Until now you've worked with tables someone else built. This module is about building them well. You'll create and change tables with CREATE TABLE and ALTER TABLE and protect your data with constraints — PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, and DEFAULT — so the database itself rejects bad data.
You'll also learn the thinking behind a good schema: normalization (1NF, 2NF, and 3NF) to remove duplicated and inconsistent data, and entity-relationship diagrams to plan tables and their one-to-many and many-to-many relationships before you write a line of SQL.
Work through the lessons in order, then continue on to Indexes & Performance.
How to define constraints when creating a table, or add them to an existing one, to enforce rules on your data.
A focused lesson on foreign keys: linking one table to another and keeping those relationships valid.
An introduction to why normalization exists and the problems it solves, such as duplicated and inconsistent data.
Walks through each of the first three normal forms with worked examples, turning a messy table into a clean design.
An introduction to ER diagrams: entities, attributes, and relationships, and how to read and draw them.
Continues with keys and bridge tables, showing how to model many-to-many relationships in a real schema.