Normalisation 2025
Normalisation 2025
(Normalization)
According to E.F.Codd, who is the inventor of the Relational Database, the goals of
Normalization include:
•It helps in vacating all the repeated data from the database.
0-55-123456-9 Main Street Small House 714-000-0000 $22.95 0-55-123456-9 Jones 123-333-3333
Example 1
Example 3
Table Scheme:
AuID AuName AuPhone
1 Sleepy 321-321-1111 {AuID, AuName, AuPhone}
2 Snoopy 232-234-1234 Functional Dependencies:
3 Grumpy 665-235-6532
{AuId} {AuPhone}
4 Jones 123-333-3333
{AuId} {AuName}
5 Smith 654-223-3455
6 Joyce 666-666-6666
{AuName, AuPhone} {AuID}
7 Roman 444-444-4444
FD – Example
Database to track reviews of papers submitted to an academic conference.
Prospective authors submit papers for review and possible acceptance
in the published conference proceedings. Details of the entities
– Author information includes a unique author number, a name, a mailing
address, and a unique (optional) email address.
– Paper information includes the primary author, the paper number, the
title, the abstract, and review status (pending, accepted,rejected)
– Reviewer information includes the reviewer number, the name, the
mailing address, and a unique (optional) email address
– A completed review includes the reviewer number, the date, the paper
number, comments to the authors, comments to the program chairperson,
and ratings (overall, originality, correctness, style, clarity)
FD – Example
Functional Dependencies
– AuthNo AuthName, AuthEmail, AuthAddress
– AuthEmail AuthNo
– PaperNo Primary-AuthNo, Title, Abstract, Status
– RevNo RevName, RevEmail, RevAddress
– RevEmail RevNo
– RevNo, PaperNo AuthComm, Prog-Comm, Date,
Rating1, Rating2, Rating3, Rating4, Rating5
Inference Rules For FDs
Inference Rules There are 6 inference rules,
•Reflexive Rule: If B is a subset of A, then A logically determines B.
•Formally, B ⊆
⊆ A then A → B.
• Example: Address (A) of a house, then parameters House no, Street no, City etc.
• These all are the subsets of A. Thus, address (A) → House no. (B).
•Augmentation Rule: It is also known as Partial dependency. If A logically determines B,
then adding any extra attribute doesn't change the basic functional dependency.
• Reference: https://youtu.be/bSdvM_0hzgc?si=dK5mfnXa0LBl-ULe
• Set of CK ={CE}
• C,E are Prime Attributes and A, B, D,F are non prime attribute
• Since F is determined from proper subset of CK which means partial
dependency exist.
• So this relation is not in 2NF
Third Normal Form (3NF)
This form dictates that all non-key attributes of a table must be functionally
dependent on a candidate key i.e. there can be no interdependencies among non-
key attributes.
For a table to be in 3NF, there are two requirements
– The table should be second normal form
– No attribute is transitively dependent on the primary key
A relation R having functional dependency A–>B is in 3NF if either of the
conditions given below are true .
• A is a superkey.
• B is prime attribute, that is B is the part of candidate key.
Example (Not in 3NF)
Scheme {Title, PubID, PageCount, Price }
1. Key {Title, PubId}
2. {Title, PubId} {PageCount}
3. {Title, PubID} {Price}
4. Both Price and PageCount depend on a key hence 2NF
5. Transitively {PageCount} {Price}hence not in 3NF
3NF - Decomposition
1. Move all items involved in transitive dependencies to a new entity.
2. Identify a primary key for the new entity.
3. Place the primary key for the new entity as a foreign key on the
original entity.
Example 1
Old Scheme {Title, PubID, PageCount, Price }
New Scheme {PubID, PageCount, Price}
New Scheme {Title, PubID, PageCount}
New Scheme is in 3NF
Third Normal Form (3NF)
Example 2 (Not in 3NF)
Scheme {Studio, StudioCity, CityTemp}
1. Primary Key {Studio}
2. {Studio} {StudioCity}
3. {StudioCity} {CityTemp}
4. {Studio} {CityTemp}
5. Both StudioCity and CityTemp depend on the entire key hence 2NF
6. CityTemp transitively depends on Studio hence violates 3NF
In 2NF non-prime attributes are allowed to be In 3NF non-prime attributes are only allowed to be
functionally dependent on non-prime attributes. functionally dependent on Super key of relation.
Stronger normal form than 1NF but lesser than 3NF Stronger normal form than 1NF and 2NF.
The goal of the second normal form is to eliminate The goal of the third normal form is to ensure
redundant data. referential integrity.
Third Normal Form Definition
A relation schema R is in third normal form (3NF) if for all:
in F+
at least one of the following holds:
is trivial (i.e., )
is a superkey for R
Each attribute A in – is contained in a candidate key for R.
(NOTE: each attribute may be in a different candidate key)
If a relation is in BCNF it is in 3NF (since in BCNF one of the first two
conditions above must hold).
Third condition is a minimal relaxation of BCNF to ensure dependency
preservation.
Third Normal Form Example
• Example: R= ABCD and
• FDs={AB → CD, D → A)
• Note: right side of FDs we have A, C, D so
• B can be determined only if B is also at left side.
• Closure of EC is AB+ ={ ABCD } and DB+ ={ ABCD }
Definition:
A relation schema R is in 4NF with respect to a set D of functional and
multivalued dependencies if for all multivalued dependencies in D+ of the
form , where R and R, at least one of the following hold:
is trivial (i.e., or = R)
is a superkey for schema R
MVD (Cont.)
Tabular representation of
holds on R if in any legal relation r(R), for all pairs for tuples t1 and t2 in r such that
t1[ ] = t2 [ ], there exist tuples t3 and t4 in r such that:
t1[ ] = t2 [ ] = t3 [ ] = t4 [ ]
t3[ ] = t1 [ ]
t3[R – ] = t2[R – ]
t4 [ ] = t2[ ]
t4[R – ] = t1[R – ]
Fourth Normal Form (4NF)
Example (Not in 4NF)
Scheme {MovieName, ScreeningCity, Genre)
Primary Key: {MovieName, ScreeningCity, Genre)
1. All columns are a part of the only candidate key, hence BCNF
2. Many Movies can have the same Genre
3. Many Cities can have the same movie
4. Violates 4NF
2. Each manager can have more than one child Mary NULL Adam