in reply to Perl DBM

If your data can be modelled into tables a relational database, especially a lightweight one like SQLite, using DBI with DBD::SQLite, would probably be a good fit.

Replies are listed 'Best First'.
Re: Re: Perl DBM
by MatthewFrancis (Acolyte) on Apr 13, 2004 at 15:30 UTC
    Thanks for the reply...

    The quick answer is that we don't have access to a relational database for this project, unfortunately. However, thanks for the SQLite recommendation - I'd not heard of it before.

    Thanks again,
    MatthewFrancis
      we don't have access to a relational database for this project

      If you can install Perl modules than you can install SQLite. It comes bundled with DBD::SQLite. It is a simple C library, and the DB is a single file. Which means no daemon running, no port to open, no admin to do (access rights are the access rights to the file). From an admin point of view it is just like a flat file. Using it is (or at least should ;--) really be a low-level implementation decision.

Re: Re: Perl DBM
by eserte (Deacon) on Apr 13, 2004 at 15:34 UTC
    Fitting arbitrary complex data into a relational data may be hard. Very hard. Using MLDBM or similar (DBM::Deep looks interesting) is much easier. To the original questioner: are you using DB_File or GDBM_File as the database backend? The default SDBM_File has many drawbacks (limited record size, missing EXISTS is implemented only since 5.6.1).
      Thanks for the reply,

      I'm using things as follows:
      use SDBM_File; use MLDBM qw ( SDBM_File );
      Again, I'm a total newbie to DBM issues, so if there are better ways to to this I'd be grateful for some pointers.
      Thanks!!
      MatthewFrancis
        Change this to
        use MLDBM qw(DB_File Storable);
        DB_File is far superior over SDBM_File, and Storable is faster than the default Data::Dumper.