Keep adjacency model, but consider either adding left and right fields or something like what I did:
http://www.pbell.com/index.cfm/2007/4/10/Tree-table-metadata-using-an-adjace ncy-model-cool-recursive-code That way you can add metadata to make the runtime queries way simpler and more performant. Unless people are really moving the tree around with something like the frequency that the data is being accessed, it¹ll be worth running something like this (SQL, not CF based that¹s a mock up only :->) to solve the problem. Personally I¹d just add two fields for left and right and a trigger to a SP to set them. Am working to get a copy of such a SP right now . . . Best Wishes, Peter On 4/12/07 1:48 PM, "J MacKay" <[EMAIL PROTECTED]> wrote: > Aaron > > http://support.microsoft.com/kb/248915 > > It sounds like you're hinting that the adjacency model is not the way to go? I > should have specified that I'm not building this from scratch. I'm working > with pre-existing structures and code (pre-MX and cfcs). So any changes must > coexist with the existing structure (adjacency model) for now. > > I'm not arguing the merits of one method over the other. I agree there are > different advantages to each approach. I think the original designers went > with the adjacency model because they expected a lot of structural changes > which can be a more expensive operation when using nested sets. But as you > hinted, querying a hierarchy is usually easier with nested sets :) > > Truthfully I'm not always a fan of the adjacency model. But thats what I've > got to work with right now. If you have any thoughts about converting it to > something more managable or performant without drastically disturbing the > existing structure I'm "all ears". > > Janet > > > -- > > > > Don't be flakey. Get Yahoo! Mail for Mobile > <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> and > always stay connected > <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> to friends. > You are subscribed to cfcdev. To unsubscribe, please follow the instructions > at http://www.cfczone.org/listserv.cfm > > CFCDev is supported by: > Katapult Media, Inc. > We are cool code geeks looking for fun projects to rock! > www.katapultmedia.com > > An archive of the CFCDev list is available at > www.mail-archive.com/[EMAIL PROTECTED] You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
