DSA Factory
All free lessons
DBMS

Free Keys, ER and normalization lessons

9 lessons, about 2 hours in all. Each teaches one idea with a visual, then gives you a problem or a few questions on it. Read the lessons here, then create a free account to practise and keep your progress.

Stage 0Relations and keys

  1. Relations and keysWhat a relation is, and how super keys, candidate keys, primary keys and foreign keys pin down rows and tie tables together.14 min
  2. Relational algebraSelection, projection, join, union and the other operators that SQL is built on, and how to read an algebra expression.13 min

Stage 1Modelling the real world

  1. Entities, relationships and cardinalityTurn a description of a business into entities, attributes and relationships, and read one-to-many and many-to-many correctly.13 min
  2. From ER model to tablesMap entities, one-to-many, many-to-many and weak entities onto tables, keys and foreign keys.13 min

Stage 2Functional dependencies

  1. Functional dependencies and closureWhat 'A determines B' means, how to infer new dependencies, and how to compute an attribute set's closure.15 min
  2. Finding candidate keysUse closure to find every candidate key of a relation, with the shortcut of attributes that never appear on a right side.14 min

Stage 3Normal forms

  1. Anomalies, 1NF, 2NF and 3NFWhy storing a fact twice breaks things, and how the first three normal forms remove each kind of repetition.15 min
  2. BCNF and good decompositionsThe strictest everyday normal form, the case where 3NF and BCNF differ, and how to decompose without losing dependencies.14 min
  3. When to denormalizeThe cost of joins against the cost of redundancy, and the patterns teams use to break normal forms safely.12 min

All of Keys, ER and normalization is free

That’s the whole topic, from the first idea to the mastery stage, with no card needed. Create a free account to practise, keep your progress and carry on to the next topic.

Create your free account