5 quick tips for AI-assisted schema design

August 29, 2025
ai
schema-design

A handful of prompts and patterns that make AI help more useful when designing schemas.

5 quick tips for AI-assisted schema design

Here are five prompts and patterns we’ve found helpful when collaborating with AI on schema design:

  1. "Propose indexes for these query patterns" — paste a few representative queries and ask for specific index suggestions.
  2. "Spot potential N+1 issues" — let the model point out places where an extra join table or denormalization helps.
  3. "Draft a migration plan" — ask for an ordered set of steps, including backfill, validation, and rollback notes.
  4. "Compare Prisma and SQL" — generate a Prisma version and a SQL version and diff the trade-offs.
  5. "Explain in plain English" — request short summaries for teammates who aren’t deep in the schema.

Use these as starting points and adapt to your domain.