01Chapter 1: Creating a table with CREATE TABLEThis chapter assumes you can write basic SQL (SELECT, INSERT, UPDATE, DELETE), understand tables, rows, and columns, and know common data types such as integers, text, and dates.2 min read
02Chapter 2: Identifying rows with PRIMARY KEYThis chapter assumes you know basic SQL statements (SELECT, INSERT, UPDATE, DELETE), tables, rows, and common data types such as integers and text. Examples use PostgreSQL syntax. Notes near the end cover MySQL and SQL Server.1 min read
03Chapter 3: Enforcing rules with CHECKThis chapter assumes you know basic SQL statements (SELECT, INSERT, UPDATE, DELETE) and the ideas of tables, rows, and columns. A CHECK constraint is a rule that every row must satisfy. The database rejects any INSERT or UPDATE that breaks the rule, so invalid data never gets stored.1 min read