Python and Sybase

David Rysdam drysdam at ll.mit.edu
Fri Sep 24 14:15:33 CEST 2004


John J. Lee wrote:
> David Rysdam <drysdam at ll.mit.edu> writes:

> 
>>Also, is there any module that provides a generic DB API and can be
>>hooked to both Sybase and postgresql?  This
>>(http://www.python.org/peps/pep-0249.html) looks pretty old.
> 
> 
> Not a single module -- why would you want one?
> 
> The DB API (version 2) is the standard.  The idea of the DB API is to
> make it possible to write DB API code that works across multiple
> database backends.  No need at all for a single module, just a single
> standard.  Unfortunately, making this work is not entirely trivial:
> There are some stupid issues that are the fault of the DB API -- SQL
> argument substitution syntax in particular -- and some trickier ones
> -- particularly the variations in the capabilities of DBMSes.  If you
> want your code to work across multiple DBMS backends, you should test
> it with those DBMSes from the start.  Doing it later is possible but
> may be hard work (made less difficult if you keep your DB code
> localised).

Yes, I posted this question before I understood what the DB API was. 
Looks good.



More information about the Python-list mailing list