in reply to DBI modules for database representation in plain files

Have you actually tested the penalties in performance? Depending on the size and complexity of your data, they may not be relevant.

I second all the other recommendations of SQLite, it rocks. However it is not pure perl and it does not create cross-platform, human readable data files.

P.S. I will be releasing a pure perl DBD::DBM soon but it is too early to say how it will compare performance-wise with the others. Obviously its files won't be cross-platform or human readable, but it should work anywhere that perl works with SDBM that comes with perl or with other DBMs if they are available.

  • Comment on Re: DBI modules for database representation in plain files

Replies are listed 'Best First'.
Re: DBI modules for database representation in plain files
by filipe (Novice) on Feb 25, 2004 at 20:15 UTC
    That's sound wounderfull :=) Would it also interface with DB_files and MLDBM?
    i've finally put the DBD::SQlite working. i've created a few tables, a unique index but i got one concern
    how can i limit the data to fit in a standard SQl type:like info char(32) i've run a small test and i don't get a data limit.
    #!/usr/bin/perl -w use strict; use warnings; use DBI; use DBD::SQLite; my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", {AutoCommit => + 1, RaiseError => 1}); $dbh->do("CREATE TABLE info (f1 char(3) primary KEY, f2 char(3), f3 ch +ar(3))"); $dbh->do('create unique index info_idx on info (f1)'); my $sth = $dbh->prepare("INSERT INTO info VALUES (?, ?, ?)"); $sth->execute("Fred", "Bloggs", "fred\@bloggs.com"); $sth = $dbh->prepare("SELECT * FROM info"); $sth->execute(); while (my @row = $sth->fetchrow_array ) { print "@row\n"; } $dbh->disconnect;
    this get Fred", "Bloggs", "fred\@bloggs.com". So i must assume that DBD::SQLite don't test for type size?
    sure i can count the data size each time i insert them into the database but would prefer that SQLite ensures
    that i don't forget about it... Any hint if i can get a free lunch here?

    Thanks for all the help here and thanks in advance for all the forthcomming one.
    Filipe