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: Nested Sets vs. Nested Intervals

Re: Nested Sets vs. Nested Intervals

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 17 Nov 2005 14:19:32 -0800
Message-ID: <1132265972.718631.72950@g14g2000cwa.googlegroups.com>


asdf wrote:
> > > What are the other advantages?
> >
> > Write a query in the adjacency model that calculates the total number
> > of hits in a subhierarchy.
>
> I could do that in the adjacency model recursively by storing the
> number of website listings in a column.

I don't understand did you mean "precompute hierarchical total", or "calculate it recursively". You can precompute only a limited number of aggregated totals. Some others you would have to query. Example:

How many subcategories called "TOOLS" are descendants in category "/HOME"? eg.
/HOME/GARDEN/TOOLS
/HOME/SOFTWARE/PC/TOOLS You can find them recursively, but (unlike set of queries that find all the ancestors) it is going to be slow. (The chain of ancestors is normally small compared to the size of the tree, the subtree of descendants is not). Received on Thu Nov 17 2005 - 16:19:32 CST

Original text of this message

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