Re: A new approach to storing ordered hierarchical data in RDBs.

From: vc <boston103_at_hotmail.com>
Date: 21 Nov 2006 09:07:01 -0800
Message-ID: <1164128821.601310.21200_at_h48g2000cwc.googlegroups.com>


goran wrote:
> Hello!
>
> I've discovered a new approach to storing ordered hierarchical data in
> RDBs. As far as I know there is no similar model out there and it
> differs significantly from traditional models (such as adjacency list,
> materialized path or the nested sets approach). A brief article
> describing the model (with accompanying sql code) can be found at
> http://orangebeta.blogspot.com/2006/11/on-storing-ordered-hierarchies-in-sql.html
>
> Goran

There a table you call "lineage". It is in fact the directed graph transitive closure that by itself should be sufficient to answer just about any graph reachability query.

The TC appoach to SQL queries has been rather well known since 1970s but alas TC maintenance is costly.

More interestingly, why bother ? SQL server implements the SQL-99 recursive query that makes graph queries pretty easy to implement. For some unknown reason, Oracle persists in *not* implementing the SQL-99 standard and remains loyal to its 'connect by' which, however, is sufficient to generate the transitive closure of a directed graph as well. Received on Tue Nov 21 2006 - 18:07:01 CET

Original text of this message