in reply to Single file RDBMS w/o system install

Greetings again,

One of the major factors influencing the listed requirements is the fact that I may or may not have root on the system where the database will live, and I can't depend on any single RDBMS being installed on the system. This has been a major reason why, until now, I've been content with flat text files, CVS, and XML for most of it all.

I'm aware that the Jet "RDBMS" powers Access when on Win32. Never the less, you can still use ODBC to get into the file. I know it's possible to play around with Access files on UNIX systems, but you have to install/config some kind of ODBC enviornment. (At least, that's what I've seen posted here and elsewhere.) So, in theory, couldn't there be a binary file with defined column sizes and so forth that's "stand alone" from a full RDBMS? I'd imagine a DBD::? would let you interface with the file via DBI...

I must be dreaming, but this sure would be nice to have.

-gryphon
code('Perl') || die;

  • Comment on Re: Single file RDBMS w/o system install

Replies are listed 'Best First'.
Re: Re: Single file RDBMS w/o system install
by RhetTbull (Curate) on Nov 13, 2001 at 17:46 UTC
    I know it's possible to play around with Access files on UNIX systems, but you have to install/config some kind of ODBC enviornment.

    You're correct. A quick search on Google turned up several possible ODBC drivers for Unix. On Windows this is a great solution because the Jet engine works quite well and you have the "one file" convenience of the MDB (Access) file. Keep in mind that even on Windows, your program isn't talking to the file directly, it's talking to a full-featured data base server (Jet or MSDE) via ODBC. However, with this solution on Unix, you'd still need a Windows server to host the Jet engine and the Access/MDB file. Probably not what you want. As mentioned here, I think AnyData or XBase would be your best bet. If your data set is going to be large and search time is important then you may need to bite the bullet and go with a "real" DB server to get the performance you need.

Re: Re: Single file RDBMS w/o system install
by elwarren (Priest) on Nov 14, 2001 at 05:04 UTC
    The dbd::csv and dbd::xbase modules will let you run your own mini database without installing any additional rdbms software. They will, however, create multiple files per db.

    Is the single file requirement for runtime or for convenience? There are ways you could make it feel like a single file db... You could store your db files in a single tar file and then extract them at runtime, stuff them back in on program exit. This would give your code a very crude rollback functionality also.

    What about running against dbd::ram and then using something like dbd::anydata to dump the entire contents to a file periodically?

    Since you're going to take a performance hit with *any* sort of perl based db solution, you could just alter your design. Combine your tables into one big table and just query it for what you're looking for.