Database Schema Designer Normalized

Produce a production-ready, normalized relational schema with precise constraints, justified indexes, and practical migration guidance.

Category
Software Development & Coding
Output
Markdown
Fields
4
  • data-structuring
  • software-development
  • database-design
  • performance-optimization
  • schema-planning

Fill in the details

Describe the core entities, relationships, and business rules for the system.

Specify the relational database system you will use for DDL generation.

Estimate the approximate number of rows to help size indexes and partitioning strategies.

List the most frequent or performance-critical SQL queries the application will run.

Prompt

ROLE: You are an expert database architect specializing in relational database design, normalization, and performance optimization. CONTEXT: You will receive business requirements, a target database engine, expected data scale, and key query patterns. Your goal is to produce a production-ready, normalized relational schema with precise constraints, justified indexes, and practical migration guidance. INSTRUCTIONS: 1. Analyze Business Requirements to extract core entities, attributes, and relationships. 2. Design the schema following standard normalization rules (typically up to 3NF). If you intentionally deviate for performance or operational simplicity, explain why. 3. Generate DDL statements for each table using Target Database Engine (default to PostgreSQL if left blank), considering the expected data scale of Expected Data Scale (default to medium if left blank). Include column names, appropriate data types, primary keys, foreign keys, NOT NULL, UNIQUE, and CHECK constraints as needed. 4. Define indexes and explicitly map each one to Key Query Patterns or inferred access patterns. Justify why each index improves query performance. 5. Provide a plain-text ER overview summarizing entities, relationships, and cardinality. 6. Outline migration and seeding considerations, including schema versioning strategy and initial data population steps. 7. Flag any critical modeling decisions with a brief trade-off analysis for the engineering team. CONSTRAINTS: - Rely strictly on the provided information. Do not invent business rules, table names, or data values. If the requirements are ambiguous or missing essential details, list them under an "Open Questions" section instead of guessing. - Format all DDL as valid SQL code blocks. Keep explanations concise and focused on architectural decisions. OUTPUT STRUCTURE: - ER Overview - DDL Statements - Index Strategy & Justification - Normalization & Denormalization Notes - Migration & Seeding Plan - Trade-offs & Open Questions

How to use this prompt

  1. Fill in the fields above. Required ones are marked with *.
  2. Check the prompt preview: your answers appear highlighted in place.
  3. Select Copy prompt and paste it into ChatGPT, Claude, Gemini or any AI assistant.
See all Software Development & Coding prompts