ninja-joe has asked for the wisdom of the Perl Monks concerning the following question:

I understand that DBM files have been in the unix scene for quite some time. Is there any point that's been discussed where support for DBM files in perl would be dropped in favor of people who generally use large db backends like mysql etc?

Replies are listed 'Best First'.
Re: Longevity of the DBM File
by Molt (Chaplain) on May 03, 2002 at 15:32 UTC

    The DBI lets Perl happily talk with virtually any RDBMS backend, such as MySQL, and this is good.

    The DBM facilities provide a lightweight and ubiquitous solution for where an RDBMS solution would be overkill, and this is good.

    I really don't see why DBM support should be 'dropped' in favour of database backends, both coexist happily and complementarily. Removing DBM code won't automagically improve RDBMS support, it'll simply mean people who do deal with DBM files will move to another language.

    A final point, DBM files are exceptionally standardised, and have been for many years. This stability means having it in the Perl core distribution makes a certain kind of sense since the code will Just Work, whereas trying to put (for example) a MySQL DBI module into the standard distribution wouldn't work since there's versions of MySQL arriving too quickly, and it won't really help those of us sitting next to the big metal Oracle.

(jeffa) Re: Longevity of the DBM File
by jeffa (Bishop) on May 03, 2002 at 15:36 UTC
    Sometimes a DBM is the better solution. Also, check out DBD::SQLite if you haven't already.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: Longevity of the DBM File
by dws (Chancellor) on May 03, 2002 at 16:08 UTC
    Is there any point that's been discussed where support for DBM files in perl would be dropped in favor of people who generally use large db backends like mysql etc?

    A spoon and a shovel are both useful. Why drop support for one in favor of the other?

Re: Longevity of the DBM File
by shotgunefx (Parson) on May 03, 2002 at 16:55 UTC
    I think you are thinking of dbmopen. This is decpreciated because people should be using the Tied hash interface to DBMs instead.

    -Lee

    "To be civilized is to deny one's nature."