Berkeley DB
maang.io System Design Series
Berkeley DB is a database that runs inside your process — a library, not a server. It offers pluggable access methods (B-tree, hash, queue) and full ACID transactions via write-ahead logging and locking. Understanding it illuminates the whole category of embedded stores and sets up its LSM-based successors like RocksDB.
This deep dive comes in three parts:
- Foundations & Core Concepts — the embedded model, access methods, and environments.
- Internals — the page cache, transactions/WAL, locking, and replication, with worked numbers.
- Interview — Staff/Principal Q&A: when to embed a database and B-tree vs LSM successors.