[DB-SIG] Abstraction layer confusion, ULA (was Re: Database Abstraction in Python)

M.-A. Lemburg mal at egenix.com
Mon Apr 18 16:30:51 CEST 2005

Jonathan Franz wrote:
> Currently, dbapi is lacking many features.

Hmm, I don't see how the DB API limits any module writer
from adding new features to their implementation.

In fact, many authors have added features to their implementation
and as a result we have added a special section to the DB API
to make sure that these features use standardized semantics.

It would really help if you could be more specific about those
lacking features.

The only feature which I'd really like to see in DB API 3.0
is a standard way to tell the module how to map database types
to Python types and vice-versa.

> Marc wrote:
> """The next version of the DB API spec will not include any
> of these abstraction attempts, but instead focus on
> clarifying the DB API 2.0 and possibly moving some of
> the currently optional features in the spec to the
> mandatory sections."""
> Every time changes to the spec are discussed on this list, you make that 
> same argument, as if dbapi 3 were something on a shelf waiting for 
> release... it is not.  Shouldn't we as a community discuss what is or 
> isn't needed in such a spec?

Of course !

My main concern is that you are trying to reuse the term "DB API"
in a way which historically doesn't make sense: the DB API
has always been a very simple API specification focussed on
very basic database building blocks. The goal was to make
it easy for module writers to build modules which adhere to the
spec and to make it easy for users to write code on top of it.
Think of it as middleware.

If you want to design a new layer on top of the DB API, you are
welcome to do so, but please use a different name.

You see, I don't think that we need a specification for an
abstraction layer. The reason is simple: you will only write
this abstraction layer once and not have many implementations
which adhere to it (which is what the DB API spec is all about).

If you believe that we need to add features to the DB API spec
to make the implementation of an abstraction layer easier,
we can discuss this aspect.

If you would like to see e.g. PDO or a similar package
in Python's standard lib, that's a different discussion.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Apr 18 2005)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the DB-SIG mailing list