[eluser]WanWizard[/eluser]
Yes but be careful for concurrency issues, two users could run a MAX query and insert a new tree at the same time resulting in duplicates.
I can vaguely remember we solved this in an app by having a unique index on root_id+left_id. You can determine the MAX in a loop, and when you create the new root for a root_id that was just created by someone else, you'll get a DB error, which you can capture, and loop to determine a new MAX value...