Re: matrix encoding IS adjacency list

From: VC <boston103_at_hotmail.com>
Date: Mon, 19 Sep 2005 22:59:44 -0400
Message-ID: <frKdnbiGx7aA5rLeRVn-jQ_at_comcast.com>


"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 ;)

>
Received on Tue Sep 20 2005 - 04:59:44 CEST

Original text of this message