Tuesday 18 November 2003 — This is 21 years old. Be careful.
Keeping tree-structured data in a relational database is always a challenge. Storing Hierarchical Data In A Database demonstrates a nifty technique that is heavily tipped toward fast queries. It stores two numbers that link all the nodes together in a depth-first traversal. This makes all sorts of queries possible and efficient, but updating rows is a real pain. If you have data that is read far more often than written, it could be a good choice.
Comments
http://www.yafla.com/papers/sqlhierarchies/sqlhierarchies.htm
Add a comment: