I have a student table and a course table that have a many-to-many relationship (a student can take many courses, and a course can be taken by many students).
If I am implementing the above data model as a database, I would create a third table to represent the many-to-many relationship.
But I want to implement the above data model in Drupal 8. I think that in Drupal 8 there are two ways to implement the above data model:
- I can create a reference field in one of the two content types (student or course) that points to the other content type.
- I can create a third content type that have two reference fields that points to the student and course content types.
Am I correct that these two ways are valid? And if I am correct, which one should I choose?