Re: yet another hierarchy model

From: Vadim Tropashko <nospam_at_newsranger.com>
Date: Thu, 18 Oct 2001 23:12:41 GMT
Message-ID: <JlJz7.34751$ev2.42691_at_www.newsranger.com>


In article <eef24980.0110181144.67155eeb_at_posting.google.com>, KWillets says...
>
>Mikito Harakiri <nospam_at_newsranger.com> wrote in message news:<ML4z7.32105$ev2.39181_at_www.newsranger.com>...
>> In article <ju2z7.31942$ev2.39130_at_www.newsranger.com>, Vadim Tropashko says...
>> >
>> >In article <eef24980.0110161354.7eb13a84_at_posting.google.com>, KWillets says...
>> >>
>> >>
>> >>1. Assigning unique prime numbers to all leaf nodes, and assigning
>> >>each intermediate node the product of its subordinates.
>> >
>> >
>> > Albert (2*3?)
>> > / \
>> > / \
>> >Bert (2) Chuck (?)
>> > \
>> > \
>> > Fred (3)
>> >
>> >
>> >What to assign to Chuck? 3? He is not on leaf node, however.
>>
>> Chuck = 3*3 and Albert = 2*3*3.
>
>Actually, I hadn't thought about nodes with a single descendant, but
>that's an interesting way to get around the problem. In any case,
>these are pretty much the same as the materialized path approach,
>except that one uses division or modulus instead of LIKE or BETWEEN to
>find descendants. I was being a bit facetious as to the usefulness of
>this approach, but it's fun to puzzle with.

One big distinction between materialized path and your decomposition into product of primes is that the first one is resilient to tree modifications, while the second one isn't (what happens if you add 2 more children to Fred?). Therefore, the similarity between "Albert.Chuck.Fred" and 2*3*3 is only superficial; I would suggest that they are different methods. Received on Fri Oct 19 2001 - 01:12:41 CEST

Original text of this message