[DB-SIG] Suggestions for DB-API improvements

Kevin Jacobs jacobs@penguin.theopalgroup.com
Sun, 7 Jul 2002 09:40:50 -0400 (EDT)


On Sun, 7 Jul 2002, Itamar Shtull-Trauring wrote:
> 1. The standard should specify what style of parameter quoting should be 
> supported by database adapters. The current situation where each implements 
> their own means you can't use this feature if you want to support multiple 
> databases, which is very annoying.
> 
> 2. There should be a standard for dealing with BLOBs that uses file-like 
> objects (the way JDBC uses streams.) Too many adapters just assume that the 
> BLOB is a string, which means you're screwed if you want to say use a 10MB 
> BLOB, since now you have a 10MB string in memory.
> 
> Comments?

YES!  Here are a few more items from my wish list:

3. Better date/time specification that does not rely on unix
   time-since-epoch.  Also one that can return datetime with timezone, when
   available.  This may be a good time to look into such a proposal since
   Python 2.3 is about to grow a new standard datetime object.

4. A simple API which exposes the unquoted normalization rules for
   identifiers.

5. A simple API which exposes the string and identifier quoting/unquoting
   schemes.

6. A standard for per-cursor transaction support for those backends that
   support it.

7. More functional query result sets -- ones that have the memory footprint
   of tuples, and the flexibility of dictionaries.

8. More fine-grained type system -- something closer to what SQL92 provides,
   with a few extras from the big players.

Plus a great deal more, though these are the more important ones for me.

Comments?

The question is how to get driver authors to support all these new
requirements.  Maybe we need multiple levels of compliance within the
DB-API?  What exists now could be "entry-level" compliance, so that we can
define "intermediate-level" to include some of the easier features, and have
"full-compliance" include some of the more complex things.

Comments?

-Kevin

--
Kevin Jacobs
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19         E-mail: jacobs@theopalgroup.com
Fax:   (216) 986-0714              WWW:    http://www.theopalgroup.com