[DB-SIG] Creating portable Python database code

Cary Collett Cary Collett <cary@ratatosk.org>
Tue, 22 Feb 2000 09:42:42 -0500


I'll second Christopher's post. The DBI-API interfaces are
nice and consistent. The differences in Oracle's and MySQL's
SQL dialects are much more significant and will be your
sticking point in any migration between the two. Personally,
I like MySQL's SQL better. There are some very handy features
that Oracle just doesn't have. (This is all as of Oracle 7,
I haven't used 8.)


Cary


Thus spake Christopher Petrilli (petrilli@amber.org):

> John Duperon [John.Duperon@EMBL-Heidelberg.de] wrote:
> > Hello,
> > 
> > whether to use Perl or Python for connecting our databases
> > to the web.  Do you have any idea whether the Python
> > database API is the same for Oracle and MySQL?  We'd like to
> > be able to write code that will work with either database,
> > requiring only the change of the database module, as can be
> > done with Perl's DBI.
> 
> Since I manage teh Database stuff for Zope (which you might consider
> as well...), and work on the DCOracle adapter, here's my take.
> 
> * DB-API is pretty consistent
> 
> * SQL is NOT
> 
> What this means is that moving between MySQL and Oracle often is more
> an issue of the SQL you use than anything else, especially given the
> difference in expressiveness (lack of subselects, etc in MySQL).  However,
> if you're careful, yo ucan write stuff that will work between both.
> 
> Chris
> -- 
> | Christopher Petrilli
> | petrilli@amber.org
> 
> _______________________________________________
> DB-SIG maillist  -  DB-SIG@python.org
> http://www.python.org/mailman/listinfo/db-sig
> 
> 

-- 
Cary Collett                                               cary@ratatosk.org
http://ratatosk.org/~cary

"To me boxing is like ballet, except that there's no music, no choreography,
and the dancers hit eachother." -- Jack Handy