6.CSI2004-ADBMS Normalization
6.CSI2004-ADBMS Normalization
Management Systems
Relational Database Model
1/10/2025 10:26:03 2
AM
Relational Database Model
Relations:
• A relation appears as a two-dimensional table.
• The RDBMS organizes the data so that its
external view is a set of relations or tables.
• This does not mean that data is stored as tables:
the physical storage of the data is independent
of the way in which the data is logically
organized.
1/10/2025 10:26:03
AM
14.3
Relational Database Model
A relation in an RDBMS has the following features:
1/10/2025 10:26:03 10
AM
Database Design
1/10/2025 10:26:03 13
AM
Informal Design Guidelines for Relational
Databases
1/10/2025 10:26:03 16
AM
Informal Design Guidelines for Relational
Databases
Redundant Information in Tuples and Update
Anomalies
1/10/2025 10:26:03 18
AM
Informal Design Guidelines for Relational
Databases
1/10/2025 10:26:03 19
AM
Informal Design Guidelines for Relational
Databases
1/10/2025 10:26:03 20
AM
Informal Design Guidelines for Relational
Databases
Spurious Tuples
Student
SNo SName CNo CName Addr Instr. Office
5425 Susan 102 Calc I …San Jose, CA P. Smith B42
Ross Room
112
7845 Dave 541 Bio 10 .San Diego, CA L. Talip B24
Turco Room
210
Redundancy
Issues due to Redundancy
Insertion anomaly
Insert redundant data for every new row
Two different but related data is stored in the
same table
ROLL NAME BRANCH HOD OFFICE_CONTACT
NO NO
1 DINESH CSE Mr. M 43377
Deletion anomaly
Deleting student information also deletes the branch
information
When no student in the department – nowhere
department details will be in database
Branch information deleted along with student data
ROLL NAME BRANCH HOD OFFICE_CONTACT NO
NO
1 DINESH CSE Mr. M 43377
2 ASHOK CSE Mr. M 43377
3 RANI CSE Mr. M 43377
4 SASIKALA CSE Mr. M 43377
Issues due to Redundancy
Updation anomaly
When Mr.M leaves and Mr.N Joins as HOD/CSE,
need to modify for each student record the HOD data
When even a single record missing the modification –
data inconsistency occurs
ROLL NAME BRANCH HOD OFFICE_CONTACT NO
NO
1 DINESH CSE Mr. M 43377
2 ASHOK CSE Mr. M 43377
3 RANI CSE Mr. M 43377
4 SASIKALA CSE Mr. M 43377
Solution to these problems
NORMALIZATION
HOW?
NORMALIZATION
Student Table
3NF
Remove remaining anomalies
resulting from FDs
BCNF
4NF
Remove remaining anomalies
Join dependencies
5NF
1NF
First Normal Form
Each attribute should have Atomic values
A column should contain values from the same
domain
Each column should have unique name
No ordering of tuples and columns
No duplicate rows
Only Simple and Indivisible Values in the
Domain of Attributes.
Disallows composite attributes, multivalued
attributes, and nested relations
First Normal Form
Approach 1
Not in 1NF
Composite attributes
Create a separate attribute for each component attribute
Multivalued attributes
Create separate schema,
Map multivalued attribute to separate tuple of the relation
Example of 1NF
2NF
Second Normal Form
2NF of EMP_PROJ
Third Normal Form
A relation R is said to be in the Third Normal Form
(3NF) if and only if
It is in 2NF and
key attributes.
Transitive Functional dependency
- Assume X, Y and Z are three attributes.
X -> Y , Y-> Z => X -> Z
Let R={a,b,c}
PK={a} & bc holds
R decomposed into R1 & R2
R1= {b,c} PK=b
R2= {a,b} PK= {a} FK=b
Third Normal Form
Third Normal Form
Third Normal Form
Normalization
Example Problem for Practice
Consider the pet health history report table given below and normalize it to 3NF
Normalization