I have a task to create a sql server database table that will accommodate up to 30 levels of subfolders under a parent folder for each user in the department.
As a visual please see attached image.
As a user I can click on the Accounting link which would be the parent folder and I should be able to pull back all the Children Folders of that parent folder that have my userid linked to it. In doing some research, I am finding that there is a new datatype called hierarchyid. I am wondering would that be feasible for me to use as I will have to create a structure in the database for each one of the left side categories.
As I understand the task, there will be a parent node which will be the department. The user can create a max of 30 children under the parent. For example:
Accounting - Could this be a hierarchyid
NewFolder - user 132 created this folder
NewFolder - user 400 created this folder
CategoryManagement - Another hierarchyid?
NewFolder - User 100 created this folder
NewFolder - User 200 created this folder
I think my question is if the hierarchyid datatype would work for this type of structure and if so, how would I create a new hierarchyid for each Department.
I know this might be confusing, but any help would be appreciated.