[PYTHON DB-SIG] database API

Thomas Breuel tmb@best.com
Thu, 10 Oct 1996 21:19:39 -0700


Hi,

I found the Python Database API (PyDB) spec, but I'm a little
confused:  it seems to lack some abstractions that are present in JDBC
and ODBC.

PyDB's concept of a "cursor" seems to encompass (somehow) the concepts
of "statement", "prepared statement", and "result set".  But I can't
tell from the API spec how a statement is prepared in the first
place.  And if I prepare it, I can't tell how I can use it multiple
times, or how I can generate multiple result sets and then
step through them simultaneously.

Another reason why this kind of interface seems odd to me is
because I view a "prepared statement" kind of like a collection
class and a "result set" like an iterator over that collection
class.  Those are distinct concepts.

While ODBC is perhaps unnecessarily complex, it seems to me that
PyDB has been simplified a bit too much.  Or maybe I just don't
understand it.  Can anyone explain?  Also, why not base the PyDB 
interface directly either on the JDBC or the Perl DBI specs?  It
seems like there is a lot of design reuse possible.

Thanks,
Thomas.

=================
DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
=================