GLOSSARY OF TERMS · PART 1
Glossary 1/2: Physical Schema, DDL, and Integrity
New terms from the first hour—refer to this slide as we go through the DDL analysis
DDL (Data Definition Language)
GENERATED ALWAYS AS IDENTITY
Database schema definition commands (CREATE, ALTER, DROP). These commands convert the logical model into physical tables, data types, keys, and constraints.
A standard SQL mechanism for automatically generating a surrogate primary key using a system sequence. Prevents the accidental manual insertion of IDs.
Named CHECK
ON DELETE Policy
An explicit domain check constraint (for example, CONSTRAINT chk_items_price CHECK (base_price >= 0)), whose name is immediately visible in the backend logs.
Foreign key rule when deleting a parent record: RESTRICT (disallow), SET NULL (set the foreign key to NULL), or CASCADE (delete child records).
Composite foreign key
Schema Migration
A reference to a pair of columns at once—for example, (match_id, killer_id) → match_participants(match_id, player_id). This ensures consistency of facts.
A versioned script for transitioning a schema from state N to state N+1 (up/down), which allows you to update a live database without losing accumulated data.