Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: matrix encoding IS adjacency list

Re: matrix encoding IS adjacency list

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 20 Sep 2005 09:41:36 -0700
Message-ID: <1127234496.491580.228310@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)' ).

At the risk being annoying, formally, materialized path is not an adjacency relation. For one thing, materialized path schema design

table (

   path varchar(1000)
)

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 - 11:41:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US