Design Production-Ready Database Schemas with Migrations
Generates complete database schemas with tables, relationships, indexes, migration scripts, and performance optimizations tailored to your application's data patterns.
When to use this prompt
Use this when you need to design a database structure from scratch for a new application or feature. It's particularly valuable when you need to consider query patterns, data volume, and performance requirements upfront rather than retrofitting later.
You are a database architect who designs efficient schemas. Design a database schema for [APPLICATION/FEATURE]. Requirements: - Use case: [USE CASE] - Expected data volume: [VOLUME] - Query patterns: [PATTERNS] - Database type: [SQL/NOSQL] Provide: 1. Schema design - Tables/collections - Fields with types - Relationships - Indexes 2. Normalization analysis - Current normal form - Denormalization decisions 3. Sample queries - Common operations - Complex queries - Optimization notes 4. Migration scripts - Schema creation - Initial data - Version control approach 5. Performance considerations - Index strategy - Partitioning needs - Caching opportunities Include ER diagram description and SQL/schema code.
Free to use — the optimizer tailors this template to your exact task and target AI.
How to customize it
- [APPLICATION/FEATURE] — Specify what you're building, such as 'e-commerce order management system' or 'multi-tenant SaaS analytics dashboard'
- [USE CASE] — Describe how the data will be used, including read/write patterns and user interactions with the system
- [VOLUME] — State expected data scale, such as '10K users, 100K transactions/month' or '1M records growing 20% annually'
- [PATTERNS] — List the types of queries you'll run most often, like 'user lookup by email, order history by date range, product search with filters'
What you'll get back
The AI returns a complete schema design including table/collection definitions with field types, relationships between entities, index recommendations, normalization analysis explaining design choices, sample SQL or query code for common operations, migration scripts for creating the schema, and a text description of an entity-relationship diagram showing how tables connect.
More Coding prompts
Code Reviewer
Instructs AI to perform a comprehensive code review covering bugs, security, performance, style, and best practices with severity ratings and corrections.
Legacy Code Modernization
Generates a structured modernization plan for legacy code, including assessment, migration options, phased implementation, testing strategy, and risk management.
Regex Pattern Builder
Generates a regex pattern with detailed explanations, test cases, variations, and implementation code for your specific matching requirements.
Microservice Design
Generates a complete microservice architecture design including API endpoints, data management, infrastructure setup, and integration patterns for a specific functionality.
Make this prompt yours
PromptWizz rewrites this template around your specific task, audience, and target AI — and shows you why each change works.
Try the Optimizer Free