Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following many to many relationship A student can take many classes

ID: 3868233 • Letter: C

Question

Consider the following many to many relationship A student can take many classes Many classes can be taken by many students What would be the most appropriate way to handle the foreign keys to maintain this relationship? a) Create a new table that has a foreign key reference to both student and classes b) Create a foreign key in student that references classes c) Create a foreign key in classes that references students d) Combine the two tables into a single table that ahs properties of both student and classes e) This is not possible to model in MySQL and must be handled in the application logic

Explanation / Answer

The answer is
c) Create a foreign key in classes that reference students.

This is because relation from Classes to Student is one to many and it will suitably hold the relation between student and class.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote