|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||Need Help??|
Contributed by gmpassos
on Jan 06, 2003 at 18:02 UTC
Q&A > database programming
Description: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:
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!
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.
Please (register and) log in if you wish to add an answer