0

I was working on some questions and found this relation R(A, B, C, D, E) with FDs {A -> B, B -> A, B -> E, AC -> D}. I worked it out to find that it was in 3NF.

But the solution key for the question paper where I came across this said it was in 1NF. According to it, B -> E was a partial dependency, so R couldn't be in 2NF. Can anyone please explain to me the logic behind this?

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185
Api
  • 1
  • 1
  • Please google 'stackexchange homework'. Show your work. Otherwise you are asking us to reproduce your textbook to justify an answer. PS A table in 2NF is also in 1NF, and one in 3NF is also in 2NF. Do you really only want to know whether it's in 2NF, or are you trying to ask, what is the highest NF (among choices)? – philipxy Jan 27 '18 at 22:59
  • Assuming your FD set is a cover (which you presumably mean but don't say): B->E is not partial. BC->E is partial, because both it & B->E hold & B is a proper/smaller subset of BC. – philipxy Feb 17 '21 at 18:57
  • Your "I have these FDs" doesn't make sense. "These are all the FDs that hold"?--Not possible. "These are all the non-trivial FDs that hold"?--Not possible. "These are some FDs that hold"?--Question can't be answered. Find out what a *cover* is & what the exact conditions are to apply a particular definition/rule/algorithm. To determine CKs & NFs we must be given FDs that form a cover. Sometimes a minimal/irreducible cover. And the set of all attributes must given. [See this answer.](https://stackoverflow.com/a/53386492/3404097) – philipxy Feb 17 '21 at 18:57

1 Answers1

0

A relation is in 2NF if any non-prime (i.e. not belonging to a candidate key) attribute is fully functionally dependent on a candidate key.

This definition implies that, if a dependency X → A can be derived in which A is not a prime attribute and X is a proper subset of a candidate key, then such dependency violates the 2NF.

This is the case of your example: the candidate keys are AC and BC, so D and E are non-prime attributes; the dependency B → E has a determinant which is not a candidate key, but only a subset of a key, so the relation is not in 2NF.

Finally note that the 2NF has only historical interest, and the normalization process is discussed in many books (and formal algorithms are presented) only for BCNF, 3NF and higher normal forms.

Renzo
  • 26,848
  • 5
  • 49
  • 61