A many-to-many relationship Enrols between Student(student_id) and Course(course_id) has an attribute grade. When mapped to a relational table, what is normally the primary key of Enrols?
Correct answer B. The combination (student_id, course_id)
Explanation
For a many-to-many relationship, a student can appear in many enrolments and so can a course, so neither key alone is unique. The relationship table takes the primary keys of both participating entity sets, and together they form its primary key, each also acting as a foreign key. Relationship attributes such as grade are descriptive and do not identify the row.
Answer checked How we write and check questions
Discussion