PhraseryPhrasery homeGet Phrasery
Data & SQL21 categories

Review this schema design

Before you create the tables everyone will depend on for years.

Longschemadesignreview
Critique the schema below as someone who will have to query it daily and migrate it in two years.

Cover:
1. **Normalisation**: what is duplicated, and where denormalisation is a deliberate good choice rather than an accident.
2. **Keys**: is the primary key stable and meaningful? Are natural keys being used where a surrogate would survive better?
3. **Types**: anything stored as text that should be typed, money stored as float, timestamps without timezone, booleans encoded as strings or nullable.
4. **Nullability**: every nullable column where NULL has no clear meaning, and every NOT NULL with a placeholder default standing in for missing.
5. **Constraints**: missing foreign keys, missing unique constraints, invariants enforced only in application code.
6. **Growth**: which table gets large first, and what breaks when it does.

Give me the three changes worth making now and the ones that can wait. Be decisive.

Schema:

Making it yours

  • Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
  • Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
  • If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.

Schema and data quality. Designing tables, migrating them without breaking live code, and cleaning what you have been handed.

Related prompts

Keep this one

Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.

Add to your browser โ€” free