AI Prompts for Data Modeling

Five paste-ready AI prompts for data modeling: stories to ERD, record shape, migration, drift.

Syntax

design-and-specify
1 NOUNS        stories -> nouns sorted into entity / event /
                attribute / role / reference set; relationships as sentences
2 LOGICAL      conceptual -> logical ERD in Mermaid: identifiers as PK,
                both relationship sentences, 3NF, derived marked,
                STATED / ASSUMED labels
3 SHAPE        review for: identity + history in one row, two owners on
                one field, facts stored twice
4 MIGRATION    APPROVED logical -> migration that names its entity;
                add nothing that is not in the model
5 DRIFT        live schema vs dictionary: missing entries, missing tables,
                mismatches, row level security off

Rule: the AI drafts, a person approves, the spec wins.

Example

design-and-specify
PROMPT 4 (MIGRATION), abridged
  Generate a Postgres migration from the APPROVED logical model below.
  - First line: a comment naming the entity this migration builds.
  - uuid PKs; each business identifier kept as a UNIQUE column.
  - FKs on the many side, ON DELETE chosen explicitly and explained.
  - Index every FK. Rules become CHECKs. Derived attributes become views.
  - Enable row level security; one policy per operation;
    append-only tables get no UPDATE or DELETE policy.
  Do not add any table, column or relationship that is not in the model.
  If you think one is missing, stop and list it as a question.