Skip to content
Official PYQ · 2004

GATE CS 2004 Q50 — Normal Forms

Explain with AI

The relation scheme Student Performance (name, courseNo, rollNo, grade)\text{Student Performance (name, courseNo, rollNo, grade)} has the following functional dependencies:

  • name, courseNo, →\rightarrow grade
  • rollNo, courseNo →\rightarrow grade
  • name →\rightarrow rollNo
  • rollNo →\rightarrow name

The highest normal form of this relation scheme is

Choose one option
View worked solution

Answer: B

To find the highest normal form, we first determine the candidate keys of the relation R(name, courseNo, rollNo, grade)R(\text{name, courseNo, rollNo, grade}):

  1. Since courseNo\text{courseNo} does not appear on the right-hand side of any functional dependency (FD), it must be part of every candidate key.
  2. Taking the closure of {name, courseNo}\{\text{name, courseNo}\}: {name, courseNo}+={name, courseNo, grade, rollNo}\{\text{name, courseNo}\}^+ = \{\text{name, courseNo, grade, rollNo}\} Thus, {name, courseNo}\{\text{name, courseNo}\} is a candidate key.
  3. Taking the closure of {rollNo, courseNo}\{\text{rollNo, courseNo}\}: {rollNo, courseNo}+={rollNo, courseNo, grade, name}\{\text{rollNo, courseNo}\}^+ = \{\text{rollNo, courseNo, grade, name}\} Thus, {rollNo, courseNo}\{\text{rollNo, courseNo}\} is also a candidate key.

From these candidate keys, we classify the attributes:

  • Prime attributes (part of any candidate key): {name, rollNo, courseNo}\{\text{name, rollNo, courseNo}\}
  • Non-prime attributes: {grade}\{\text{grade}\}

Now, we test the normal forms:

  • BCNF: For a relation to be in BCNF, the left-hand side of every non-trivial FD X→YX \rightarrow Y must be a superkey. For the FD name→rollNo\text{name} \rightarrow \text{rollNo}, the LHS {name}\{\text{name}\} is not a superkey. Thus, the relation is not in BCNF.
  • 3NF: For a relation to be in 3NF, for every non-trivial FD X→YX \rightarrow Y, either XX must be a superkey or YY must be a prime attribute.
    • name, courseNo→grade\text{name, courseNo} \rightarrow \text{grade} : LHS is a superkey.
    • rollNo, courseNo→grade\text{rollNo, courseNo} \rightarrow \text{grade} : LHS is a superkey.
    • name→rollNo\text{name} \rightarrow \text{rollNo} : RHS {rollNo}\{\text{rollNo}\} is a prime attribute.
    • rollNo→name\text{rollNo} \rightarrow \text{name} : RHS {name}\{\text{name}\} is a prime attribute.
    Since all FDs satisfy the 3NF condition, the relation is in 3NF.

Therefore, the highest normal form of the relation is 3NF.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Normal Forms questions