Data layerIntermediate6h

Data modeling.

Designing schemas your whole app can live with.

What is data modeling?

Data modeling is designing the tables, columns, and relationships that represent your app's domain. It is the decision the entire stack depends on — the API shapes, the UI, and future features all flow from how you model the data.

Why it matters

A good model makes features easy and queries fast; a poor one fights you forever and is painful to change once data exists. As a full-stack developer you design the model and live with it across every layer, so getting it right early pays off across the whole app's life.

What to learn

  • Entities, attributes, and relationships
  • One-to-many and many-to-many modeling
  • Normalization and when to denormalize
  • Choosing column types and constraints
  • Designing for the queries you will run
  • Soft deletes, timestamps, and audit fields
  • Evolving a model as requirements change

Common pitfall

Modeling around the UI as it looks today instead of the domain, then needing painful migrations when the interface changes. Model the underlying entities and relationships, which are more stable than any one screen. A model tied to the current UI breaks the moment the UI evolves.

Resources

Primary (free):

Practice

Model a small domain — say a blog with users, posts, comments, and tags — including a many-to-many relationship. Choose types and constraints, and add timestamps. Sketch the main queries first and confirm the model serves them. Done when the model reflects the domain, not just one screen.

Outcomes

  • Model entities, attributes, and relationships.
  • Handle one-to-many and many-to-many cases.
  • Choose types and constraints deliberately.
  • Model the domain, not the current UI.
Back to Full-Stack roadmap