This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
David Welton <davidw@gate.cks.com> writes: > On Mon, Oct 26, 1998 at 11:17:54AM -0500, Russell McManus wrote: > > > > See http://idt.net/~mcmanus for a Sybase dblib interface for guile. > > Before everyone goes off and writes drivers for their favorite DB, > would it not be a good idea to learn from history, and try and create > a standard sort of DB interface, like Perl's DBI? I think Python has > something like this as well... Things would be easier if we did this > now, instead of writing a zillion different drivers willy nilly. Generally, I don't like to hear people discouraging others from writing useful code. But I agree that it would be nice to have a programming layer that is portable across db interfaces, and that it would probably save overall work if that layer was defined sooner rather than later. A survey of existing work is the right place to start when trying to define this portable layer. I don't know ODBC or any of the database interfaces that support cursors, so I use a very simple interface to the database from scheme. The operations that are supported in my interface are basically these: 1. create a connection to the database server. 2. send sql to the server. 3. process results. to process results, the user provides two 1-ary procedures. the first 1-ary proc is a row handler. a row is a vector holding data values for each column. the second 1-ary proc gets called with the column headings once at the beginning of each set of results. Voila, a database interface. -russ -- In theory, there is no difference between theory and practice. But, in practice, there is.