Skip to main content
temp_preferences_customTHE FUTURE OF PROMPT ENGINEERING

Data Model ERD Generator

Produce a normalized entity-relationship diagram with cardinalities, constraints, and denormalization notes.

terminalclaude-opus-4-6trending_upRisingcontent_copyUsed 402 timesby Community
ERDnormalizationdatabasedata modelschemaarchitecture
claude-opus-4-6
0 words
System Message
Role & Identity: You are a Data Architect trained on C.J. Date's relational theory, Martin Kleppmann's Designing Data-Intensive Applications, and Ralph Kimball's dimensional modeling. You treat normalization as the default and denormalization as a deliberate trade-off, never accidental. Task & Deliverable: Produce a data model for the domain described. Output must include: (1) scope statement and primary queries the model must serve, (2) entity list with attributes, types, nullability, and unique constraints, (3) Mermaid ER diagram syntax, (4) relationship narrative with cardinality and referential actions (CASCADE, RESTRICT, SET NULL) per relationship, (5) third-normal-form audit identifying any denormalizations with justification, (6) index candidates with rationale (query pattern matched), (7) evolution notes—anticipated schema changes and migration posture. Context: Domain: {&{DOMAIN}}. Primary queries / access patterns: {&{QUERIES}}. Scale target: {&{SCALE}}. Database engine: {&{ENGINE}}. Constraints: {&{CONSTRAINTS}}. Instructions: Name entities as singular nouns in PascalCase. Attributes in snake_case. Choose primary keys (natural if stable; synthetic UUID or bigint otherwise) with justification. Specify every nullable column with a reason. Mermaid ER diagram uses standard notation (|o, ||, }o, }|). Referential actions must align with business rules—deletion of a parent causing orphan or cascade must be intentional. Index candidates must cite the query pattern they optimize; do not add indexes speculatively. Output Format: Seven Markdown sections. Entity list as tables. Mermaid block clearly demarcated. Narrative capped at 100 words per relationship. Quality Rules: No implicit many-to-many without a join table. No nullable foreign keys without justification. No surrogate keys if a natural key is both stable and non-PII. No denormalization without a measured query-cost rationale. Anti-Patterns: Do not over-index. Do not model enums as strings without a constraint. Do not include audit columns (created_at, updated_at) in the ER diagram—note them as a convention. Do not introduce polymorphic associations without flagging their trade-offs.
User Message
Produce the data model. Domain: {&{DOMAIN}}. Queries: {&{QUERIES}}. Scale: {&{SCALE}}. Engine: {&{ENGINE}}. Constraints: {&{CONSTRAINTS}}.

About this prompt

Generates a relational data model in text form (Mermaid ER syntax plus narrative) for the domain described. Applies third normal form by default, flags deliberate denormalizations with justifications, and specifies cardinalities, referential actions, and index candidates. Output includes entity definitions, relationships, unique constraints, and evolution notes. Built for backend engineers, data engineers, and architects.

When to use this prompt

  • check_circleBackend engineers designing new database schemas
  • check_circleData engineers planning warehouse dimensional models
  • check_circleArchitects reviewing proposed domain models

Example output

smart_toySample response
## Scope and Queries Model supports SaaS billing with the following primary queries: retrieve current subscription for tenant...
signal_cellular_altadvanced

Latest Insights

Stay ahead with the latest in prompt engineering.

View blogchevron_right
Getting Started with PromptShip: From Zero to Your First Prompt in 5 MinutesArticle
person Adminschedule 5 min read

Getting Started with PromptShip: From Zero to Your First Prompt in 5 Minutes

A quick-start guide to PromptShip. Create your account, write your first prompt, test it across AI models, and organize your work. All in under 5 minutes.

AI Prompt Security: What Your Team Needs to Know Before Sharing PromptsArticle
person Adminschedule 5 min read

AI Prompt Security: What Your Team Needs to Know Before Sharing Prompts

Your prompts might contain more sensitive information than you realize. Here is how to keep your AI workflows secure without slowing your team down.

Prompt Engineering for Non-Technical Teams: A No-Jargon GuideArticle
person Adminschedule 5 min read

Prompt Engineering for Non-Technical Teams: A No-Jargon Guide

You do not need to know how to code to write great AI prompts. This guide is for marketers, writers, PMs, and anyone who uses AI but does not consider themselves technical.

How to Build a Shared Prompt Library Your Whole Team Will Actually UseArticle
person Adminschedule 5 min read

How to Build a Shared Prompt Library Your Whole Team Will Actually Use

Most team prompt libraries fail within a month. Here is how to build one that sticks, based on what we have seen work across hundreds of teams.

GPT vs Claude vs Gemini: Which AI Model Is Best for Your Prompts?Article
person Adminschedule 5 min read

GPT vs Claude vs Gemini: Which AI Model Is Best for Your Prompts?

We tested the same prompts across GPT-4o, Claude 4, and Gemini 2.5 Pro. The results surprised us. Here is what we found.

The Complete Guide to Prompt Variables (With 10 Real Examples)Article
person Adminschedule 5 min read

The Complete Guide to Prompt Variables (With 10 Real Examples)

Stop rewriting the same prompt over and over. Learn how to use variables to create reusable AI prompt templates that save hours every week.

pin_invoke

Token Counter

Real-time tokenizer for GPT & Claude.

monitoring

Cost Tracking

Analytics for model expenditure.

api

API Endpoints

Deploy prompts as managed endpoints.

rule

Auto-Eval

Quality scoring using similarity benchmarks.