How would you get tree-structured data from a database with the best performance? For example, say you have a folder-hierarchy in a database. Where the folder-database-row h
I am a fan of the simple method of storing an ID associated with its parentID:
ID ParentID 1 null 2 null 3 1 4 2 ... ...
It is easy to maintain, and very scalable.