Many-to-Many Relationship
A relationship where rows on both sides can relate to many rows on the other side.
What is Many-to-Many Relationship in a relational database?
Many-to-Many Relationship — A relationship where rows on both sides can relate to many rows on the other side.
CREATE TABLE enrollment (
student_id INTEGER REFERENCES student (student_id),
course_id INTEGER REFERENCES course (course_id),
PRIMARY KEY (student_id, course_id)
);
Level: Novice · More Database terms at this level
Updated