Re: matrix encoding IS adjacency list

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 19 Sep 2005 20:18:24 -0700
Message-ID: <1127186304.410827.219810_at_g44g2000cwa.googlegroups.com>


VC wrote:
> "Vadim Tropashko" <vadimtro_invalid_at_yahoo.com> wrote in message
> news:1127179828.730374.139640_at_g14g2000cwa.googlegroups.com...
> > VC wrote:
> > 'find tuples where prefix(materialized_path) = a.b
> > and length(materialized_path)=3'
> >
> > which is not the same as
> >
> > 'find tuples where parent_id = 5'
>
> Come to think about it, you do not need the length, the m.p. query can be
> expressed as: 'find tuples where parent(materialized_path) =
> parent_materialized_path', where parent(x) extracts the parent path by
> removing the last path element. Of course, you'd create a function-based
> index to speed the query, as you would with a 'real' parent id. The
> materialized path is an adjacency list ;)

Which is equivalent to saying: "Let's represent a node with both materialized path and truncated path". Surely, there is a referential integrity constraint between these two columns. The point is that you artificially made that second column. Received on Tue Sep 20 2005 - 05:18:24 CEST

Original text of this message