Re: matrix encoding IS adjacency list
Date: 20 Sep 2005 09:41:36 -0700
Message-ID: <1127234496.491580.228310_at_g49g2000cwa.googlegroups.com>
VC wrote:
> It's not. We do not need a separate colum, the parent id can be extracted
> from a node m.p. using a function ( 'parent(materialized_path)' ).
has only one column, while for adjacency relation you need at least two. Matrix encoding has more than enough columns - 4. (Well, object propellerheads might insist there is only one:-)
Materialized path encodes the global position of a node in a hierarchy, so that you can derive all the nodes in the local neighourhood. The adjacency relation, however, is encoded implicitly, not like explicit foreign key constraint. In a word, you can prove your point if you show how to declare foreign key constraint. AFAIK, foreign key constraints can't be declared on derived columns. Received on Tue Sep 20 2005 - 18:41:36 CEST