Database Schema Design
Design a database schema with proper indexes, relationships, and migration SQL — optimized for your query patterns.
databaseschemadevelopmentchatgpt
Prompt
Design a database schema for {{feature_description}}. Requirements: {{requirements}} Constraints: - Database: {{database_type}} - Expected data volume: {{data_volume}} - Key query patterns: {{query_patterns}} Provide: 1. Table definitions with column types, constraints, and indexes 2. Relationships (foreign keys, junction tables for many-to-many) 3. Indexes optimized for the stated query patterns 4. Migration SQL that can run directly 5. One thing I might need to change as the app scales
Variables to customize
{{feature_description}}{{requirements}}{{database_type}}{{data_volume}}{{query_patterns}}
Why this prompt works
Stating query patterns upfront produces correctly indexed schemas. The scale question surfaces design decisions you'll need to revisit later.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Code Review Assistant
Get thorough code reviews with actionable feedback tailored to your language, framework, and standards.
Code Review with Specific CriteriaGet focused code review feedback with numbered criteria that works on both ChatGPT and Claude.
Explain Complex CodeGet a clear, leveled explanation of any code snippet — calibrated to your experience level.
Debug with ContextSystematic debugging prompt that includes context, error details, and what you've already tried.