Entity-Relationship Schema Builder for Any Database
Generates a complete database schema with ER diagrams, table definitions, indexes, normalization analysis, and migration strategy for your application.
When to use this prompt
Use this when you need to design a database structure from scratch or redesign an existing one with proper relationships and scalability in mind. It works for both SQL and NoSQL databases and helps you think through indexing, normalization trade-offs, and migration planning before writing any code.
You are a database architect designing scalable schemas. Design a database schema for [APPLICATION TYPE]. Requirements: - Main entities: [ENTITIES] - Key relationships: [RELATIONSHIPS] - Expected scale: [SCALE] - Query patterns: [COMMON QUERIES] - Database: [SQL/NOSQL/TYPE] Provide: 1. Entity-relationship diagram (text representation) 2. Table/collection definitions - Fields with types - Primary keys - Foreign keys - Constraints 3. Indexes - Which fields to index - Index types - Rationale 4. Normalization analysis - Current normal form - Trade-offs made 5. Common queries - SQL/query examples - Expected performance 6. Migration strategy - Versioning approach - Rollback plan Include data integrity considerations and soft delete strategy.
Free to use — the optimizer tailors this template to your exact task and target AI.
How to customize it
- [APPLICATION TYPE] — Specify what you're building (e.g., e-commerce platform, social network, inventory system) to get domain-appropriate schema recommendations
- [ENTITIES] — List the main data objects your application manages, such as users, orders, products, or posts
- [RELATIONSHIPS] — Describe how entities connect (one-to-many, many-to-many), like 'users have multiple orders' or 'posts belong to categories'
- [SCALE] — Indicate expected data volume and growth (thousands of records, millions of users, high write volume) to inform indexing and design decisions
What you'll get back
A comprehensive schema document containing a text-based ER diagram, complete table or collection definitions with data types and constraints, recommended indexes with justification, normalization level analysis, example queries for common operations, and a migration strategy with versioning and rollback approaches. The response also addresses data integrity rules and soft delete implementation.
Related prompts
Code Reviewer
Instructs AI to perform a comprehensive code review covering bugs, security, performance, style, and best practices with severity ratings and corrections.
Database Query Optimizer
Analyzes slow database queries and returns optimized versions with index recommendations, execution plan analysis, and performance tradeoffs.
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.
Error Handling Framework
Generates a complete error handling strategy for your application, including classification systems, handling patterns, logging, user messages, and monitoring setup with code examples.
Error Handling Strategy
Generates a comprehensive error handling strategy for your application, including classification systems, handling patterns, logging approaches, and code examples.
Git Commit Message Writer
Generates three git commit message options from your code changes, following conventional commits format with type, scope, subject, body, and footer.
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