[go: up one dir, main page]

dBM (computing)

This is an old revision of this page, as edited by Xhienne (talk | contribs) at 20:53, 2 September 2017 (WP:SPAM See discussion in talk page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The dbm library was a simple database engine, originally written by Ken Thompson and released by AT&T in 1979. The name is a three letter acronym for DataBase Manager, and can also refer to the family of database engines with APIs and features derived from the original dbm.

The dbm library stores arbitrary data by use of a single key (a primary key) in fixed-size buckets and uses hashing techniques to enable fast retrieval of the data by key.

The hashing scheme used is a form of extendible hashing, so that the hashing scheme expands as new buckets are added to the database, meaning that, when nearly empty, the database starts with one bucket, which is then split when it becomes full. The two resulting child buckets will themselves split when they become full, so the database grows as keys are added.

The dbm library and its derivatives are pre-relational databases – they manage associative arrays, implemented as on-disk hash tables. In practice, they can offer a more practical solution for high-speed storage accessed by key, as they do not require the overhead of connecting and preparing queries. This is balanced by the fact that they can generally only be opened for writing by a single process at a time. An agent daemon can handle requests from multiple processes, but introduces IPC overhead.

Successors

The dbm library has had many successors, such as:

  • Ndbm: In 1986 Berkeley produced ndbm (standing for New Database Manager). This added support for having multiple databases open concurrently.
  • Sdbm: Some versions of Unix excluded ndbm due to licensing issues, so in 1987 Ozan Yigit produced this public-domain clone.[1]
  • BDB: 1991 successor to ndbm by Sleepycat Software (now Oracle) created to get around the AT&T Unix copyright on BSD.
  • GDBM (GNU dbm): A Free/Libre version written by Philip A. Nelson for the GNU project. It added support for arbitrary-length data in the database: previously all data had a fixed maximum length.[2][3] The latest version was released on 11 March 2017.[4]
  • QDBM (Quick Database Manager): "an embedded database library compatible with GDBM and NDBM. It features hash database and B+ tree database."[5]
  • tdb (trivial database library): developed and used internally within the Samba suite, implements an API inspired by GDBM but also supports multiple writers, released under the LGPL license.[6]
  • tdbm: a version of ndbm with atomic transactions, in-memory databases, and other extensions, released under a BSD-style open source license.[7]
  • MDBM: Ndbm work-alike hashed database library based on sdbm which is based on Per-Aake Larson's Dynamic Hashing algorithms.[8][9]
  • Tokyo Cabinet and Kyoto Cabinet: C and C++ implementations employing hash table, B+ tree, or fixed-length array structures by FAL Labs.
  • LMDB: copy-on-write memory-mapped B+ tree implementation in C with a dbm-style API.

See also

References

  1. ^ Seltzer & Yigit. "A New Hashing Package for Unix" (PDF).
  2. ^ "Gdbm - Free Software Directory".
  3. ^ "GDBM".
  4. ^ « gdbm-1.13 released », lists.gnu.org, 11 March 2017.
  5. ^ "QDBM - Free Software Directory".
  6. ^ "tdb: Main Page".
  7. ^ "tdbm - a simple, high-performance database with nested atomic transactions".
  8. ^ "yahoo/mdbm".
  9. ^ "MDBM Documentation — MDBM Documentation".

General