Extended guidance for contributors extending Module 16. For basic conventions, see CONTRIBUTING.md.
This module follows a three-layer documentation architecture:
Layer 1: Lessons (01–07) — Conceptual teaching, one topic per file
Layer 2: Engineering Documents — Reference, checklists, cookbooks, incidents
Layer 3: Labs & Practice — Performance_lab/, PRACTICE_PROBLEMS.md
When adding content, place it in the correct layer. Don’t put reference material in lessons or teaching content in engineering docs.
Every paragraph must teach something an experienced SQL engineer doesn’t already know, or explain something they know in a way that connects to production decision-making. Avoid:
08_, 09_, etc.).md and .sql files| Document | Add when… |
|---|---|
| PERFORMANCE_SMELLS.md | New recurring code smell identified |
| REWRITE_COOKBOOK.md | New canonical rewrite pattern validated with benchmark |
| PRODUCTION_INCIDENTS.md | New realistic incident case study |
| CROSS_DATABASE_ENGINEERING.md | New engine support or behavior change |
| ENGINEERING_GLOSSARY.md | New term introduced in a lesson |
Every .sql file must include:
-- BUSINESS OBJECTIVE: [one line]
-- PRODUCTION SCENARIO: [scale and context]
-- DATASET: [tables used]
-- PROBLEM STATEMENT: [business question]
-- PRODUCTION SQL: [the query]
-- ALTERNATIVE SQL: [rewrite or anti-pattern]
-- PERFORMANCE ANALYSIS: [what to look for in EXPLAIN]
-- INTERVIEW INSIGHT: [one Q&A]
-- FURTHER EXPERIMENTS: [2-3 suggestions]
assets/diagrams/.md file