How do i store a directory / hierarchy / tree structure in the database? Namely MSSQL Server.
@olavk: Doesn't look like you've seen my own answer. The way i use is way better than recursive queries :)
p.p.s. This is the way to go!
How do i store a directory / hierarchy / tree structure in the database? Namely MSSQL Server.
@olavk: Doesn't look like you've seen my own answer. The way i use is way better than recursive queries :)
p.p.s. This is the way to go!
This is more of a bookmark for me than a question, but it might help you too. I've used this article's approach to store a directory / tree structure in the database.
There are some useful code snippets in the article as well.
Hope this helps.
I'm not affiliated with that website in any way
The typical way is a table with a foreign key (e.g. "ParentId") onto itself.