Module 1: Relational Databases & SQL: Mistake Clinic
This clinic turns wrong moves into reusable judgment. Use it after each practice page and again before the quiz or checkpoint.
Module-Specific Mistake Radar
Start with these traps. Replace or extend them with real mistakes from your own work.
| Mistake to look for | Where it shows up | Symptom | Repair evidence |
|---|---|---|---|
| Finishing Relational Algebra to SQL Workshop with only a final answer | Relational Algebra to SQL Workshop | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Schema Design and Normalization Lab with only a final answer | Schema Design and Normalization Lab | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Query Performance Clinic with only a final answer | Query Performance Clinic | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing SQL Code Katas with only a final answer | SQL Code Katas | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Treating Relations, Tuples, Attributes, Domains as vocabulary instead of a tool | Relations, Tuples, Attributes, Domains | The explanation names the concept but cannot decide between two cases. | Write one example, one non-example, and the rule that separates them. |
| Treating Keys: Primary, Candidate, Foreign, Surrogate vs Natural as vocabulary instead of a tool | Keys: Primary, Candidate, Foreign, Surrogate vs Natural | The explanation names the concept but cannot decide between two cases. | Write one example, one non-example, and the rule that separates them. |
Practice Mistake Checks
Pull any miss from these checks into your mistake log.
Relational Algebra to SQL Workshop
Source: practice/01-relational-algebra-to-sql-workshop.md
Identify the bug or incorrect claim in each:
SELECT name, AVG(salary) FROM employee GROUP BY dept_id;- "
LEFT JOINfollowed byWHERE b.col = 1returns the same rows as puttingb.col = 1in theONclause." SELECT dept, salary, RANK() OVER (PARTITION BY dept ORDER BY salary DESC) FROM employee WHERE rank = 1;- "
SELECT *from a natural join ofemployeeanddeptondept_idreturns every column from both tables, includingdept_idtwice." - "
UNIONis faster thanUNION ALLbecause it removes duplicates."
Repair Protocol
For each real mistake:
- Reproduce the failure on the smallest example, trace, proof, query, command, or design sketch.
- Name the hidden assumption.
- Repair the artifact.
- Save evidence that changed: failing then passing test, corrected proof step, revised diagram, safer command, benchmark, or review note.
- Add one retrieval card beginning with Check... before... or Do not use... when....
Mistake Log
| Date | Mistake | Symptom | Root cause | Repair evidence | Retrieval card |
|---|---|---|---|---|---|
| Starter | Pick one radar row above | Explain how it would fail in this module | Name the assumption | Add a counterexample or corrected artifact | Write the card before closing the page |
Completion Standard
- At least five real mistakes are logged.
- At least two mistakes include a counterexample or failing test.
- At least one mistake connects to an older semester skill.
- At least one correction changes code, a proof, a diagram, a command transcript, a query, or a design decision.