Re: double linked list
Date: 9 Feb 2003 18:35:53 -0800
Message-ID: <c0d87ec0.0302091835.5d250030_at_posting.google.com>
>> It's not important whether TC is built on the fly (for example,
with "recursive with" construct), or incrementally maintained. <<
I grant that once you have the transitive closure, a lot of problems are easy. But building it and storing each possible path as a separate row, is expensive.
In a nested set model, the (lft, rgt) pairs are ordered, so I have a left-most (oldest) child, a right-most (youngest) child and an ordering of the sibling in between.
>> Once again, it is implementation dependent in the sence that the
user is
locked into a particular labeling schema. <<
Okay. The phrase "implementation dependent" is used in ANSI/ISO Standards to mean that the vendor gets to determine something about a feature.
>> there only one adjacency list model. <<
Two.
Albert / \ / \ Bert Chuck / | \ / | \ / | \ / | \ Donna Eddie Fred
CREATE TABLE Parent_Down_Tree
parent child
(parent_id CHAR (8), -- null means child is the root
child_id CHAR(8) NOT NULL);
NULL 'Albert'
'Albert' 'Bert'
'Bert' 'Chuck'
'Chuck' 'Donna'
'Chuck 'Eddie'
'Chuck' 'Fred'
CREATE TABLE Child_Up_Tree
(parent_id CHAR (8) NOT NULL,
child_id CHAR(8)); -- null means child is a leaf
parent child
'Albert' 'Chuck' 'Albert' 'Bert' 'Bert' NULL' 'Donna' NULL 'Eddie' NULL 'Fred' NULL
True.
>> That might be correct. However, until Herarchy Theory in the
Relational Model is mostly undeveloped I prefer not to dismiss
alternative solutions easily. <<
And I am a "Standards Faniac" <g> ... Received on Mon Feb 10 2003 - 03:35:53 CET