CDM 7 Faveenna
CDM 7 Faveenna
MANAGEMENT
FAVEENNA SUKUMARAN
NORMALIZATION IN DB
NORMALIZATION IN DB
Normalization in DB is a technique using which you can organize the data in the database
tables so that:
It is a multi-step process that puts data into tabular form, removes duplicate data, and set up the
relationship between tables.
WHY WE NEED
NORMALIZATION IN DB?
Normalization helps in keeping data
consistent by storing the data in one table and
referencing it everywhere else
121991 F 98 CDM
391989 G 100 PV
1112024 E 99 CDM
10324 F 97 CDM
The student_id column is a primary key because using the student_id value we can uniquely identify each row of
data.
Student Table:
Student Id Student Contact Info Branch ID
Name
In both tables, Student-ID in the Student table and
121991 F 7777777777 111
Branch-ID in the Branch table are primary keys. This
391989 G 8888888888 333 means that each value in these columns is unique
and can uniquely identify each row in their
1112024 E 9999999999 111 respective tables.
Imagine your table is like a class register — normal forms help make sure the data is written clearly, with no mix-
ups, and is easy to update.
First Normal Form (1NF)
2 D,E
3 F
4 G
DOB Name
2.Values stored in a column should be of the same domain.
01-11-2024 E
A column should contain values of same kind
Do not inter-mix different values 01-02-1991 F
03-09-1989 G
I 28-09-2014
3. All the columns in a table should have unique names.
Each column should have unique name
This is to avoid confusions and the time of data retrieval
1 F S
3 E G
DOB F_Name L_Name
2 T O
01-02-1991 F S
09-10-2000 E G
11-12-2013 T O
2NF – Second Normal Form
• the table must be in 1NF.
• Every non-key column depends on the whole primary key, not just part of it.
(Partial dependency) Student ID Student Name
101 Aisha
102 Rahul
Student ID Subject
101 Maths
101 Science
102 English
Primary Key = (Student-ID + Subject) → because a student can take multiple subjects.
3NF – Third Normal Form:
• Only store what's really about the main thing.
• First, the table must be in 2NF.
• Then, everything in the table should directly relate to the primary key, and only the primary
key
.
Normal Form Definition Key Requirements Goal
A table is in 2NF if it is in
- In 1NF
1NF and all non-key
2NF (Second Normal - No partial dependency Remove partial
attributes are fully
Form) (non-key depends on part dependencies
functionally dependent on
of a composite key)
the entire primary key.