Berkeley DB

Source: Wikipedia, the free encyclopedia.
Berkeley DB
Original author(s)Margo Seltzer and Keith Bostic of Sleepycat Software
Developer(s)Sleepycat Software, later Oracle Corporation
Initial release1994; 30 years ago (1994)
Stable release
18.1.40 [1] / May 29, 2020;
4 years ago
 (2020-05-29)
Written in
Websitewww.oracle.com/database/technologies/related/berkeleydb.html

Berkeley DB (BDB) is an embedded database software library for key/value data, historically significant in open-source software. Berkeley DB is written in C with API bindings for many other programming languages. BDB stores arbitrary key/data pairs as byte arrays and supports multiple data items for a single key. Berkeley DB is not a relational database,[2] although it has database features including database transactions, multiversion concurrency control and write-ahead logging. BDB runs on a wide variety of operating systems, including most Unix-like and Windows systems, and real-time operating systems.

BDB was commercially supported and developed by

Sleepycat permissive license
.

Origin

Berkeley DB originated at the

LDAP server[7] and for use in the Netscape browser. That request led to the creation of Sleepycat Software. This company was acquired by Oracle Corporation
in February 2006.

Berkeley DB 1.x releases focused on managing key/value data storage and are referred to as "Data Store" (DS). The 2.x releases added a locking system enabling concurrent access to data. This is what is known as "Concurrent Data Store" (CDS). The 3.x releases added a logging system for transactions and recovery, called "Transactional Data Store" (TDS). The 4.x releases added the ability to replicate log records and create a distributed highly available single-master multi-replica database. This is called the "High Availability" (HA) feature set. Berkeley DB's evolution has sometimes led to minor API changes or log format changes, but very rarely have database formats changed. Berkeley DB HA supports online upgrades from one version to the next by maintaining the ability to read and apply the prior release's log records.

Starting with the 6.0.21 (Oracle 12c) release, all Berkeley DB products are licensed under the

dual licensing
.

Berkeley DB includes compatibility interfaces for some historic Unix database libraries: dbm, ndbm and hsearch (a System V and POSIX library for creating in-memory hash tables).[12]

Architecture

Berkeley DB has an architecture notably simpler than

API calls. Oracle added support for SQL in 11g R2 release based on the popular SQLite API by including a version of SQLite in Berkeley DB (it uses Berkeley DB for storage).[13]

A program accessing the database is free to decide how the data is to be stored in a record. Berkeley DB puts no constraints on the record's data. The record and its key can both be up to four gigabytes long.

Berkeley DB supports database features such as

replication
.

Oracle Corporation use of name "Berkeley DB"

The name "Berkeley DB" is used by Oracle Corporation for three different products, only one of which is BDB:[14]

  1. Berkeley DB, the C database library that is the subject of this article
  2. Berkeley DB Java Edition,[15] a pure Java library whose design is modelled after the C library but is otherwise unrelated
  3. Berkeley DB XML,[16] a C++ program that supports XQuery, and which includes a legacy version of the C database library

Open-source programs still using Berkeley DB

BDB was once very widespread, but usage dropped steeply from 2013 (see licensing section). Notable software that still uses Berkeley DB for data storage include:

  • spam filter that saves its wordlists using Berkeley DB by default.[17]
  • Citadel/UX – A collaborative software (messaging and groupware) that is directly descended from the Citadel family of programs, which became popular in the 1980s and 1990s as a bulletin board system platform.
  • Sendmail – A free/open-source MTA, first released in 1983 for Linux/Unix systems.
  • Spamassassin
    – A free/open-source anti-spam application.

Open-source operating systems and languages such as Perl and Python still support old BerkelyDB interfaces. The FreeBSD and OpenBSD operating systems ship Berkeley DB 1.8x to support the dbopen()[18][19] operating system call used by password programs such as pwb_mkdb.[20] Linux operating systems, including those based on Debian,[21] and Fedora[22] ship Berkeley DB 5.3 libraries.

Licensing

Berkeley DB V2.0 and higher is available under a

dual license
:

  1. Oracle commercial license [23]
  2. The GNU AGPL v3.[24]

Switching the open source license in 2013 from the Sleepycat license to the AGPL had a major effect on open source software. Since BDB is a library, any application linking to it must be under an AGPL-compatible license. Many open source applications and all closed source applications would need to be relicensed to become AGPL-compatible, which was not acceptable to many developers and open source operating systems. By 2013 there were many alternatives to BDB, and Debian Linux was typical in their decision to completely phase out Berkeley DB, with a preference for the Lightning Memory-Mapped Database (LMDB).[25]

References

  1. ^ "Oracle Berkeley DB Downloads". Retrieved 27 September 2020.
  2. ^ Berkeley DB Reference Guide: What is Berkeley DB not?. Doc.gnu-darwin.org (2001-05-31). Retrieved on 2013-09-18.
  3. ^ "Major Release: Berkeley DB 12gR1 (12.1.6.0)". Open Source Projects at Oracle. 2013-06-10. Archived from the original on 2013-12-05. Retrieved 2021-04-11.
  4. Linux Weekly News. Archived
    from the original on 2013-07-22.
  5. ^ a b Olson, Michael A.; Bostic, Keith; Seltzer, Margo (1999). "Berkeley DB" (PDF). Proc. FREENIX Track, USENIX Annual Tech. Conf. Archived (PDF) from the original on 2022-10-09. Retrieved October 20, 2009.
  6. ^ Seltzer, Margo; Yigit, Ozan (1991). "A New Hashing Package for UNIX". Proc. USENIX Winter Tech. Conf. Retrieved October 20, 2009.
  7. ^ Brunelli, Mark (March 28, 2005). "A Berkeley DB primer". Enterprise Linux News. Archived from the original on September 6, 2008. Retrieved December 28, 2008.
  8. ^ [Berkeley DB Announce] Major Release: Berkeley DB 12gR1 (12.1.6.0). Retrieved July 5, 2013. (Despite AGPL mentions there, the source archive still declares BSD-4-Clause terms in 6.0.19.)
  9. ^ "Snapshot of the 6.0.19 source at the time". 13 June 2013.
  10. ^ "The Sleepycat License". Open Source Initiative. October 31, 2006. Retrieved December 28, 2008.
  11. ^ "Licenses". Free Software Foundation. December 10, 2008. Archived from the original on December 16, 2008. Retrieved December 28, 2008.
  12. ^ "Compatibility with historic UNIX interfaces". docs.oracle.com. Retrieved 2019-11-20.
  13. ^ "Twitter / Gregory Burd: @humanications We didn't r ..."
  14. ^ "Oracle Berkeley DB Downloads: Latest Production Releases".
  15. ^ "Oracle Berkeley DB Java Edition". Archived from the original on 2017-07-11.
  16. ^ "Berkeley DB XML". Archived from the original on 2016-07-18.
  17. ^ "bogofilter -- Fast Bayesian Spam Filter Code (Git)". sourceforge.net. Retrieved 2024-05-17.
  18. ^ "dbopen(3)". FreeBSD Manual Pages. Retrieved 2023-04-18.
  19. ^ "OpenBSD manual pages". dbopen(3). Retrieved 2023-04-18.
  20. ^ "pwd_mkdb(8)". OpenBSD manual pages. Retrieved 2023-04-18.
  21. ^ Webmaster, Debian. "Debian -- Details of package libdb5.3 in sid". Debian -- Packages. Retrieved 2023-04-18.
  22. ^ "Overview - rpms/libdb". src.fedoraproject.org. Retrieved 2023-04-18.
  23. ^ "Download, license and sales information". Nov 30, 2017.
  24. ^ "Major Release: Berkeley DB 12gR1 (12.1.6.0)". June 10, 2013. Retrieved July 15, 2013.
  25. ^ Ondřej Surý (June 19, 2014). "New project goal: Get rid of Berkeley DB (post jessie)". debian-devel (Mailing list). Debian.

External links