| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: matrix encoding IS adjacency list
Vadim Tropashko wrote:
> As it has been written elsewhere, Nested Intervals gradually evolved
> into matrix encoding. To summarize, each node of a tree is encoded with
> 4 integers, which translates into the following schema design:
>
> table MatrixTreeNodes (
> a11 integer,
> a12 integer,
> a21 integer,
> a22 integer
> );
>
> As the title of the message says, there is adjacency list relation
> hidden there!
It's not surprising since you maintain a sort of materialized path in every node containing pairs (parent, child), So given a path 1.2.3.4, in order to access the fifth sibling just use 1.2.3.5, that's all. Much simpler than the matrix encoding. Received on Mon Sep 19 2005 - 15:04:08 CDT
![]() |
![]() |