Subject Re: [firebird-support] Re: Database tree-like structure
Author Adomas Urbanavicius
willy_metra wrote:

>>Links
>>-----
>>1, 2
>>2, 3
>>1, 4
>>1, 5
>>1, 6
>>
>>
>>4 childs for the same parent. item 2 has 1 child (which is item 3).
>>
>>
>
>OK, clear now... and what's the difference from Alexander solution,
>please?
>
>
>
Idea to have columns (ID,PARENT_ID) is quite good, I am using this
structure for several projects, and have faced only 2 serious issues
-a) to get all childs and subchilds of node x.. b) to get all parents ,
grandparents etc for node x. One solution is recursive, another quite
tricky with some cycles, but both of them are not very quick :(.., as
there you have to make separate reads for each level of data nodes.
Adomas




>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>