Schema And Constraints

Schema and Constraints

Designing a schema that's correct, fast, and evolvable — types, keys, references, and the normalisation forms in plain English.

Suggest an edit

Schema and Constraints

Foundations covered DDL syntax. This module covers schema design — choosing types, modelling relationships, deciding when to normalise and when to denormalise, and the cascade of foreign-key behaviours that makes referential integrity a first-class concern.

Place in the curriculum

Chapters

  1. Types — choosing the right type for each column. Numeric, text, temporal, JSON, arrays.
  2. Keys and References — primary keys, foreign keys, ON DELETE/ON UPDATE cascade behaviour, unique and check constraints in depth.
  3. Normalisation — 1NF, 2NF, 3NF, BCNF in plain English. When to normalise; when to denormalise for performance.
Mark as read