I am designing a database to reflect our Organisational chart.
The hierachical relationships to model are:
The lowest level is an Employee.
Many Employees can belong to the next level - Services.
Many Services can belong to the next level - Portfolios.
Many Portfolios can belong to the next level - Clusters.
All four entities are represented by their own table, with a foreign key to the level above.
Services, Portfolios and Clusters all have a manager linked to the Employee table.
The Employee table has a link to the Service Table (Service_Id) on a one to one basis.
The trouble is, for employees who are also managers at the Portfolio level, they do not have a specific Service.
For employees who are also managers at the Cluster level, they do not have a specific Portfolio or service.
For these employees, the whole realtionship between levels breaksdown.
I am tempted to include a Portfolio_Id and Cluster_id to the Employees table, but I think this breaks rules of normalisation.
Thoughts
The risk with keeping an open mind is having your brains fall out.
Shaunk
The hierachical relationships to model are:
The lowest level is an Employee.
Many Employees can belong to the next level - Services.
Many Services can belong to the next level - Portfolios.
Many Portfolios can belong to the next level - Clusters.
All four entities are represented by their own table, with a foreign key to the level above.
Services, Portfolios and Clusters all have a manager linked to the Employee table.
The Employee table has a link to the Service Table (Service_Id) on a one to one basis.
The trouble is, for employees who are also managers at the Portfolio level, they do not have a specific Service.
For employees who are also managers at the Cluster level, they do not have a specific Portfolio or service.
For these employees, the whole realtionship between levels breaksdown.
I am tempted to include a Portfolio_Id and Cluster_id to the Employees table, but I think this breaks rules of normalisation.
Thoughts
The risk with keeping an open mind is having your brains fall out.
Shaunk