Practice mode DBMS and SQL

Enrol(student_id, course_id, student_name, grade) has key (student_id, course_id), with student_id -> student_name and (student_id, course_id) -> grade. Which normal form does it fail first?

Correct answer C. 2NF

Explanation

2NF forbids a non-prime attribute depending on only part of a composite candidate key. student_name depends on student_id alone, which is a partial dependency, so the relation is in 1NF but not 2NF. 3NF deals with transitive dependencies through non-key attributes, which is not the issue here. The fix is to move student_id and student_name into a separate Student table.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.