0% found this document useful (0 votes)
33 views10 pages

Normalisation Example

Uploaded by

Fantic Bot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views10 pages

Normalisation Example

Uploaded by

Fantic Bot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NORMALISATION (UNF TO 3NF)

Task: Converting Unnormalized Table into Normal Forms in a Computer


Hardware Company's Order Process Form. Draw CHEN notation ER diagram
depicting the final database schema in third normal form using draw.io.
Background:
You've been assigned the task of normalizing an unnormalized table representing
the order process form in a computer hardware company. Normalization is crucial
for maintaining data integrity, reducing redundancy, and ensuring efficient data
retrieval and management.
Questions:
1. First Normal Form (1NF):
- Describe the step-by-step procedure for converting the unnormalized table
into 1NF. Create the normalized resultant 1NF tables.
- Why is it important to ensure that the table adheres to 1NF?
2. Second Normal Form (2NF):
- Explain how you would further normalize the table from 1NF to 2NF. Create
the normalized resultant 2NF tables.
- What are the benefits of achieving 2NF, specifically in the context of the order
process form?
- Identify any dependencies or relationships that were resolved by moving to
2NF.
3. Third Normal Form (3NF):
- Outline the steps involved in transforming the table from 2NF to 3NF. Create
the normalized resultant 3NF tables.
- Discuss the significance of attaining 3NF in the database schema.
4. Draw CHEN notation ER diagram depicting the final database schema in third
normal form using draw.io.
5. Critical Analysis:
- Describe the main differences between a Primary Key, Foreign Key,
Composite, and Compound Key. Provide an example of each of these keys, based
on the Database you have designed, and explain why you needed each of them.
- Highlight the advantages and disadvantages of normalization in the context of
this order process form.
- Discuss how normalization contributes to the overall efficiency and
effectiveness of the database design.
The given table:
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 5


2024
X2189 Cisco NIC 20 25

1002 10-feb- 0345 Ali Meath 3321001 Y7674 17” 50 6


2024 Monitor
B3456 Wireless 10 10
Mouse

F67584 2GB Ram 80 7

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

ORDER (Order Number


Order Date
Customer Number
Name
Address
Contact Number
Item Number
Description
Unit cost
Quantity)

2. UNF to 1NF (1st normal form)


1NF = No multi-valued (repeating) attributes
A) Identify the multi valued attributes
ORDER (Order Number
Order Date
Customer Number
Name
Address
Contact Number
(Multivalued attributes)
Item Number
Description
Unit cost
Quantity)
B) Remove the repeating attributes and create a new entity, giving it a
meaningful name.
ORDER_ITEM (Item Number
Description
Unit cost
Quantity)
C) Identify a primary key for this new entity
ORDER_ITEM (Item Number(Pk)
Description
Unit cost
Quantity)

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

F) We have two different entities.


ORDER (Order Number(PK)
Order Date
Customer Number
Name
Address
Contact Number)
ORDER_ITEM (Order Number(FK)
Item Number(pk)
Description
Unit cost
Quantity)

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

3.1NF To 2NF (2 ND normal form)


2NF = No partial key dependencies
A) First, identify your composite key (a key that has more than one attribute
together form a composite key that can uniquely identify a tuple in a table)
Composite key = Order Number+Item Number
B) Then, look for attributes which rely on only one of the composite keys to
exist.
In this scenario, in the entity ORDER_ITEM the attributes "Description"
and "Unit Cost" are dependent solely on the prime attribute "Item Number,"
indicating a partial dependence. On the other hand, the non-prime attribute
"Quantity" depends on both prime attributes, "Order Number" and "Item
Number."
ORDER_ITEM (Order Number (FK)
Item Number(pk)
Description
Unit cost
Quantity)

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_ITEM (Order Number (FK)


Item Number (FK)
Quantity)

F) We have three different entities.

ORDER (Order Number


Order Date
Customer Number
Name
Address
Contact Number)

ORDER_ITEM (Order Number(FK)


Item Number(FK)
Quantity)

ITEM (Item Number(pk)


Description
Unit cost)

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

3. 2NF to 3NF (3rd normal form)


3NF = No non-key dependencies Or Transitive Dependencies

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.

ORDER (Order Number


Order Date
Customer Number
Name
Address
Contact Number)

B) Remove the Transitive Dependencies attributes and create a new entity,


giving it a meaningful name.
Customer (Customer Number
Name
Address
Contact Number)
C) Identify a primary key for this new entity
Customer (Customer Number (pk)
Name
Address
Contact Number)

D). Since the new key is a primary key in a new entity (Customer), make it a
foreign key in the original entity (ORDER)

ORDER (Order Number (PK)


Customer Number (FK)
Order Date)

E) We have four different entities

ORDER (Order Number (PK)


Customer Number (FK)
Order Date)

Customer (Customer Number (pk)


Name
Address
Contact Number)

ORDER_ITEM (Order Number (FK)


Item Number (FK)
Quantity)

ITEM (Item Number(pk)


Description
Unit cost)
Order Table:
Order Order Customer
Number Date Number
1001 05-feb-2024 0123
1002 10-feb-2024 0345

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

You might also like