software-development-lessons

Records and Relationships

This lesson practices domain modeling and when to use a one-to-many or a many-to-many relationship.

Slides

Topics

What are the associations?

One-to-Many or Many-to-Many?

When you’re deciding, ask yourself:

The answer is usually: it depends on what you’re building.

Justify it.

If One-to-Many, which table gets the foreign key column?

If Many-to-Many, what’s a good name for the join table?

Next Up

HTML