[plt-scheme] PLT and Database access

From: nishad at ptolemy.tlg.uci.edu (nishad at ptolemy.tlg.uci.edu)
Date: Fri May 27 20:35:42 EDT 2005

Thanks to everyone for your very helpful replies.  I'm playing with
scheme-pg, and it's looking like the answer (David Neu, can I write to
you offlist with some questions, or would you prefer them here?)


Jacob Matthews wrote:
> 
> 
> I said before and I'll say again that once the web site project is done, 
> I'm going to try to write up an entry for the Scheme Cookbook 
> summarizing the current state of affairs in the world of connecting PLT 
> Scheme to a database. It's a topic that I think is in dire need of 
> better documentation.
> 

My troubles so far have mostly to do with the ODBC factor.  I have,
from the bottom up, a Postgres release, a unix ODBC driver manager
(two choices), a Postgres-specific driver (at least three choices),
the v209/299 differences (albeit temporary), SrPersist (tricky to
compile), and SchemeQL (buggy, possibly moribund), all of which have
to come together with compatible versions.  The psqlodbc releases
alone sometimes compile with one driver manager, sometimes with the
other.  Based on the fun I had trying to get this to work on Solaris,
I can't say it's the way to go unless 1) the cross-platform promise of
ODBC is vital to your work, and 2) hacking a package like
SrPersist/SchemeQL is as easy to you as using it (the line between
these two sorts of programmers seems to be much finer in Scheme than
in other languages, which is in some ways a dangerous thing).

<Wishful thinking> 
I'm not sure what a universe solution would be.  A standard (SRFI?)
interface of database bindings would need an implementation layer per
DB program per OS.  This could be done either scheme-pg-style (use the
DB's libraries) or spgsql-style (do it entirely in Scheme).  That
still seems like less work, and potentially more stable, than the ODBC
route.  DB libraries and protocols are much more stable than driver and
driver manager releases, AFAICT.

At any rate, one longs for the day when all this is as easy and
brilliant as the parser tools, XML, and web programming collections
that PLT provides.
</Wishful>

Cheers,

nishad
-- 
"Things ain't been the same since the blues walked into town."

                                                -- Larry Love



Posted on the users mailing list.