[DB-SIG] Proposal: model database metadata from JDBC

Dittmar, Daniel daniel.dittmar@sap.com
Mon, 14 Jan 2002 01:06:18 +0100


I would like to propose that any metadata facilities for the Python 
DB API follow the interface specified by JDBC:DatabaseMetadata:
http://java.sun.com/j2se/1.4/docs/api/java/sql/DatabaseMetaData.html

Advantages:
- covers a lot of ground
- can be easily tested (depending on the quality of the JDBC driver)

The archive http://home.snafu.de/~dittmar/downloads/genMetadataClass.tgz 
contains a python script which generates such a class complete with doc 
strings (well, javadoc strings).  If a JDBC driver is available and the 
script is executed using Jython, then some of the methods are generated 
using information from the JDBC driver.  

Of course, using ODBC as a model would have the same advantages. Perhaps
someone with some knowledge of ODBC and some time could write a similar 
script. I haven't really looked into the ODBC documentation, but as I 
use in the SAP DB JDBC driver the same views the ODBC driver uses, I 
guess the two API are quite close in functionality.

Daniel

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
mailto:daniel.dittmar@sap.com
http://www.sapdb.org/