[Zope-dev] Is ODBC the way to go ?
Christopher Petrilli
petrilli@digicool.com
Fri, 04 Feb 2000 13:54:51 -0500
On 2/4/00 12:06 PM, Andrew M. Kuchling at akuchlin@mems-exchange.org wrote:
> Christopher Petrilli writes:
>> We'd be ecstatic if the Python community made more adapters, but we
>> currently support Sybase and Oracle, and its a pretty big burden given we
>> add no value to the equation. If you were to offer an Informix adapter that
>> you supported, all the Informix people would love you, as would we. ;-)
>
> Note that writing a DA isn't documented, and there's no test suite for
> verifying a DA's correct operation.
Actually it has been documented for several months, I wrote a HOW-TO and
announced it to the list with a resounding THUD. I'm currently working with
our ODBC DA effort in a closed loop to try and improve it. You can find it
here:
http://www.zope.org/Members/petrilli/WritingADA
It was put up 11/3/1999. As for no test suite, this is a correct assertion,
and we are working to create regression code for all things, but it's a slow
process.
> We use an mxODBC DA that I hacked out of the Oracle DA (I haven't yet
> gotten around to releasing it -- I know, I know...). A little while
> ago, it started occasionally raising an exception about the connection
> being broken and I haven't yet tracked down the cause. It's probably
> a bug in my code, but it might be a bug in the Oracle DA that I used
> as a starting point. Maintaining sychronization with the Oracle DA
> would be tedious.
It shouldn't be hard to use it as a basis for what needs done though,
especially after reading the HOW-TO.
> I found that the Oracle DA doesn't really have to change very much to
> use mxODBC. Maybe this is an argument for pushing the whole Oracle DA
> into some standard product, where you'd write a single adapter module
> for each new database, rather than copying the whole DA over and over
> again.
This was the goal of the DB-API, but we don't need most of it. This is the
point of ODBC as well. Push the standard further down the stack:
+-------------+
| ZOPE |
+-------------+
| SQL Methods |
+-------------+
| DA |
+-------------+
| DB-API |
+-------------+
| OCI |
+-------------+
| Oracle |
+-------------+
Instead what we'd really like to see is something more abstract below
DB-API. I talked a lot with the ActiveState guys at the conference on this
one. It's a long road, but Python is sorely lacking in comparison to Perl
in this arena, and we can't solve it alone.
Chris
--
| Christopher Petrilli Python Powered Digital Creations, Inc.
| petrilli@digicool.com http://www.digicool.com