cdb vs LMDB
cdb: D. J. Bernstein's constant database: immutable on-disk hash tables with two-read lookups and atomic swaps. LMDB: Tiny memory-mapped B+tree with ACID transactions and lock-free readers; reached 1.0 in 2026.
key differences
- LMDB is built for larger datasets (≤ 10 TB) than cdb (≤ 100 GB).
- Transactions: cdb offers limited ACID; LMDB offers full.
- Only LMDB has transactions.
choose cdb for
- +Mail and DNS server lookup tables
- +Read-only configuration or routing maps rebuilt in batches
- +Static key/value datasets shipped with an application
best at · Embedded, Coordination, Metadata
choose lmdb for
- +Read-heavy embedded indexes and caches
- +Directory services (OpenLDAP back-mdb)
- +Blockchain and wallet state
- +ML dataset storage with fast random reads
best at · Embedded, Metadata, Local-first
cdb vs LMDB: FAQ
What is the difference between cdb and LMDB?
cdb: D. J. Bernstein's constant database: immutable on-disk hash tables with two-read lookups and atomic swaps. LMDB: Tiny memory-mapped B+tree with ACID transactions and lock-free readers; reached 1.0 in 2026. LMDB is built for larger datasets (≤ 10 TB) than cdb (≤ 100 GB). Transactions: cdb offers limited ACID; LMDB offers full. Only LMDB has transactions.
When should I choose cdb over LMDB?
Choose cdb for mail and DNS server lookup tables; read-only configuration or routing maps rebuilt in batches; and static key/value datasets shipped with an application. Choose LMDB for read-heavy embedded indexes and caches; directory services (OpenLDAP back-mdb); and blockchain and wallet state.
Is cdb or LMDB more popular?
LMDB ranks #47 on the WhichDB Score (39.7/100) and cdb ranks #434 (3.5/100). Popularity is not fit: check the requirements that matter for your project.
Are cdb and LMDB open source?
Yes. cdb is open source. License: Public domain. Yes. LMDB is open source. License: OpenLDAP Public License 2.8.