Skip to content
Official PYQ · 2018

GATE CS 2018 Q42 — Normal Forms

Explain with AI

Consider the following four relational schemas. For each schema , all non-trivial functional dependencies are listed, The bolded attributes are the respective primary keys.

Schema I:\text{Schema I:} Registration(rollno, courses)

Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for.

Non-trivial functional dependency

rollno →\rightarrow courses

Schema II:\text{Schema II:} Registration (rollno, coursid, email)

Non-trivial functional dependencies:

rollno, courseid →\rightarrow email

email →\rightarrow rollno

Schema III:\text{Schema III:} Registration (rollno, courseid, marks, grade)

Non-trivial functional dependencies:

rollno, courseid, →\rightarrow marks, grade

marks →\rightarrow grade

Schema IV:\text{Schema IV:} Registration (rollno, courseid, credit)

Non-trivial functional dependencies:

rollno, courseid →\rightarrow credit

courseid →\rightarrow credit

Which one of the relational schemas above is in 3NF\text{3NF} but not in BCNF\text{BCNF}?

Choose one option
View worked solution

Answer: B

To determine which schema is in 3NF\text{3NF} but not in BCNF\text{BCNF}, we analyze each schema individually.

Schema I:

The attribute courses is set-valued (non-atomic). By definition, a relation must have atomic attributes to be in First Normal Form (1NF\text{1NF}). Since it is not in 1NF\text{1NF}, it cannot be in 3NF\text{3NF}.

Schema II:

Relation: Registration(rollno, courseid, email)
Functional Dependencies (FDs):

  1. rollno, courseid→email\text{rollno, courseid} \rightarrow \text{email}
  2. email→rollno\text{email} \rightarrow \text{rollno}

Let's find the Candidate Keys (CKs):

  • (rollno, courseid)+={rollno, courseid, email}(\text{rollno, courseid})^+ = \{\text{rollno, courseid, email}\}
  • (email, courseid)+={email, courseid, rollno}(\text{email, courseid})^+ = \{\text{email, courseid, rollno}\}

Thus, the Candidate Keys are {rollno, courseid}\{\text{rollno, courseid}\} and {email, courseid}\{\text{email, courseid}\}.

  • Prime attributes (part of any candidate key): {rollno, courseid, email}\{\text{rollno, courseid, email}\}
  • Non-prime attributes: None

Checking 3NF:
For every non-trivial dependency X→YX \rightarrow Y, either XX must be a superkey, or YY must be a prime attribute.

  • For rollno, courseid→email\text{rollno, courseid} \rightarrow \text{email}: LHS is a superkey. (Satisfied)
  • For email→rollno\text{email} \rightarrow \text{rollno}: RHS (rollno\text{rollno}) is a prime attribute. (Satisfied)
Therefore, Schema II is in 3NF.

Checking BCNF:
For every non-trivial dependency X→YX \rightarrow Y, XX must be a superkey.

  • For email→rollno\text{email} \rightarrow \text{rollno}: LHS (email\text{email}) is not a superkey.
Therefore, Schema II is NOT in BCNF.

Schema III:

Relation: Registration(rollno, courseid, marks, grade)
FDs:

  1. rollno, courseid→marks, grade\text{rollno, courseid} \rightarrow \text{marks, grade}
  2. marks→grade\text{marks} \rightarrow \text{grade}
Candidate Key is {rollno, courseid}\{\text{rollno, courseid}\}.
For the dependency marks→grade\text{marks} \rightarrow \text{grade}, marks\text{marks} is not a superkey and grade\text{grade} is not a prime attribute. This is a transitive dependency, so Schema III is not in 3NF.

Schema IV:

Relation: Registration(rollno, courseid, credit)
FDs:

  1. rollno, courseid→credit\text{rollno, courseid} \rightarrow \text{credit}
  2. courseid→credit\text{courseid} \rightarrow \text{credit}
Candidate Key is {rollno, courseid}\{\text{rollno, courseid}\}.
For the dependency courseid→credit\text{courseid} \rightarrow \text{credit}, a proper subset of the candidate key (courseid\text{courseid}) determines a non-prime attribute (credit\text{credit}). This is a partial dependency, so Schema IV is not in 2NF (and hence not in 3NF).

Thus, only Schema II is in 3NF\text{3NF} but not in BCNF\text{BCNF}.

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

Published
Report a correction
Keep exploringMore Normal Forms questions