DB decisions for AI builders
A teaching workbench, not a slide deck

The database talk your builders actually need.

Three questions come up in every AI-builder community: "when should I use Supabase?", "why can't Claude Code just make structured data for me?", and "Postgres vs NoSQL, and why should I care?" This page answers all three in plain language, and each answer runs live so a non-technical founder can see the reasoning, not just take my word for it.

Every explanation here is framed around how AI changes the workflow, because that is how people actually build now.

01

"When should I use Supabase?"

The honest first move is not to answer. It is to ask four questions, because "Supabase" is rarely the real question. The real question is "what kind of database do I even need?" Answer below and the engine recommends one, tells you why in plain words, and hands you the exact thing to tell your AI assistant.

Decision engineanswer 4 questions, it recomputes live
Try a founder:
02

"Why can't Claude Code just make structured data for me?"

Because "structured" is a decision, not a default. Below is one messy spreadsheet of orders. Watch it get normalized step by step, recomputed in your browser from that same data. The point a founder feels at the end: the shape is what stops your app from telling two different truths about the same customer.

Normalization, livesame rows, four stages
Update-anomaly test: changes their email. How many rows must you edit?
03

Summary tables: the difference between "instant" and "timed out"

Same question, two ways to answer it: "total revenue per product." One scans every raw sale. The other reads a small pre-aggregated table. The rows-scanned number is exact and computed below; the timing is measured in your browser right now. This is the optimization AI will not add unless you know to ask for it.

Raw scan vs summary tablegenerating sales...
Raw sales rows
0
Summary rows
0
Fewer rows to read
0x
Scan every raw saleidle
rows read: 0
SELECT product, SUM(amount)
FROM sales
GROUP BY product;   // reads all rows, every time
Read the summary tableidle
rows read: 0
SELECT product, SUM(total)
FROM product_daily_totals
GROUP BY product;   // reads the small rollup
Both queries return the identical totals (the self-test proves it). The summary table just answers the everyday question by reading far fewer rows. The catch a founder should learn: a summary table is a copy, so you have to keep it fresh. That trade, fresh-enough vs fast, is the actual engineering judgment.
04

The three questions, answered like a person

The short versions, in the plain language I would use on a call. Each ends with the one sentence to hand your AI assistant, because framing the ask correctly is half of getting good structured output.

QWhen should I use Supabase?

When you need a real relational database with an easy on-ramp: rows and columns, relationships between things, and you would rather not run servers. Supabase is Postgres with the annoying parts handled. Reach for it when a spreadsheet has started to hurt and you have real users. Do not reach for it to store a to-do list you could keep in a Google Sheet.

Tell your AI: "Use Supabase Postgres. Here is my schema as CREATE TABLE statements. Keep every query consistent with it."
QWhy can't Claude Code just make structured data for me?

It can, once you have decided the shape. From a vague prompt it has to guess whether a customer is one thing or five, and guesses drift row to row. Give it the tables and the keys and it becomes very good at filling them. Structure is a decision you make; the AI is the fast hands, not the architect.

Tell your AI: "Here are my tables and their keys. Generate data that respects them. Never invent a column."
QPostgres vs NoSQL, and why should I care?

Postgres wants a shape up front and rewards you with joins, consistency, and one source of truth. NoSQL (Mongo, DynamoDB) lets you throw in flexible documents and scales writes hard, but you carry the consistency yourself. Most founders building a normal app want Postgres. You care because switching later is a rebuild, not a setting.

Tell your AI: "Default to Postgres unless I ask otherwise. Flag anything that would be simpler as a document."
QSo do I even need a database yet?

Often, no. If it is a list you read a few times a day, a spreadsheet or Airtable is the right database, and outgrowing it is a good problem you will feel clearly. The skill I teach is not "always use Postgres." It is knowing which tier of tool matches the job, and when the pain tells you to move up.

Tell your AI: "Recommend the smallest tool that fits. Tell me the signal that means I have outgrown it."
05

Do not take the page's word for it

Every headline number on this page comes from a computation, not from copy I typed. This button re-runs those computations from the raw data embedded in the page and checks each claim. It can fail, and it says exactly what it checked.

In-browser self-testrecomputes from raw inputs, asserts each claim
not run yet