Re: Hierachical structures - an overview

From: David Morse <davem405_at_comcast.net>
Date: Wed, 21 Jan 2004 18:42:58 GMT
Message-ID: <RKzPb.115674$I06.806127_at_attbi_s01>


HI,

You can use FirstSQL/J ORDBMS and access the data with CONNECT BY to get at hierarchical data with recursive queries.

See http://www.firstsql.com/connectby.shtml for complete details.

Dave M.
"Mike MacSween" <mike.macsween.nospam_at_btinternet.com> wrote in message news:3ff7e63a$0$52881$5a6aecb4_at_news.aaisp.net.uk...
> I have an app I need a hierachical structure for. There seem to be 3 ways
of
> implementing this, as far as I can see:
>
> 1. Adjacency list.
> Pros - intuitive and relatively simple
> Cons - not easily accesible via standard SQL, needs recusive queries to
> crawl up or down the structure. I'll be doing this in Jet or perhaps MS
SQL
> Server, so Oracle's Connect by is out.
>
> 2. Nested Sets a la Joe Celko's BOM.
> Pros - easy to access the structure via standard SQL
> Cons - expensive/complex when the structure changes frequently.
>
> 3. Materialised Paths.
> Pros - easy to access the structure via standSQL, the hierachy is obvious
> and stored in a single field.
> Cons - None? The value in the 'path' field doesn't _appear_ to be atomic,
> that might well be a debatable point.
>
> 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.
>
> Any other techniques?
>
> Any other pros and cons?
>
> Yours, Mike MacSween
>
>
>
Received on Wed Jan 21 2004 - 19:42:58 CET

Original text of this message