Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

When I create a database using dbmopen, e.g.

dbmopen( %DB, $datapathname, 0666 ) or die;
dbm creates two files rather one:
data.dir data.pag
Why is that?

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: Why does dbmopen create two files?
by belg4mit (Prior) on Dec 18, 2006 at 11:43 UTC

    One contains the actual data ("page") table, the other is an index ("directory").

Re: Why does dbmopen create two files?
by merlyn (Sage) on Sep 27, 2000 at 11:14 UTC

    That's either ODBM or NDBM. GDBM introduced the idea of a single .db file rather than the pair of files used by DBMs since the early 1980s.