In the pack: ChatGPT, Claude & Gemini Prompts for Coding and Developers
Design a Database Schema for a New Feature
Prompt
Database: {{DIALECT}}
Feature and the main things users do with it: {{FEATURE}}
Existing related tables: {{EXISTING_SCHEMA}}
Expected volumes and the most frequent queries: {{ACCESS_PATTERNS}}
Produce:
1. Entities and relationships in plain English, including cardinality (one-to-many, many-to-many).
2. CREATE TABLE statements with types, primary keys, foreign keys with ON DELETE behavior, NOT NULL and CHECK constraints, unique constraints, and defaults.
3. Indexes driven by the access patterns, with the query each one serves.
4. The decisions, each with the alternative and why you chose this: surrogate versus natural keys, soft versus hard delete, how money and time are stored (integer minor units or decimal; UTC timestamps), enums versus lookup tables, JSON columns versus normalized tables.
5. Data integrity risks the schema can't prevent on its own, and where the application must enforce them.
6. Three sample queries for the main access patterns.
Keep it as simple as the feature allows. If my access patterns are unclear, list the questions that would change the design.
Customize this prompt
Fill in the variables below to personalize this prompt:
Model Settings
Recommended Models
Temperature
Max Tokens
Additional Notes
About this prompt
“Design a Database Schema for a New Feature” is a free prompt for ChatGPT in the Coding & Software category, 190 words long, added to The Prompt Index on October 28, 2026 by The Prompt Index. Copy it with the button above, paste it into ChatGPT or any other AI chat assistant, and send it.
It has 4 placeholders to fill in first:
{{DIALECT}}, {{FEATURE}}, {{EXISTING_SCHEMA}}, {{ACCESS_PATTERNS}}.
Use the “Customize this prompt” fields to personalise it before you copy.
Recommended models: ChatGPT, Claude, Gemini.
0 upvotes, sent to an AI tool 0 times, viewed 8 times.
Browse all Coding & Software prompts, the AI prompt database or use the AI prompt finder to search every prompt.