Skip to content
StackDecode
System Design
4. Database FundamentalsAnimated

Database Schema Design

Deciding tables, columns, types and relationships.

The idea

A good schema reflects the domain, enforces rules with constraints, and fits how data will be read and written.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

BrowserApp serverDatabase
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Presentation tier: the browser shows the interface.

step:
1/4
at:
Browser
1/9

The green dot is a request moving through the system.

Step by step

  1. 1List entities and attributes
  2. 2Define keys and relationships
  3. 3Choose types and constraints
  4. 4Check against the main queries

Where it is used

Starting any data-backed feature.

Watch out for

Schemas are painful to change at scale. Think about growth.

Related