Back to browse
SQL Schema Designer
Design a normalized SQL schema for a feature or product.
Added May 11, 20260 views0 copies
Prompt
Act as a database architect. Domain: [DOMAIN — e.g. e-commerce, SaaS billing, LMS] Core entities and relationships I need to model: [ENTITIES] Database engine: [POSTGRES / MYSQL / SQLITE] Scale expectations: [USERS, RECORDS, QPS] Design the schema: 1. ER diagram in text (or describe entities, attributes, relationships) 2. CREATE TABLE statements with appropriate types, constraints, and indexes 3. Justification for each non-obvious choice (why this PK, why this index) 4. Normalization level chosen and why (3NF vs intentional denormalization) 5. Patterns for handling soft deletes, timestamps, and audit logs 6. Migration ordering for safe deployment 7. 3 sample queries showing how the schema will be used (read paths) 8. 3 scaling risks and how the schema can evolve to handle them
Replace text in [BRACKETS] with your own values before pasting.