Multiple choice technology databases

"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

A junction table resolves a many-to-many relationship (Students to Classes) by combining their primary identifiers. Using 'name' (for student) and 'class name' (for class) creates a composite key. The other choices contain irrelevant attributes like age, or single fields that cannot form a composite key.