Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] sybase interface?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-04-16 (16:00)
From: Michael Neumann <uu9r@s...>
Subject: Re: DBI (was : [Caml-list] sybase interface?)
Vitaly Lugovsky wrote:
> On Fri, 11 Apr 2003, Christophe TROESTLER wrote:
> > A while ago, it was said on this list that a common database
> > interface
> > (? la Perl DBI) would be nice.
>  Nice? May be. But impossible. E.g., for Oracle you have to use
> prepared statements with variables substitution, when in
> Postgres there is no need to mess with this stuff - performance
> is good enough if you create a new statement for every request.
>  Postgres have asyncronous messages. OCI don't. Other database
> interfaces could be even more different...

IMHO many people just want to issue their SQL commands and get
back the resulting rows, without writing too much code. And they 
don't use many of the special features, like asynchronous messages etc. 

If someone want's to start a DBI-like interface, please also have a look
at Ruby/DBI (I'm the creator of it).

And it's DBI specification:

Also take a look at Python's DB API.

> > Are there people interested on this list?  Personally I don't
> > have

Even if I'm not a OCaml guy, I'd like to help with the interface
as much as I can.  

> > much time to contribute but as I will be soon in need of using
> > DB, I
> > am willing to make an effort.
>  I have no problems in using two quite different APIs in a
> mid-layer - Oracle and Postgres. And I don't think I'll ever will
> try to use any kind of generic interface. I ate this shit with
> JDBC, and I don't want it any more...

You can't compare JDBC with DBI. DBI is a very pragmatic approach to
a database interface, without much overhead (in terms of additional code), 
whereas JDBC doesn't help write less code. I don't like to read hundreds
of pages, before I can issue a simple SQL statement. With DBI, it's just
5 lines of code.



To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: