1

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?

Sigmund
  • 69
  • 1
  • 9
  • Actually your relation schema is in 3NF (and for this it is already in 2NF). In fact for each dependency of the minimal cover the determinant is a candidate key or the determinate is a prime attribute (belongs to a candidate key). – Renzo Sep 11 '21 at 13:06
  • Better; still unclear. "reformulating" & its sentence are unclear. 1st bullet is unnecessary; don't know why you think it is; anyway it must be true since the LHSs are CKs; so you don't need the "We ... respectively." after the bullets. 2nd bullet "reduce" is unclear, maybe you mean remove; but "an attribute" is not enough to give all proper subsets. That bullet isn't a grammatical continuation of "show that the FDs:" You still don't clearly give an algorithm or say why it determines whether the defining condition holds. If you use closure of attribute sets you don't need closure of a cover. – philipxy Sep 14 '21 at 18:10
  • It would help if presentation of an algorithm for determining whether the definition of 2NF holds & its justification were separated from applying it in a particular case. Because otherwise we don't really know why you are doing or mentioning the specific things. We have to try to guess. You're really asking 2 questions, algorithm & application, by the latter only makes sense to apply once the former is correct. (Also an algorithm for applying the definition is likely a faq.) – philipxy Sep 14 '21 at 18:18

0 Answers0