Normalization-I Module 3
Normalization-I Module 3
Normalization-I Module 3
• Referential Integrity
• Concept of Foreign key
• Functional Dependency(FD)
• Closures of Attributes
• Closures of FD
• Inference rules
• Finding Candidate Key
• Types of FDs
• Normalization
• Types of Normalization.(1NF,2NF,3NF, BCNF, 4NF and
5NF)
• R(A,B,C,G,H,I)
• Given FD= {A→B,
• A→C,
• CG→ H,
• CG→I,
• B→H}
• Find (FD)+ ?
Question to perform:
• R(A,B,C,D,E)
• FD={ A→BC,
• CD→E,
• B→D,
• E→A}
• Find the closure of FD?
Finding Candidate keys in a table.
R(A,B,C,D,E,F)
FD= {A→C,
C→D,
D→B,
E→F}
Find CK=?
Questions on Candidate Key
Q1.R(A,B,C,G,H,I) Q2.R(A,B,C,D,E)
FD= {A→B, FD= {A→B,
A→C, AB→C,
CG→H, BC→E,
CG→I, BD→E}
B→H} Find CK=?
Find CK=?
Q3.Let R(A,B,C,D,E)
FD={A→BC,
CD→E,
B→D,
E→A}
Find Candidate keys=?
• R(A,B,C,D,E,F,G,H)
• FD={CH→G,
• A→BC,
• B→CFH,
• E→A,
• F→EG}
• Find Candidate Keys=?
Types of FDs
• Fully Functional Dependency FFD
• Partial Functional Dependency
• Transitive Functional Dependency
• Trivial Functional Dependency.
• Single valued .
Partial Dependency:
• Suppose we have more than one attribute in
Primary key. Let A be the non primary key
attribute. If A doesn’t depends upon all the
primary key attribute than partial dependency
exists.
• X→ Y , Y is said to be partial dependent on X,
because any proper subset of X can be able to
determine Y, such kind of dependency if exists
are known as partial dependency.
Fully FD & Partial FD
• X→ Y, if Y can be fully functionally determined
by a subset of X, then it is said to be partially
functional dependent.
• On the other hand,
• If Y cannot be determined by any subset of X
then it is said to be fully functionally
dependent on X.
Transitive Dependent:
• This dependency can be derived easily and is
based on the transitive rule only, which says,
• If X→ Y, holds and
• Y→Z exists than because of transitive rule
X→Z also exists. And X→Z is called TFD or we
say Z is transitively dependent on X or X
transitively determines Z.
Trivial Dependency
• X C Y, then Y → X exists.
Dependency of this type is called
• Similarly A→A Trivial Dependency. This can be
proved by Reflexive Rule.
Single valued and multiple valued
dependency
• Single Valued – In any relation R, if for a
particular value of X, Y has single value then it
is known as single valued Dependency.
• For Single valued we has,
• Teacher_ID → Teacher_name
• For multiple valued: Teacher_ID→→Dept
Teacher_ID Teacher_name Dept
1 ABC CSE
1 ABC MAE
2 XYZ CE
2 XYZ ECE
3 PQR ECE
Normalization
Decomposition of a Relation