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] |
hjstein@bfr.co.il (Harvey J. Stein) writes: | One interface I'm familiar with is the one which makes an underlying | database file look like an associative array (aka hash table). Sascha Ziemann <szi@aibon.ping.de> wrote: > Consider a SQL query which returns more data than your computer has > memory. I don't think that you will find a useful implementation that > let's the result look like a hash table. You missed the point. "Looks like a hastable" does not imply that it be implemented as an in-memory hashtable, only that it has a similar programming interface. (Notice also that Harvey talked about the "underlying database file" and you talk about result sets.) The more important point is that an SQL table does *not* look like hash table: A table may have multiple keys, can be retrieved in different search orders, and may have various secondary indexes. You can of course gain access to all the records using a mapper and a filtering predicate; the problem is you really want to translate the Scheme filter predicate into SQL, so the database engine can do the right optimizations and select the best indexes. Doing that is an interesting implementation challenge! --Per Bothner Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner