[GOODIE] BinaryRelation

Brian T Rice water at tunes.org
Fri Mar 28 05:11:17 UTC 2003


On Thu, 27 Mar 2003, Avi Bryant wrote:

> On Thu, 27 Mar 2003, Brian T Rice wrote:
>
> Then I guess I should mention I've been working on the same thing for the
> last few days ;).  You can find a snapshot of the Roe (Relational Object
> Expression) library up at
> http://beta4.com/squeak/aubergines/source/Roe.st.

I posted my current work to
http://tunes.org/~water/Collections-Relations.st

> I suspect we're approaching it rather differently, however. My main goal
> has been to build an alternative way of interacting with relational
> databases that's idiomatic to both Smalltalk (unlike SQL strings) and to
> the data model (unlike O/R mapping).  It's an experiment, but I'm finding
> it promising: the ability to compose and filter a bunch of relations and
> then have a single SQL query generated as needed to produce the results
> has some definite potential.

This is compatible with what I am doing, but my goal has generally been to
implement something akin to QSOUL, which obviously has had more attention
to it and become a lot more useful in that area, and also I never had a
commercial goal to fulfill through this. It's been mostly academically-
motivated.

> The same operations and lazy querying can also be performed with relations
> that are purely in memory, but there's no optimization of the evaluation -
> I'm using that more for testing purposes than for anything else.

A cursory look reveals that we're going about it differently, but this can
be fixed fairly quickly. I basically have a lot of relational operators
defined as classes that can perform queries on their own.

The general merged-design that I can see would allow me to use my object-
and image-querying tools with the same expression-style trees as you are
using. One thing that's already built in to the system I'm using is a full
set of relational algebra operators, which allows you to do things like
following a path through a relation left-to-right or vice-versa in a very
transparent manner. Joins and such are also represented and implemented.

The Arrows code mostly draws from a prolog program called LIBRA, which is
just a lazy interpreter of binary relational algebra with some added data
structure types and conversions for utility's sake.

I'll explain more about how this could proceed off-list. Thanks!

-- 
Brian T. Rice
LOGOS Research and Development
mailto:water at tunes.org
http://tunes.org/~water/



More information about the Squeak-dev mailing list