How to store a tree in SQL database
问题 I have to store a tree in a database, so what is the best way to do this? Show the method you use and name its pros and cons. (I am using SQL Server 2005) 回答1: I found the discussion in the SQL Anti-patterns very helpfull, as it also focuses on the drawbacks of every implementation. Also, The slides 48-77 in this presentation reiterate that analisys. Bottom line, there is no such thing as a generic tree, and no silver bullet for SQL trees. You'll have to ask yourself about the data, how and