Chapter 25. A Hashed Database Library

Applications commonly wish to store some form of binary data in a file. Storing such data for efficient retrieval is tricky and error-prone. There are a number of libraries that provide simple APIs for storing information in files. The dbm library was an early part of Unix systems (and was later reimplemented as ndbm), which led later to the the Berkeley db library and the gdbm library from the GNU Project. All of these libraries provide easy access to files that are set up as hash tables, with a binary key providing access to a binary data region.[1]

While gdbm and Berkeley db are both widely available on Linux systems, the licenses for each of them make them unsuitable for commercial development.[2] The ...

Get Linux Application Development, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.