[DB-SIG] Question concerning the DB-API
Anthony Baxter <email@example.com>
Sun, 21 Sep 1997 12:59:51 +1000
>>> Oliver Andrich wrote
> how do I have to understand the DBAPI? Is it the minimum that a module
> conforming this API should provide or describes it the exact interface to the
> database? I ask cause I like to add some nice little methods to the module,
> that aren't described in the DBAPI.
I'd suggest that they should be layered on top of a DB-API interface. The
DB-API is a fairly low-level one (deliberately, I feel), so that it can
be implemented on as many databases as possible.
Some databases are just not going to be able to provide a full DB-API
interface (mSQL for one...) so I guess they should try to provide as
much as possible.
> Or something like select_db, create_db,
> drob_db, .... not worth implementation?
select, create, drop, insert, &c could probably be put in a seperate SQL
module that just accepted a cursor and made it easier to build up the SQL
statement. This could then sit on top of any DB-API compliant module.
> Do I have to understand the connection
> object as a connection to a database or as a connection to the database
I consider a connection object as a connection to a database. Some of my
code connects to multiple databases using different connection objects
for each one.
DB-SIG - SIG on Tabular Databases in Python
send messages to: firstname.lastname@example.org
administrivia to: email@example.com