Introduction to Normalization

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

WELCOME

Presented By:
Awais Mobeen
Mudassar Ullah
Ameer Hamza
Abdul Wahab
M. B ilal Saeed
Introduction to
Normalization
Normalization is the process of organizing data in a database to reduce
redundancy, improve data integrity, and ensure efficient data storage and
retrieval. It involves breaking down a database into smaller tables and defining
relationships between them.
Anomalies in Database Design
Update Anomaly Insertion Anomaly Deletion Anomaly

Occurs when updating data in one part Arises when new data cannot be added Happens when deleting data in one part
of the database causes unintended to the database without also including of the database causes the unintended
changes in other parts, leading to additional, irrelevant information. loss of other, related data.
inconsistencies.
First Normal Form (1NF)

1 Eliminate Repeating Groups


The first step in normalization is to ensure that the database is in 1
NF, which requires that all attributes in a table are atomic and there
are no repeating groups.

2 Unique Identifier
Each record in a 1 NF table must have a unique identifier, called a
primary key, that distinguishes it from all other records.

3 Flat Table Structure


A 1 NF table has a simple, flat structure with no nested or
hierarchical data, making it easier to query and manipulate.
EMP-ID EMP-NAME ZIP CODE CITY

101 Harry 20101,22344 Noida

102 Tom 46207 Chicago

Normal Form 103 Jhon 34567 New York

104 87245

Maxwell 89043 Noida

EMP-ID EMP-NAME ZIP CODE CITY

101 Harry 20101 Noida


First Normal Form (1NF)
101 Harry 22344 Noida

102 Tom 46207 Chicago

103 Jhon 34567 New York

104 Jhon 87245 New York

104 Maxwell 89043 Noida


Second Normal Form (2NF)
Partial Dependency Decomposition
A table is in 2NF if all non-key attributes are fully dependent on the To achieve 2NF, the table may need to be decomposed into smaller
primary key, with no partial dependencies. tables, each with its own primary key.

Referential Integrity Improved Data Organization


The relationships between the decomposed tables must be maintained to 2NF ensures that data is stored in a more organized and efficient
preserve referential integrity. manner, reducing redundancy and improving data quality.
STD NO COURSE-NO COURSE FEE
2NF
1 C1 1000

2 C2 1500

3 C3 2000

2 C3 2000

STD NO COURSE-NO COURSE-NO COURSE FEE

1 C1 C1 1000

2 C2 C2 1500

2 C3 C3 2000

3 C3
Third Normal Form (3NF)

Transitive Dependency Eliminate Redundancy


A table is in 3NF if it has no transitive 3NF ensures that data is stored only
dependencies, where a non-key attribute once, reducing the risk of data
depends on another non-key attribute. anomalies and improving data integrity.

Improved Performance Simplified Maintenance


By eliminating transitive dependencies, 3NF makes the database easier to
3NF can lead to faster data retrieval and maintain and update, as changes in one
more efficient database operations. part of the database do not affect other
areas.
EMP-ID EMP-NAME ZIP CODE CITY

101 Harry 20101 Noida

102 John 02228 Boston

103 Tom 46207 Chicago

EMP-ID EMP NAME ZIP CODE ZIP CODE CITY

101 Harry 20101 20101 Noida

102 John 02228 02228 Boston

103 Tom 46207 46207 Chicago


Importance of Normalization in
DBMS

1 Reduced Data Redundancy 2 Improved Data Integrity


Normalization eliminates the By removing anomalies,
repetition of data, which can lead normalization ensures the
to data inconsistency and wasted accuracy and consistency of data
storage space. within the database.

3 Enhanced Database 4 Simplified Database


Performance Maintenance
Normalized databases require Normalization makes it easier to
fewer disk operations, resulting maintain and update the database
in faster data retrieval and as the data and requirements
processing. change over time.
THANKS

You might also like