CodeRigor

FREE COURSE / REAL PRACTICE

Relational database design

Design durable relational schemas with native SQLite keys, dependencies, integrity, migrations and order-level reports.

Free lessons & exercises7 authored lessons3 units

What you’ll work toward

Model entity identity and cardinality, normalize stated functional dependencies, enforce integrity, preserve data in a bounded migration, choose an index and transaction boundary, and build a constrained order schema with a trustworthy report.

Read an explanation, inspect the diagrams and work through the available checks, debugging exercises and builds. Feedback and prerequisite links guide the next step.

Before you start

This course builds on these skills:

Individual lessons can add prerequisites. The course map shows your actual readiness.

A look inside the first lesson

Entity identity and candidate keys

SQL
CREATE TABLE customers(
  id INTEGER PRIMARY KEY,
  external_ref TEXT NOT NULL UNIQUE,
  display_name TEXT NOT NULL
);
INSERT INTO customers VALUES(7,'crm:a','Lee'),(20,'crm:b','Lee');
UPDATE customers SET display_name='L. Lee' WHERE id=7;
SELECT id,external_ref,display_name FROM customers ORDER BY id;

Your course outline

Follow the lessons in curriculum order. Open a unit to preview the ideas you’ll work with.

UNIT 013 lessons Relational facts and relationships
  1. LESSON 01.01

    Entity identity and candidate keys

    Turn entity identity and business uniqueness into durable SQLite keys.

    Open lesson
  2. LESSON 01.02

    Cardinality and relationship tables

    Represent optional, one-to-many and many-to-many relationships without accidental uniqueness.

    Open lesson
  3. LESSON 01.03

    Functional dependencies and normalization

    Decompose repeated facts while preserving relationship identity and purchase-time values.

    Open lesson
UNIT 023 lessons Integrity and controlled change
  1. LESSON 02.01

    Constraints and referential lifecycles

    Make required references, valid row states and deletion policies agree.

    Open lesson
  2. LESSON 02.02

    Data-preserving schema evolution

    Rebuild a bounded SQLite schema atomically without changing IDs, NULLs or unrelated data.

    Open lesson
  3. LESSON 02.03

    Index design and transaction boundaries

    Choose an access path without changing cardinality and commit one complete business operation.

    Open lesson
UNIT 031 lesson An integrated order system
  1. LESSON 03.01

    Capstone: an order schema and trustworthy report

    Integrate normalized order facts, explicit constraints, atomic import and a report at order grain.

    Open lesson