| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: why hierarchy?
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 Mon Jul 31 2006 - 20:33:06 CDT
![]() |
![]() |