Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: matrix encoding IS adjacency list

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@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 Mon Sep 19 2005 - 21:59:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US