6 - Chapter 3 - Functional Dependencies
6 - Chapter 3 - Functional Dependencies
6 - Chapter 3 - Functional Dependencies
Session 6
Chapter 3 - Design theory for
Relational Database - FDs
Objectives
5 Understand what are closing sets of FD’s and how to determine them
1 Functional Dependencies
6 Projecting FD’s
1. Functional Dependency Definition
Exercise 1:
(title, year) forms a key?
Exercise 2:
(title, year, starName) forms a key ?
3. Super-keys
R (A, B, C, D, E, F)
S = {A → C, A → D, D → E,
E → F}
Easy to see that:
{A}+ = {A, C, D, E, F}
5. Closure set algorithm
Exercises
R (A, B, C, D, E, F)
S = {AB → C, BC → AD, D → E,
CF → B}
compute {AB}+
An efficient algorithm to finding KEYS for
a relation
L contains those attributes that occur only on the left-hand side of FDs
Suppose
Suppose R contains those attributes that occur only on the right-hand side of
FDs
Suppose M contains those attributes that occur on both side of FDs
Note:
L Intersects M = EMPTY
M Intersects R = EMPTY
L Intersects R = EMPTY
Some LEMAs
R (A, B, C, D)
S = {BC→D, D→A, A→B}
What are all the keys of R?
What are all the super-keys for R that
are not keys?
Exercises
R (A, B, C, D)
S = {AD→B, AB→C, BC→D, CD→A}
What are all the keys of R?
What are all the super-keys for R that
are not keys?
Closing sets of FD’s
T=A->C, C->D;