Design a database schema for [PROJECT].
Project: [WHAT THE APP DOES]
Database type: [POSTGRESQL / MYSQL / MONGODB / SQLITE / UNSURE]
Main entities: [LIST — E.G. USERS, POSTS, COMMENTS, ORDERS]
Scale expectations: [SMALL / MEDIUM / LARGE]
Provide:
1. **Entity Relationship Diagram**: Tables/collections and their relationships
2. **Table Definitions**: Columns, data types, and constraints for each table
3. **Primary & Foreign Keys**: Key relationships and cascading behaviour
4. **Indexes**: Which columns to index for query performance
5. **Normalisation Check**: Is the schema properly normalised?
6. **Sample Queries**: Common queries the app will need to run
7. **Migration Script**: SQL/code to create the initial schema
8. **Seed Data**: Sample data for development and testing
9. **Performance Considerations**: Potential bottlenecks and solutions
10. **Schema Evolution**: How to handle future changes safely
Design a database schema for [PROJECT].
Project: [WHAT THE APP DOES]
Database type: [POSTGRESQL / MYSQL / MONGODB / SQLITE / UNSURE]
Main entities: [LIST — E.G. USERS, POSTS, COMMENTS, ORDERS]
Scale expectations: [SMALL / MEDIUM / LARGE]
Provide:
1. **Entity Relationship Diagram**: Tables/collections and their relationships
2. **Table Definitions**: Columns, data types, and constraints for each table
3. **Primary & Foreign Keys**: Key relationships and cascading behaviour
4. **Indexes**: Which columns to index for query performance
5. **Normalisation Check**: Is the schema properly normalised?
6. **Sample Queries**: Common queries the app will need to run
7. **Migration Script**: SQL/code to create the initial schema
8. **Seed Data**: Sample data for development and testing
9. **Performance Considerations**: Potential bottlenecks and solutions
10. **Schema Evolution**: How to handle future changes safely
How to use this prompt
Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.
Leave a Review
Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.