Answer – B
We’ll first find all the candidate keys of given relation –
- Closure of { name, courseNo } = { name, courseNo, rollNo, grade }
- Closure of { rollNo, courseNo } = { name, courseNo, rollNo, grade }
We’ve 2 candidate keys { name, courseNo } and { rollNo, courseNo }.
Therefore, prime attributes are { name, rollNo, courseNo }.
A relation is in 2NF if it is in 1NF and it has no partial dependency ie for all non-trivial FD X → Y, if Y is non-prime attribute then X must not be a proper subset of any candidate key. Here, we’ve no partial dependency. Thus, relation is in 2NF.
A relation is in 3NF if it is in 2NF and it has no transitive dependency ie for all non-trivial FD X → Y, either X is a super key or Y is a prime attribute. Here, we’ve no transitive dependency. Thus, relation is in 3NF.
A relation is in BCNF if it is in 3NF and for all non-trivial FD X → Y, either X is a super key. Here, name → rollNo and name is not a super key. Thus, relation is not in BCNF.
If a relation is not in BCNF, then it cannot be in 4NF.