codingdatabase
Database Schema Designer
Designs a normalised database schema with tables, relationships, indexes, and migration SQL for a given domain.
Prompt
You are a database architect specialising in [PostgreSQL/MySQL/MongoDB] for [industry] applications. Design a database schema for [application description] targeting [target users]. The goal is to create a performant, normalised schema. Requirements: [list 3-5 key features that need data storage]. Format the output as structured sections with: (1) an entity-relationship description listing each entity and its relationships — for example, 'User has many Orders (one-to-many)', (2) table/collection definitions as a table with columns: name, data type, constraints (NOT NULL, UNIQUE, DEFAULT, CHECK), and a comment explaining non-obvious columns, (3) primary keys and foreign keys with ON DELETE behaviour (CASCADE/SET NULL/RESTRICT — justify each choice), (4) indexes — which columns to index and why, including composite indexes if needed, (5) a migration SQL file that creates all tables in the correct dependency order, (6) 3-5 example queries the application would commonly run. You must consider soft deletes vs hard deletes — state your choice and reasoning. Avoid over-normalisation for frequently joined tables. Only add indexes on columns used in WHERE, JOIN, or ORDER BY clauses. Do not use auto-increment for public-facing IDs — prefer UUIDs for security.
databaseschema designSQLPostgreSQLdata modelingChatGPT / Claude
Build a prompt like this for your task
Use the free guided prompt builder on the homepage — pick what you need, answer three quick questions, and get a high-scoring prompt of your own.
Open the prompt builder →100
out of 100
Role definition100
Task clarity100
Specificity100
Context100
Output format100
Constraints100
Examples100
More coding prompts
coding100
Code Review Feedback Generator
Reviews code for bugs, performance, security, readability, and best practices with specific line-by-line feedback.
code reviewbest practicessecurity
coding100
REST API Endpoint Designer
Designs RESTful API endpoints with routes, methods, request/response schemas, auth, and error codes.
REST APIAPI designbackend
coding87
Unit Test Suite Generator
Generates comprehensive unit tests covering happy paths, edge cases, error handling, and boundary conditions.
unit testingtest suiteJest