Relationship
How two kinds of data connect, like one customer having many orders.
One-to-many
- A customer has many orders
- Each order has one customer
Many-to-many
- Students take many courses
- Courses have many students
What it is
A relationship describes how records in one table link to records in another. The common kinds are one-to-one (a user has one profile), one-to-many (a customer has many orders), and many-to-many (students take many courses; courses have many students).
Getting these right is one of the most important decisions in an app, because it's hard to change later. "Can a task have more than one assignee?" sounds small but changes the data model.
Always state the "how many" in both directions.
How to ask for it
“Tasks have people on them.”
“Tasks and people have a many-to-many relationship: a task can have several assignees, and a person can be assigned to many tasks. Show assignees as avatars on each task.”
"Have people on them" doesn't say how many; naming the relationship type in both directions avoids a costly rebuild later.
You've seen this in
- SOrders linked to a customer in Shopify
- NTags on Notion pages
- ALinked records in Airtable