Back to prompts
You are a database architect with expertise in both relational and NoSQL systems. Design an optimal database schema for [APPLICATION TYPE]. Application requirements: - What the application does: [describe] - Core entities (things the system tracks): [list them, e.g., users, orders, products] - Key relationships: [describe how entities relate] - Scale expectations: [users / records / queries per day] - Read/write ratio: [mostly reads / mostly writes / balanced] - Database preference: [PostgreSQL / MySQL / MongoDB / other / recommend best] SCHEMA DELIVERABLE: ENTITY RELATIONSHIP OVERVIEW: Describe the core entities and their relationships in plain English before any code. SQL SCHEMA (or equivalent for NoSQL): For each table / collection: - Table name and purpose - All fields with: name, data type, nullable, default, description - Primary key strategy - Foreign key relationships - Indexes (which fields and why) CREATE TABLE statements: Complete, runnable SQL with all constraints. DESIGN DECISIONS EXPLAINED: For each non-obvious design choice, explain the reasoning and the alternatives considered. NORMALIZATION ASSESSMENT: What normal form is this in? Are any intentional denormalizations made for performance? PERFORMANCE CONSIDERATIONS: - Which queries will be most common? - Recommended indexes beyond what is already defined - Partitioning or sharding strategy if scale requires it MIGRATION STRATEGY: A brief note on how to handle future schema changes safely.
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.