in reply to Append to a busy flat-file db without leaving customer in lurch

I'll second or even third the recommendations put forth so far, and suggest going to an RDBMS. The extra effort involved in writing an SQL query is definitely worth the effort, both in reliability, ease of use, and most of all user experience.

For simple things like what you are doing, I'm sure that some of the DB Abstraction modules will do everything you need and more.

I used for the first time SQLite.pm the other day for a quick and dirty keyed table for fast insert and lookups, and it is blazingly fast, fully ACID compliant (I think?) and best of all is all in one self-contained module.

It's definitely worth trying out, and easier for small projects than setting up a mysql/postrges instance to deal with one small transaction.

  • Comment on Re: Append to a busy flat-file db without leaving customer in lurch

Replies are listed 'Best First'.
Re^2: Append to a busy flat-file db without leaving customer in lurch
by asz (Pilgrim) on Jan 23, 2006 at 10:50 UTC
    i too recomend SQLite, a complete (SQL92 compliant) database stored in a single disk file. i use it in projects where a full RDBMS server would be overkill (i.e. most of my work :) and network acces to the DB is not required.

    SQLite was the first RDBMS i used and my first introduction to SQL. i'd say it is relatively easy to learn. you definetly want to use version 3 with the excellent Perl module DBD::SQLite.

    your first concern might be the integrity of data. i didn't have any problems with that using SQLite, but you might want to read about how SQLite3 takes care of this problem.

    :)))))
      I started working with SQLite lately, and found that it very nicely fits it's niche and is available for lots of platforms. However I find the naming of the perl module confusing.

      The name for the module that was compatible with version 2 of the database is DBD::SQLite2, while the name for version 3 is DBD::SQLite and not DBD::SQLite3 as one would suspect. It took me a while to hit on that out so I thought I point it out.


      holli, /regexed monk/