Re: Heirarchical Data Structures. MS Access. Together?

From: Heinz Huber <hhuber_at_racon-linz.at>
Date: Mon, 28 Jul 2003 16:04:18 +0200
Message-ID: <3f252d63$0$48902$91cee783_at_newsreader02.highway.telekom.at>


Lennart Jonsson wrote:
> "Jace Harker" <jharker_at_marlboro.edu> wrote in message news:<vhuhvgjqr27d83_at_corp.supernews.com>...
>

>>"--CELKO--" <71062.1056_at_compuserve.com> wrote in message
>>news:c0d87ec0.0307220645.2ccab82f_at_posting.google.com...

>

>
> [...]
>
>
>>Very nice!  Once I saw what you were getting at, the strategy made perfect
>>sense to me.  It certainly adds efficiency in several nifty ways, especially
>>in finding removed parents of children.
>>

>
>
> In most cases - IMHO - one should not allow removal of a parent (i.e.
> someone that has children). Instead add functionlity that prevents
> removal of such nodes. Dont know how that is done in the "pure" nested
> set approach, but it is quite easy if you add parentid to the
> relation. Also, if you are interested in another aproach dealing with
> hierarchies, drop me a note and I can send you
> some links.

In the "pure" nested set, any parent has (right - left - 1) / 2 = number of children.
Therefore it's easy to find out whether there are any children.

Regards,
Heinz Received on Mon Jul 28 2003 - 16:04:18 CEST

Original text of this message