Ok, but let try and move a large branch of a nested set somewhere else in the hierarchy. :)
I'll begin with the adjacency list model: Step 1: Update predecessor_id of the top of the branch Done. And now I'll start us off with the nested set model (Turn page over and write on back if you need more room) Step 1: Step 2: Step 3: Step 4: Step 5: Step 6: Step 7: Step 8: Step 9: Step 10: Step 11: Step 12: (yes, yes, I know.. we were talking about deletion, NOT moving-- I just couldn't help myself :] ) ~Brad -----Original Message----- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 31, 2006 5:31 PM To: CF-Talk Subject: Re: Nested Set Model Really, there's nothing to change. No triggers, procs, magic, or anything. Delete a record, and nothing in the tree gets orphaned. Say you've got a table like this: Name Left Right food 1 8 fruit 2 7 apple 3 4 banana 5 6 That is, food has a child fruit, which has two children apple and banana. Now delete fruit. Apple and banana are still inside the food set, without changing anything. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230905 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

