not sure if I'm in the correct forums, but what I wanted to ask is how would you implement a hierarchies in database terms?
for example, a person belongs to a service, and then to a team, and then to a section, and then to a channel, and then to a division.
so to summarize, a person will have these values associated to him/her: service > team > group > domain > company.
I think the better approach is to have different tables for each category, so there will be 5 tables for the categories and 1 table for the person entity that will hold the relationship to the appropriate categories to a person. so the person table will have the columns serviceId, teamId, groupId, domainId, companyId which are all FK to the category tables.
or do you think this approach is better. have all the categories be placed in one table, and be differentiated by a TYPE field which will identify what type of category it is. also the hierarchy needs to be declared as well. so there would a level column that will identify which is the parent of which category.
which design do you think is better, in terms of optimization, operationability and complexity?