DBMS Unit 4
DBMS Unit 4
UNIT 4
NORMALIZATION
II CSE
2024-2025 EVEN SEMESTER
SYLLABUS
• Normalization
• Need for Normalization
• NF1
• NF2
• NF3
• NF4
• NF5
• Case study:
• Apply Conversion rules and normalize the Database.
Lossless Decomposition
• Let R be a relation schema and let R1 and R2 form a decomposition of R . That is R = R1 U R2
• We say that the decomposition is a lossless decomposition if there is no loss of information by replacing R with
the two relation schemas R1 U R2
• Formally,
R1 (r) R2 (r) = r
• And, conversely a decomposition is lossy if
r R1 (r) R2 (r) = r
Normalization Theory
• Decide whether a particular relation R is in “good” form.
• In the case that a relation R is not in “good” form, decompose it into set of relations {R1, R2, ..., Rn} such that
• Each relation is in good form
• The decomposition is a lossless decomposition
• Our theory is based on:
• Functional dependencies
• Multivalued dependencies
Functional Dependencies Definition
• Let R be a relation schema
R and R
• The functional dependency
holds on R if and only if for any legal relations r(R), whenever any two tuples t1 and t2 of r agree on
the attributes , they also agree on the attributes . That is,
1 4
t1[] = t2 [] t1[ ] = t2 [ ] 1 5
3 7
• Example: Consider r(A,B ) with the following instance of r.
• On this instance, B A hold; A B does NOT hold,
Normalization
• Normalization is a systematic approach to organize data in a
database to eliminate redundancy, avoid anomalies and ensure
data consistency.
• The process involves breaking down large tables into smaller,
well-structured ones and defining relationships between them.
• This not only reduces the chances of storing duplicate data but
also improves the overall efficiency of the database.
Normalization
• A relation in BCNF is also in 3NF ,
a relation in 3NF is also in 2NF and
a relation in 2NF is also in 1NF.