AnyDBM_File - provide framework for multiple DBMs
NDBM_File, DB_File, GDBM_File, SDBM_File, ODBM_File - various DBM implementations
- use AnyDBM_File;
This module is a "pure virtual base class"--it has nothing of its own. It's just there to inherit from one of the various DBM packages. It prefers ndbm for compatibility reasons with Perl 4, then Berkeley DB (See DB_File), GDBM, SDBM (which is always there--it comes with Perl), and finally ODBM. This way old programs that used to use NDBM via dbmopen() can still do so, but new ones can reorder @ISA:
Having multiple DBM implementations makes it trivial to copy database formats:
Here's a partial table of features the different packages offer:
- odbm ndbm sdbm gdbm bsd-db
- ---- ---- ---- ---- ------
- Linkage comes w/ perl yes yes yes yes yes
- Src comes w/ perl no no yes no no
- Comes w/ many unix os yes yes no no no
- Builds ok on !unix ? ? yes yes ?
- Code Size ? ? small big big
- Database Size ? ? small big? ok
- Speed ? ? slow ok fast
- FTPable no no yes yes yes
- Easy to build N/A N/A yes yes ok
- Size limits 1k 4k 1k none none
- Byte-order independent no no no no yes
- Licensing restrictions ? ? no yes no
on mixed universe machines, may be in the bsd compat library, which is often shunned.
Can be trimmed if you compile for one access method.
See DB_File. Requires symbolic links.
By default, but can be redefined.
dbm(3), ndbm(3), DB_File(3), perldbmfilter