INFO20003 Database Systems
Dr Renata Borovica-Gajic
Lecture 16 Hands-on Normalization
Copyright By PowCoder代写 加微信 powcoder
Example #1
Report (reportNo, editor, deptNo, deptName, deptAddr, authorId, authName, authAddr)
reportNo → editor, deptNo deptNo → deptName, deptAddr authorId → authName, authAddr
• Is the Report table in 2NF? If not, put the table in 2NF.
• Are there any insert, update or delete anomalies with these 2NF relations?
INFO20003 Database Systems © University of Melbourne 2
Example #2
Class (courseNumber, roomNumber, instructorName, studentNumber, workshopNumber, grade, tutor)
workshopNumber → tutor
studentNumber, courseNumber → grade, workshopNumber courseNumber → roomNumber, instructorName
• Normalise the relation into 3NF.
INFO20003 Database Systems © University of Melbourne 3
Example #3
CustomerID → CustomerPostcode
OrderID → CustomerID
OrderID, ItemID → ItemQuantity, CanDispatchFrom
• Normalize the relation to 3NF.
CustomerID
CustomerPostcode
ItemQuantity
CanDispatchFrom
Truganina, Hallam
Somerton, NFO20003 Database Systems © University of Melbourne 4
Next Lecture
• Transactions
INFO20003 Database Systems © University of Melbourne 5 —
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com