SQL Interview: Normalisation, NULL and Query Optimisation
Design and correctness questions: the normal forms, why NULL breaks intuition, and how to answer "this query is slow, what do you do?"
Normal forms and functional dependencies.
5 notes tagged
Design and correctness questions: the normal forms, why NULL breaks intuition, and how to answer "this query is slow, what do you do?"
The three anomalies normalisation prevents, and the disciplined way to reintroduce redundancy when reads genuinely demand it.
The formal notation behind normalisation, and the stricter normal form that catches what 3NF allows through when candidate keys overlap.
Normalisation worked through on one table: remove repeating groups, then partial dependencies, then transitive ones - with the SQL at each step.
The three kinds of integrity a relational database enforces, why redundancy causes anomalies, and where a derived value is worth its maintenance cost.