[DB-SIG] Next Version [was Re: Preparing statement API]

Christopher Petrilli petrilli@amber.org
Sun, 30 Jan 2000 22:58:20 -0500

M.-A. Lemburg [mal@lemburg.com] wrote:
> Just my 2cents: auto commit is a *bad thing* and a pretty evil
> invention of ODBC. While it does make writing ODBC drivers
> simpler (ones which don't support transactions that is), it
> is potentially dangerous at times, e.g. take a crashing
> program: there is no way to recover from errors because the
> database has no way of knowing which data is valid and which is
> not. No commercial application handling "mission critical" (I 
> love that term ;-) data would ever want to run in auto-commit
> mode.

I'm going to back this up.  ANY serious application MUST manage its
own transactions, as otherwise you can't ever hope to control
failure modes.  Zope will ALWAYS run databases in non-autocommit mode.

Note that X/Open CLI specifies that it must be off by default I believe,
I can check the spc tomorrow.  ODBC violates this.

> Quoting is generally not needed since you pass in the data
> via bound parameters. The DB interface does the needed quoting
> (if any) without user intervention.

I can imagine some situation where it would be useful, but no Zope users
has EVER asked for this.  And it's probably one of the bigger database
application users in the Python world :-)

> See above... all drivers should default to auto-commit mode
> being *disabled*.

Amen, and all drivers that Digital Creations is involved in will always
behave this way, period.

> Just curious: In what state would a DB be if no transaction
> was explicitly started ?

Most database have implicit BEGIN TRANSACTION on anything of the following:

	* All DDL
	* All DML

Ta'da :-) This is true for Oracle, DB2 and Sybase that I know of.

| Christopher Petrilli
| petrilli@amber.org