Back to Software Engineering

Database Schema Designer

Design a normalized database schema with relationships, indexes, and migration plan.

Updated Feb 20, 2026

ShareLinkedIn

Variables to Customize

0/6 filled

Prompt

You are a senior database architect. Design a database schema for:

Application: {{application}}
Database: {{postgresql/mysql/mongodb/sqlite}}

Provide:
1) **Entity Relationship Diagram** — describe all entities, their attributes, and relationships (text format)
2) **Schema DDL** — complete CREATE TABLE statements with:
   - Proper data types
   - Primary keys (UUID vs auto-increment — justify choice)
   - Foreign keys with ON DELETE behavior
   - NOT NULL constraints where appropriate
   - CHECK constraints for validation
   - Indexes for common query patterns
3) **Normalization** — ensure 3NF minimum, note any intentional denormalization and why
4) **Row-Level Security** — policies for multi-tenant or user-specific data
5) **Seed Data** — sample INSERT statements for testing
6) **Migration Plan** — if evolving an existing schema, provide ALTER statements
7) **Common Queries** — 5 queries the application will frequently run, with EXPLAIN analysis
8) **Scaling Considerations** — what breaks first at 1M, 10M, 100M rows?

Key entities: {{entities}}
Expected data volume: {{volume}}
Access patterns: {{patterns}}
Multi-tenant: {{yes/no}}

Powered by Hugging Face Inference API

Pro Tips

  • Includes scaling considerations and common query optimization, not just the schema itself.

Prompt Output

See what this prompt produces — real output screenshots from community members, coming soon.

References

More Software Engineering Prompts

💻Software Engineering

Senior Developer Code Review

Get a thorough code review from an experienced senior developer perspective, covering correctness, performance, security, and maintainability.

You are a senior software engineer with 15+ years of experience conducting a tho...

Claude Opus 4
IntermediateView prompt
💻Software Engineering

System Architecture Designer

Design scalable system architectures with detailed component diagrams, trade-off analysis, and implementation roadmaps.

You are a principal systems architect. Design a comprehensive system architectur...

Claude Opus 4
AdvancedView prompt
💻Software Engineering

Debug Detective

Systematically debug complex issues by analyzing error messages, stack traces, and code behavior with a structured approach.

You are an expert debugging specialist. Help me systematically debug this issue....

Claude Sonnet 4
IntermediateView prompt

You Might Also Like

✍️Writing & Content

Blog Post Architect

Create SEO-optimized, engaging blog posts with structured outlines, compelling hooks, and strategic keyword placement.

You are an expert content strategist and SEO specialist. Create a comprehensive ...

Claude Opus 4
IntermediateView prompt
📚Education

Socratic Method Tutor

Learn any concept through guided questioning that builds deep understanding instead of memorization.

You are a Socratic tutor. Your role is to help me deeply understand a concept th...

Claude Opus 4
BeginnerView prompt
🚀Product Management

Product Requirements Document (PRD)

Generate comprehensive PRDs with user stories, acceptance criteria, technical requirements, and success metrics.

You are a senior product manager at a top tech company. Write a comprehensive PR...

Claude Opus 4
IntermediateView prompt