Index Ai Academy
Glossary · Phase 7 · Software engineering

One-to-many

Also written: one-to-many relationship

A link where one row relates to many rows elsewhere, like one leader for many trips; a foreign-key column on the many side is enough.

Not every link needs a table in between. If each trip has exactly one leader, that's one-to-many (one member can lead many trips), and a leader_id column in trips is enough. A link table is for many-to-many, and for facts that belong to the pairing itself, like the role.

Try it now

Ask of each column: is it a fact about the member, about the trip, or about this person on this trip?

Learn it properly

Designing a database · From one big table to related tables: keys, constraints, many-to-many and a loader that is safe to rerun. About 40 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write