10
我已經在早期的Perl項目中使用過GDBM和Berkeley DB/DB_File,但是我應該將它們用於新項目嗎?不同的Perl DBM實現有哪些優缺點?Perl DBM實現的優缺點? (GDBM,Berkeley DB等)
(相關:是否像DBM ::深或KyotoCabinet工具太慢/重相比傳統的數據庫管理系統,當你需要的是二進制/文本數據的透明哈希)
我已經在早期的Perl項目中使用過GDBM和Berkeley DB/DB_File,但是我應該將它們用於新項目嗎?不同的Perl DBM實現有哪些優缺點?Perl DBM實現的優缺點? (GDBM,Berkeley DB等)
(相關:是否像DBM ::深或KyotoCabinet工具太慢/重相比傳統的數據庫管理系統,當你需要的是二進制/文本數據的透明哈希)
的AnyDBM_File模塊有一個很好的圖表爲各種dbms。我不知道這是多麼的過時。
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.
省略了'BerkeleyDB'模塊,它具有一定的優勢;它所命名的「bsd-db」是'DB_File'模塊,它是一個更簡單的接口。 – tchrist
另外[CDB](http://search.cpan.org/search?query=cdb) – daxim