Practice mode DBMS and SQL

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.

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.