Professional Documents
Culture Documents
Normalization 10
Normalization 10
Normalization:- process of desiging the database effectively such that we can avoid
anomalies.
(or)
decomposing or splitting the large table into small tables is known as
normalization.
(or) to organize the data in a very good form we use normalization.
normal form:- the table which is not having data redundancy and anomalies is said
to be in normal form.
anomalies(problems arise from relations that generated from user views are called
anomalies)(INSERT,UPDATE OR DELETION anomalies).
(de-normalized table)
O_NO QUANTITY ITEM_PRICE ORDER_DATE STATUS PRO_CODE PRO_NAME
PRO_PRICE CUST_NAME PHONE PINCODE STATE CITY
101 33 200 01-Jan-23 shipped p_1 CYCLE
200 A 9988009988 571199 M AA
102 44 333 12-Feb-23 cancelled p_2 CLASSIC CAR
400 B 9980807080 571199 M AA
103 55 400 15-Mar-23 shipped p_3 CAR
500 C 9988707089 571196 O CC
104 66 700 15-Mar-23 on hold p_4 BUS
600 D 8766554433 571194 P DD
105 77 1200 19-Jun-23 shipped p_5 TRUCK
800 E 8722334455 571933 Q EE
106 5,5 1200,700 02-Jun-23 shipped p_4,p_5 BUS,TRUCK
600,800 F 9365879087 571192 R FF
(Convert into 1NF) :- (O_NO || PRO_CODE) -->candidate key (combination of these two
uniquely identify the table).
PRODUCT TABLE
P_ID(PK) PRO_CODE PRO_NAME PRO_PRICE
11 p_1 CYCLE 200
12 p_2 CLASSIC CAR 400
13 p_3 CAR 500
14 p_4 BUS 600
15 p_5 TRUCK 800
RELSTIONSHIP TABLE
(PK)O_ID P_ID C_ID
1 11 1111
2 12 1112
3 13 1113
4 14 1114
5 15 1115
6 14 1116
7 15 1116
PRODUCT TABLE
P_ID(PK) PRO_CODE PRO_NAME PRO_PRICE
11 p_1 CYCLE 200
12 p_2 CLASSIC CAR 400
13 p_3 CAR 500
14 p_4 BUS 600
15 p_5 TRUCK 800
A->B B->C
C_ID->PINCODE PINCODE-->CITY,STATE
PINCODE STATE CITY
571199 M AA
571196 O CC
571194 P DD
571933 Q EE
571192 R FF