Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

What's the best option on DBD for flat files or non server db?

by gmpassos (Priest)
on Jan 06, 2003 at 18:02 UTC ( #224680=categorized question: print w/replies, xml ) Need Help??
Contributed by gmpassos on Jan 06, 2003 at 18:02 UTC
Q&A  > database programming


I was looking for the best DBD option for flat files, or any way that don't need to install a DB server, just the DBD module, but all need to be PORTABLE (at least fro Linux & Win32). I have tested some good modules:

1* DBD::SQLite

The idea is very good, have a good SQL syntax. But is very hard to compile on Win32, since DBI don't compile with MingW and SQLite only compile with MingW on Win32. To compile I got 2 Perl, 1 compiled with VC++ and other with MingW, and after this group the DBI and DBD::SQLite in one version. I tried ExtUtils::FakeConfig to avoid a Perl compiled with MingW, but doesn't work with this module!

But this module doesn't work very well, at least on Win32. Is very easy to get errors, even with codes used in the install tests. One big bug is the reuse of existing db files! If you create a program that creates the db files and use it, it's ok, but if you open an existing file not!

2* DBD::Sprite

Seems to be a DBD::CSV improved. But it doesn't work very well on Win32 too! It has the same problem to reopen db files! If this bugs were fixed it can be a very good candidate!


What I like in this is the stability and is portable, since the concept is simple! But it isn't fast, specially for big files. If some one has more experience with this, please, comment where and when you used it!


I like very much this! It's portable and stable too, and work very well with different types of files! But it doesn't install with the last version of DBD::CSV (that it uses), I get an old version of DBD::CSV to make it work! If some one has more experience with this, please comment too!

About DBD::RAM I have a question, a catalog() method (Continuous file access), really don't load all the db file in the memory?! Or it only kip saving the file?!

All this modules have very good ideas, but they need to be more stables, specially on Win32!

If someone know other good DBD modules, or any way to have a database with SQL syntax on Perl, that don't depends on 3rd programs, and portable, please, comment!

Or if someone know a very small and portable SQL server, please, send it! We can embed it inside a XS, like DBD::SQLite.

Graciliano M. P.
"The creativity is the expression of the liberty".

Answer: What's the best option on DBD for flat files or non server db?
contributed by Jenda

I did not have any problems compiling DBD::SQLite with MSVC6.0 under Win32 at all (ActivePerl 5.6.1 build 631), all tests passed, everything I tried worked fine. If you happen to use ActivePerl (or something compatible) you can install the module with PPM from

I am not using it in production code though now. I don't have any use for it currently.

Could you show me some code that errored out for you? Hope you sent a bugreport to the authors!


Answer: What's the best option on DBD for flat files or non server db?
contributed by Juerd

I'd choose DBD::SQLite. It's extremely fast and has all important features. I'm a Linux user, and it works perfectly here, but some Windows users told me they use the PPM without problems, so you could try that.

Please (register and) log in if you wish to add an answer

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (2)
    As of 2018-12-11 00:38 GMT
    Find Nodes?
      Voting Booth?
      How many stories does it take before you've heard them all?

      Results (52 votes). Check out past polls.

      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!