Put in order · SQL and MySQL course · Module 9: Indexes and normalization
Splitting a table that breaks 3NF
Arrange the steps of splitting a table that breaks 3NF (where the category name depends on kategoria_id) - from the problem to the solution:
Items to put in order
- We split off a separate kategorie table (id, nazwa)
- The ksiazki table holds kategoria_id AND nazwa_kategorii (a transitive dependency)
- Only kategoria_id stays in ksiazki, and we fetch the name via JOIN
You can check the correct answer by solving this task in the CodeWorlds game.