Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Design with Inheritance & Hierarchy

Author  Topic 

ronnieoverby
Starting Member

36 Posts

Posted - 2009-01-15 : 16:12:43
Please help me to know whether I am designing this the "best" way.

Here are my entities (tables):

Gauges
Organizations
Schools
Divisions
Departments

Here are the rules:

An Organization CAN have MANY Gauges. A gauge MUST belong to 1 Organization.

Schools, Divisions, and Departments ARE Organizations.

A Department MUST belong to 1 Division.
A Division CAN have MANY Departments.
A Division MUST belong to 1 School.
A School CAN have MANY Divisions.

I think I am designing this the best way but I want to make sure.
Please look at my diagram:


Before setting up the seperate tables for Schools, Divisions, and Departments, I had just the Organizations table which had a field called ParentOrganizationID, with a self-relationship.

But I switched to seperate tables because I didn't need an unlimited depth hierarchy, I need to know the type of organization I am dealing with, and I think queries will be easier the new way.

Please let me know if I am doing this in a good way, a bad way, or if it doesn't matter. Thanks.

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2009-01-16 : 10:03:15
A division belongs to a school and an organization.
Can it belong to an organization different from the organization of the school to which it belongs? Your schema would appear to allow this.

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page
   

- Advertisement -