| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Nested set model with large gaps and spreads in the numbering
>> Writing a book AND moving! You're a glutton for punishment. :-) <<
This was not quite my plan, but life is what happens while you are working on your dreams.
>> Looking over the many posts in this forum concerning the nested set model, I can't help but wonder if one could define the sets equally well by replacing the "left" and "right" columns with "node_id" and "num_descendants" columns. <<
Actually I have a suggestion somewhat like that. use the pre-order traversal number and the rightmost son.
OrgChart
emp trv_nbr rgt_most
The organizational chart would look like this as a directed graph:
Albert (1,6)
/ \
/ \
Bert (2,2) Chuck (3,6)
/ | \
/ | \
/ | \
/ | \
Donna (4,4) Eddie (5,5) Fred (6,6)
Remember a shorthand in PL/I where you coudl replace a string of END keywords with a single "END <block name>" construct? Same idea. Received on Fri Oct 04 2002 - 14:51:04 CDT
![]() |
![]() |