Re: Hierachical structures - an overview

From: Mike MacSween <mike.macsween.nospam_at_btinternet.com>
Date: Sun, 4 Jan 2004 16:55:47 -0000
Message-ID: <3ff84593$0$52882$5a6aecb4_at_news.aaisp.net.uk>


"Lennart Jonsson" <lennart_at_kommunicera.umea.se> wrote in message

> > 1a. Adjacency list + as per:
> >
http://fungus.teststation.com/~jon/treehandling/TreeHandling.htm
> > Not sure about this. It claims to give the path upwards. It looks like
it
> > merely gives the ancestors, which isn't the same thing.

Thanks you for putting me onto that in the first place

> In what way does this differ? Are you meaning that the set of
> ancestors is unordered, compared to the path?

I think so

> In that case the path is
> easy to create from the ancestor set.

No doubt. I'll have a go (unless you can do it off the top of your head).

> It is also possible to create a total ordering of a subtree and
> thereby do, for example an inorder traversal. However, this becomes
> impractical for relatively small subtrees since the total ordering is
> prox O(n^2) (where n is the cardinality of the ancestor relation for
> the subtree)
>
>
> > Any other techniques?
> >
>
> Recursive SQL. It is supported by atleast two databases, DB2 (WITH)
> and Oracle (CONNECT BY).

This will be Jet or SQL Server.

Thanks, Mike MacSween Received on Sun Jan 04 2004 - 17:55:47 CET

Original text of this message