You are on page 1of 4

Normalization

ABC Store
Invoice Number:1001
Date: 16/7/2020
Customer Number: C001
Customer Name: U Mg Mg
Address: Mdy
Item Code Description Qty Price Amount
I234 Exercise Book 12 300 3600

I345 Soft Pen 10 500 5000

I456 Ball Pen 20 700 14000

Total 22600
Signature:
Invoice Date Custome Customer Address Item Description Price Qty
Number r Name Code
Number
1001 16/7/2020 C001 U Mg Mg Mdy I234 Exercise 300 12
Book
1001 16/7/2020 C001 U Mg Mg Mdy I345 Soft Pen 500 10
1001 16/7/2020 C001 U Mg Mg Mdy I456 Ball Pen 700 20
1002 16/7/2020 C002 Daw Aye Ygn I345 Soft Pen 500 4
1002 16/7/2020 C002 Daw Aye Ygn I555 Pencil 250 4
1003 16/7/2020 C003 U Soe Tgy I345 Soft Pen 500 2
Amount=Qty*Price Total=Amount+
Amount+…..
 What is derive attribute?
 What is problem?
 Repeated Items?
 Multivalued Items/Attributes

Attributes
Unnormal Form (UNF)
Invoice_Number
Date
Customer_Number
Customer_Name
Address
Item_Code
Description
Price
Qty
Amount
Total

First Normal Form (1NF)


 No multivalued attributes
 Every attribute value is atomic
Invoice Invoice_Item

Invoice_Number (PK) Invoice_Number (PK,FK)

Date Item_Code (PK)

Customer_Number Description

Customer_Name Price
Qty
Address
(PK) 1001 (PK) I234
1001 I345
1001 I456

Primary Key
Composite Key
Candidate Key
Foreign Key

Problem/ Anomalies
Insert- without Invoice Number
Delete- Information Lost
Update- Inconsistency

Second Normal Form (2NF)


-INF
-Fully Functional Dependency
Invoice Number>> Date
Student ID determines student name.
Student Name depends on Student ID.

Invoice Invoice_Item Item


Invoice_Number(PK,F Item_Code(PK)
Invoice_Number (PK)
K)
Description
Date
Item_Code(PK,FK)
Price
Customer_Number
Qty
Customer_Name
Address
Third Normal Form (3NF)
-2NF
-No functional dependencies between Non-key attributes.
Invoice Invoice_Item Customer Item

Invoice_Number Invoice_Number Customer_Number Item_Code

Date Item_Code Customer_Name Description


Qty Address Price
Customer_Number

ERD

Invoice Customer

Invoice_Item

Item

You might also like