Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Review: CDB_File

General Summary: Good, but limited applications

The CDB_File module allows you to gain access to databases that are stored in the CDB format (by Dan Bernstein).

CDB_Files are very efficient when it comes to lookup speed. They are especially usefull when you have a large data set. The tradeoff is that CDB_Files are read-only.

If you want to update a CDB_File, you must pass a new hash of data to the CDB_File::create class method and then re-tie your old tied hash to gain access to the new data. This means if you are in a situation where you constantly need to be both acessing and updating your data file, the CDB_File format is probably not your best choice.

In benchmarking of CDB_Files vs DB_Files, I found that there is a considerable ammount of overhead in the process of tying a CDB_File vs. tying a regular DB_File, so if you are forced into a situation where you are tying a data file, accessing a single value, then un-tying, you may be better off with a DB_File (especially if you have a small data set)

If however, you have a situation where you are tying to a data file once, and doing multiple lookups with very little updates, you might want to consider CDB_Files as a very useful alternative to DB_Files.

In reply to CDB_File by ehdonhon

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (12)
    As of 2019-06-18 12:08 GMT
    Find Nodes?
      Voting Booth?
      Is there a future for codeless software?

      Results (81 votes). Check out past polls.

      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!