[mod_python] Which Database?

Scott Chapman scott_list at mischko.com
Fri Mar 17 12:06:52 EST 2006


marinus van aswegen wrote:
> Hi All
> 
> Having sorted out mod_python code I new move on to the database :) I've 
> been playing with mysql via _mysql. Before I get into using this module 
> I thought I'd ask the obvious question "what database do you like to use 
> and what module to you use to interface?"
> I know this is a bit open ended, but I thought let me gauge what ppl 
> like to use.

My signature line says it all.

Seriously, MySQL is just coming into functionality that PostgreSQL has had for a 
very long time.  Maturity is worth something.  It also has tons of functionality 
that MySQL still does not have.  Someone else already mentioned the MySQL SQL 
implementation issues.

I talked with the maker of the GIS extension to MySQL and found that he had to 
modify code in MySQL's string handling sections to implement the GIS module. 
What does that tell you about MySQL's design?  It looks rather monolithic and 
poorly designed to me from here.  I asked him what he knew of PG's 
implementation of their GIS addon and he said it was a very nice bolt-on module 
which has proven very solid, reflecting PG's much better design.

In summary, PG is mature and will allow you all the room you need to grow. MySQL 
(like PHP) is a "well established HACK".  I use SQLLite for all my light lifting 
and PG for everything else.  Just because something is popular does not mean it 
should be used.

Use Psycopg2 to interface to PG.  Don't worry about the "beta" status. It's very 
stable and will go production soon.  I've been using it in production with no 
problems for quite a few beta versions.

Compare http://sql-info.de/mysql/gotchas.html
with http://sql-info.de/postgresql/postgres-gotchas.html
and search google for:
mysql gotcha
and for
postgres gotcha

Cordially,
Scott
-- 
q: Why do so many people take an instant dislike to MySQL and PHP?
a: It saves time.
ps: Use PostgreSQL and Python instead.


More information about the Mod_python mailing list