Re: Nearest Common Ancestor Report (XDb1's $1000 Challenge)

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Thu, 27 May 2004 23:24:58 +0200
Message-ID: <9rmcb0p7qha0ju7s8bbj6ke68a4mr76gpm_at_4ax.com>


On 26 May 2004 11:48:55 -0700, Neo wrote:

>> > In XDb1's db, 'john isa thing' is not stored because it can be derived.
>> > Since 'isa' is transitive 'john isa thing' is derived
>> > form 'john isa person' and 'person isa thing'.
>>
>> In my database, 'john isa thing' is not stored either, because it can be
>> derived. Everything is a thing.
>
>Show me a method to determine person's class with the provided
>solution and I will show you how it will fail if the data is changed
>(ie the name of thing is changed from 'thing' to 'thingy' or
>'object'). This failure will not occur with XDb1.

(Based on original implementation)

SELECT     things.thing, classes.class
FROM       things
LEFT  JOIN classes
      ON   classes.thing = things.thing
WHERE      things.thing = 'john'


(Based on second implementation)

SELECT     things.thingName, classes.className
FROM       things
LEFT  JOIN ClassOfThings
      ON   ClassOfThings.thing = things.thing
INNER JOIN classes
      ON   classes.class = ClassOfThings.class
WHERE      things.thingName = 'john'


Best, Hugo

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Thu May 27 2004 - 23:24:58 CEST

Original text of this message