Re: Generalised approach to storing address details

From: Neo <neo55592_at_hotmail.com>
Date: 11 Dec 2006 08:04:45 -0800
Message-ID: <1165853085.141019.280450_at_n67g2000cwd.googlegroups.com>


> It's not obvious to me what that would be useful for. Can you elaborate a bit?

Trying to duplicate the below dbd example might help. It represents that john likes mary, john hates bob, and like is opposite of hate. Then a query finds the person with whom john's relationship is opposite that of with mary. It is not imossible, just highly impractical to implement in RMDBs in a systematic way (ie follows IP, NULL-less, normalized, non-redundant and remains so when extended).

(new 'john)
(new 'mary)
(new 'bob)

(new 'like)
(new 'hate)
(new 'opposite)

(set like opposite hate)
(set hate opposite like)

(set john like mary)
(set john hate bob)

(; Get person with whom

    john's relationship is opposite of that with mary)
(; Gets bob)
(get john (get (get john * mary) opposite *) *)

(; Get person with whom

    john's relationship is opposite of that with bob)
(; Gets mary)
(get john (get (get john * bob) opposite *) *)
Received on Mon Dec 11 2006 - 17:04:45 CET

Original text of this message