Skip to main content
Academy
Intermediate Code District

Database design

Model data cleanly and pick the right kind of database.

Good apps start with a good data model. In this track you turn features into entities and relationships, choose keys that never need to change, and clean a messy spreadsheet into tables with normalization. Then you design for real use: data types that can't lose a cent or an hour, constraints that guard your rules, indexes shaped by the queries you actually run, counters that make popular pages fast, and the right kind of database for each job.

Every example is PostgreSQL you can run, and the track ends with you designing a seasonal game leaderboard on your own.

Lessons
14
Time
2 h
Level
Intermediate
  • Bronze open
  • Silver open
  • Gold locked

Ready to prove it?

Three exams are waiting: Bronze, Silver and Gold.

Go to the exams

What you'll be able to do

  • Turn a feature description into entities, relationships and an ER sketch
  • Choose primary keys and build one-to-many and many-to-many tables
  • Normalize messy data to third normal form
  • Pick data types and constraints that keep data correct
  • Design indexes and counters for the queries you really run
  • Choose between relational, document, key-value, graph, search and time-series stores

The journey

  1. 1
    Module 1

    Model the world

    Find entities and relationships, choose keys, and normalize messy data into clean tables.

    0 / 4
  2. 2
    Module 2

    Design for real use

    Types, constraints, indexes, counters, and the right database for each job.

    0 / 6
  3. 3
    Module 3

    Next steps

    Change live schemas safely, split huge tables, keep history and model data for analytics.

    0 / 4

Quick navigation