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: Transitive Closure and Relational Division

Re: Transitive Closure and Relational Division

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 21 Dec 2006 13:44:59 -0800
Message-ID: <1166737499.015635.321350@a3g2000cwd.googlegroups.com>

Vadim Tropashko wrote:
...
> In a nested sets model we do hierarchical query via relational
> division. "find all the
> ancestors of node 2" is done in 2 steps:
>
> 1. Find all the elements of the set at node 2. This would be
> pi(elem) sigma(set=2) which evaluates into
>
> elem
> ----
> 2
> 4
>
> Here is is naturally to ask: "Aren't you selecting and projecting on
> the wrong columns? It
> appears as if you look for all the DESCENDANTS of the node 2!". Hang on
> to step 2.
>
> 2. Divide the relation T(set,elem) by this relation, that is find all
> the sets that contain
>
> set {2,4}.

TCRelation / ancestors = descendants?
TCRelation / descendants = ancestors? Received on Thu Dec 21 2006 - 15:44:59 CST

Original text of this message

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