DBMS Cheat Sheet
Relations, keys, normalization, transactions, indexes and joins — the DBMS ideas from the track, with just enough SQL to see them. Bookmark it.
Projects to build
The fastest way to make this stick. Build one, then put it in your portfolio.
Library on paper
Draw an ER diagram for books, members and loans. Turn the many-to-many loan into tables and mark every primary and foreign key.
Two joins
On a students-and-enrolments schema, write one inner join and one left join. Say which rows the left join keeps that the inner join drops.
Normalize an orders sheet
Start from one wide orders table. Name the insert, update and delete anomalies, list the functional dependencies, and decompose to 3NF.
Index before and after
Load a few thousand enrolment rows. Run EXPLAIN on a lookup by student_id before and after an index, and name one column you would leave unindexed and why.
Transfer, then a crash
Write a two-account transfer as one transaction. Show which ACID property fails if only the debit commits, then say what WAL redo and undo do if the process dies after the log flush.
