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 sort, trying again

Re: Nested sort, trying again

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 30 Sep 2005 13:57:49 -0700
Message-ID: <1128113869.119690.254760@f14g2000cwb.googlegroups.com>


vc wrote:
> David Cressey wrote:
> > If PATH contains the entire materialized path in a string, with dots
> > between the path elements, then ordering by path should be enough to put
> > all your rows in the right order. LEVEL can be transformed to the right
> > indentation, before printing the NAMEX.
>
> Order by the m.p. will work only if the sibling were sorted in the
> desired order during the m.p. creation. That's rrarely the case.
>
> The m.p. creation process for a hierarchy represented by a (parent,
> child) adjacency list is, in fact, a depth-first traversal.

"Materialized" adjective is indeed confusing. Order by (dynamically generated) path. Now, in order to be able to generate path strings, query language should admit the LIST aggregate function (see W.Litwin "The LIST aggregate function", built in LIST function Sybase Anywhere, or allow it to be programmed as user-defined aggregate). I also suspect that some analytical capabilities might be required: when ordering node's children by some criteria, it might be handy to enumerate them with integers. Received on Fri Sep 30 2005 - 15:57:49 CDT

Original text of this message

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