views:

434

answers:

3

Hi, for development i'd love to have a flat file database with the requirements up in the title, but I don't seem to be able to find a database with these requirements. I can't seem to get MetaKit to work. I only need it to work on the development machine, but in the real world my product will have more data and needs more room and will need something better.

Does anyone know of a database engine capable of this or do I need to just use python's pickle and load and save a file?

Joe

A: 

If you're looking for something embeddable/easily distributed take a look at sqlite. It embeds a RDB in a single file on disk. There is also a python interface for couchdb.

However, neither of these is quite the same as MetaKit and may not be appropriate alternatives. Maybe you could elaborate on your difficulties getting it to work?

terru
I don't get how to compile it! There's very very limited instructions! (btw welcome to stackoverflow)
Joe Simpson
The directions in the README files in the /unix and /python directories were sufficient to build it okay on my Ubuntu box. I haven't tested it so I have no idea if it works, but it compiled. ;) Are you working on Linux or another OS?
terru
I'm running MAC OS X Snow Leopard :)
Joe Simpson
+1  A: 

Use shelve. http://docs.python.org/library/shelve.html

S.Lott
A: 

A document based flat file database is also known as a file system.

mikerobi
totally, because i can just filter through files in literally less than a second... as if
Joe Simpson
Then you should have been more specific in your requirements. File systems are essentially b-tree indexed databases. The the original CDDB database was nothing more than a collection of folders with tens of thousands of text files.If you need fancy filtering, or can't map effectively map resources to file names, than whatever you are looking for is not a flat file database. Judging by the fact that you accepted the suggestion of the shelve module, you are looking for an embedded database which is not the same thing as a flat file.
mikerobi
A flat file database i thought was a database you stuck in a file.
Joe Simpson
Apparently there is no consensus on what a flat file database is. It could refer to any database in a single file, or a bunch of text files on a disk.
mikerobi