Any tips of how to handle hierarchial trees in relational model?

Posted by George on Stack Overflow See other posts from Stack Overflow or by George
Published on 2010-03-16T12:11:54Z Indexed on 2010/03/16 12:16 UTC
Read the original article Hit count: 208

Filed under:
|
|

Hello all.

I have a tree structure that can be n-levels deep, without restriction. That means that each node can have another n nodes.

What is the best way to retrieve a tree like that without issuing thousands of queries to the database?

I looked at a few other models, like flat table model, Preorder Tree Traversal Algorithm, and so.

Do you guys have any tips or suggestions of how to implement a efficient tree model? My objective in the real end is to have one or two queries that would spit the whole tree for me.

With enough processing i can display the tree in dot net, but that would be in client machine, so, not much of a big deal.

Thanks for the attention

© Stack Overflow or respective owner

Related posts about tree

Related posts about c#