[DB-SIG] Other extensions
Art Protin
aprotin at research.att.com
Tue May 15 21:53:39 CEST 2007
Dear folks,
M.-A. Lemburg wrote:
>On 2007-05-15 21:00, Robert Brewer wrote:
>
>
>>M.-A. Lemburg wrote:
>>
>>
>>>On 2007-05-15 19:58, Art Protin wrote:
>>>
>>>
>>>>No, this can not be done in a standard way above the DB-API
>>>>level. There is nothing in the DB-API specification that can
>>>>be used in a DBMS independent manner, that would be assured
>>>>of producing the answers. One would need to presume that all
>>>>DBMSs have SQL access to the systems tables and ours for
>>>>one does not.
>>>>
>>>>
>>>This depends on the database backend. Most of them provide
>>>system tables with the needed information in one form or
>>>another.
>>>
>>>Others don't and require using special interfaces (at C level).
>>>
>>>It's difficult to standardize. ODBC has gotten this pretty well
>>>sorted out, IMHO, but emulating it in the DB API would be
>>>quite difficult for the module authors.
>>>
>>>
>>It's not so much that making a standard interface is hard (SQLAlchemy,
>>for example, and my Dejavu/Geniusql do this quite well).
>>
>>
>
>Well, it's finding the right attributes / selectors for the meta
>data that's hard.
>
>After all, the meta data should be as detailed
>as possible, but not to a point where the majority of backends
>wouldn't be able to support the interface or where writing the
>interface for the meta data would require too much work (for
>little value).
>
>
>
>>It's that such
>>interfaces are then called "Object-Relational Mappers" [1] and are
>>pretty universally shunned as an arena for standardization.
>>
>>
>
>I think we'd just need to standardize this at the DB-API level
>if there are a significant number of database backends that
>don't allow querying this meta data via cursor.execute().
>
>Looking at your provider implementations:
>
>http://projects.amor.org/geniusql/browser/trunk/geniusql/providers
>
>it appears as if most databases do support this kind of
>introspection. While for some you are using ADO (which essentially
>uses the same meta data catalog API as ODBC), I think those
>can also be covered using direct SELECT queries into the system
>tables.
>
>
>
OK.
Given that there is no standard way to do this thing,
I'll just code up whatever I think my users will like.
Thank you,
Art Protin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/db-sig/attachments/20070515/806f8a73/attachment-0001.htm
More information about the DB-SIG
mailing list