How to use 2NF definition to show that a relation is in 2NF

104 views Asked by At

I have this Relation: (City, State, Governor, Population)

Given FDs:

City, State -> Population
State -> Governor
Governor -> State

I understand this to be the a minimal cover of FDs.

How do we show this is in 2NF?

Definition for 2NF from Wikipedia:

  • A relation is in the second normal form if it fulfills the following two requirements: It is in first normal form. It does not have any non-prime attribute that is functionally dependent on any proper subset of any candidate key of the relation.

So for this we need to look at all possible FDs we could arrive at by reformulating the original dependencies.

Applied to my example: Candiate-Keys are: City, State and City, Governor and the only non-prime attribute in my example is Population.

So we need to show that the FDs:

(City, State) -> Population ; (City, Governor) -> Population

  • are contained in the closure of the set of functional dependencies above
  • if we reduce any attribute from the left side, that FD is not contained in the closure.

We can determine this with the closure algorithm by plugging in both left sides and showing that through the given dependencies we will arrive at population (the right side). The closure of (City, State) and (City, Governor) both contain Population, respectively. But any subset of them will not.

Is this somewhat correct?

0

There are 0 answers