$ ./guess_the_languageSQL & Databases
SQL & Databases · medium · #34

Students take many courses and courses have many students. How is this usually modeled?

  1. One table holding both entities
  2. A course list column in students
  3. A junction table of both keys
  4. A foreign key on each side only
A many-to-many relationship needs a link table such as enrollments(student_id, course_id).
Play SQL & Databases ▸