【问题标题】:Pros and cons of Perl DBM implementations? (GDBM, Berkeley DB, etc.) [closed]Perl DBM 实现的优缺点? (GDBM、Berkeley DB 等)[关闭]
【发布时间】:2011-06-27 17:33:11
【问题描述】:

我在早期的 Perl 项目中使用过 GDBM 和 Berkeley DB/DB_File,但我应该将它们用于新项目吗?不同 Perl DBM 实现的优缺点是什么?

(相关:与传统 DBM 相比,DBM::Deep 或 KyotoCabinet 等工具是否太慢/太重,而您只需要二进制/文本数据的透明哈希?)

【问题讨论】:

    标签: perl dbm


    【解决方案1】:

    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 模块,这是一个更简单的接口。
    • 还有CDB
    猜你喜欢
    • 1970-01-01
    • 2010-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多