Re: Generalised approach to storing address details

From: Neo <neo55592_at_hotmail.com>
Date: 13 Dec 2006 09:44:13 -0800
Message-ID: <1166031853.807775.245830_at_n67g2000cwd.googlegroups.com>


> > 1) Parent(x,y) => Ancestor(x,y)
> > 2) Ancestor(x,y) & Ancestor(y,z) => Ancestor(x,z)
>
> If read as a first-order logic implication,  the above does not
> uniquely define the Ancestor relation.  Consider Ancestor(X,Y) = true.
> If read as a Prolog program,  the above is more expressive than any
> relational algebra query because Prolog has recursion(resolution)  and
> r.a. does not.

Below is a dbd example, which verifies the transitive relationships between people in the following multi-rooted employee hierarchy.

john

   jim
     joe
mary

   jim
     joe

(new 'employee)
(set employee vbType transitive)

(new 'john)
(new 'mary)
(new 'jim)
(new 'joe)

(set john employee jim)
(set mary employee jim)
(set jim employee joe)

(; Following return true)
(verifyRel john employee joe)
(verifyRel mary employee joe)

(; Following returns false)
(verifyRel john employee mary)
Received on Wed Dec 13 2006 - 18:44:13 CET

Original text of this message