Re: why hierarchy?
Date: 31 Jul 2006 18:33:06 -0700
Message-ID: <1154395986.109792.313530_at_h48g2000cwc.googlegroups.com>
Bob Badour wrote:
> Aloha Kakuikanu wrote:
>
> > Bob Badour wrote:
> >>A better question would be to ask if the requirements change and one
> >>needs to record when the friendship began, how does dbd record the bob
> >>and tom have been friends since October 12, 1993 ?
> >>
> >>One of course has to record that fact to answer questions like: What is
> >>the average duration of current friendships? What percentage of
> >>friendships last more than 15 years? Who began a friendship on October
> >>12, 1993 ? etc.
> >
> > new 'ternaryRelation
> > (new 'john 'person)
> > (new 'frank 'person)
> > (new '10/12/1993 'date)
> > (create 'ternaryRelation john frank 10/12/1993)
> >
> > Rather obvious, isn't it?
>
> And how does one write the queries I mentioned?
A little creativity would help:
(new 'average) (new 'duration) (select average duration from ternaryRelation)Received on Tue Aug 01 2006 - 03:33:06 CEST