Joseph and Tony,

There is quite an elegant solution to what is one of the more complex 
data structures you will encounter in a relational DB.  Joe Celko has 
described the "nested set model" which uses relational DB concepts to 
describe the structure of a tree (which is what you have in this 
case, one parent leads to 1..N childrend which each have 1..N 
children ad infinitum) in his book SQL for Smarties.  I won't 
describe it here, it would take me too long to type it out.  Instead, 
look at this article written by Joe himself. 
http://www.intelligententerprise.com/001020/celko.shtml

Is it confusing?  Yes!  At first it took me a few hours to understand 
the model and how it works.  Many of my coworkers were confounded by 
this representation when I first presented it to them.  However, it 
works in terms of ease of use and performance once you understand the 
basic premise.  I actually think this is one of the coolest DB tricks 
I have seen!

Hope that helps!

-dhs
-- 
Dean H. Saxe
[EMAIL PROTECTED]
http://www.FullFrontalNerdity.com/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to