# SQL Level 8: Schema Design

> Level 8: Schema Design of the LoWisa SQL course: Tables and Data Types, Keys and Constraints, Normalisation and Relationships. 3 lessons and 9 ideas, each explained in one line.

Schema Design is level 8 of 15 of the [LoWisa SQL course](/courses/sql/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Tables and Data Types

- **Naming and shape.** Good schemas read like the business: singular-fact **columns**, consistent names, one concept per table.
- **Choosing types.** The narrowest honest **type** wins: it validates data at the door and keeps indexes small.
- **Constraints as truth.** NOT NULL and CHECK constraints turn business **rules** into physics: bad rows become impossible, not unlikely.

## Keys and Constraints

- **Primary keys.** A **primary** key uniquely names each row: usually a surrogate id the business never reuses.
- **Foreign keys.** A **foreign** key makes a relationship real: the database refuses an order pointing at a customer that does not exist.
- **Unique constraints.** A **UNIQUE** constraint enforces natural uniqueness: one account per email, guaranteed by the engine.

## Normalisation and Relationships

- **Normalisation.** **Normalisation** stores each fact once: a customer’s address lives in one row, not copied onto every order.
- **Update anomalies.** Duplicated facts drift: the **anomaly** is updating one copy and not the others, then trusting both.
- **Denormalising deliberately.** Sometimes you copy data for speed: **denormalisation** is a documented trade, made after measuring, not before.

## Before and after this level

- **Before:** [Level 7: Data Modification](/courses/sql/level-7-data-modification/): INSERT, UPDATE and DELETE, Upserts and Merge Patterns, Safe Data Changes.
- **Next:** [Level 9: Transactions](/courses/sql/level-9-transactions/): ACID, Isolation and Concurrency, Locks, Deadlocks and Transaction Design.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does SQL Level 8: Schema Design cover?

Tables and Data Types, Keys and Constraints, Normalisation and Relationships: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 7: Data Modification, which covers INSERT, UPDATE and DELETE, Upserts and Merge Patterns, Safe Data Changes.

## Learn SQL on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/sql/level-8-schema-design/ · Updated 2026-11-16
