UNF
Sales Order
Fiction Company
202 N. Main
Mahattan, KS 66502
CustomerNumber: 1001 Sales Order Number: 405
Customer Name: ABC Company Sales Order Date: 2/1/2000
Customer Address: 100 Points Clerk Number: 210
Manhattan, KS 66502 Clerk Name: Martin Lawrence
Item Ordered Description Quantity Unit Price Total
800 widgit small 40 60.00 2,400.00
801 tingimajigger 20 20.00 400.00
805 thingibob 10 100.00 1,000.00
Order Total 3,800.00
First normal form
CusNu CusName CusAdd SalesOrNum SalesOrDat ClerkNum ClerkNam ItemNum ItemName Quantity UnitPric Total OrderTotal
m e e e
1001 ABC 100 Points 405 2/1/2000 210 Martin 800 Widget small 40 60 2400 3800
Comp Manhattan, Lawrence
KS 66502
1001 ABC 100 Points 405 2/1/2000 210 Martin 801 tingimajigger 20 20 400 3800
Comp Manhattan, Lawrence
KS 66502
1001 ABC 100 Points 405 2/1/2000 210 Martin 805 thingibob 10 100 1000 3800
Comp Manhattan, Lawrence
KS 66502
Identify PK: CusNum, SalesOrNum, ItemNum, ClerkNum
Second Normal Form
Customer Item Clerk
CusNum CusName CusAdd ItemNum ItemName UnitPrice ClerkNum ClerkName
1001 ABC 100 Points Manhattan, KS 800 Widget small 60 210 Martin
Comp 66502 801 tingimajigger 20 Lawrence
805 thingibob 100
SalesOrder
SalesOrNum CusNum ClerkNum SalesOrDate OrderTotal
405 1001 210 2/1/2000 3800
SalesOrderDetails
SalesOrNum ItemNum Quantity Total
405 800 40 2400
405 801 20 400
405 805 10 1000
Third Normal Form
Identify transitive dependency, is there any? No, therefore the tables are in 3 NF
Third Normal Form
Customer Item Clerk
CusNum CusName CusAdd ItemNum ItemName UnitPrice ClerkNum ClerkName
1001 ABC 100 Points Manhattan, KS 800 Widget small 60 210 Martin
Comp 66502 801 tingimajigger 20 Lawrence
805 thingibob 100
SalesOrder
SalesOrNu CusNum ClerkNum SalesOrDate OrderTotal
m
405 1001 210 2/1/2000 3800
SalesOrderDetails
SalesOrNum ItemNum Quantity Total
405 800 40 2400
405 801 20 400
405 805 10 1000
Normalization process ends, now can implement those tables in the DBMS.
Further changes can be made such as introducing FK / PK like below
Tables Implemented
Customer Item Clerk
CusNum CusName CusAdd ItemNum ItemName UnitPrice ClerkNum ClerkName
1001 ABC 100 Points 800 Widget small 60 210 Martin
Comp Manhattan, 801 tingimajigger 20 Lawrence
KS 66502 805 thingibob 100
SalesOrder
SalesOrNum CusNum (FK) ClerkNum (FK) SalesOrDate OrderTotal
405 1001 210 2/1/2000 3800
SalesOrderDetails
ID SalesOrNum (FK) ItemNum (FK) Quantity Total
001 405 800 40 2400
002 405 801 20 400
003 405 805 10 1000
SALES ORDER
Imperial Book Bazaar
1, 5, 1 Jalan 2/149B Taman Sri Endah, Wilayah Persekutuan, Kuala Lumpur
Order Number: 1029 Sales Order Date: 20/10/2023
Customer ID: 201920 Clerk Number: 6969
Customer 07-16, ABC Apartment,
Address Clerk Name: Bill Door
Bandar Puchong, Selangor
Order Details
Book Book Name Quantit Unit Total
ID y Price (RM)
101201 To Kill A Mockingbird 1 20 20
123019 Mary Poppins 1 10 10
102492 The Great Gatsby 1 15 15
391031 A Tale Of Two Cities 1 20 20
Order Total 65