The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+3 votes
Consider table R(A,B,C,D,E) with FDs as A->B, BC->E and ED-> A. The table is in which normal form? Justify your answer.
asked in Databases by (85 points) | 4.3k views

2 Answers

+9 votes
Best answer
First step: Identify the candidate keys. Candidate keys must be able to determine all other attributes. Most of the time they can be found by just looking at the FDs. Here,

EDC is a candidate key so are ACD and BCD.

Now, just check for the conditions of each normal form.

We can see A->B.
ACD is the candidate key and A is a partial key. But B is a prime-attribute (part of a candidate key). Hence, this is not a partial functional dependency.

Similarly in BC->E and ED->A, E and A are prime-attributes and hence both are not partial functional dependencies. Hence R is in 2NF.

Now 3NF states that every non-prime attribute must be dependent on the candidate key. In the given functional dependencies, all dependent attributes are prime-attributes and hence it is trivially in 3NF.

Now BCNF requires that for every FD $\alpha -> \beta$, $\alpha$ must be a super key (candidate key or its superset). This condition is violated by all the 3 FDs given and hence R is not in BCNF.  

So, 3NF is the highest normal form table can be in.
answered by Boss (16k points)
selected by
Sir, apart from EDC and ACD, BCD is also a candidate key.

But in the book answer it is written that
 R is in 3NF because B, E and A are all parts of keys.
 R is not in BCNF because none of A, BC and ED contain a key.

I didn't understand the concept of this answer. Can u plz explain.
Sorry. I missed that. That takes R to 3NF. I have modified my answer. You can check it.
which book is this from?
+1 vote
answered by Active (2.2k points)

Related questions

0 votes
1 answer
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,535 questions
54,122 answers
71,039 users