Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!newstand.syr.edu!news.maxwell.syr.edu!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!feed1.news.erols.com!howland.erols.net!blackbush.xlink.net!ins.net!heeg.de!uucp
From: Hasko Heinecke <hasko@heeg.de>
Subject: Re: 3 Weekend Rants
Content-Type: text/plain; charset=us-ascii
Message-ID: <32DCAD63.41C67EA6@heeg.de>
Sender: uucp@heeg.de
Content-Transfer-Encoding: 7bit
Organization: Georg Heeg - Object-Oriented Systems
References: <19970111182300.NAA23036@ladder01.news.aol.com>
Mime-Version: 1.0
Date: Wed, 15 Jan 1997 10:11:47 GMT
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 4.1.3 sun4c)
Lines: 41

Dogmat wrote:
> 
[...]
> Or forget relational tables and just consider a MultiKeyedLargeDictionary
> in ST. Wouldn't it be great to have one that optimizes its indexing based
> on a schema and traverse definition?
[...]
>    Multikeyed Dictionaries would be neat.


I thought about this myself a while ago so here's my $0.02:

You need fast sequential and keyed access to a collection. Then, you
want several sort orders and keys in the same collection. Finally, your
collection should be optimized to do the various look-ups.

So what you need is a collection that is aware of its sort oder. The
sort orders need to know how they sort what so that they can re-sort
when it's needed, and for optimization.

IMHO, all you need is a sort order object (a concept widely known as an
"index"), and a collection class that is aware of its sort orders.

Implementation is left as an exercise to the reader. :-)

No really, when I found out that what I needed was already there (I'm
using GemStone) I didn't bother to implement things myself. Sort of the
same spirit as when you talked about using relational engines to handle
the indices.

I'm not saying that GemStone collections do everything you'd need them
for. In particular, indices for small collection tend to be too big and
query optimization is not automagic. But then, you mentioned you were
looking for an OODBMS, too. :-)

Hasko
-- 
+------------------------------------------------------+
| Hasko Heinecke, Georg Heeg - Object-Oriented Systems |
| mailto:hasko@heeg.de or try http://www.heeg.de/      |
+------------------------------------------------------+
