
Originally Posted by
John_G
Hi -
I took a look at the second diagram. You seem to have the normalization part sorted out OK, and you understand the concept of junction tables, but I have serious issues with your relationships (the ones on the diagram, that is!). In an entity - relationship diagram, by following the relationship links, in general there should be only one path between any two tables. On yours, there are FOUR different paths to get from tblJobs to tblParts. This can lead to all sorts of inconistent data, and is almost guaranteed to lead to major headaches when it comes to designing queries and forms. To start, here is what I suggest you look at:
Parts are directly related to WorkOrders which are directly related to Jobs. Parts are not directly related to Jobs. Delete tblPartsJobs and its relationships.
Buildings are directly related to Jobs. Parts are not directly related to Buildings. Delete tblPartsBuildings and its relationships.
Finishes are directly related to Parts. Finishes are not directly related to Jobs. Delete tblJobFinishes and its relationships.
So, now you have only one pathway from Jobs to Parts:
Jobs can have many Workorders which can have many Parts.
For Shipments, the design will depend on what the "business rules" are for shipments. A shipment obviously can contain many parts - but:
Can one shipment contain parts for many different work orders?
Can one work order require more than one shipment to complete?
Can one shipment consist of many containers (your structure indicates that it cannot).
Your structure shows that One Shipment consists of one container which contains only one part type. Is this correct?
Shipments are not directly related to Jobs, so delete that relationship.
What is UOM? There is a problem there. The relationships between tblParts, tblContainers and tblUOM are circular; one of those relationships should not be there.
These are some things I would look at first -if you can clarify some of the questions about shipments, it will help.
Cheers!
John