The database uses Berkeley DB Transactional Data Store for storing the fakefs virtual filesystem metadata. The BD-TDS supports concurrent access, transactions, and the ACID database properties.
The text of small files can be stored in a Berkeley DB table as simple key values. Larger files are stored in a directory structure outside of Berkeley DB.