CS FundamentalsVery hardProduct company interview · GATE level

A relation R(A, B, C, D, E) has candidate key AB and no other candidate keys. Which of the following dependencies, if it existed, would specifically violate 2NF (as opposed to only 3NF or BCNF)?

  1. A. C → D (neither C nor D is part of the key)
  2. B. AB → E (the whole key determines a non-prime attribute)
  3. C. A → C (a proper subset of the key AB determines a non-prime attribute C)
  4. D. D → A (a non-prime attribute determines part of the key)

Correct answer: C. A → C (a proper subset of the key AB determines a non-prime attribute C)

2NF is specifically about PARTIAL dependencies: a non-prime attribute depending on only part of a candidate key. A → C has A (a proper subset of the key AB) determining C (non-prime), which is exactly a partial dependency and violates 2NF. C → D is a dependency among two non-prime attributes (a 3NF/transitive-dependency concern, not 2NF, since neither side touches the key at all in a way 2NF cares about). AB → E is the key determining a non-prime attribute, which is expected and never a 2NF violation.

More DBMS and SQL questions

Exams that ask this topic