| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: matrix encoding IS adjacency list
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
![]() |
![]() |