Re: Heirarchical Data Structures. MS Access. Together?

From: Heinz Huber <>
Date: Mon, 28 Jul 2003 16:04:18 +0200
Message-ID: <3f252d63$0$48902$>

Lennart Jonsson wrote:
> "Jace Harker" <> wrote in message news:<>...

>>"--CELKO--" <> wrote in message


> [...]
>>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.

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

Original text of this message