AICT005-4-1-Database Systems Normalization
Tutorial 8
Scenario 1: Canvas Enterprice is having an exclusive clearance sale of their expensive
collections of office products.
Each customer can only have one order id.
Each order id can be assigned to only one customer.
Each order id can have multiple items.
Each item can have only one price.
Based on the criteria above, normalized UNF below into normalized 3rd normal form.
CusID CusName Address OrderID OrderDate ItemName ItemID UnitPrice Quantity Amount
C01 Gary Kuala OR01 24 June 2011 Mouse I01 RM105 4 RM420
Lumpur
Keyboard I02 RM408 3 RM1224
Monitor I03 RM678 1 RM678
Total charge RM2322
C02 Cyndia Petaling OR02 10 July 2011 Monitor I03 RM678 2 RM1356
Jaya
Keyboard I02 RM408 4 RM1632
Hard disc I04 RM845 2 RM1690
Total charge RM4678
Scenario 2: Ronia Enterprice is having clearance sales of their office products.
Each customer can have multiple order id.
Each order id can be assigned to only one customer.
Each order id can have multiple items.
Each item can have only one price.
Based on the criteria above, normalized UNF below into normalized 3rd normal form.
CusID CusName Address OrderID OrderDate ItemName ItemID UnitPrice Quantity Amount
C01 Gary Kuala OR01 24 June 2011 Mouse I01 RM10 4 RM10
Lumpur
Keyboard I02 RM40 3 RM120
Monitor I03 RM300 1 RM300
Total charge RM430
C02 Cyndia Petaling OR02 10 July 2011 Monitor I03 RM300 2 RM600
Jaya
Keyboard I02 RM40 4 RM160
Hard disc I04 RM350 2 RM700
Total charge RM1460
Diploma Asia Pacific University of Technology & Innovation Page1 of 1
AICT005-4-1-Database Systems Normalization
1NF (CusID, CusName, Address, OrderID, OrderDate, ItemName, ItemID, UnitPrice, Quantity, Amount)
FD
ItemID,OrderID --> Quantity, Amount
PD
OrderID -->CusID, CusName, Address, OrderID,OrderDate,Total Amount
ItemID --> ItemName, UnitPrice
TD
CusID --> CusName, Address
2NF
SALES
(ItemID,OrderID ,Quantity, Amount)
Order
(CusID, CusName, Address, OrderID,OrderDate,Total Amount)
ITEM
(ItemID, ItemName, UnitPrice)
3NF
SALES
(ItemID,OrderID ,Quantity, Amount)
Order
(OrderID,OrderDate,TotalAmount,CustID)
ITEM
(ItemID, ItemName, UnitPrice)
CUSTOMER
CusID ,CusName, Address
FK
CustID
Diploma Asia Pacific University of Technology & Innovation Page1 of 1