vs

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

overview
Primary model
Key-Value
Key-Value
Also supports
–
–
Type
Embedded library
Embedded library
Status
Active
Active
Developer
D. J. Bernstein
Symas Corporation / OpenLDAP Project
First release
1996
2011
Latest version
20251021 (Oct 21, 2025)
1.0.2 (Sep 8, 2026)
License
Open source (permissive)Public domain
Open source (permissive)OpenLDAP Public License 2.8
Free tier
✓
✓
popularity
WhichDB Score
3.5
39.7
Rank
#434
#47
GitHub stars
–
3.1K
Stack Overflow questions
–
260
scale & guarantees
Comfortable data size
Small (≤ 100 GB)
Medium (≤ 10 TB)
Horizontal scaling
None
None
Multi-region
None
None
ACID
Limited
Full
Consistency
Strong
Strong
Schema
Schemaless
Schemaless
Architecture
Embedded
Embedded
deployment
Self-hosted
✓
✓
Vendor-managed cloud
—
—
Serverless
—
—
Embedded
✓
✓
Edge
—
—
Clouds
–
–
capabilities
Transactions
—
✓
Joins
—
—
Secondary indexes
—
—
Full-text search
—
—
Vector search
—
—
Geospatial
—
—
JSON
—
—
Change data capture
—
—
Triggers
—
—
Stored procedures
—
—
Materialized views
—
—
TTL / expiry
—
—
Pub/Sub
—
—
Columnar storage
—
—
In-memory
—
—
Durable persistence
✓
✓
Compression
—
—
Encryption at rest
—
—
Role-based access
—
—
Time travel
—
—
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
C API
C API
Client languages
C, Go, Rust, Perl, Python, Ruby, Haskell
C, C++, Python, Go, Rust, Java, JavaScript
Best for
Embedded, Coordination, Metadata
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.