The DBA functions provide a single, uniform interface to a wide variety of dbm-style databases.
dbm was one of the first databases used on UNIX and UNIX-like platforms. Excellent for small applications, dbm is a lightweight database that uses a simple indexed key-value format for storing data. A variety of dbm-like databases have been developed in the years since dbm was first deployed. Often, dbm-style databases can replace flat files, offering significantly better performance and usability.
PHP supports a fair variety of dbm-style databases, including cdb, db2, db3, dbm, gdbm, and ndbm. The following list provides some details:
cdb - A fast, constant dbm-style database by D.J. Bernstein, author of the popular qmail package - http://cr.yp.to/cdb/install.html. PHP only supports read operations for cdb.
db2 and db3 - Modern dbm-style databases from SleepyCat software. Visit http://www.sleepycat.com for more information.
gdbm - The GNU dbm-style database. Visit http://www.gnu.org/software/gdbm/gdbm.html for more information.
dbm - The use of dbm with PHP is deprecated. dbm was the original Berkley dbm-style database. Check your system's manual pages for more information.
ndbm - The use of ndbm (New Database Manager) with PHP is deprecated. ndbm was developed as a successor to the Berkley dbm-style database. Check your system's manual pages for more information.
Concurrent access to the same db file may corrupt the data stored in the file. Developers should always use some kind of file locking to prevent this from happening. See the entries on flock() for information on PHP's lightweight file locking mechanism.
PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.