[PYTHON DB-SIG] database API

Thomas Breuel tmb@best.com
Sat, 12 Oct 1996 20:54:19 -0700


    Thomas: Is there some reason you couldn't wrap the present
    interface in your-favorite-framework in python code (without
    too much overhead) and get what you want? 

Well, it isn't really a question of my personal taste.  Sure,
I can get something to work with a PyDB implementation, somehow.
Of course, since I need to implement a DB2 interface myself
anyway...

But the interface is different from similar interfaces in other
languages: it has eliminated one or two important concepts and instead
hints to the implementor at providing additional functionality behind
the scenes.  That has several consequences:

 -- experienced users familiar with analogous APIs in other
    languages will be confused about how functionality they
    know from other APIs is provided by the PyDB API

 -- the API will give less guidance to novice users as to
    what the underlying abstractions actually are, since
    some of them are hidden

 -- implementors will receive less guidance about what is
    expected from a high quality implementation, since some
    of the abstractions required aren't made explicit

 -- PyDB will probably be looked at as being somewhat inferior
    to other database APIs

I'm frankly not quite sure yet what to do.  I will probably want to
provide a scripting language and CGI interface to a multimedia database
product based on DB2.  Python, Perl, Java, and Tcl are possible choices.

I think the current PyDB spec makes Python a less attractive choice
than a PyDB spec that would be more closely modeled on ODBC or JDBC.
Most of the potential users are not going to be familiar with Python or
PyDB, but they probably do know ODBC or JDBC.

    In particular, forgive me for being a moron again, but where was
    that python/db spec? last time I looked at the python.org site it
    didn't show. (reply privately with url somebody or everybody,
    please - I wanna try out the ODBC module, and if it works maybe put
    it to real use with MSAccess on Tuesday...)

I don't have the URL handy; I'll try and send it out next time I log
into my work machine.  I have also sketched out a PyDB interface
analogous to JDBC, which I may include for people to look at.
While the JDBC spec is relatively long, most of that is because
of the profusion of statically typed methods required to satisfy
Java's static type checker; those drop out in a "PyDBC" interface,
and something like that turns out not to be more complex than the
current PyDB interface.

Cheers,
Thomas.

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

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