MapDB
maintenanceby Jan Kotek · since 2012 · also known as Map<D,B>, JDBM4
Embedded Java database exposing concurrent Maps, Sets and Queues backed by disk or off-heap memory.
maintenance. Last release 3.1.0 (Jan 2024); 2026 activity is dependency pinning and CVE fixes on the 3.1 branch, with no new feature releases.
Overview
MapDB, by Jan Kotek, is an embedded storage engine for the JVM that hands you familiar java.util collections (HTreeMap, BTreeMap, sets, queues) persisted to a file, to memory-mapped storage or to off-heap memory outside the garbage-collected heap. It grew out of the JDBM project in 2012, and the 3.x line is written in Kotlin and Java. Optional write-ahead-log transactions, snapshots, entry expiration with size or time limits and overflow from memory to disk make it popular as a local cache, an off-heap buffer or a simple embedded key-value store. The last feature release is 3.1.0 (January 2024); 2026 commits on the 3.1 branch only pin dependencies and patch CVEs, so treat it as stable but in maintenance.
Strengths & trade-offs
Strengths
- +Drop-in persistent replacements for java.util Map, Set and Queue
- +Off-heap storage keeps large data out of GC pressure
- +Expiration by time or size plus disk overflow for cache use
- +Single dependency, Apache-licensed, widely used in JVM projects
Trade-offs
- −No feature release since January 2024; maintenance-only
- −Transactions are optional and limited; no query language or secondary indexes
- −Historic format changes between 1.x, 2.x and 3.x complicate upgrades
Great for
- +Local persistent caches and off-heap buffers in Java services
- +Embedded key-value storage in desktop or Android apps
- +Spilling large in-memory collections to disk
Think twice for
- −Multi-process or networked access
- −Workloads needing SQL, secondary indexes or strong durability guarantees
Capabilities
Native or official first-party support · 4 of 25 tracked
Scale & consistency
- Comfortable data size
- Small · ≤ 100 GB
- Horizontal scaling
- None
- Multi-region
- No
- Transactions
- Limited ACID
- Consistency
- Strong
- Schema
- Schemaless
- Architecture
- Embedded, In memory
- Query languages
- Java collections API
Single JVM; stores can grow to large files on disk.
Deployment
Ecosystem
Alternatives to MapDB
Meta's embeddable LSM-tree key-value engine, the storage layer under dozens of databases.
mapdb vs rocksdb →Tiny memory-mapped B+tree with ACID transactions and lock-free readers; reached 1.0 in 2026.
mapdb vs lmdb →Fast pure-Java SQL engine for embedded, in-memory and test databases, with compatibility modes.
mapdb vs h2 →The standard embedded JVM cache, with heap, off-heap and disk tiers and optional Terracotta clustering.
mapdb vs ehcache →Off-heap, memory-mapped key-value store for Java with microsecond latency and cross-process sharing.
mapdb vs chronicle-map →The 1990s-era embedded key-value library, now Oracle-owned, AGPL-licensed and rarely updated.
mapdb vs berkeley-db →MapDB FAQ
What is MapDB?
MapDB is a key-value database by Jan Kotek, first released in 2012. MapDB, by Jan Kotek, is an embedded storage engine for the JVM that hands you familiar java.util collections (HTreeMap, BTreeMap, sets, queues) persisted to a file, to memory-mapped storage or to off-heap memory outside the garbage-collected heap. It grew out of the JDBM project in 2012, and the 3.x line is written in Kotlin and Java. Optional write-ahead-log transactions, snapshots, entry expiration with size or time limits and overflow from memory to disk make it popular as a local cache, an off-heap buffer or a simple embedded key-value store. The last feature release is 3.1.0 (January 2024); 2026 commits on the 3.1 branch only pin dependencies and patch CVEs, so treat it as stable but in maintenance.
Is MapDB open source?
Yes. MapDB is open source. License: Apache License 2.0.
Does MapDB support ACID transactions?
Partly. MapDB offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.
Does MapDB scale horizontally?
MapDB does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).
How can I run MapDB?
You can self-host it and embed it in your application.
What is MapDB best for?
MapDB is a strong fit for local persistent caches and off-heap buffers in Java services; embedded key-value storage in desktop or Android apps; and spilling large in-memory collections to disk. Think twice for multi-process or networked access.
What are the best alternatives to MapDB?
Common alternatives to MapDB include RocksDB, LMDB, H2 Database, Ehcache and Chronicle Map. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
Is MapDB still maintained?
MapDB is in maintenance mode. Last release 3.1.0 (Jan 2024); 2026 activity is dependency pinning and CVE fixes on the 3.1 branch, with no new feature releases.
How popular is MapDB?
MapDB ranks #340 of 844 databases on the WhichDB Score (7.6/100), and #47 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.

