Berkeley DB

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Berkeley DB
Design by Many developers at Oracle Corporation
Developed by Oracle Corporation
Latest release 4.7.25 / 2008-05-20; 318 days ago
Written in C with APIs for most other languages
Operating system Unix, Linux, Windows, AIX, Sun Solaris, SCO Unix, Mac OS
Size ~700KB compiled on x86
Development status production
Type Database
License Sleepycat License

Berkeley DB (BDB) is a computer software library that provides a high-performance embedded database, with bindings in C, C++, Java, Perl, Python, Ruby, Tcl, Smalltalk, and most other programming languages. BDB stores arbitrary key/data pairs as byte arrays, and supports multiple data items for a single key. BDB can support thousands of simultaneous threads of control or concurrent processes manipulating databases as large as 256 terabytes, on a wide variety of operating systems including most Unix-like and Windows systems, and real-time operating systems.


[edit] Origin

Berkeley DB originated at the University of California, Berkeley as part of the transition (1986 to 1994) from BSD 4.3 to 4.4 and of the effort to remove AT&T-encumbered code. In 1996 Netscape requested that the authors of Berkeley DB to improve and extend the library, then at version 1.86, to suit Netscape's requirements for an LDAP server[1] and for use in the Netscape browser. That request led to the creation of Sleepycat Software, subsequently acquired by Oracle Corporation in February 2006. Berkeley DB is redistributed under the Sleepycat Public License, an OSI- and FSF-approved license.[2][3] The product ships with complete source code, build tools, test suite, and documentation. The code quality and general utility along with the free software/open source license has led to its use in a multitude of free software/open source programs. Those who don't wish to abide by the terms of the Sleepycat Public License have the option of purchasing another proprietary license for redistribution from Oracle Corporation. This technique is called dual licensing.

Berkeley DB includes compatibility interfaces for some historic UNIX database libraries: dbm, ndbm and hsearch.

[edit] Architecture

Berkeley DB has an architecture notably more simple than that of other database systems like Microsoft SQL Server and Oracle. For example, it does not provide support for network access — programs access the database using in-process API calls. It does not support SQL or any other query language, nor does it support table schemas or table columns. 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.

Despite having a simple architecture, Berkeley DB supports many advanced database features such as ACID transactions, fine-grained locking, hot backups and replication.

[edit] Editions

Berkeley DB comes in three different editions:

  1. Berkeley DB
  2. Berkeley DB Java Edition
  3. Berkeley XML DB

Each edition has separate database libraries, despite the common branding. The first is the traditional Berkeley DB, written in C.

Berkeley DB Java Edition comprises a pure Java database. Its design resembles that of Berkeley DB without replicating it exactly. It does not offer all the features that traditional Berkeley DB has. However, it has the advantage of being written in pure Java, not requiring any native code; it also has a different architecture, which gives it different performance and concurrency characteristics, which may be advantageous or dis-advantageous depending on the application. It provides two APIs -- one which is based on the Java Collections Framework (an object persistence approach); and one based on the traditional Berkeley DB API. Note that traditional Berkeley DB also supports a Java API, but it does so via JNI and thus requires an installed native library.

The Berkeley XML DB database specialises in the storage of XML documents, supporting XQuery queries. It is implemented as an additional layer on top of Berkeley DB. It supports multiple language bindings, including C and Java (although the latter uses JNI and thus is not a pure Java solution).

[edit] Programs that use Berkeley DB

Berkeley DB provides the underlying storage and retrieval system of several LDAP servers, database systems, and many other proprietary and free/open source applications. Notable programs that use Berkeley DB for data storage include:

[edit] Licensing

Oracle Corporation makes versions 2.0 and higher of Berkeley DB available under a dual license.[4] This license is a 2-clause BSD license with an additional copyleft clause similar to the GNU GPL version 2's Section 3, requiring source code of an application using Berkeley DB to be made available for a nominal fee.

Thus, the license depends on how a particular application that uses Berkeley DB is distributed to the public. Software that is not distributed can use the Sleepycat License, as can free software. Proprietary software can use Berkeley DB only under a commercial license agreement between Oracle and the application's publisher.

[edit] External links

[edit] References

  1. ^ Brunelli, Mark (March 28, 2005). "A Berkeley DB primer". Enterprise Linux News.,289142,sid39_gci1071880,00.html. Retrieved on December 28, 2008. 
  2. ^ "The Sleepycat License". Open Source Initiative. October 31, 2006. Retrieved on December 28, 2008. 
  3. ^ "Licenses". Free Software Foundation. December 10, 2008. Retrieved on December 28, 2008. 
  4. ^ "Open Source License for Berkeley DB". Oracle Corporation. Retrieved on December 28, 2008. "For a license to use the Berkeley DB software under conditions other than those described here, or to purchase support for this software, please contact" 
Personal tools