I've used GDBM and Berkeley DB/DB_File for earlier Perl projects, but should I be using them for new ones? What are the pros and cons of different Perl DBM implementations?
(Related: Are tools like DBM::Deep or KyotoCabinet too slow/heavy compared to traditional DBMs, when all you need is a transparent hash for binary/text data?)
The AnyDBM_File module has a nice chart for the various dbms. I don't know how out of date this is though.
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[0] no no no
Builds ok on !unix ? ? yes yes ?
Code Size ? ? small big big
Database Size ? ? small big? ok[1]
Speed ? ? slow ok fast
FTPable no no yes yes yes
Easy to build N/A N/A yes yes ok[2]
Size limits 1k 4k 1k[3] none none
Byte-order independent no no no no yes
Licensing restrictions ? ? no yes no
[0] on mixed universe machines, may be in the bsd compat library, which
is often shunned.
[1] Can be trimmed if you compile for one access method.
[2] See DB_File. Requires symbolic links.
[3] By default, but can be redefined.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With