Claude Prompt Library

30 Claude Prompts for Data Models

30 copy-paste prompts

Paste a process writeup, a table list, or a messy schema and get back an entity list, an ERD, a normalised design, or a warehouse layer plan you can take to review.

In short: This page contains 30 copy-paste ready prompts, organized into 6 categories with a description and pro tip for each. The first 5 prompts are free instantly, no signup needed. Hand-curated and tested by the AI Academy team.

Louis Corneloup
By Louis Corneloup ยท Founder, Techpresso
Last updated ยทHand-curated & tested by the AI Academy team

Entity Design

5 prompts

Extract entities from a process writeup

1/30

โœจ What it does

Turns a process writeup into a reviewed entity list with identifiers and nouns that should stay as attributes.

You are a senior data modeller who has turned messy process writeups into entity lists that survive the first design review. <context> I have a written description of how the business works today and I need a first-pass entity list before anyone draws an ERD or writes DDL. </context> <inputs> - Process writeup: [PASTE THE PROCESS DESCRIPTION] - Systems that store data today: [CRM, ERP, SPREADSHEETS, CUSTOM APP] - Known nouns the business already uses: [CUSTOMER, ORDER, INVOICE, OR OTHER TERMS] - Out of scope for this model: [WHAT MUST NOT BE MODELLED] - Audience for the entity list: [ANALYTICS TEAM, APP ENGINEERS, BOTH] </inputs> <task> Extract candidate entities, their likely identifying attributes, and the relationships implied by the writeup. Separate real entities from attributes that only look like entities. Flag any noun that two teams would define differently. </task> <constraints> Do not invent entities that the writeup never mentions. Keep the list to entities that would actually be stored, not process steps. Name each entity with a singular noun the business would recognise. Avoid vague names like Item or Record. </constraints> <format> A table of entity, one-line definition, candidate identifier, and related entities, then a short list of nouns you treated as attributes instead of entities, then open questions I must answer before an ERD. </format>

๐Ÿ’ก

Pro tip: Paste the writeup verbatim, including the messy bits, because the conflicting nouns are usually where the real entities hide.

Build a conceptual model from interview notes

2/30

โœจ What it does

Turns labelled interview notes into a conceptual model plus a glossary that keeps conflicting terms visible.

You are a senior data modeller who sits in stakeholder interviews and turns raw notes into a conceptual model. <context> I interviewed a few people who each described the same domain in different words, and I need one conceptual model that does not silently pick one persons vocabulary. </context> <inputs> - Interview notes: [PASTE NOTES FROM EACH PERSON, LABELLED BY ROLE] - Stated business goal of the model: [WHY THIS MODEL IS BEING BUILT] - Existing reports or screens they mentioned: [REPORT NAMES OR SCREEN NAMES] - Known disagreements already: [TERMS OR RULES PEOPLE DISAGREED ON] - Modelling notation preferred: [CROWS FOOT, UML, BOX AND LINE] </inputs> <task> Produce a conceptual model: entities, relationships, and a glossary that maps each persons terms onto the chosen entity names. Call out every place the notes conflict and do not resolve a conflict by guessing. </task> <constraints> If two people used the same word for different things, keep both meanings visible in the glossary. Do not add entities that only one person mentioned unless you flag them as unconfirmed. Keep relationship names as verbs the business uses. </constraints> <format> A glossary of term to entity mappings, then the conceptual model as a list of entities and relationships, then a conflict list with the exact quote or paraphrase that created each conflict. </format>

๐Ÿ’ก

Pro tip: Label each paragraph of notes with the persons role, otherwise Claude will flatten two definitions of the same word into one.

Resolve colliding entity names across teams

3/30

โœจ What it does

Splits one overloaded business word into two named entities and shows which columns and reports belong to each.

You are a senior data modeller who has mediated naming fights between product, finance, and operations. <context> Two teams use the same word for different things, and the current schema has already mixed those meanings in one table. I need a naming and entity split I can take back to both teams. </context> <inputs> - Colliding term: [THE SHARED WORD, E.G. ORDER OR ACCOUNT] - Team A definition: [HOW TEAM A USES THE WORD] - Team B definition: [HOW TEAM B USES THE WORD] - Current table or columns involved: [TABLE AND COLUMN NAMES] - Downstream reports that would break: [REPORT OR DASHBOARD NAMES] </inputs> <task> Propose a split into two entities with distinct names, show which current columns belong to which entity, and list the reports that need a mapping period while both names exist. </task> <constraints> Do not pick a winner and tell the other team to change their language. Give each meaning a name that team would accept. If a column is used by both meanings, say so instead of assigning it to one side. </constraints> <format> Two entity definitions, a column assignment table, a list of reports that need a mapping, and a one paragraph explanation I can paste into a Slack thread for both teams. </format>

๐Ÿ’ก

Pro tip: Include the actual column names, not a paraphrase, so the assignment table can be checked against the live schema.

Model a many-to-many with relationship attributes

4/30

โœจ What it does

Designs an associative entity that keeps relationship attributes off both parents and states the uniqueness rule.

You are a senior data modeller who has seen many-to-many joins lose their attributes because someone treated the link as a bare junction table. <context> Two entities clearly have a many-to-many relationship, and the relationship itself carries dates, status, or quantities that must not live on either parent. </context> <inputs> - Left entity: [ENTITY A NAME AND KEY] - Right entity: [ENTITY B NAME AND KEY] - Attributes of the relationship: [DATES, STATUS, QTY, ROLE, OR OTHER] - Cardinality notes: [ANY LIMITS, E.G. ONE ACTIVE LINK AT A TIME] - Current storage if any: [HOW THIS IS STORED TODAY] </inputs> <task> Design the associative entity: name, keys, attributes, uniqueness rules, and the lifecycle of a link, including what happens when a link ends and a new one starts. </task> <constraints> Do not put relationship attributes on entity A or entity B. State the uniqueness constraint in plain language and as a candidate key. If the business allows only one active link, encode that as a constraint, not as a comment. </constraints> <format> The associative entity definition, a uniqueness rule, an example of two valid rows and one invalid row, and the foreign keys back to both parents. </format>

๐Ÿ’ก

Pro tip: List every attribute that exists only while the link exists, those are the ones that vanish if you model this as a bare junction table.

Decide entity versus attribute for a fuzzy concept

5/30

โœจ What it does

Gives a criteria-based verdict on whether a fuzzy concept should be an entity, a lookup, or a free-text column.

You are a senior data modeller who has reversed bad calls where a status, a type, or a tag was promoted to an entity too early, or left as a free-text column too long. <context> I have a concept that some people want as its own table and others want as a column on an existing entity. I need a decision with criteria, not a preference. </context> <inputs> - Concept under debate: [NAME AND HOW PEOPLE TALK ABOUT IT] - Parent entity it might hang off: [PARENT ENTITY NAME] - Distinct values seen so far: [SAMPLE VALUES OR A COUNT] - Does it have its own attributes or history: [YES/NO AND WHICH] - Who maintains the list: [BUSINESS TEAM, ENGINEERING, NOBODY] </inputs> <task> Decide whether this should be an entity, a controlled attribute with a lookup, or a free-text attribute. Give the criteria you used and the point at which the decision should be revisited. </task> <constraints> Do not default to making a new table for flexibility. If the concept has no attributes of its own and a small closed list, prefer a lookup or a check constraint. If it has history or owners, prefer an entity. </constraints> <format> A verdict of entity, lookup attribute, or free text, the criteria table that led there, and a one line trigger for revisiting the decision. </format>

๐Ÿ’ก

Pro tip: Answer who maintains the list, a concept with no owner is a poor entity even if someone wants a table for it.

ERDs and Relationships

5 prompts

Draft a Crows Foot ERD from a table list

6/30

โœจ What it does

Turns a table list into a Crows Foot ERD in your notation, with cardinality and identifying relationships marked.

You are a senior data modeller who draws ERDs that other people can implement without a follow-up meeting. <context> I have a list of tables and a rough sense of how they connect, and I need a Crows Foot ERD I can drop into a design doc. </context> <inputs> - Tables and key columns: [PASTE TABLE NAMES WITH PK AND FK COLUMNS] - Known relationships: [WHICH TABLES JOIN TO WHICH] - Uncertain relationships: [PAIRS YOU ARE NOT SURE ABOUT] - Notation I will paste into: [LUCIDCHART, DBDIAGRAM, MERMAID, DRAW.IO] - Audience: [ENGINEERS, ANALYSTS, MIXED] </inputs> <task> Produce a Crows Foot ERD for the stated notation, with cardinality on every relationship and a note on any pair you left unconnected on purpose. Name identifying versus non-identifying relationships where that distinction matters. </task> <constraints> Do not invent tables that were not listed. If a foreign key column does not match a stated primary key, flag it instead of silently renaming. Keep entity names matching the table list unless a name is clearly a typo. </constraints> <format> The ERD in the requested notation first, then a relationship table of parent, child, cardinality, and identifying yes or no, then a list of open questions on the uncertain pairs. </format>

๐Ÿ’ก

Pro tip: Put uncertain pairs in their own input, otherwise Claude will draw a relationship you did not mean to commit to.

Settle a cardinality argument with examples

7/30

โœจ What it does

Settles a one-to-many versus many-to-many fight using real cases and example rows, not opinions.

You are a senior data modeller who settles cardinality arguments with concrete row examples instead of abstract debate. <context> Two people disagree on whether a relationship is one-to-many or many-to-many, and the current draft ERD has already picked a side. I need a verdict backed by example rows. </context> <inputs> - Entity A: [NAME AND WHAT ONE ROW REPRESENTS] - Entity B: [NAME AND WHAT ONE ROW REPRESENTS] - Side arguing one-to-many: [THEIR REASONING IN THEIR WORDS] - Side arguing many-to-many: [THEIR REASONING IN THEIR WORDS] - Real cases from production or ops: [PASTE TWO OR THREE REAL EXAMPLES] </inputs> <task> Decide the cardinality using the real cases. Show valid example rows for the cardinality you chose, and show the row that would be illegal or duplicated under the rejected cardinality. </task> <constraints> Do not average the two opinions. If the real cases include even one valid many-to-many instance, do not force one-to-many. If a business rule forbids the many case going forward, say that is a constraint on future rows, not a description of history. </constraints> <format> A one line verdict, a small example table of legal rows, one illegal row under the rejected model, and a sentence I can paste into the ERD notes. </format>

๐Ÿ’ก

Pro tip: Paste actual cases from ops or support tickets, hypothetical examples tend to confirm whichever side wrote them.

Rebuild a messy whiteboard ERD

8/30

โœจ What it does

Rebuilds a whiteboard or slide sketch into a clean ERD and lists every guess that still needs a yes or no.

You are a senior data modeller who has cleaned up whiteboard photos and half-finished diagrams into ERDs a team can implement. <context> We sketched a model on a whiteboard or in a slide and it is now the source of truth by accident. I need a cleaned ERD that keeps the intent and drops the doodles. </context> <inputs> - Sketch content: [PASTE LABELS, BOXES, AND ARROWS AS TEXT, OR A TRANSCRIPT] - Confirmed entities: [NAMES WE AGREED ON] - Known leftovers: [BOXES THAT WERE CROSSED OUT OR QUESTION MARKED] - Target notation: [CROWS FOOT, UML, MERMAID] - What must stay identical: [NAMES THAT ARE ALREADY IN TICKETS OR CODE] </inputs> <task> Rebuild the ERD in the target notation. Drop leftover boxes, resolve unlabeled arrows into named relationships, and list every place you had to guess. </task> <constraints> Do not rename an entity that is already in tickets or code. If an arrow has no cardinality, mark it unknown instead of defaulting to one-to-many. Keep the cleaned diagram no richer than the sketch plus the confirmed list. </constraints> <format> The cleaned ERD, a changelog of what you dropped or renamed, and a list of guesses that need a human yes or no. </format>

๐Ÿ’ก

Pro tip: Transcript crossed-out boxes into the leftovers field, otherwise they come back as real entities.

Model a self-referencing hierarchy

9/30

โœจ What it does

Chooses a hierarchy pattern from parent rules and query needs, and shows the write path for a reparent.

You are a senior data modeller who has designed org trees, product categories, and account hierarchies that later had to support moves and multiple parents. <context> I need to model a hierarchy where a row points at another row of the same entity, and I am not sure whether a simple parent_id is enough. </context> <inputs> - Entity being organised: [EMPLOYEE, CATEGORY, ACCOUNT, OR OTHER] - Depth typical and worst case: [TYPICAL DEPTH, MAX DEPTH] - Can a node have two parents: [YES, NO, RARE EXCEPTIONS] - Moves and reparents: [HOW OFTEN A NODE CHANGES PARENT] - Queries that must be fast: [DESCENDANTS, ANCESTORS, PATH TO ROOT] </inputs> <task> Recommend a hierarchy pattern that fits the parent rule and the queries: adjacency list, nested set, closure table, or a hybrid. Show the columns and the write path for a reparent. </task> <constraints> If two parents are allowed, do not recommend a single parent_id. If reparents are common, do not recommend nested sets without stating the write cost. Keep the recommendation to one primary pattern plus one optional helper structure, not a catalogue. </constraints> <format> The recommended pattern, the column list, a worked reparent example with before and after rows, and one paragraph on the query that would be slowest under this design. </format>

๐Ÿ’ก

Pro tip: Answer whether a node can have two parents before anything else, that single fact knocks out a simple parent_id.

Audit an ERD for missing relationships

10/30

โœจ What it does

Finds relationships the ERD omitted, lines nobody queries, and orphan tables, each tied to a real join or rule.

You are a senior data modeller doing a review pass that looks only for missing, implied, or one-way relationships. <context> The ERD looks complete in a slide, but I suspect several joins the business already makes are not drawn, and a few drawn lines do not match how people query the data. </context> <inputs> - Current ERD or relationship list: [PASTE ENTITIES AND RELATIONSHIPS] - Queries or reports people already run: [JOIN PATHS OR REPORT NAMES] - Business rules that mention two entities: [RULES IN PLAIN LANGUAGE] - Known orphans: [TABLES NOBODY IS SURE HOW TO JOIN] </inputs> <task> List every relationship the queries and rules imply that the ERD does not show, every drawn relationship the queries never use, and every orphan table. For each missing relationship, propose cardinality and a foreign key column name. </task> <constraints> Do not add a relationship just because two entities share a word in their names. Every proposed relationship must point at a query, report, or rule in the inputs. If an orphan has no join path in the inputs, say it may not belong in this model. </constraints> <format> Three lists: Missing, Unused on the ERD, Orphans. Each missing item gets cardinality and a suggested FK column. End with the five relationships I should confirm first. </format>

๐Ÿ’ก

Pro tip: Paste the actual join paths from two or three production queries, those catch missing relationships a pretty diagram hides.

Normalisation

5 prompts

Normalise a spreadsheet export to third normal form

11/30

โœจ What it does

Decomposes a flat spreadsheet export into 3NF tables with keys and a column-level mapping back to the sheet.

You are a senior data modeller who has taken spreadsheet dumps that finance or ops treat as the system of record and turned them into 3NF schemas. <context> I have a flat export with repeated groups, mixed subjects in one row, and free-text keys. I need a 3NF design I can review before anyone loads this into a database. </context> <inputs> - Spreadsheet columns and 5 sample rows: [PASTE HEADER PLUS SAMPLE ROWS] - What one row is supposed to mean: [THE GRAIN IN PLAIN LANGUAGE] - Columns that repeat as 1, 2, 3: [REPEATING GROUP NAMES] - Known lookups hiding as text: [STATUS, TYPE, COUNTRY, OR SIMILAR] - Target engine if known: [POSTGRES, SNOWFLAKE, BIGQUERY, UNDECIDED] </inputs> <task> Decompose the sheet into 3NF tables: name each table, list columns, mark primary keys, and show which repeating groups became child tables. Keep a mapping from original column to new table.column. </task> <constraints> Do not stop at 1NF if transitive dependencies remain. Do not invent columns that are not implied by the sheet. If a column is a repeating group, do not leave it as item_1, item_2, item_3 on the parent. </constraints> <format> A table list with keys, a column mapping from the original sheet, one example of how a single source row splits across the new tables, and a short list of remaining 3NF questions. </format>

๐Ÿ’ก

Pro tip: Include five real rows, not made-up ones, because repeating groups and mixed grain only show up in actual data.

List functional dependencies and current normal form

12/30

โœจ What it does

Lists functional dependencies from sample rows and names the normal form plus the dependency that blocks the next one.

You are a senior data modeller who diagnoses normal form from functional dependencies rather than from table width. <context> I have a table that feels wrong but I cannot point at the dependency that is breaking it. I need the functional dependencies listed and the current normal form named. </context> <inputs> - Table name and columns: [TABLE AND COLUMN LIST] - What the primary key is today: [CURRENT PK, OR NONE] - Sample rows: [5 TO 10 ROWS THAT SHOW REPEATS] - Business rules about uniqueness: [WHAT MUST BE UNIQUE, IN THEIR WORDS] - Columns that always travel together: [GROUPS YOU HAVE NOTICED] </inputs> <task> List the functional dependencies you can defend from the sample and the rules. State the highest normal form the table currently meets, and name the specific dependency that blocks the next form. </task> <constraints> Do not claim a dependency the sample contradicts. If the sample is too thin to decide, say which extra rows would settle it. Treat the current primary key as a claim to test, not as a fact. </constraints> <format> A list of dependencies written as determinant to dependents, the normal form verdict, the blocking dependency, and two rows I should look up to confirm or reject the verdict. </format>

๐Ÿ’ก

Pro tip: Paste rows that actually repeat, a unique sample hides the dependencies you are trying to find.

Make a denormalisation call for a known query

13/30

โœจ What it does

Decides whether to keep 3NF, add a controlled denormalised table, or push the query into a mart.

You are a senior data modeller who has denormalised on purpose for a query path and later had to undo it when the write path broke. <context> A query is expensive because it joins several 3NF tables, and someone wants to collapse them. I need a yes, no, or not yet, with the anomaly we would accept if we say yes. </context> <inputs> - Current 3NF tables involved: [TABLE NAMES AND KEYS] - The expensive query: [PASTE THE SQL OR A PLAIN DESCRIPTION] - Read versus write volume: [READS PER HOUR, WRITES PER HOUR] - Freshness need: [HOW STALE THE COLLAPSED DATA MAY BE] - Who would own the collapsed table: [TEAM NAME] </inputs> <task> Recommend keep 3NF, add a controlled denormalised table, or add a warehouse mart instead of changing OLTP. If you recommend denormalisation, specify the grain, the source of each column, and the update anomaly we are accepting. </task> <constraints> Do not collapse tables in the system of record if writes are frequent and several source columns can change independently. If freshness can be minutes old, prefer a mart over changing OLTP. Name the anomaly in one sentence, not as a general warning. </constraints> <format> A verdict, the grain of any new table, a column source list, the anomaly we accept, and the query rewrite in outline form. </format>

๐Ÿ’ก

Pro tip: Give real read and write volumes, a denormalisation that is fine at 10 writes an hour is a bad idea at 10 writes a second.

Split a wide table that mixes several subjects

14/30

โœจ What it does

Splits a mixed-subject wide table into a core table plus subject tables and lists jobs that select star.

You are a senior data modeller who has split god tables after they became the place every new column landed. <context> One table now holds columns about several different subjects, nullable blocks that are only filled for some row types, and comments like do not use this field except when. I need a split plan. </context> <inputs> - Current table and column list: [PASTE COLUMNS WITH TYPES AND NULLABILITY] - Row types people already talk about: [TYPE FLAGS OR STATUS VALUES] - Which columns are always populated: [CORE COLUMNS] - Which columns are only used together: [COLUMN GROUPS] - Downstream jobs that select star: [JOB OR VIEW NAMES] </inputs> <task> Propose a split into a core table plus subject tables. Show which columns move, how the tables share a key, and which downstream jobs will break if they keep selecting star. </task> <constraints> Do not create a table for a group of two unused columns. Every new table must have a clear subject and a key that matches the core. Keep a migration note for jobs that select star, they will see missing columns. </constraints> <format> A core table definition, one section per new subject table, a column move list, and a break list for star-selecting jobs. </format>

๐Ÿ’ก

Pro tip: Mark the columns that are only filled for some row types, those groups are usually the subject tables.

Find insertion, update, and deletion anomalies

15/30

โœจ What it does

Shows insertion, update, and deletion anomalies on the real table with before and after rows.

You are a senior data modeller who explains anomalies with before and after rows so a non-modeller can see the bug. <context> I suspect the current table lets us lose facts, duplicate facts, or invent facts when we insert, update, or delete a row. I need the anomalies named with examples. </context> <inputs> - Table and columns: [TABLE NAME AND COLUMN LIST] - Current key: [STATED PRIMARY KEY] - Sample rows: [PASTE ROWS THAT REPEAT A FACT] - The write the business does most: [INSERT, UPDATE A FIELD, DELETE A ROW] - Fact that must not disappear: [THE FACT PEOPLE ARE AFRAID OF LOSING] </inputs> <task> Show an insertion anomaly, an update anomaly, and a deletion anomaly against this table, each with before and after rows. If one of the three cannot happen given the key, say so and explain why. </task> <constraints> Every example must use the columns given, not a toy schema. Tie each anomaly to the fact that must not disappear. Do not prescribe a full redesign here, only name the anomalies and the dependency that causes them. </constraints> <format> Three short before and after examples labelled Insert, Update, Delete, then the dependency that causes them, then one sentence I can put in a review comment. </format>

๐Ÿ’ก

Pro tip: Name the fact you are afraid of losing, the examples stay useful instead of drifting into textbook ones.

These prompts give you the what. Tutorials give you the why.

Learn when to use extended thinking, how to build Claude Projects, and workflows that compound. 300+ tutorials and growing.

Try AI Academy Free

Keys and Physical Design

5 prompts

Design primary and foreign keys for a domain

16/30

โœจ What it does

Produces a PK and FK plan with on-delete behavior and flags natural keys that are not safe as primary keys.

You are a senior data modeller who has watched poorly chosen keys leak into every API and report. <context> The logical model is agreed but we have not locked primary keys and foreign keys. I need a key plan I can put in the schema review. </context> <inputs> - Entities and their natural identifiers: [ENTITY, NATURAL ID CANDIDATES] - Relationships already agreed: [PARENT TO CHILD LIST] - Identifiers that change in the real world: [WHICH NATURAL IDS GET REISSUED OR EDITED] - Identifiers shared with partners: [EXTERNAL IDS THAT MUST STAY STABLE] - Target engine: [POSTGRES, MYSQL, SNOWFLAKE, SQL SERVER] </inputs> <task> For each entity, recommend a primary key and the foreign key columns on children. Say when a natural key is safe as the PK and when it should be a unique constraint next to a surrogate. Name on-delete behavior for each FK. </task> <constraints> Do not use a natural key as the PK if it is edited or reissued. Do not cascade delete from a high-volume parent without saying what child volume that would touch. Keep key names consistent: parent table, underscore, pk column. </constraints> <format> A table of entity, PK, unique extras, and FK children with on-delete behavior, then a short list of keys that must never be reused as display IDs in an API. </format>

๐Ÿ’ก

Pro tip: Call out identifiers that get reissued, those are the ones that quietly break history if you promote them to a PK.

Choose surrogate keys versus natural keys

17/30

โœจ What it does

Recommends surrogate versus natural keys for one table, with the child FK choice and what a later ID change would break.

You are a senior data modeller who has migrated tables off natural keys after a partner changed their ID format. <context> A design review is stuck on whether to use the business number as the primary key or to add a surrogate and keep the business number unique. I need a decision for this table, not a general essay. </context> <inputs> - Table and grain: [TABLE NAME AND WHAT ONE ROW IS] - Candidate natural key: [COLUMNS AND WHO ISSUES THEM] - Change history of that key: [HAS IT EVER BEEN EDITED OR REISSUED] - Children that would inherit it: [CHILD TABLES AND THEIR VOLUME] - External exposure: [USED IN URLS, FILES, PARTNER APIS, NONE] </inputs> <task> Recommend surrogate PK plus unique natural key, natural PK, or a composite natural key. State what would break if the natural key changes after go-live, and what the child tables store as their FK. </task> <constraints> If the key is exposed in URLs or partner files, treat a format change as a given, not a rarity. Do not recommend a composite of three or more columns as a PK unless every child query already filters on all of them. Keep the recommendation to this table. </constraints> <format> A one line recommendation, the PK and unique constraint DDL in outline form, the child FK choice, and a one paragraph note for the review. </format>

๐Ÿ’ก

Pro tip: If the key appears in a URL or a partner file, say so, that usually decides the surrogate side on its own.

Specify uniqueness and composite keys

18/30

โœจ What it does

Turns a business uniqueness rule into a unique constraint, including partial uniqueness when soft-delete is in play.

You are a senior data modeller who writes uniqueness rules that match the business, not just the columns that look unique in a sample. <context> A table already has a primary key, but duplicates still appear for the business meaning of a row. I need the real uniqueness rule and the constraint that enforces it. </context> <inputs> - Table and columns: [TABLE AND COLUMN LIST] - Current PK and unique indexes: [EXISTING CONSTRAINTS] - Duplicates people have seen: [PASTE TWO ROWS THAT SHOULD NOT BOTH EXIST] - Soft-delete or effective dating in play: [YES/NO AND COLUMN NAMES] - Partial uniqueness needed: [E.G. UNIQUE ONLY WHEN ACTIVE] </inputs> <task> State the uniqueness rule in one sentence a product owner would accept, then write the unique constraint or unique index that enforces it, including any WHERE clause for partial uniqueness. Show how the duplicate pair would be rejected. </task> <constraints> Do not unique-index a column that the duplicate pair proves is not unique on its own. If soft-delete is in play, a unique constraint that ignores deleted rows must be explicit. Prefer one constraint that matches the rule over several overlapping ones. </constraints> <format> The one sentence rule, the constraint SQL, the rejected duplicate pair, and a note on any existing index that now fights the rule. </format>

๐Ÿ’ก

Pro tip: Paste two rows that should not both exist, that pair is a better spec than a prose rule.

Propose indexes from stated access patterns

19/30

โœจ What it does

Proposes a first index set from real access patterns, with column order and a skip list for patterns that should not be indexed.

You are a senior data modeller who designs indexes from the queries people actually run, not from every column that appears in a WHERE clause. <context> The logical model is landing in a database soon and I want the first index set to match access patterns, not a guess after the first slow query. </context> <inputs> - Tables and current keys: [TABLE, PK, EXISTING INDEXES] - Access patterns: [QUERY SHAPES, FILTERS, SORTS, AND HOW OFTEN] - Write volume per table: [INSERTS AND UPDATES PER HOUR] - Engine: [POSTGRES, MYSQL, SNOWFLAKE, SQL SERVER] - Tables expected to grow fastest: [TABLE NAMES AND ROUGH ROW COUNTS] </inputs> <task> Propose a first index set. For each index, state the column order, which access pattern it serves, and the write cost given the stated volume. Call out any pattern that should stay as a sequential scan or a warehouse query instead of an OLTP index. </task> <constraints> Do not index every filtered column on its own if a composite index serves the pattern. Do not add more than two extra indexes on a table that is write heavy unless you justify each one. Match column order to filter plus sort, not to column order in the table. </constraints> <format> A list of CREATE INDEX statements with a one line reason each, a skip list of patterns that should not get an index, and a note on the write-heaviest table. </format>

๐Ÿ’ก

Pro tip: Write the access patterns as filter plus sort, not as a list of column names, column order depends on both.

Add soft delete, effective dating, and audit columns

20/30

โœจ What it does

Chooses soft delete, effective dating, or a history table, and revises uniqueness so expired rows do not block new ones.

You are a senior data modeller who has retrofitted soft delete and effective dating onto tables that already had live traffic. <context> We need history on a table: deleted rows must remain queryable, and some attributes must keep their old values after a change. I need a column and constraint plan, not a generic audit lecture. </context> <inputs> - Table and grain: [TABLE NAME AND WHAT ONE ROW IS] - What must remain after a delete: [WHICH FACTS MUST STAY VISIBLE] - Attributes that change over time: [COLUMNS THAT NEED HISTORY] - Who needs to see deleted rows: [APP, ANALYTICS, COMPLIANCE, ALL] - Current unique constraints: [CONSTRAINTS THAT WILL COLLIDE WITH SOFT DELETE] </inputs> <task> Recommend a pattern: soft-delete flag, effective-from and effective-to, a separate history table, or a mix. Show the columns, the uniqueness change, and how a current-row query is written so people do not forget the filter. </task> <constraints> Do not put full history on every column if only two attributes change. If uniqueness is on a business key, adjust it so a deleted or expired row does not block a new current row. State timezone handling for effective dates. </constraints> <format> The chosen pattern, the column list, the revised unique constraint, a current-row query example, and a one line warning for application code that still selects without the filter. </format>

๐Ÿ’ก

Pro tip: List the current unique constraints, the usual bug is a unique business key that blocks re-creating a row after a soft delete.

Warehouse Layers

5 prompts

Design bronze, silver, and gold for one source

21/30

โœจ What it does

Designs bronze, silver, and gold tables for one source, with grain, keys, and tables that should stop at bronze.

You are a senior dimensional modeller who has set up medallion layers that analysts can actually find, not a pile of similarly named tables. <context> A new source is landing in the warehouse and I need a bronze, silver, and gold plan before anyone copies the source tables into a reporting schema. </context> <inputs> - Source system and extract style: [SYSTEM NAME, FULL DUMP OR CDC, FILE OR API] - Source tables in scope: [TABLE OR FILE NAMES] - Business questions gold must answer: [3 TO 5 QUESTIONS] - Late arriving and corrected data: [YES/NO AND HOW OFTEN] - Warehouse engine: [SNOWFLAKE, BIGQUERY, DATABRICKS, REDSHIFT] </inputs> <task> Design the three layers: what bronze stores as-is, what silver cleans and keys, and what gold publishes for the stated questions. Name tables, grain, and the keys that connect silver to gold. Call out any source table that should not be promoted past bronze. </task> <constraints> Do not put business renaming and metric definitions in bronze. Do not put raw payload columns in gold. If corrections arrive, say whether silver is restated or gold keeps a versioned fact. Keep gold to tables that answer the listed questions, not a copy of silver. </constraints> <format> A section per layer with table names, grain, and keys, then a list of source tables that stop at bronze, then a one page diagram in text of extract to bronze to silver to gold. </format>

๐Ÿ’ก

Pro tip: Write the gold questions first, otherwise silver grows into a second copy of the source and gold never gets a grain.

Set the grain of a fact table

22/30

โœจ What it does

Writes a testable fact grain, the unique key, and splits measures that would double-count if left on the same table.

You are a senior dimensional modeller who has rebuilt fact tables after someone stored two grains in one table and every metric double counted. <context> We are about to build a fact table and the grain is still a sentence like orders and stuff. I need a grain statement a reviewer can test with a unique key. </context> <inputs> - Business process: [THE PROCESS THE FACT DESCRIBES] - Candidate grain in their words: [WHAT THEY THINK ONE ROW IS] - Measures people want on the same table: [METRIC LIST] - Degenerate or junk dimensions already proposed: [IDS OR FLAGS] - Sample of the source rows: [5 TO 10 SOURCE ROWS] </inputs> <task> Write a grain statement of the form one row per X. List the columns that make that grain unique. Split out any measure that belongs to a different grain into a second fact, and show the double-count that would happen if they stayed together. </task> <constraints> Do not accept a grain that needs or in the sentence, that is two grains. If a measure is an average or a distinct count that cannot be summed across the grain, say so and keep it off this fact or mark it non-additive. The unique key must be testable on the sample. </constraints> <format> The grain sentence, the unique key columns, a second fact if needed with its own grain, and a two-row example of the double-count you avoided. </format>

๐Ÿ’ก

Pro tip: If the grain sentence needs the word or, you already have two facts, force the split before anyone writes SQL.

Design a type 2 slowly changing dimension

23/30

โœจ What it does

Designs a type 2 dimension with surrogate keys, effective dates, and the fact join rule after an attribute change.

You are a senior dimensional modeller who has implemented type 2 dimensions that analysts could filter to current without breaking history. <context> A dimension attribute changes over time and reports need both the current value and the value that was true when the fact occurred. I need a type 2 design, not a reminder that type 2 exists. </context> <inputs> - Dimension and natural key: [DIMENSION NAME AND BUSINESS KEY] - Attributes that must keep history: [TYPE 2 ATTRIBUTE LIST] - Attributes that may overwrite: [TYPE 1 ATTRIBUTE LIST] - Fact tables that will point at it: [FACT NAMES AND THEIR GRAIN] - How changes arrive: [FULL SNAPSHOT, CDC, OR MANUAL FILE] </inputs> <task> Design the type 2 dimension: surrogate key, effective dates, current flag, and which attributes are type 1 versus type 2. Show how a fact row stays pointed at the historical surrogate after an attribute change, and how a current-only query filters. </task> <constraints> Do not type-2 an attribute that the inputs marked as overwrite. Effective dates must not overlap for the same natural key. State how a same-day correction is handled so you do not create two current rows. Name the timezone for the dates. </constraints> <format> The column list, a before and after of one natural key changing a type 2 attribute, the fact join rule, and the current-row filter. </format>

๐Ÿ’ก

Pro tip: Split attributes into must-keep-history versus overwrite before you paste, a type 2 on every column makes current filters painful.

Convert an OLTP model into a star schema

24/30

โœจ What it does

Maps a 3NF OLTP model to one star, reusing conformed dimensions and leaving lookup-only tables out of gold.

You are a senior dimensional modeller who has converted 3NF application schemas into star schemas without dragging every lookup into gold. <context> The OLTP model works for the app and is a poor shape for the questions analysts ask. I need a star schema for a stated process, not a one-to-one copy of every table. </context> <inputs> - OLTP tables and keys: [PASTE THE RELEVANT 3NF TABLES] - Business process to model: [ORDERS, TICKETS, SUBSCRIPTIONS, OR OTHER] - Questions the star must answer: [3 TO 5 QUESTIONS] - Conformed dimensions we already have: [EXISTING DIM NAMES] - Facts we must not duplicate: [EXISTING FACT NAMES AND GRAINS] </inputs> <task> Propose one fact and the dimensions around it. Map each OLTP table to a fact, a dimension, a degenerate column, or out of scope. Reuse conformed dimensions where the grain matches, and say when a new dimension is justified. </task> <constraints> Do not create a dimension per OLTP lookup table if several lookups are attributes of the same entity. Do not copy transactional status history into the fact unless the grain is the status change. If an existing fact already has this grain, say reuse it. </constraints> <format> The fact grain and measures, a dimension list with conformed yes or no, an OLTP-to-star mapping table, and a list of OLTP tables left out of gold on purpose. </format>

๐Ÿ’ก

Pro tip: List conformed dimensions you already have, otherwise Claude will invent a second customer dimension with a new name.

Review a warehouse model for mixed grain

25/30

โœจ What it does

Reviews warehouse facts for mixed grain and non-additive measures, with a do-not-ship call when double-counting is baked in.

You are a senior dimensional modeller doing a review that looks only for grain violations, double-counting, and facts that hide a second process. <context> A warehouse model is in review and I want a pass that ignores naming taste and only checks whether measures can be summed at the stated grain. </context> <inputs> - Fact tables with stated grain and measures: [FACT, GRAIN SENTENCE, MEASURE LIST] - Dimension keys on each fact: [KEY LIST PER FACT] - Sample queries already written: [PASTE TWO OR THREE QUERIES] - Known complaint from analysts: [A METRIC THAT LOOKS WRONG] </inputs> <task> For each fact, test whether every measure is additive at the stated grain. Flag mixed grain, header-and-line measures on one table, and queries that join two facts on a dimension and then sum. Propose the split or the semi-additive note that fixes each finding. </task> <constraints> Do not comment on column names unless a name hides a second grain. Every finding must name the measure and the grain conflict. If a query is wrong and the model is fine, say the query is the problem. </constraints> <format> A findings list of fact, measure, grain conflict, and fix, then a clean bill or a do-not-ship verdict, then the first split I should make if I only have time for one. </format>

๐Ÿ’ก

Pro tip: Paste the query that already looks wrong, that is usually the mixed-grain fact wearing a pretty grain sentence.

Most people use 10% of Claude. Tutorials unlock the rest.

AI Academy: 300+ hands-on tutorials on Claude, ChatGPT, Midjourney, and 50+ AI tools. New tutorials added every week.

Start Your Free Trial

Reviews, Docs, and Migrations

5 prompts

Map the blast radius of a proposed model change

26/30

โœจ What it does

Maps consumers of a proposed model change and sequences a dual-write window so the old contract can survive review.

You are a senior data modeller who has shipped a rename that looked local and broke six reports plus an app join. <context> Someone proposed a model change and I need the blast radius before we agree to it in review, not after the migration runs. </context> <inputs> - Proposed change: [RENAME, SPLIT, MERGE, TYPE CHANGE, OR NEW RELATIONSHIP] - Current objects touched: [TABLES, COLUMNS, VIEWS] - Known consumers: [APP QUERIES, DBT MODELS, DASHBOARDS, REVERSE ETL] - Backward compatible window we can keep: [DAYS OR SPRINTS] - Rollback appetite: [CAN WE KEEP THE OLD COLUMN IN PARALLEL, YES OR NO] </inputs> <task> Map every consumer that reads or writes the touched objects. Classify each as breaks immediately, works if we dual-write, or untouched. Propose a sequence that keeps the old contract alive for the stated window if rollback is allowed. </task> <constraints> Do not treat a rename as safe because the meaning is the same. If a consumer is unknown, list it as unknown, not as fine. If dual-write is required, say which writer owns the backfill. </constraints> <format> A consumer table with impact class, a recommended sequence of steps, and a one paragraph go or wait verdict for the review. </format>

๐Ÿ’ก

Pro tip: Include reverse ETL and scheduled extracts, they break as often as dashboards and people forget to list them.

Write a data dictionary for a schema

27/30

โœจ What it does

Writes a per-table data dictionary with grain, allowed values, and flags on columns whose meaning was inferred.

You are a senior data modeller who writes data dictionaries that analysts use, not a dump of column names and types. <context> The schema exists and people still ask what a column means, what the grain is, and which values are allowed. I need a dictionary I can put next to the ERD. </context> <inputs> - Tables in scope: [TABLE LIST OR DDL] - Grain of each table: [ONE ROW PER WHAT, IF KNOWN] - Allowed values or lookups: [STATUS LISTS, TYPE LISTS, OR NONE] - Columns that are often misread: [COLUMNS PEOPLE ALREADY MISUSE] - Audience: [ANALYSTS, ENGINEERS, MIXED] </inputs> <task> Write a data dictionary: table grain, column definition, type, nullability, allowed values, and a warning on columns that are often misread. Mark any column whose definition you had to infer from the name. </task> <constraints> Do not define a column as the column name restated. If you do not know the grain, say unknown instead of guessing. Keep each definition to one or two sentences. Flag deprecated columns rather than omitting them. </constraints> <format> One section per table starting with the grain sentence, then a column table with definition, type, nulls, allowed values, and an inferred yes or no flag. </format>

๐Ÿ’ก

Pro tip: Call out the columns people already misuse, those definitions are the ones that save the next Slack thread.

Plan a backward compatible model migration

28/30

โœจ What it does

Sequences a live model migration with dual-write, batched backfill, a point of no return, and per-step rollback.

You are a senior data modeller who has migrated live schemas without a weekend lock and without leaving two grains in one table forever. <context> We need to move from the current physical model to a new one while readers and writers stay up. I need a step plan with a point of no return. </context> <inputs> - Current model: [TABLES AND KEYS TODAY] - Target model: [TABLES AND KEYS AFTER] - Row counts: [APPROXIMATE ROWS PER TABLE] - Writers that cannot pause: [APP SERVICES OR PIPELINES] - How we deploy app code versus DDL: [CODE FIRST, DDL FIRST, OR TOGETHER] </inputs> <task> Produce a multi-step migration that keeps old readers working until the last step. Tag each step as DDL, backfill, dual-write, or cutover. Mark the point of no return and what rollback looks like before that point. </task> <constraints> Assume a full table lock of more than a few seconds is not acceptable on the largest table. Batch backfills. Do not drop an old column until every listed writer has moved. If code cannot deploy before DDL, say which steps collapse and what risk that adds. </constraints> <format> A numbered sequence with step type tags, the exact DDL outline for each DDL step, the point of no return, and a rollback note for every step before that point. </format>

๐Ÿ’ก

Pro tip: Answer whether app code can deploy before DDL, that single fact changes which steps can stay backward compatible.

Produce DDL from an agreed logical model

29/30

โœจ What it does

Turns an agreed logical model into engine-specific DDL or dbt models with keys, uniques, and comments.

You are a senior data modeller who turns a reviewed logical model into DDL a DBA or dbt project can run without guessing names. <context> The logical model is agreed and I need physical DDL for the target engine, including keys, unique constraints, and comments, not a sketch of CREATE TABLE. </context> <inputs> - Logical model: [ENTITIES, ATTRIBUTES, KEYS, RELATIONSHIPS] - Target engine: [POSTGRES, SNOWFLAKE, BIGQUERY, SQL SERVER] - Naming rules: [SNAKE CASE, PLURAL TABLES, OR PASTE THE STANDARD] - Soft-delete or audit columns required: [YES/NO AND WHICH] - dbt or raw SQL: [DBT MODELS, RAW DDL, OR BOTH] </inputs> <task> Write CREATE TABLE statements, or dbt model SQL plus YAML tests, that match the logical model and the naming rules. Include primary keys, foreign keys, unique constraints, and a COMMENT or description on each table and on columns that are not obvious. </task> <constraints> Do not rename an entity that the logical model already named unless the naming rules force it, and if they force it, show the mapping. Do not skip a unique rule that the logical model stated. Use types the target engine actually has. </constraints> <format> The DDL or dbt files first, then a logical-to-physical name mapping, then a list of constraints you could not express in the engine and how you documented them instead. </format>

๐Ÿ’ก

Pro tip: Paste the naming standard, otherwise table names drift from the logical model and the review starts over on spelling.

Prepare a modelling review pack for stakeholders

30/30

โœจ What it does

Builds a one-hour modelling review pack: grain summary, must-settle decisions, role-specific questions, and a timed agenda.

You are a senior data modeller who runs reviews where product, engineering, and analytics have to agree on grain and names in one sitting. <context> I have a draft model and a one-hour review. I need a pack that forces the decisions, not a 20-page document nobody reads. </context> <inputs> - Draft model summary: [ENTITIES OR TABLES AND THE GRAIN OF EACH] - Open questions: [THE DECISIONS STILL UNRESOLVED] - Stakeholders in the room: [ROLES, NOT NAMES] - Decisions that would block build: [THE ONES THAT MUST BE SETTLED TODAY] - Time available: [MINUTES] </inputs> <task> Build a review pack: a one page model summary, a decision list ordered by what blocks build, a suggested agenda that fits the time, and the exact question to ask each role so they do not debate column types. </task> <constraints> Do not put more than five decisions on the must-settle list. Keep the summary to grain and relationships, not every attribute. Write questions a product owner can answer without SQL. If time is under 45 minutes, drop the walkthrough of already agreed tables. </constraints> <format> One page summary, a numbered decision list with the question and the role who must answer, a timed agenda, and a parking lot for items that must not eat the meeting. </format>

๐Ÿ’ก

Pro tip: Limit the must-settle list to five, a longer list turns the review into a tour of the diagram and nothing gets decided.

Free tool

Prompt Optimizer

Turn a rough idea into a structured, professional AI prompt.

Try it free โ†’

Frequently Asked Questions

Yes, if you paste the process writeup, the nouns the business already uses, and what is out of scope. The entity-design prompts return a candidate list with identifiers and a set of questions to settle before anyone draws an ERD.
Give it the table list with primary and foreign keys, say which pairs are still uncertain, and name the notation you will paste into, such as Mermaid or dbdiagram. Ask it to leave uncertain pairs unconnected instead of inventing cardinality.
Start with the normalisation prompts when the source is a spreadsheet or a wide table. Use the denormalisation prompt only when you have a specific expensive query, real read and write volumes, and a freshness limit. The warehouse-layer prompts are the right place for marts, not the OLTP schema.
Yes. The warehouse-layer set covers medallion layout, fact grain, type 2 dimensions, OLTP-to-star mapping, and a mixed-grain review. Paste source extract style and the questions gold must answer, or silver will become a second copy of the source.
Real sample rows, current DDL or column lists, and the actual queries or reports people run. Hypothetical examples confirm whichever side of a cardinality or grain argument wrote them. The placeholders in each prompt list the minimum inputs.

Prompts are the starting line. Tutorials are the finish.

A growing library of 300+ hands-on tutorials on ChatGPT, Claude, Midjourney, and 50+ AI tools. New tutorials added every week.

7-day free trial. Cancel anytime.