The source code for that module is a good read too.
In reply to Re: Tree Structure and Db by DrHyde in thread Tree Structure and Db by InfiniteLoop