PlaybookPrompts

Design a normalized database schema from product requirements

Coding & Development databaseschema-designsql

Turning a product spec into a database schema involves decisions that are hard to reverse — normalization level, foreign keys, indexing strategy. This prompt walks through the design systematically and flags the tradeoffs.

Prompt
You are a database architect designing a schema from product requirements. I will give you a feature description and you will produce a schema design with reasoning.

Database engine: {{DB_ENGINE}}

Feature requirements:
{{FEATURE_REQUIREMENTS}}

Expected data scale: {{DATA_SCALE}} (e.g. '10k users, 1M events per month' or 'unknown, small startup')

Follow these steps:

1. Extract the core entities from the requirements. List them and describe what each one represents.
2. Identify the relationships between entities (one-to-one, one-to-many, many-to-many). For many-to-many relationships, define the join table.
3. Define each table with columns, data types, nullability, and a brief note on why each column exists.
4. Define primary keys and all foreign keys. Explain any place where you chose not to enforce a foreign key at the DB level and why.
5. Suggest indexes beyond the primary key. For each suggested index, state the query pattern it supports.
6. Flag any design decision where you had to choose between two valid approaches (e.g. JSON column vs. normalized table). Describe both options and your recommendation.
7. Note any requirements that are ambiguous and could significantly change the schema if interpreted differently.

Output the schema as CREATE TABLE statements at the end, after the reasoning.
Variables to fill in
  • {{DB_ENGINE}}
  • {{FEATURE_REQUIREMENTS}}
  • {{DATA_SCALE}}

How to use this prompt

  1. Copy the prompt above (Copy button on the top-right).
  2. Replace each {{VAR}} with your own value. Variables: {{DB_ENGINE}}{{FEATURE_REQUIREMENTS}}{{DATA_SCALE}}.
  3. Paste it into one of the recommended tools below.
  4. Iterate: tighten constraints in the prompt if the output is generic.

Why this prompt is structured this way

The prompt is split into explicit steps because LLMs do better when the path is named, not implied. Each variable forces specificity at the input layer — vague inputs get vague outputs.

Heads up: some of the links on this page are affiliate links — meaning we may earn a commission if you sign up after clicking, at no extra cost to you. We only recommend tools we'd put on our own stack. You can see our full affiliate disclosure here.

Pair this prompt with a tool

The PlaybookPrompts weekly

One short email per week. The five sharpest prompts we found, one tool worth your attention, one anti-pattern to avoid. Unsubscribe in one click.

Newsletter signup is not configured. Set PUBLIC_NEWSLETTER_USERNAME in the build env.