# Determining if a relation is in third normal form 3NF

I have a ralation R(A,B,C) with the functional dependencies as follows

``````A->B
A->C
B->C
``````

with `A` being the candidate key, is this relation in `3NF`? well because by analyzing the first two dependencies it seems that both non key attributes `B` and `C` are not transitively dependent on A but does the third functional dependency `B->C` not make `C` transitively dependent on `A`?

## 1 Answer

When looking to see if a relation is in 3NF, two are the questions that you must answer:

1. Has every functional dependency a left hand side which is a superkey?

2. If this is not true, are the attributes on the right hand side prime attributes? (i.e. belonging to any key?).

So in your example you can see that both `A -> B` and `A -> C` are dependencies in which the left hand side is a key, so the answer to the first question is yes.

In the third dependency, instead, `B` is not a superkey, (since `B+ = BC`), so, is `C` a prime attribute?

To answer to this question, you should know all the keys of the relation, and see if `C` belongs to one of them. And in this case this is very simple, since A is the unique key of this relation, so you can conclude that the relation is not in 3NF. But note that in general, in more complex cases, it is not so simple to answer to such question, since you can have a very large number of keys, actually a number which is exponential with the number of attributes.