Re: object algebra

From: Mikito Harakiri <mikharakiri_at_iahu.com>
Date: Wed, 25 Feb 2004 09:18:27 -0800
Message-ID: <zW4%b.13$OB.143_at_news.oracle.com>


"Marshall Spight" <mspight_at_dnai.com> wrote in message news:hXY_b.56566$4o.75850_at_attbi_s52...
> "Neo" <neo55592_at_hotmail.com> wrote in message
news:4b45d3ad.0402242223.6e84d475_at_posting.google.com...
> > > > It is not that you cant represent 4-th dimensional, trees and
complex
> > > > data structures using the "rectangularish" building block provided
by
> > > > RDM, it's just more difficult and sometimes impractical.
> > >
> > > I disagree that it's more difficult. Trees are easy.
> >
> > Will you implement an equivalent NULL-less solution to the example
> > posted at www.xdb1.com/Example/Ex076.asp so that we can establish
> > this?
>
> Here's my first cut. I reserve the right to change my design later. No
> nulls were used. I have to admit your test data made me feel a bit silly.
>
> create table EX76 (subject varchar(80), relator varchar(80), object
varchar(80));
> insert into EX76 values ('obeys', 'isa', 'relator');
> insert into EX76 values ('god', 'isa', 'thing');
> insert into EX76 values ('god', 'equals', 'god');
> insert into EX76 values ('it', 'is', 'obeys');
> insert into EX76 values ('force', 'isa', 'thing');
> insert into EX76 values ('army', 'isa', 'force');
> insert into EX76 values ('church', 'isa', 'thing');
> insert into EX76 values ('trinity', 'isa', 'church');
> insert into EX76 values ('person', 'isa', 'thing');
> insert into EX76 values ('john', 'isa', 'person');
> insert into EX76 values ('mary', 'isa', 'person');
> insert into EX76 values ('luke', 'isa', 'person');
> insert into EX76 values ('age', 'isa', 'thing');
> insert into EX76 values ('35', 'isa', 'age');
> insert into EX76 values ('john', 'is', '35');
> insert into EX76 values ('weight', 'isa', 'thing');
> insert into EX76 values ('130', 'isa', 'weight');
> insert into EX76 values ('mary', 'is', '130');
> insert into EX76 values ('color', 'isa', 'thing');
> insert into EX76 values ('red', 'isa', 'color');
> insert into EX76 values ('luke', 'is', 'red');
> insert into EX76 values ('dog', 'isa', 'thing');
> insert into EX76 values ('fido', 'isa', 'dog');
> insert into EX76 values ('computer', 'isa', 'thing');
> insert into EX76 values ('laptop1', 'isa', 'computer');
> insert into EX76 values ('army', 'obeys', 'god');
> insert into EX76 values ('trinity', 'obeys', 'god');
> insert into EX76 values ('john', 'obeys', 'army');
> insert into EX76 values ('mary', 'obeys', 'army');
> insert into EX76 values ('mary', 'obeys', 'trinity');
> insert into EX76 values ('luke', 'obeys', 'trinity');
> insert into EX76 values ('laptop1', 'obeys', 'john');
> insert into EX76 values ('laptop1', 'obeys', 'mary');
> insert into EX76 values ('fido', 'obeys', 'john');
> insert into EX76 values ('fido', 'obeys', 'mary');
> insert into EX76 values ('fido', 'obeys', 'luke');

And now please write a query that returns an aggregate age of all persons. In this schema with SQL, or with Neo's school science fair project. Received on Wed Feb 25 2004 - 18:18:27 CET

Original text of this message