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

From: Hugo Kornelis <hugo_at_pe_NO_rFact.in_SPAM_fo>
Date: Sun, 23 May 2004 22:36:04 +0200
Message-ID: <uc22b0l64ie0t572ia7613trbobcdb503q_at_4ax.com>


On 22 May 2004 17:54:14 -0700, Neo wrote:

>> I saw that you wanted a GENERIC solution, that would allow
>> ANY hierarchy. That's why I renamed the table "hierarchies", added the
>> hierarchy column and added a parameter to the procedure.
>
>Actually the provided solution is inconsistent in that the class
>hierarchy of things, the most important one, isn't encoded in the
>hierarchies table. It is instead encoded in a dedicated table named
>types.

Yes, indeed. That's because I normalized the data (as requested in the original message). Note: see my other message as well, where I provide an additional table to keep track of the class hierarchy.

> The procedure that generates the report utilize hierarchies
>table and not the types table.

Of course. If you'd replace the statement 'john isa person' by 'john isa dog' but leave all 'xxx leader yy' statements intact, the Common Ancestor Report would remain unchanged. This report is based on the leader hierarchies, disregarding the class of a thing. Why would I use a table in my query if it doesn't have any effect on the requested output?

> And if one were to encoded the class
>hierarchy in hierarches table also, it would be redundant and possibly
>different.

I'm not sure if I understand what you try to say here.

Best, Hugo

-- 

(Remove _NO_ and _SPAM_ to get my e-mail address)
Received on Sun May 23 2004 - 22:36:04 CEST

Original text of this message