Given your technical background, perhaps you should look into using SQLite to help with certain parts of your project. Click on the link in my signature to find out more.
That's what I was thinking too. Is there a database description/ERD-chart available where I can find the relations between all tables? I could then write code in VB.Net or php to retrieve this information (basically lots of recursive searches up and down the tree(s)).