Each outcome is backed by the checks that test it. Solid means every check was right first time; with hints means you got there with a nudge; worth a revisit means an answer was revealed or is still wrong.
1
Name the rules a table can keep (NOT NULL, UNIQUE, CHECK, PRIMARY KEY and FOREIGN KEY), and say which one refuses a given bad row and with which message.
Not yet
2
Choose a key for a table, including a key made of two columns, and connect tables with foreign keys that SQLite checks once foreign_keys is switched on.
Not yet
3
Spot a fact that a table stores more than once, and say the update trap it sets.
Not yet
4
Split a table step by step into first, second and third normal form, and check the split by joining the pieces back into the rows you started with.
Not yet
Your cheat sheet
What each lesson leaves you able to do, in one place. Lessons you have not finished are dimmed, not hidden.
Say what a constraint is: a rule written into a table, which the database tests on every row that is added or changed.
Write NOT NULL for a value that must be there, UNIQUE for a value no two rows may share, and CHECK for a test each value must pass.
Read SQLite's message for a refused row: the kind of rule, then the table and column, or the CHECK's own test.
Say why a missing mark passes CHECK (mark BETWEEN 0 AND 100): a CHECK refuses only when its test is false, so a value that must be there also needs NOT NULL.
Find the repeated facts in a library's loans, name the key of a loan, choose UNIQUE for emails, move the author by the second rule, and write a three-column key.