You are on page 1of 2

Bui Hoang Linh – CE160280

Given R (C, T, H, R, S, G). Let the set of FD's for R be C-> T, HR-> C, HT-> R, HS-> R, and
CS-> G.
a)  What are all the keys for R?
b)  Find FD's minimal basis.
c) Use the 3NF synthesis algorithm to find a lossless-join, dependency-preserving decomposition
of R into 3NF relations. Are any of the relations not in BCNF?
Solution
a/
C-> T, HR-> C, HT-> R, HS-> R, CS-> G
{HS}+={H,S,R,C,T,G} is key.
b/
- Convert the FD’s into singleton right sides:
C-> T
HR-> C
HT-> R
HS-> R
CS-> G
- Remove redundant attributes on left-hand sides of each FD:
HR-> C
{H}+= {H} not including C.
{R}+={R} not including C.
HT-> R
{H}+= {H} not including R.
{T}+= {T} not including R.
HS-> R
{H}+= {H} not including R.
{S}+= {S} not including R.
CS-> G
{C}+= {C} not including G.
{S}+= {S} not including G.
{S}+={S} not including G
Therefore: F = { C -> T, HR -> C, HT -> R, HS -> R, CS -> G }
Remove redundant FD: If
Remove C -> T: {C,T}+= {C} not include T
Remove HR -> C: {H,R}+= {H,R} not include C
Remove HT -> R: {H,T}+= {H,T} not include R
Remove HS -> R: {H,S}+= {H,S} not include R
Remove CS -> G: {C,S}+= {C,S,T} not include G
Closure of FD is: C -> T, HR -> C, HT -> R, HS -> R, CS -> G
c/
By using the 3NF synthesis algorithm, the final set of relations obtained will be CT, HRC, HTR,
HSR, CSG (FD'S are already proved to be minimal basis in part (b)). All the relations are in
BCNF.

You might also like