Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: why hierarchy?

Re: why hierarchy?

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 31 Jul 2006 15:21:15 -0700
Message-ID: <1154384475.623506.67260@75g2000cwc.googlegroups.com>

Bob Badour wrote:
> JOG wrote:
> > Neo wrote:
> >
> >>>how you would represent something like "A person called Bob is friends with a person called Tom" in your system (obviously that's a bidirectional relationship).
> >>
> >>(new 'bob 'person)
> >>(new 'tom 'person)
> >>(new 'friend 'verb)
> >>(create bob friend tom)
> >>(create tom friend bob)
> >
> > ok gotcha, good start. Then you have:
> >
> > bob --- is_friends_with ---> tom
> > tom --- is_friends_with ---> bob
> >
> > What if I wanted to record a different sentence - "A person called
> > John is friends with Frank within the remit of Work"? (i.e. they aren't
> > friends outside of workhours)
>
> 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? Received on Mon Jul 31 2006 - 17:21:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US