Re: Nested sort, trying again

From: Mikito Harakiri <>
Date: 30 Sep 2005 13:57:49 -0700
Message-ID: <>

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 - 22:57:49 CEST

Original text of this message