Wow, look at all the Doug B's here! 

Awhile back I posted some code samples on my blog regarding this very topic, 
though in my example I was working with a hierarchical navigation system where 
nav items could have children who could have children, etc. The concept has 
been quite adequately explained, but if you're looking for some code snippets 
and such, here they be: 
http://www.dougboude.com/blog/index.cfm?mode=archive&year=2006&month=6&day=17

>As someone previously stated, the major drawback to this
>design is that you can only have one parent for each item.  If you need
>an item to have more than one parent, you would have to develop a two
>table design.

I can't imagine a scenario where I would need to have a single child have two 
parent records...but if I DID need that, I believe I might just go ahead and 
clone my child (create two child records with the same category description), 
giving each one the appropriate parent ID. Hopefully this would be the rare 
exception to the rule...that way I could stick to my one table design and not 
have to, as was pointed out, get myself into the situation where i could 
potentially have to be creating X number of tables to support my relationships.

two more cents for the pot.

>
>Hope that clears things up a bit.
>
>Rich Kroll
>
>-----Original Message-----
>From: Doug Brown [mailto:[EMAIL PROTECTED] 
>Sent: Monday, August 21, 2006 3:26 PM
>To: CF-Talk
>Subject: Re: Database design question
>
>Thanks michael, but if I do it that way, will I not have hundreds of
>tables?
>I currently have about 24 categories and each category has prob 10-50
>sub_categories and then each sub_category has it's own set of
>sub_categories.
>
>
>
>----- Original Message ----- 
>From: "Michael E. Carluen" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[email protected]>
>Sent: Monday, August 21, 2006 12:53 PM
>Subject: RE: Database design question
>
>
>> Doug, yYou can actually use a single table for that. One way is to
>create
>a
>relationships

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250521
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to