You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering how someone could model N-M table relationships.
Currently, we can model 1-1 and 1-N relationships with parent (tabular) and child (relational) models. However, is it possible to model N-M association tables?
An example association table could be student_courses_registrations that unites students and courses. A student can attend many courses and a course could be taken by multiple students:
courses ---- 1-N ---> students_courses_registrations <----- M-1 ----- students
Should we create parent tabular models for courses and students tables and then somehow use a child relational model for students_courses_registrations? Is it possible?
I can't find a way to do it. I was wondering if there is way to convert a N-M table to multiple 1-N relationships and then model the relationships separately. Of course later on I will have to revert the process to convert them to a N-M single table when sampling data.
What do you think? Is there a way to do it?
The text was updated successfully, but these errors were encountered:
echatzikyriakidis
changed the title
How to model N-M tabular relationships
How to model N-M association tables?
Jun 9, 2023
Hi @avsolatorio !
I was wondering how someone could model N-M table relationships.
Currently, we can model 1-1 and 1-N relationships with parent (tabular) and child (relational) models. However, is it possible to model N-M association tables?
An example association table could be student_courses_registrations that unites students and courses. A student can attend many courses and a course could be taken by multiple students:
courses ---- 1-N ---> students_courses_registrations <----- M-1 ----- students
Should we create parent tabular models for courses and students tables and then somehow use a child relational model for students_courses_registrations? Is it possible?
I can't find a way to do it. I was wondering if there is way to convert a N-M table to multiple 1-N relationships and then model the relationships separately. Of course later on I will have to revert the process to convert them to a N-M single table when sampling data.
What do you think? Is there a way to do it?
The text was updated successfully, but these errors were encountered: