Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"


by ehdonhon (Curate)
on Oct 03, 2001 at 05:26 UTC ( [id://116324]=modulereview: print w/replies, xml ) Need Help??

Item Description: Perl extension for access to cdb databases

Review Synopsis:

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.

Replies are listed 'Best First'.
Re: CDB_File
by jdporter (Paladin) on Mar 25, 2004 at 20:28 UTC
Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: modulereview [id://116324]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-16 11:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found