Re: node integrity when copying subtree in nested sets
- From: "Ed Prochak" <edprochak@xxxxxxxxx>
- Date: 13 Jul 2006 10:33:12 -0700
bernie wrote:
howdy,
Nested sets (or modified preorder tree transversal algorithm) work great
if a specific node only exists once inside the tree. I am using my tree
for user authentication. For example, a group may have users and other
groups in them. If the root groupA has groupB and groupC in it, and
groupB contains groupC then groupC exists twice in the tree. Now, my
issue is when I remove a subnode from groupC I need to remove that
subnode from every instance of groupC in the root tree. This can become
a nightmare of recursive functions (my reason for going with nested sets
was to avoid recursive functions).
Sorry, but I do not quite see the problem.
as a tree structure isn't it equivalent to this image?
groupA
+- groupB
+- groupC
In words: groupA is the parent of groupB which is the parent of groupC
Why would groupC exist twice?
Ed
.
- Follow-Ups:
- References:
- node integrity when copying subtree in nested sets
- From: bernie
- node integrity when copying subtree in nested sets
- Prev by Date: Re: I think that relational DBs are dead. See link to my article inside
- Next by Date: Re: node integrity when copying subtree in nested sets
- Previous by thread: node integrity when copying subtree in nested sets
- Next by thread: Re: node integrity when copying subtree in nested sets
- Index(es):
Relevant Pages
|
|