What is the recommended python module for SQL database access?

Chris Angelico rosuav at gmail.com
Mon Feb 10 22:18:53 EST 2014


On Tue, Feb 11, 2014 at 1:57 PM, Walter Hurry <walterhurry at gmail.com> wrote:
> Chris Angelico wrote:
>
>> Broad recommendation: Single application, tiny workload, concurrency
>> not an issue, simplicity desired? Go SQLite. Big complex job, need
>> performance, lots of things reading and writing at once, want
>> networked access? Go PGSQL. And don't go MySQL if PG is an option.
>>
>> And definitely don't go for a non-free option (MS-SQL, DB2, etc)
>> unless you've looked into it really closely and you are absolutely
>> thoroughly *sure* that you need that system (which probably means you
>> need your app to integrate with someone else's, and that other app
>> demands one particular database).
>>
> I agree 100% with this. And speaking as an ex Oracle and DB2 DBA - not to mention MS-SQL (spit), with which I occasionally had to dabble, avoid them like the plague unless circumstances dictate.
>

I can't speak for Oracle as I've never used it, but DB2 is not at all
a bad product. In fact, it's excellent. I'm not sorry to have spent a
couple of decades using it; it's part of what taught me to assume
transactions everywhere, for instance (you don't "BEGIN TRANSACTION",
you simply are in one - after you COMMIT, another transaction is
automatically opened (at next query, I think), so you have to
explicitly COMMIT everything), and its networking support is
excellent. (Also, back in the 1990s, PostgreSQL wasn't nearly as easy
to use as it is now.)

But it's non-free, and that makes a HUGE difference when you start
deploying servers. You have to count up how many boxes you're using,
and then factor in the number of test machines you have too. Licenses
for your OS, database, etc, etc, all add up pretty quickly. When there
are no license fees whatsoever, life's easy - I can create myself a
Debian Linux VM image, install all our stuff on it, and then clone it
a whole bunch of times to try different things; doing that with
Windows or DB2 or anything pay-for is a lot less convenient (or even
straight-up illegal, depending on the license terms). That's a pretty
huge downside, and I've yet to use any pay-for database engine or
operating system that outdoes that.

ChrisA



More information about the Python-list mailing list