I created this schema with OpenOffice.
Does this design adhere to 3NF ?
(A relationship link between Equipment and Supplier_Equipment , Customer and Membership should be created but OpenOffice isn't allowing me to do so.)

|
I created this schema with OpenOffice. Does this design adhere to 3NF ? (A relationship link between Equipment and Supplier_Equipment , Customer and Membership should be created but OpenOffice isn't allowing me to do so.)
|
|||
|
Yes, this conforms to 3NF as far as I can see. Basically 3NF is met when all non-key values (assuming natural keys here) in relations are non-transitively functionally dependent on the key. Surrogate keys don't count for this analysis since category.name is not functionally dependent on category.category_id. In fact, category.name is probably your natural key and category.category_id is functionally dependent on it for purposes of this analysis (because it is in essence a join dependency stand-in or surrogate for your natural key). Going through your tables here I do not spot any cases where this is violated. The one obvious change that this suggests is what was mentioned in the comments by others, to move customer_id into hire and out of hire_equipment (if third party loans of equipment are supported you probably want customer_id in both places though). |
|||
|
|
Hire_Equipementrelation suggests that a Hire can be related to many Customers. If that is your requirement, I see no serious problem with the design. – ypercube Nov 4 '12 at 21:51customer_idtoHire2.Drop the relationships betweenHire_Equipementand the two tables:HireandCustomer3.Make(customer_id, order_id)the primary key ofHire4.Recreate theHire_Equipement-Hirerelationship targeting the new composite PK. 5.Add a new 1:N relationship betweenCustomerandHire(viacustomer_id). – ypercube Nov 4 '12 at 22:14customer_idtoHire2.Drop only one relationship, betweenHire_EquipementandCustomer3.Change the PK ofHire_Equipmentto(equipment_id, order_id)and drop thecustomer_idfrom that table 4.Keep theHire_Equipement-Hirerelationship as it is. 5.Add a new 1:N relationship betweenCustomerandHire(viacustomer_id). – ypercube Nov 4 '12 at 22:18