Typically, when I've had to do this, I was working with the data dictionary, which means just one pull from the database. Then I've used Class::Struct to build a simple tree. That puts the simple processing on the desktop or the app server, not on the database. (Maybe it's just that I've typically worked with systems that were pretty well redlined, but I always want to take work off the RDBMS.)
If you're doing something else, the question of multiple pulls becomes more important.
I guess that's just a long-winded way of saying I want to try it, too.