Consider the following four relational schemas. For each schema , all non-trivial functional dependencies are listed, The bolded attributes are the respective primary keys.
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 courses
Registration (rollno, coursid, email)
Non-trivial functional dependencies:
rollno, courseid email
email rollno
Registration (rollno, courseid, marks, grade)
Non-trivial functional dependencies:
rollno, courseid, marks, grade
marks grade
Registration (rollno, courseid, credit)
Non-trivial functional dependencies:
rollno, courseid credit
courseid credit
Which one of the relational schemas above is in but not in ?
View worked solution
Answer: B
To determine which schema is in but not in , 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 (). Since it is not in , it cannot be in .
Schema II:
Relation: Registration(rollno, courseid, email)
Functional Dependencies (FDs):
Let's find the Candidate Keys (CKs):
Thus, the Candidate Keys are and .
- Prime attributes (part of any candidate key):
- Non-prime attributes: None
Checking 3NF:
For every non-trivial dependency , either must be a superkey, or must be a prime attribute.
- For : LHS is a superkey. (Satisfied)
- For : RHS () is a prime attribute. (Satisfied)
Checking BCNF:
For every non-trivial dependency , must be a superkey.
- For : LHS () is not a superkey.
Schema III:
Relation: Registration(rollno, courseid, marks, grade)
FDs:
For the dependency , is not a superkey and 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:
For the dependency , a proper subset of the candidate key () determines a non-prime attribute (). This is a partial dependency, so Schema IV is not in 2NF (and hence not in 3NF).
Thus, only Schema II is in but not in .
Free practice · Your answers on this page are not saved.
