in reply to Tree Structure and Db

If your mind is open and you don't fear to change the usual way, you can try something different then relational database. I suppose that XML is more appropriate for hierarcic tree-like structures. You can use XPath for querying them - it was designed exactly for that. Look at the Berkeley DB XML. But, frankly, I had no time to test it with Perl.