70 likes | 242 Vues
Functional Dependencies. True for all table instances Cannot get FDs just from one table instance Business Rules (Assumptions). eName  NIN NIN = f(eName) NIN contractNo hours eName hNo hLoc 1135 C1024 16 Smith J H25 East Kilbride
                
                E N D
Functional Dependencies • True for all table instances • Cannot get FDs just from one table instance • Business Rules (Assumptions)
eName  NIN NIN = f(eName) NIN contractNo hours eName hNo hLoc 1135 C1024 16 Smith J H25 East Kilbride 1135 C1025 15 Smith J H4 Glasgow ….. ……. .. ……… …. ……………. 1160 C1024 16 Smith J H25 East Kilbride Incorrect: eName  NIN Correct: NIN  eName
NIN  eName contractNo  hNo hNo  hLoc NIN, contractNo  hours NIN, contractNo  hours, eName, hNo, hLoc NIN, contractNo  All
Primary Key NIN, contractNo NIN, contractNo  hours, eName, hNo, hLoc NIN, contractNo, hNo hours, eName, hLoc NIN, contractNo, hNo:Primary key? Candidate Key: A minimum set of attributes that uniquely identifies each occurrence of an entity type.
Alternate Keys hours, eName, hNo contractNo, hNo NIN, hNo All Incorrect!
Assumptions • Identify all non-trivial FDs NIN  eName contractNo  hNo hNo  hLoc NIN, contractNo  hours • Choose a PK: NIN, contractNo • List all Aks: NONE