Skip to content
Web Design & Development

How to Get Relational Data Modeling Right

Designing database tables and relationships so data stays consistent and queries stay simple.

Marcus Adeyemi Technical Director 2 min read 21 views
How to Get Relational Data Modeling Right

What is at stake

Schema decisions are expensive to change later, and poor models cause duplicated data and slow reports.

The playbook

  1. Model core entities before building features
  2. Use foreign keys and constraints
  3. Normalize first, denormalize with evidence
  4. Document the schema
  5. Review models with people who know the domain

Where it goes wrong

Avoid:

  • Everything in one wide table
  • Relationships enforced only in code
  • Storing lists in text columns
  • Schema changes without migration plans
What to do and what to avoid with relational data modeling, side by side
Good practice against the usual mistakes, from the sources listed below.

The numbers behind it

Published figures for Relational Data Modeling
MeasureFigure
Normalizationreduces duplicated data
Foreign keysenforce relationships at the database level
Denormalizationtrades duplication for read speed
Constraintsprotect data integrity regardless of application bugs

Getting outside help

When to hand it over: Bring in help when designing schemas for long-lived products.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

Marcus Adeyemi

Builds and maintains the web work. Writes about front-end architecture, performance, accessibility and the unglamorous parts of keeping a site alive.

Keep reading

More in Web Design & Development