[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scsh in PLT Scheme?

> Maybe we need to create an SRFI for a database connectivity mechanism.
> What do you think it would need to include?
> Or, should we make something like Francisco's Scheme QL the layer we
> want to work with, and write adaptors that connect it to various
> databases...

SchemeQL has it's place, but I consider it more of a SQL abstraction
than a database connectivity abstraction.  I would prefer something a
little lower level.  More along the lines of the Perl DBI, or the Python
DB-API.  Once a general connectivity mechanism has been worked out,
SchemeQL could then be modified to work on top of it.  This way we can
satisfy both the people who want a nice scheme-like way to program SQL
and those who want their SQL to look like SQL.

At minimum, the connectivity mechanism should provide the obvious
things, like connection and disconnection to a database server,
transaction management (automatic or manual commits), the execution of
non-data-returning statements (such as INSERT, DELETE and UPDATE), and
the execution of data-returning statements like SELECT (including
retrieving the results).  A less obvious feature might be the ability to
fetch BLOBs in chunks rather than all at once like Perl and Python make
you do it.

Additionally it would be nice if it were flexible enough to support
features unique to a specific database (PostgreSQL's large objects, and
Interbase's named transactions come to mind here).  At least as long as
such extensions don't interfere with conformance to the base standard.

Pat Ekman