[PYTHON DB-SIG] SQL interface

Greg Stein gstein@microsoft.com
Sat, 12 Oct 1996 21:37:28 -0700


>----------
>From: 	Thomas Breuel[SMTP:tmb@best.com]
>Sent: 	Friday, October 11, 1996 5:33 PM
>To: 	Greg Stein
>Cc: 	db-sig@python.org
>Subject: 	RE: [PYTHON DB-SIG] SQL interface
>
>    The database interface encompasses many databases, not just SQL.
>
>Thanks for the response.  Unfortunately, it seems to me that Python's
>database interface is significantly more limited than ODBC, JDBC, or
>Perl DBI (see my previous message) and/or not specified in enough
>detail to actually write code that would be portable from one database
>to another.  It seems to me that most database interfaces, whether they

The standard Python approach is to writing a C module to expose
functionality, not add value. The API was designed to expose as much of
a database's functionality as possible, not to make things portable from
one database to another. It was decided a long time ago to not attempt
to do that. What would happen is that you'd end up with a lowest common
denominator or a really complex specification. Instead, the approach
that was taken was to write something that enabled most of a database's
capabilities within Python. Additional layers, in Python, could then be
used to create a truly portable API.

>use SQL as their query language or not, should make a distinction
>between a prepared statement and an iterator over the set resulting
>from actually binding query parameters and executing the query.
>
>Of course, also, it isn't clear to me whether the generality of
>supporting non-SQL databases is really worth the limitations that
>that will impose on the interfaces; to put it differently,
>a special interface for Python to SQL databases analogous to ODBC 
>or DBI would seem like a good idea to me.

So far, nobody has tried to use the API for non-SQL databases. It
doesn't map well to dbm style. I'm not sure what other types are out
there that people would be interested in using from Python.

>Is there still any kind of active discussion of those issues going on
>or are things frozen?

The discussion you've started is the first thing since last April or so.
:-)

-g
>

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

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