AI engineering glossary · SQL databases
What is one-to-many relationship?
One-to-many relationship: A relationship where one row in a table relates to many rows in another, but each of those relates back to only one. It is implemented with a foreign key on the many side.
One-to-many relationship: an example
One customer places many orders; each order belongs to one customer, so orders holds customer_id.
Related terms
More SQL databases terms
- ORDER BY
- Parameterised query
- PARTITION BY
- Phantom read
- PostgreSQL
- Primary key
- Query optimizer
- RANK and DENSE_RANK
Where you learn it
One-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.