[DB-SIG] pure python database driver

Anthony Tuininga anthony at computronix.com
Thu May 20 10:04:43 EDT 2004


Oracle requires the Oracle client libraries. Period. I haven't heard of 
anyone providing their own independent drivers for accessing Oracle 
(unless you count ODBC and friends). Oracle has provided an "instant 
client" with 10g which is significantly pared down and much easier to 
install -- I haven't played with it much but if you want simple, that's 
the way to go.

As far as "pure" Python goes, I guess it depends on how far you want to 
go. The ctypes module (for example) gives you access to routines written 
in shared libraries in C without having to write C code. Of course, the 
ctypes module is written in C.... :-) And the difference in performance 
can be quite significant so I think that C definitely has its place and 
the realm of database drivers is one of them. :-)

Randall Smith wrote:
> The same reason the Java type 4 jdbc drivers exist.  What I mean by 
> portability is that it will work on nearly any machine without 
> dependency issues.  Just drop the driver into your app.  I've been 
> wanting this ever since I started working with Oracle.  I hate having to 
> install the Oracle client libraries just to talk to the database. 
> Installing Oracle on GNU/Linux has given me heartache many times.  I 
> don't know if one could write a Python only driver for Oracle because of 
> proprietary issues.  Does Oracle release specs for their protocol?
> 
> Although I don't like programming in Java, one thing I do admire is that 
> applications are often Pure-Java and I try to make my Python 
> applications as Pure-Python as possible.  I think one should only write 
> in C when performance is poor.
> 
> You have confirmed what I believed to be true; The reason these JDBC 
> type 4 like drivers do not exist is that nobody sees enough benefit to 
> justify the work.
> 
> Randall
> 
> Federico Di Gregorio wrote:
> 
>> Lì mercoledì, 2004/05/19 alle 21:46, -0500, Randall Smith ha scritto:
>>
>>> Does anyone know of existing database drivers written in pure 
>>> Python?  I realize this may not perform well, but I'm curious.  The 
>>> portability would be nice.
>>
>>
>>
>> that would mean reimplementing all the client/server protocol, that
>> changes for *every database*. why port thousands lines of C code to
>> python (for each database) when the original client libraries are
>> already there (and well-tested?)
>>
>> moreover the portability simply would *not* be. as i said above every
>> database uses its won protocol.
>>
>> federico
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> DB-SIG maillist  -  DB-SIG at python.org
>> http://mail.python.org/mailman/listinfo/db-sig
> 
> 
> _______________________________________________
> DB-SIG maillist  -  DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig



More information about the DB-SIG mailing list