AI engineering glossary · SQL databases
What is many-to-many relationship?
Many-to-many relationship: A relationship where rows on each side can relate to many on the other, implemented with a third link table holding a foreign key to each side. A link table is always needed in relational designs.
Many-to-many relationship: an example
A student takes many courses and a course has many students, so an enrolments table links them.
Related terms
- Junction table
- One-to-many relationship
- Composite key
More SQL databases terms
Where you learn it
Many-to-many relationship is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.