Freedom251 › Embedded Databases
Tkrzw

What Tkrzw is
Tkrzw is a free, Apache-2.0 C++ library implementing DBM for key-value records stored in files. It supplies file-backed hash, B+ tree, and skip-list databases, plus in-memory hash, B+ tree, cache, and standard-container options. A shared interface sets, retrieves, removes, and iterates records, and the database classes are documented as thread-safe for simultaneous access. Polymorphic, sharding, and asynchronous adapters extend the storage layer, while file and in-memory secondary indexes support lookup designs. Official bindings cover Python, Java, Ruby, and Go alongside C++. Python requires version 3.6 or later and prior Tkrzw installation; Java requires JDK 9 or later and prior installation. HashDBM documents ZLib, ZStd, LZ4, and LZMA compression, with RC4 and AES cipher options. Linux, macOS, Windows, and self-hosted deployments are supported. Unix-like builds use GCC 7.3 or later or Clang and GNU make; Windows builds use Visual Studio 2019 with C++ components. Open databases must be explicitly closed to avoid corruption.
Who it suits
Tkrzw suits developers building embedded or self-hosted key-value storage in C++ or its supported language bindings. It is appropriate when file-backed and in-memory database structures are needed.
What it does well
- Multiple file-backed and in-memory database types
- Thread-safe classes for simultaneous access
- Python, Java, Ruby, and Go bindings
- Secondary indexes and database adapters included
- Compression and AES or RC4 options documented
What to know first
- Python binding requires Python 3.6 or later
- Java binding requires JDK 9 or later
- Tkrzw must be installed before language bindings
- Opened databases must be explicitly closed
Verdict
Tkrzw provides a broad DBM toolkit with several storage structures, adapters, indexes, and language interfaces. Build prerequisites and careful database closing are important operational considerations.
Facts from Tkrzw's own pages
- Build tools
- The README specifies GCC 7.3 or later, Clang, GNU make, and standard tools for Unix-like builds, and Visual Studio 2019 with C++ components for Windows builds. · github.com, 8 Oct 2026
- Compression and encryption
- HashDBM documents record compression options ZLib, ZStd, LZ4, and LZMA, and cipher options RC4 and AES. · dbmx.net, 8 Oct 2026
- Concurrency
- The API documentation says all database classes are thread-safe for simultaneous access by multiple threads. · dbmx.net, 8 Oct 2026
- Core operations
- The shared database interface supports setting, retrieving, and removing records, and iterating through records. · dbmx.net, 8 Oct 2026
- Data structures
- It provides file based hash, B+ tree, and skip list databases, plus several in-memory database implementations. · dbmx.net, 8 Oct 2026
- Indexes
- Tkrzw includes file and in-memory secondary index implementations and adapters. · dbmx.net, 8 Oct 2026
- Indexes and adapters
- The library includes polymorphic and sharding database adapters, an asynchronous adapter, and file and in-memory secondary index implementations. · dbmx.net, 8 Oct 2026
- Java requirement
- The Java binding documentation requires JDK 9 or later and says to install Tkrzw beforehand. · dbmx.net, 8 Oct 2026
- Language bindings
- Official documentation pages provide interfaces for Python, Java, Ruby, and Go in addition to the C++ library. · dbmx.net, 8 Oct 2026
- License
- The project repository identifies the license as Apache-2.0. · github.com, 8 Oct 2026
- Operational requirement
- Opened databases must be explicitly closed to avoid data corruption. · dbmx.net, 8 Oct 2026
- Operations
- The shared database interface supports setting, retrieving, and removing records, plus iterating through records. · dbmx.net, 8 Oct 2026
- Platforms
- The project README says Tkrzw is available on UNIX-like systems including Linux, Mac OS, FreeBSD, and Solaris, and on Windows. · github.com, 8 Oct 2026
- Purpose
- Tkrzw is a C++ library that implements DBM for storing key-value records in files. · dbmx.net, 8 Oct 2026
- Python requirement
- The Python binding requires Python 3.6 or later and requires Tkrzw to be installed first. · dbmx.net, 8 Oct 2026
- Record protection options
- HashDBM supports configurable record CRC checks and lists AES and RC4 cipher modes among its record compression options. · dbmx.net, 8 Oct 2026
- Remote access
- The separate Tkrzw-RPC project provides a server and gRPC library so multiple processes can access databases managed by the server. · dbmx.net, 8 Oct 2026
- Storage types
- It provides file-backed hash, B+ tree, and skip-list databases, as well as in-memory hash, B+ tree, cache, and standard-container databases. · dbmx.net, 8 Oct 2026
- Support model
- The repository provides contribution instructions and sample code, while the opened project pages do not state a commercial support offering. · github.com, 8 Oct 2026
Where Tkrzw stands on Freedom251
- Embedded Databases#28 of 30