ratchet ratchet - 1 year ago 84
MySQL Question

Database table relationship design

I am trying to write out a database design to include the following relationships, I have tried to work them out from the top down, hierarchically, but the relationships seem to be better connected another way, I just cannot see, or express how.

(This comes from a FOUO system from work, so the names have been changed to reflect that classification, that's why the names may look odd.)

Each Branch 1:n Functional Areas,

Each Building 1:n Groups,

Each Group 1:n Units,

Each FunctionalArea 1:n Checklists,

Each Checklist 1:n Items, and

Each Unit 1:n Checklists and

This was solved by re-evaluating the relationships without concern for the size or data type they would hold. 1:n relationships were used in lieu of n:n.

Answer Source

When you are designing a database you need to be specific about the relationships. For example you need to mention things like "A functional area can only belongs to a one branch only". These will help to determine either we are going to have 1:1 relations or 1:n or something else.

However i have come up with an answer. see the image

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download