| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Nested Sets Insertion
I'm making some forum software using PHP and MySQL that's quite a bit
like a Usenet group (i.e. threads). The data won't change much, and
the program is very dependent on being able to count the number of
descendants of any post (which is very slow with adjacency tables), so
I want to use nested sets. Still, for when a post is added directly
into the tree, I haven't been able to find any optimized examples of
how to do this. I'm sure there's some sort of spiffy mathematical
solution of INSERT and UPDATE statements that can append a child to a
node and update the left and right values of the affected nodes.
Could somebody point me in the right direction? Thanks!
Received on Sat May 10 2003 - 16:19:52 CDT
![]() |
![]() |