* Daniel Kinzler
Anyway, if using MySQL's memory tables consumes too much resources, perhaps consider alternatives? Have you looked at network analysis frameworks like JUNG (Java) or SNAP (C++)? Relational databases are not good at managing linked structures like trees and graphs anyway.
If Java is not a problem, there's also a (NoSQL) graph database available called Neo4J: http://neo4j.org/
Regards, Morten