in Databases
1,046 views
2 votes
2 votes
Consider a relation R(A,B,C,D,E,F,H) with A as the only key. Assume that the dependencies E->F and C-> DEH hold.on R.

1. Is R in 2NF? If not, decompose to 2NF.

2. is R in 3NF? if not, decompose to 3NF.

//What does " with A as the only key" mean ?
in Databases
1.0k views

3 Comments

"with A as the only key" I think it means A is the only key attribute and other (B,C,D,E,F,H) are non primary attribute so we can say that it is already in 2NF.
1
1
But then, what is the relation between A and the remaining elements in R.
0
0
As 'A' is the key attribute all other elements are depended on A. Like A->BCDEFH automatically holds.
0
0

2 Answers

1 vote
1 vote
R is in 2NF. It is NOT in 3NF. 3NF decomposition : ABC, CDEH, EF

A is the only candidate means that there are no other candidate keys.
0 votes
0 votes
R(ABCDEFH) { E → F, C → DEH}

here, Candidate key will be {ABC}.   So, C –> DEH is a partial functional dependency. So, its not in 2NF.

2NF decomposition will be: R1(CDEHF), R2(ABC)

 

Also, since its not in 2NF. so its also not in 3NF.

For 3NF decomposition will be: R1(EF), R2(CDEH), R3(ABC)

Related questions

3 votes
3 votes
2 answers
1