Bthash versus Berkeley
The Berkeley Database (libdb) is more of a database
management system (DBMS) than bthash.
Here are some of the features that distinguish the Berkeley
Database from bthash.
-
The Berkeley Database has a larger footprint than
bthash.
-
The Berkeley Database has more features than
bthash.
-
The Berkeley Database is based on
Donald E. Knuth's design
for a database. bthash is based on
Cormen's algorithm
for a btree and
Sedgewick's algorithm
for a hashing database.
-
The Berkeley Database has btree, hashing, and
sequential access methods.
-
The bthash library has only the btree
and hashing access methods.
-
The Berkeley Database is object oriented.
-
The object for the Berkeley Database is defined
as DB.
-
The Berkeley object DB contains all the
methods for maintaining the database.
-
The object for bthash is defined as a
file with a file handle.
-
The bthash schema is passed from subroutine
to subroutine as a structure.
-
The Berkeley Database has transaction processing.
-
The Berkeley Database has transaction logging.
-
The Berkeley Database has transaction backout.
-
The Berkeley Database has a variable length record
and key.
-
bthash has a fixed length record and key
structure.
-
The key in the Berkeley Database is separate from
the data portion of the record.
-
The key in bthash is embedded in the data
portion of the record.
-
The Berkeley Database is better for a high volume,
multi-threaded, remote, database server.
-
bthash is suited for a medium volume,
single-threaded, local, database access method.
-
The Berkeley Database is a commercially maintained
database under the Berkeley license.
-
bthash is voluntarily maintained under the
GNU General Public License (GPL).
-
bthash is more portable for other platforms
and operating systems.
-
bthash uses standard subroutines in UNIX:
-
open
-
close
-
lseek
-
read
-
write
-
POSIX lockf
...and the equivalent routines in Windows.
-
bthash has a more logical internal structure
for database repair.
-
bthash is intended to be more simplistic and
easier to use and understand than the Berkeley database.
Many of the same features also distinguish the SQL
database servers MySQL and PostgreSQL
from bthash.