Re: double linked list
Date: 1 Feb 2003 13:23:11 -0800
Message-ID: <c0d87ec0.0302011323.6b6e9e7f_at_posting.google.com>
>> Being a novice in SQL and after doing just a couple of days of
research on that matter ... <<
Another boss who will not pay for training :0!!
>> I got the impression that SQL hasn't yet evolved to that point to
SQL is a set oriented language, not a procedural language. You have
provide simple to use keywords for these kind of problems. <<
>> Oracle 9i seems to have been progressed over 8i in this regard. <<
>> Currently I figure to use
SELECT cs, cb, level
that will return a tree containing all paths with the root as the
common starting point. <<
It returns a sequential file that represents a table and that
represernation depends on the order of the records (they are no
FROM link_t
START WITH cb
IN (SELECT cb
FROM link_t
WHERE cs = 'A')
CONNECT BY PRIOR cb = cs;
>> I would load this structure into a middle tier and apply some sort
of commonly used tree traversial algorithm to it to search for nodes
and endpoints of interest. <<
You can do all of those searches in the Nested Sets model with a single query, no middle ware and they will run 10 to 100 times faster for large trees.
I have a book on trees in SQL that will be published later this year that you might want to buy. Received on Sat Feb 01 2003 - 22:23:11 CET