Normalisation Example
Normalisation Example
Order Order Customer Name Address Contact Item Description Unit Quantity
Number Date Number Number Number cost
1001 05-feb- 0123 Amal Dublin 39112200 X3412/ 120Gb HD/ 40/20 5/25
2024 X2189 Cisco NIC
1002 10-feb- 0345 Ali Meath 3321001 Y7674/ 17” 50/10 6/10/7
2024 B3456/ Monitor/ /80
F67584 Wireless
Mouse/
2GB RAM
1.Un-normalized form (UNF)
1.Identify entity
2.List all attributes
3.Identify the key
D)Take the primary key from the first table and use it as a foreign key
so that both tables are linked to each other.
ORDER_ITEM (Order Number(FK)
Item Number(pk)
Description
Unit cost
Quantity)
E) You now have a composite key (Two or more attributes together form a
composite key that can uniquely identify a tuple in a table.)
Composite key = Order Number+Item Number
Order table:
Order Order Customer Name Address Contact
Number Date Number Number
1001 05-feb-2024 0123 Amal Dublin 39112200
1002 10-feb-2024 0345 Ali Meath 3321001
Order_item Table:
Order Number Item Number Description Unit Cost Quantity
1001 X3412 120Gb HD 40 5
1001 X2189 Cisco NIC 20 25
1002 Y7674 17” Monitor 50 6
1002 B3456 Wireless Mouse 10 10
1002 F67584 2GB Ram 80 7
C) Remove the partial dependent attributes and create a new entity, giving it a
meaningful name.
ITEM (Item Number
Description
Unit cost)
D) Identify a primary key for this new entity
ITEM (Item Number (Pk)
Description
Unit cost)
E). Since the new key is a primary key in a new entity (ITEM), make it a
foreign key in the original entity (ORDER_ITEM).
Order Table:
Order Order Customer Name Address Contact
Number Date Number Number
1001 05-feb-2024 0123 Amal Dublin 39112200
1002 10-feb-2024 0345 Ali Meath 3321001
Order_item Table:
Order Number Item Number Quantity
1001 X3412 5
1001 X2189 25
1002 Y7674 6
1002 B3456 10
1002 F67584 7
Item Table:
Item Number Description Unit Cost
X3412 120Gb HD 40
X2189 Cisco NIC 20
Y7674 17” Monitor 50
B3456 Wireless Mouse 10
F67584 2GB Ram 80
A. Examine at all the entities produced so far and identify any non-prime
attributes which rely on any other non-prime attributes (Transitive
Dependencies).
In this scenario, within the entity ORDER, the non-prime attributes Contact
Number, Name & Address, and are dependent on the non-prime attribute
Customer Number, indicating transitive dependencies.
D). Since the new key is a primary key in a new entity (Customer), make it a
foreign key in the original entity (ORDER)
Customer Table:
Customer Name Address Contact
Number Number
0123 Amal Dublin 39112200
0345 Ali Meath 3321001
Order_item Table:
Order Number Item Number Quantity
1001 X3412 5
1001 X2189 25
1002 Y7674 6
1002 B3456 10
1002 F67584 7
Item Table:
Item Number Description Unit Cost
X3412 120Gb HD 40
X2189 Cisco NIC 20
Y7674 17” Monitor 50
B3456 Wireless Mouse 10
F67584 2GB Ram 80
ER Diagram using CHEN notation