Multiple choice technology architecture

A student has such attributes as name, address, and gender. A student can also attend a graduate, undergraduate, or elective class that has the following attributes: class name, section name, major, and instructor. Based on the scenario above, which is the composite key in a junction table if many students can attend many classes?

  1. section name, age

  2. name

  3. undergraduate

  4. name, class name

  5. major, gender

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In a many-to-many relationship between students and classes, a junction table (associative entity) is needed. This table contains foreign keys from both entities. The composite key is the combination of both identifying attributes - in this case, the student's name and the class name together uniquely identify each enrollment record.