Hi I want to create a tree structure in a sql database. I need to have the following properties.
- Fast Select
- Easy to Select with only a string like Cat2/Cat4 -> Returns Cat5 & Cat6
- Support of Virtual Categories
- Insert should be easy, but not important compared to a fast Select
- Delete same as Insert, easy would be nice, but again it’s more important to be able to Select fast
- Reorder is again not as important as Select
I have looked at Materialized-Path and hierarchyId, but most examples use a sample like AdventureWorks, that’s just too complicated, for my need.
Just for the record I use Sql Server 2008 R2 and C# 4.0