On Tue, Mar 12, 2002 at 06:35:54PM +1100, Jeff Waugh wrote: > <quote who="Jamie Honan"> > > > Databases are like the proverbial hammer. Everyone uses them because they > > know them. But they may not be completely appropriate, sort of like every > > problem becoming how to drive a nail. > > So, on that point, what Free Software non-overkill-database systems are > recommended by the SLUG coding crack troops? > > If I want some fairly simple storage that handles locking, multiple > readers/writers, hopefully some forms of indexing, useful from > Python/Perl/PHP, but DON'T require a RDBMS (or faux-RDBMS with SQL querying, > MySQL fans)... What should I look into? > > GDBM or Berkeley DB? (Oh, the pain!) Others?
Out of luck, there are none. GDBM and the Berkeley DB's don't do locking and don't do indexing - they are hash db's. (They find only the exact thing you wanted). One tdbm package claims to do ACID transaction support, but it is also a hash DB. What you've described as wanting is probably an RDBM like MySQL or Postgres. If you relax some of your criteria, you may be able to something very simple. For example, you could simply have a server that handles whole transactions serially. Inside of gnucash, for example, there has to be some locking to prevent clashes, but it doesn't use a database. Persistency is simply handled by writing out to disk every so often .... How much persistency do you want, how much concurrancy do you want? Can it be achieved by writing transactions out to a log? (Do you need to do this anyway? Oh by the way, make sure the log writing is atomic) A point I guess I'm getting to is that the database may be underkill as much as overkill, i.e. not enough to secure your transactions - like if lots of money depended on it. At another extreme, if you wanted to have a free text searching system with real time updates, or a picture searching system I think you'd need something else. For example the book 'Managing Gigabytes' shows a pretty fancy system for free text searching, inverted indexes etc. etc. but can't be updated in real time. What I'm thinking of is a little library that plugs into other packages that would provide transaction support. It could work with flat files, ISAM files, anything really. Basically blocks of data that you like to keep the way you want. Horses for courses. Or hobby horses. Jamie -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug