| 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! Let see, the n-th child
> [[a11_child,a12_child][a21_child,a22_child]] of the node
> [[a11_parent,a12_parent][a21_parent,a22_parent]] is calculated by the
> formulas
>
> a11_child = a11_parent * n + a12_parent
> a12_child = a11_parent
> a21_child = a21_parent * n + a22_parent
> a22_child = a21_parent
Never mind. The child is referred to parent as
a11_parent = mod(a11_child,a12_child) a11_parent = a12_child a21_parent = mod(a21_child,a22_child) a21_parent = a22_child
which is not exactly referential integrity constraint:-( Received on Thu Sep 15 2005 - 19:33:05 CDT
![]() |
![]() |