Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Berkeley DB
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Software library providing embedded database for key/value data}} {{Infobox software | name = Berkeley DB | logo = | screenshot = | caption = A transactional embedded data manager for un-typed data in basic key/value data structures | collapsible = | author = [[Margo Seltzer]] and [[Keith Bostic (software engineer)|Keith Bostic]] of [[Sleepycat Software]] | developer = [[Sleepycat Software]], later [[Oracle Corporation]] | released = {{Start date and age|1994}} | latest release version = 18.1.40 <ref name="downloadpage">{{cite web |title=Oracle Berkeley DB Downloads |url=https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html |access-date=27 September 2020}}</ref> | latest release date = {{Start date and age|2020|05|29|br=yes}} | latest preview version = | latest preview date = | programming language = [[C (programming language)|C]] | operating system = [[Microsoft Windows|Windows]], [[Unix-like]] | platform = | size = ~1244 [[Kilobyte|kB]] compiled on [[Microsoft Windows|Windows]] [[x86]] | language = | genre = [[Embedded database]], [[NoSQL|NoSQL Database]] | license = [[Dual licensing|Dual licensed]] ([[GNU Affero General Public License]] and [[Proprietary software|proprietary license]] | website = {{URL|https://www.oracle.com/database/technologies/related/berkeleydb.html}} }} '''Berkeley DB''' ('''BDB''') is an [[embedded database]] [[software]] [[Library (computing)|library]] for [[Key–value database|key/value]] data, historically significant in [[open-source software]]. Berkeley DB is written in [[C (programming language)|C]] with API bindings for many other [[programming language]]s. 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]],<ref>[http://doc.gnu-darwin.org/intro/dbisnot.html Berkeley DB Reference Guide: What is Berkeley DB not?]. Doc.gnu-darwin.org (2001-05-31). Retrieved on 2013-09-18.</ref> although it has database features including [[database transaction]]s, [[multiversion concurrency control]] and [[write-ahead logging]]. BDB runs on a wide variety of [[operating system]]s, including most [[Unix-like]] and [[Microsoft Windows|Windows]] systems, and [[real-time operating system]]s. BDB was commercially supported and developed by [[Sleepycat Software]] from 1996 to 2006. Sleepycat Software was acquired by [[Oracle Corporation]] in February 2006, who continued to develop and sell the C Berkeley DB library. In 2013 Oracle re-licensed BDB under the [[AGPL 3|AGPL]] license<ref>{{Cite web |date=2013-06-10 |title=Major Release: Berkeley DB 12gR1 (12.1.6.0) |url=https://oss.oracle.com/pipermail/bdb/2013-June/000056.html |url-status=live |archive-url=https://web.archive.org/web/20131205045329/https://oss.oracle.com/pipermail/bdb/2013-June/000056.html |archive-date=2013-12-05 |access-date=2021-04-11 |website=Open Source Projects at Oracle}}</ref><ref>{{Cite web |last=Nathan |first=Willis |date=2013-07-10 |title=Debian, Berkeley DB, and AGPLv3 |url=https://lwn.net/Articles/557820/ |url-status=live |website=[[Linux Weekly News]] |archive-url=https://web.archive.org/web/20130722163022/http://lwn.net:80/Articles/557820/ |archive-date=2013-07-22 }}</ref> and released new versions until May 2020. [[Bloomberg L.P.]] continues to develop a [[Fork (software development)|fork]] of the 2013 version of BDB within their [[Comdb2]] database, under the original [[Sleepycat license|Sleepycat permissive license]]. ==Origin== Berkeley DB originated at the [[University of California, Berkeley]] as part of [[Berkeley Software Distribution|BSD]], Berkeley's version of the [[Unix]] operating system. After 4.3BSD (1986), the BSD developers attempted to remove or replace all code originating in the original [[AT&T Corporation|AT&T]] Unix from which BSD was derived. In doing so, they needed to rewrite the Unix database package.<ref name="freenix">{{cite conference |last1=Olson |first1=Michael A. |last2=Bostic |first2=Keith |last3=Seltzer |first3=Margo |title=Berkeley DB |book-title=Proc. FREENIX Track, USENIX Annual Tech. Conf. |year=1999 |url=http://www.usenix.org/events/usenix99/full_papers/olson/olson.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.usenix.org/events/usenix99/full_papers/olson/olson.pdf |archive-date=2022-10-09 |url-status=live |access-date=October 20, 2009}}</ref> Seltzer and Yigit<ref>{{cite conference |last1=Seltzer |first1=Margo |last2=Yigit |first2=Ozan |title=A New Hashing Package for UNIX |book-title=Proc. USENIX Winter Tech. Conf. |year=1991 |url=http://www.eecs.harvard.edu/margo/papers/usenix91/paper.ps |access-date=October 20, 2009}}</ref> created a new database, unencumbered by any AT&T patents: an on-disk [[hash table]] that outperformed the existing [[DBM (computing)|dbm]] libraries. Berkeley DB itself was first released in 1991 and later included with 4.4BSD.{{r|freenix}} In 1996 [[Netscape]] requested that the authors of Berkeley DB improve and extend the library, then at version 1.86, to suit Netscape's requirements for an [[LDAP]] server<ref>{{cite news |last=Brunelli |first=Mark |url=http://searchenterpriselinux.techtarget.com/originalContent/0,289142,sid39_gci1071880,00.html |title=A Berkeley DB primer |journal=Enterprise Linux News |date=March 28, 2005 |access-date=December 28, 2008 |archive-date=September 6, 2008 |archive-url=https://web.archive.org/web/20080906125402/http://searchenterpriselinux.techtarget.com/originalContent/0,289142,sid39_gci1071880,00.html |url-status=dead }}</ref> and for use in the [[Netscape (web browser)|Netscape browser]]. That request led to the creation of [[Sleepycat Software]]. This company was acquired by [[Oracle Corporation]] in February 2006.<ref>{{Cite web |title=Getting To Know Berkeley DB Java Edition |url=https://objectcomputing.com/resources/publications/sett/november-2006-getting-to-know-berkeley-db-java-edition |access-date=2025-03-07 |website=objectcomputing.com |language=en}}</ref> 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.{{Cn|date=March 2025}} Starting with the 6.0.21 (Oracle 12c) release, all Berkeley DB products are licensed under the [[GNU Affero General Public License|GNU AGPL]].<ref>[https://oss.oracle.com/pipermail/bdb/2013-June/000056.html [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.)</ref><ref>{{cite web| url = https://build.opensuse.org/package/show/devel:libraries:c_c++/libdb-6_0?rev=2| title = Snapshot of the 6.0.19 source at the time| date = 13 June 2013}}</ref> Previously, Berkeley DB was redistributed under the 4-clause [[BSD license]] (before version 2.0), and the Sleepycat Public License, which is an [[Open Source Initiative|OSI]]-approved [[open-source license]] as well as an [[Free Software Foundation|FSF]]-approved [[free software license]].<ref>{{cite web|url=http://www.opensource.org/licenses/sleepycat.php |title=The Sleepycat License | publisher=[[Open Source Initiative]] |date=October 31, 2006 |access-date=December 28, 2008}}</ref><ref>{{cite web |url=http://www.fsf.org/licensing/licenses/index_html#GPLCompatibleLicenses |title=Licenses |publisher=[[Free Software Foundation]] |date=December 10, 2008 |access-date=December 28, 2008 |url-status=dead |archive-url=https://web.archive.org/web/20081216005913/http://www.fsf.org/licensing/licenses/index_html#GPLCompatibleLicenses |archive-date=December 16, 2008 }}</ref> The product ships with complete source code, build script, test suite, and documentation. The comprehensive feature along with the licensing terms have led to its use in a multitude of [[free and open-source software]]. Those who do not wish to abide by the terms of the GNU AGPL, or use an older version with the Sleepycat Public License, have the option of purchasing another [[proprietary software license|proprietary license]] for redistribution from [[Oracle Corporation]]. This technique is called [[Dual license|dual licensing]]. Berkeley DB includes compatibility interfaces for some historic Unix database libraries: [[DBM (computing)|dbm]], ndbm and hsearch (a [[UNIX System V|System V]] and [[POSIX]] library for creating in-memory [[hash table]]s).<ref>{{Cite web|url=https://docs.oracle.com/cd/E17276_01/html/programmer_reference/program_compatible.html|title=Compatibility with historic UNIX interfaces|website=docs.oracle.com|access-date=2019-11-20}}</ref> ==Architecture== Berkeley DB has an architecture notably simpler than [[relational database management system]]s. Like [[SQLite]] and [[Lightning Memory-Mapped Database|LMDB]], it is not based on a [[Client–server model|server/client]] model, and does not provide support for network access{{snd}} programs access the database using in-process [[Application programming interface|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).<ref>{{cite web|title=Twitter / Gregory Burd: @humanications We didn't r ...|url=https://twitter.com/gregburd/statuses/10979336891}}</ref> 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 [[ACID]] [[Database transaction|transactions]], fine-grained [[Lock (computer science)|locking]], hot [[backup]]s and [[replication (computer science)|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:<ref>{{cite web| url = https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html| title = Oracle Berkeley DB Downloads: Latest Production Releases}}</ref> # Berkeley DB, the C database library that is the subject of this article # Berkeley DB Java Edition,<ref>{{Cite web|title=Oracle Berkeley DB Java Edition|url=https://www.oracle.com/database/berkeley-db/java-edition.html|url-status=live|archive-url=https://web.archive.org/web/20170711100315/https://www.oracle.com/database/berkeley-db/java-edition.html |archive-date=2017-07-11 }}</ref> a pure Java library whose design is modelled after the C library but is otherwise unrelated # Berkeley DB XML,<ref>{{Cite web|title=Berkeley DB XML|url=https://www.oracle.com/database/berkeley-db/xml.html|url-status=live|archive-url=https://web.archive.org/web/20160718014819/https://www.oracle.com/database/berkeley-db/xml.html |archive-date=2016-07-18 }}</ref> 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|licensing section]]). Notable software that still uses Berkeley DB for data storage include: * [[Bogofilter]] – A free/open-source [[spam (email)|spam]] filter that saves its wordlists using Berkeley DB by default.<ref>{{Cite web |title=bogofilter -- Fast Bayesian Spam Filter Code (Git) |url=https://sourceforge.net/p/bogofilter/git/ci/main/tree/bogofilter/README |access-date=2024-05-17 |website=sourceforge.net}}</ref> * [[Citadel/UX]] – A [[collaborative software]] (messaging and groupware) that is directly descended from the [[Citadel (software)|Citadel]] family of programs, which became popular in the 1980s and 1990s as a [[bulletin board system]] platform. * [[Sendmail]] – A free/open-source [[Message transfer agent|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 (programming language)|Python]] still support old BerkelyDB interfaces. The [[FreeBSD]] and [[OpenBSD]] operating systems ship Berkeley DB 1.8x to support the <code>dbopen()</code><ref name="FreeBSD Manual Pages">{{cite web | title=dbopen(3) | website=FreeBSD Manual Pages | url=https://man.freebsd.org/cgi/man.cgi?query=dbopen&sektion=3&apropos=0&manpath=FreeBSD+13.1-RELEASE+and+Ports | access-date=2023-04-18}}</ref><ref name="dbopen(3)">{{cite web | title=OpenBSD manual pages | website=dbopen(3) | url=https://man.openbsd.org/dbopen.3 | access-date=2023-04-18}}</ref> operating system call used by password programs such as <code>pwb_mkdb</code>.<ref name="OpenBSD manual pages">{{cite web | title=pwd_mkdb(8) | website=OpenBSD manual pages | url=https://man.openbsd.org/pwd_mkdb | access-date=2023-04-18}}</ref> Linux operating systems, including those based on Debian,<ref name="Webmaster">{{cite web | last=Webmaster | first=Debian | title=Debian -- Details of package libdb5.3 in sid | website=Debian -- Packages | url=https://packages.debian.org/en/sid/amd64/libdb5.3 | access-date=2023-04-18}}</ref> and Fedora<ref name="src.fedoraproject.org">{{cite web | title=Overview - rpms/libdb | website=src.fedoraproject.org | url=https://src.fedoraproject.org/rpms/libdb | access-date=2023-04-18}}</ref> ship Berkeley DB 5.3 libraries. ==Licensing== Berkeley DB V2.0 and higher is available under a [[dual license]]: # Oracle commercial license <ref>{{cite web|url=http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html|title=Download, license and sales information|date=Nov 30, 2017}}</ref> # Open source license #* Berkeley DB #** V2.0 - V6.0.19 is licensed under the [[Sleepycat License]] #** V6.0.20 and newer is licensed under the [[GNU Affero General Public License|GNU AGPL v3]].<ref>{{cite web|url=https://oss.oracle.com/pipermail/bdb/2013-June/000056.html|title=Major Release: Berkeley DB 12gR1 (12.1.6.0)|date=June 10, 2013|access-date=July 15, 2013}}</ref> Switching the open source license in 2013 from the [https://opensource.org/licenses/Sleepycat 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|Debian Linux]] was typical in their decision to completely phase out Berkeley DB, with a preference for the [[Lightning Memory-Mapped Database]] (LMDB).<ref>{{cite mailing list | url=https://lists.debian.org/debian-devel/2014/06/msg00338.html | title=New project goal: Get rid of Berkeley DB (post jessie) | mailing-list=debian-devel | date=June 19, 2014 | author=Ondřej Surý |publisher=[[Debian]]}}</ref> == See also == * [[VSAM]] ==References== {{Reflist|30em}} ==External links== {{Portal|Free and open-source software}} * [http://www.oracle.com/database/technologies/related/berkeleydb.html Oracle Berkeley DB] * [https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html Oracle Berkeley DB Downloads] * [http://docs.oracle.com/en/database/other-databases/ Oracle Berkeley DB Documentation] * [http://www.oracle.com/technetwork/products/berkeleydb/downloads/licensing-098979.html Oracle Berkeley DB Licensing Information] * [http://omtco.eu/references/oracle/top-60-licensing-pitfalls-for-oracle-databases-and-oracle-technology-products/ Licensing pitfalls for Oracle Technology Products] * [http://omtco.eu/references/oracle/ Oracle Licensing Knowledge Net] * [https://web.archive.org/web/20100131071155/http://www.apress.com/book/view/9781590596722 ''The Berkeley DB Book'' by Himanshu Yadava] {{Oracle}} {{Oracle FOSS}} {{DEFAULTSORT:Berkeley Db}} [[Category:Database engines]] [[Category:Database-related software for Linux]] [[Category:Embedded databases]] [[Category:Free database management systems]] [[Category:Free software programmed in C]] [[Category:Key-value databases]] [[Category:NoSQL]] [[Category:Oracle software]] [[Category:Structured storage]] [[Category:Software using the GNU Affero General Public License]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite conference
(
edit
)
Template:Cite mailing list
(
edit
)
Template:Cite news
(
edit
)
Template:Cite web
(
edit
)
Template:Cn
(
edit
)
Template:Infobox software
(
edit
)
Template:Oracle
(
edit
)
Template:Oracle FOSS
(
edit
)
Template:Portal
(
edit
)
Template:R
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Snd
(
edit
)