Design a normalized database schema from product requirements
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.
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. {{DB_ENGINE}}{{FEATURE_REQUIREMENTS}}{{DATA_SCALE}}
How to use this prompt
- Copy the prompt above (Copy button on the top-right).
- Replace each
{{VAR}}with your own value. Variables:{{DB_ENGINE}}{{FEATURE_REQUIREMENTS}}{{DATA_SCALE}}. - Paste it into one of the recommended tools below.
- 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.
Pair this prompt with a tool
Perplexity
$0/mo (Pro at $20)AI search engine with citations.
Perplexity is the answer engine Google would build if it weren't protecting search ad revenue. Cited answers, follow-up questions, focused source modes.
Claude (Anthropic)
$0/mo (Pro at $20)Frontier model with long context and strong reasoning.
Claude (Opus / Sonnet / Haiku tiers) is the assistant favored by writers and engineers who care about reasoning quality and tone. 1M token context on Opus.
ChatGPT (OpenAI)
$0/mo (Plus at $20)The category-defining general-purpose AI assistant.
ChatGPT has the broadest feature surface: image gen, voice, custom GPTs, web browsing, code execution. Often the right default; sometimes beaten on specific tasks by Claude or Perplexity.
Cursor
$20/moAI-first code editor forked from VS Code.
Cursor is VS Code with first-class LLM integration. Multi-file edits, codebase Q&A, autocomplete that's actually useful. The default IDE for many shipping engineers in 2026.
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.