Re: yet another hierarchy model

From: KWillets <kwillets_at_looksmart.net>
Date: 18 Oct 2001 12:44:35 -0700
Message-ID: <eef24980.0110181144.67155eeb_at_posting.google.com>


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. Received on Thu Oct 18 2001 - 21:44:35 CEST

Original text of this message