Solutions for data storage?
eurleif at ecritters.biz
Wed Jan 19 01:17:09 EST 2005
I'm writing a relatively simple multi-user public Web application with
Python. It's a rewrite of a similar application which used PHP+MySQL
(not particularly clean code, either). My opinions on various Web
frameworks tends to vary with the phase of the moon, but currently, I'm
planning to use Quixote.
Needless to say, my application will need some kind of persistent data
storage. The previous PHP+MySQL application uses around 1.1GB of
storage, so something like PyPerSyst where everything is kept in memory
I've looked at SQLObject, and it's very nice, but it doesn't provide
certain features I really want, like the ability to store lists of
strings or integers directly in the database (using commas in a varchar
column or something).
ZODB is very nice, but IndexedCatalog doesn't seem to provide any
automatic mechanisms for things like ensuring attribute uniqueness (for
e.g. usernames). I suppose I could implement manual checking in every
class that needs it, but it really seems like very error-prone code to
be implementing at the application level.
My ideal solution would be an object database (or object-relational
mapper, I guess) which provided total transparency in all but a few
places, built-in indexing, built-in features for handling schema
changes, the ability to create attributes which are required to be
unique among other instances, and built-in querying with pretty syntax.
Atop seems to come pretty close, but since it's meant to be used in the
asynchronous Twisted environment, it doesn't provide any thread safety.
So basically, I'm wondering if there are any Python data storage
solutions I haven't noticed that come a bit closer to what I'm looking
for. I could live without built-in schema evolution; the querying is
really the most important feature I want.
More information about the Python-list