Coding

Database Schema Design

✦ ChatGPT 🔥 88 trend score 👁 0 uses
#database#schema#sql
Category
Coding
Platform
ChatGPT
Trend Score
88/100
Total Uses
0
Prompt Template
Design a database schema for the following use case: [DESCRIBE DOMAIN AND KEY ENTITIES]. Scale: [APPROXIMATE ROWS, QPS]. Database: [POSTGRES/MYSQL/MONGODB/etc.]

Design: 1) Entity-relationship diagram (ASCII or description), 2) Table definitions with data types and constraints, 3) Index strategy — what to index and why, 4) Normalization decisions (where to denormalize for performance), 5) Foreign key and cascading rules, 6) How to handle soft deletes, timestamps, and audit fields, 7) Migration strategy if evolving an existing schema. Identify the top 3 query patterns and show how the schema su...
Browse more Coding prompts