Newbie: Crazy, but Quick
Gustavo Cordova
gcordova at hebmex.com
Fri Feb 22 12:34:23 EST 2002
>
> For that matter, you could also store the Python objects
> directly in the SQL database. My own opinion is that SQL
> is so easy that it's a no-brainer to use it whenever possible.
> A problem I've seen many times is people utilize some shortcut
> because they feel the program will never need anything more,
> only later to discover that the program has utility far
> beyond what they expected, but the shortcut they've taken
> cripples it, and they end up rewriting (or worse, they don't).
>
Has a python wrapper for SQLite been written yet?
SQLite, for those who haven't checked it out, is a
C library (or dll) which implements a SQL data store,
complete with foreign keys, indexes, etc etc.
I think it's modeled after the PostgreSQL engine,
bit I could be very mistaken. The author has done
a few comparisons with PostgreSQL, and says that
it's about 4 times faster.
Also, it stores the whole database in a single file,
which is mighty convenient.
>
> What if she decides to maintain historical data? Then to
> keep the files reasonably sized, she'll have to start
> juggling files.
>
> Software has a tendency to grow beyond the developer's
> expectations, so I consider it unwise to take shortcuts
> when a better long-term solution isn't much more difficult
> to implement.
Indeed.
>
> Not only that, but storing the data in a SQL database
> separates the data storage from the program, so in the
> future she could use that data from some other program,
> not just the Python one.
>
> Then if she decides she wants to access the data from,
> say, a web server, it's not a big problem.
>
Yep.
There's the hassle of a db server. I KNOW, to us geeky
people setting up a MySQL, an mSQL (ewww), or a pgsql
engine isn't a hassle at all, and it pays back quite
nicely by separating data storage from the application.
But to a non-developer it may be more of a hassle than
to us.
-gus
More information about the Python-list
mailing list