Re: Implementing trees in a relational database

From: --CELKO-- <71062.1056_at_compuserve.com>
Date: 1 Aug 2002 15:06:53 -0700
Message-ID: <c0d87ec0.0208011406.63b0337b_at_posting.google.com>


>> there is also a "declarative spirit" that is often overlooked. <<

I agree with the need for a "declarative spirit", but would add that SQL is a set oriented language, so we can define a tree as a set of subtrees, which are themselves subtrees.

I view the (lft,rgt) pair in the nested set model (I never heard of the "Santoro & Khatib interval scheme") as a single co-ordindate which happens to have two parts, just as an (x,y) Cartesian co-ordinate or a complex number (x + yi) does.

The materialized path can also be regarded as a (very long!) atomic value that identifies a path.

In both these models, it is possible to tell if any node is a superior or a subordinate of any other node from the rows themselves.

>> Another example of "labeling independent" query is oracle "connect
by" syntax: <<

Strongly disagree and I think I can convince you. This is a hidden cursor and the PHYSICAL ORDER of the output has meaning. It tells if any node is a superior or a subordinate of any other node from the order of the display. This is not set oriented, not declarative in nature. It is sequential. Received on Fri Aug 02 2002 - 00:06:53 CEST

Original text of this message