Is there a DB out there that can store tree structures (like for nested comments) without using anti-patterns or such.
I think LDAP is one, but are there any others?
I need to be able to index childes as well. I need it to be easy to move a branch from one node to a different node and be fast to read + format.
I have seen other similar questions. The problem with those (for me) they ask what is the most efficient way to do it in db XXX, while I ask which DB I should use.
Relational databases won’t be the best for this if the tree is very deep. I’d recommend a graph or object database.
“Storing comments”? Like those following blogs or articles? If that’s the case, I’d say that you can assume they won’t be that deep. A ten level comment tree would be exceptional.
In that case, a simple relational parent/child relationship using foreign keys would be sufficient: