A woman at a desk working on a large monitor, with a phone and a second screen beside her, banner image on the Design a database that survives growth page

Playbook - Build suite - About 3 hours

Design a database that survives growth

The intended result: A schema you will not have to migrate painfully when the app gets real users.

What you can do

The free tools in this guide open right here on this site. For PostgreSQL and Supabase you work in those services' own dashboards, because that part is done in the service itself. Where a step asks you to check or test something, you do it yourself.

At a glance

TimeAbout 3 hours
Steps5 steps, in order
Free tools usedDatabase Schema Designer, SQL Query Builder, JSON Data Studio
Outside servicesPostgreSQL, Supabase
What you end withA documented schema with keys, timestamps, and indexes matched to the app's real query patterns.

The steps

Steps that use the free tools run in your browser. Steps that involve an outside service are done in that service's own dashboard in that service's own dashboard.

Step 1

List the five questions the app asks of its data most often - the schema serves those, not an imagined future.

Step 2

Model entities and relationships with database-schema-designer and check every relationship for the orphaned-record question: what happens when the parent is deleted.

Step 3

Add the boring-but-essential columns now: created_at, updated_at, and a real primary key on every table.

Step 4

Write the three most common queries in sql-query-builder and confirm each can use an index.

Step 5

Export the schema documentation so the next person (or agent) does not have to reverse-engineer it.

The result

A documented schema with keys, timestamps, and indexes matched to the app's real query patterns.

The tools this uses

Database Schema Designer · SQL Query Builder · JSON Data Studio - all free, no account needed for the tools themselves.

Connectors used

Postgres · Supabase

All playbooks The Build suite

Each step in detail

What to do at each step, and which free tool does the work.

Step 1 of 5

List the five questions the app asks of its data most often - the schema serves those, not an imagined future.

This step is done by you, in the service's own dashboard where one is involved. Write down what you decided so the next step has something to start from.

Step 2 of 5

Model entities and relationships with database-schema-designer and check every relationship for the orphaned-record question: what happens when the parent is deleted.

Use Database Schema Designer. Describe tables in plain text. Get CREATE TABLE SQL for PostgreSQL, MySQL or SQLite, a relationship diagram and a data dictionary.

Step 3 of 5

Add the boring-but-essential columns now: created_at, updated_at, and a real primary key on every table.

This step is done by you, in the service's own dashboard where one is involved. Write down what you decided so the next step has something to start from.

Step 4 of 5

Write the three most common queries in sql-query-builder and confirm each can use an index.

Use SQL Query Builder. Build SELECT queries visually - tables, columns, joins, filters, ordering, limits - and copy the SQL.

Visual table and column picking: Name your tables and columns; the SELECT and FROM clauses assemble as you work. Joins by matching keys: Add a second table and the likely join condition is proposed from column names; edit it inline.

Step 5 of 5

Export the schema documentation so the next person (or agent) does not have to reverse-engineer it.

This step is done by you, in the service's own dashboard where one is involved. Write down what you decided so the next step has something to start from.

The free tools, closer up

Every tool runs in your browser and needs no account.

Database Schema Designer

Type table names and fields such as email: string(200) required unique. The tool writes the CREATE TABLE statements for your dialect, works out foreign keys from names like customer_id or from an arrow, orders the tables so references exist when they are created, draws the relationships, and produces a Markdown data dictionary. Problems are listed with the line they came from. Everything runs in your browser. Nothing is uploaded.

    SQL Query Builder

    Pick the tables, tap the columns, set the filters. Clean, correct SQL assembles itself as you work, with joins wired by matching key names.

    • Visual table and column picking. Name your tables and columns; the SELECT and FROM clauses assemble as you work.
    • Joins by matching keys. Add a second table and the likely join condition is proposed from column names; edit it inline.
    • Filters, order, limits. WHERE conditions, ORDER BY and LIMIT are guided fields, not syntax you recall.
    • Dialect-clean output. Standard SQL that runs on Postgres, MySQL and SQLite, with identifiers quoted only when needed.

    Real output from the tool

    YOU ENTER:
    Input
    users: id, name, email, created_at
    orders: id, user_id, total, status
    From
    users
    Input
    orders
    Input
    orders.user_id = users.id
    Input
    orders.status
    Input
    =
    Input
    'shipped'
    Order by
    orders.created_at DESC
    Limit
    100
    
    THE TOOL RETURNS:
    SELECT
    users.name,
    orders.total
    FROM users
    JOIN orders ON orders.user_id = users.id;

    JSON Data Studio

    Paste JSON and learn what is wrong with it, down to the line and column. Repair the usual mistakes with a visible list of every change. Then query it, browse it as a tree or a table, infer a schema, flatten it for a spreadsheet or a config file, and export. Everything runs in your browser. Nothing is uploaded or saved.

      Outside services in this playbook

      Each connector page states what it does.

      PostgreSQL

      Uses:

      • Slow-query reports compile weekly with indexes suggested.
      • Schema changes diff into a migration review note.
      • Table-growth anomalies alert before disk pressure.

      Do this part in PostgreSQL itself.

      Supabase

      Uses:

      • New rows in a signup table start the onboarding playbook.
      • Edge-function errors file triage entries nightly.
      • Database backups verify on a schedule with a pass/fail note.

      Do this part in Supabase itself.

      Questions

      How long does "Design a database that survives growth" take?

      Plan for about 3 hours. It has 5 steps and you can stop after any of them and pick up later.

      Do I need an account?

      No account is needed for the free tools in this playbook. They run in your browser.

      What do I end up with?

      A documented schema with keys, timestamps, and indexes matched to the app's real query patterns.

      Which steps need an outside service?

      Steps that involve PostgreSQL, Supabase are done in that service itself, because that part is done in the service itself.

      Can I skip a step?

      You can, but the steps are in the order they are because each uses the output of the one before. The first step is: List the five questions the app asks of its data most often - the schema serves those, not an imagined future.

      SQL Query Builder: Which dialects?

      Standard SQL output that runs on Postgres, MySQL, SQLite and SQL Server with at most identifier-quote tweaks.

      SQL Query Builder: INSERT/UPDATE?

      The builder focuses on SELECT, the query people reach for help with. Write-side statements are on the roadmap.

      Related playbooks

      A wooden desk with glasses, a coffee cup, a plant and the edge of a laptop, banner image on the Design a database that survives growth page

      Try it.

      Open the free tools this playbook uses, or pick another goal.

      In depth

      This guide on one page, with everything in order

      Design a database that survives growth has 5 steps. This part lays them out in one place with the tools and services each step uses, taken from the guide itself.

      Overview

      The page at a glance

      Design a database thatsurvives growthThe wholeplan on onesheetThe freetools in thisguide, one byoneThe outsideservices, andwhat eachconnectordoesDatabase Schema DesignerfeaturesDatabaseSchemaDesigner:What isinside thetoolDatabaseSchemaDesigner:What eachpart on thetool pageDatabaseSchemaDesigner:Things thatmake a schemafail orThis guideon one pageTHIS PAGE
      Parts: The shape of "Design a database that survives growth", The whole plan on one sheet, The free tools in this guide, one by one, The outside services, and what each connector does, Database Schema Designer: what it can do for this guide, Database Schema Designer: What is inside the tool, Database Schema Designer: What each part on the tool page tells you, Database Schema Designer: Things that make a schema fail or behave oddly
      1At a glanceBuild suite - About 3 hours.2One sheetEvery step from this playbook in onetable, with the tool or place where eachstep happens.3Free toolsEach tool runs in your browser and needsno account. The table says what each onedoes and what it gives you.4Outside servicesThese steps happen in the serviceitself. The connector pages say whateach connector does.5Tool by toolThe facts below are taken from theDatabase Schema Designer page itself.6MoreThis comes from the Database SchemaDesigner page.7MoreThis comes from the Database SchemaDesigner page.IN ORDER
      What each part tells you, in order

      At a glance

      The shape of "Design a database that survives growth"

      Build suite - About 3 hours. The intended result: A schema you will not have to migrate painfully when the app gets real users.

      5steps, in order
      3free tools used
      2outside services
      3 hoursto do it
      List the five questions the app asks of its data most oftenModel entities and relationships with database-schema-designer and check every relationship for the orphaned-record questionAdd the boring-but-essential columns nowWrite the three most common queries in sql-query-builder and confirm each can use an indexExport the schema documentation so the next person (or agent) does not have to reverse-engineer it
      Steps5Free tools3Outside services2Steps using a tool2Steps done by you3
      List the fivequestions the appasks of its datamost oftenModel entities andrelationships withdatabase-schema-designerand check everyrelationship forthe orphaned-recordAdd theboring-but-essentialcolumns nowWrite the threemost common queriesinsql-query-builderand confirm eachcan use an indexExport the schemadocumentation sothe next person (oragent) does nothave toreverse-engineer itPATH
      In order: List the five questions the app asks of its data most often then Model entities and relationships with then Add the boring-but-essential columns now then Write the three most common queries in sql-query-builder then Export the schema documentation so the next person (or
      Hands typing on a laptop at a wooden desk beside a notebook and a mug, banner image on the Design a database that survives growth page

      01 / 22

      01 / 22

      Build suite - About 3 hours

      The intended result: A schema you will not have to migrate painfully when the app gets real users.

      One sheet

      The whole plan on one sheet

      Step 1WHAT TO DOList the five questions the app asks ofits data most often - the schema servesthose, not an imagined future.WHERE IT HAPPENSYou, in the service's own dashboardROW
      Row: Step 1

      Every step from this playbook in one table, with the tool or place where each step happens.

      StepWhat to doWhere it happens
      Step 1List the five questions the app asks of its data most often - the schema serves those, not an imagined future.You, in the service's own dashboard
      Step 2Model entities and relationships with database-schema-designer and check every relationship for the orphaned-record question: what happens when the parent is deleted.Database Schema Designer
      Step 3Add the boring-but-essential columns now: created_at, updated_at, and a real primary key on every table.You, in the service's own dashboard
      Step 4Write the three most common queries in sql-query-builder and confirm each can use an index.SQL Query Builder
      Step 5Export the schema documentation so the next person (or agent) does not have to reverse-engineer it.You, in the service's own dashboard
      Step 2WHAT TO DOModel entities and relationships withdatabase-schema-designer and check everyrelationship for the orphaned-recordquestion.WHERE IT HAPPENSDatabase Schema DesignerROW
      Row: Step 2
      Step 3WHAT TO DOAdd the boring-but-essential columnsnow: created_at, updated_at, and a realprimary key on every table.WHERE IT HAPPENSYou, in the service's own dashboardROW
      Row: Step 3
      Step 4WHAT TO DOWrite the three most common queries insql-query-builder and confirm each canuse an index.WHERE IT HAPPENSSQL Query BuilderROW
      Row: Step 4
      Step 5WHAT TO DOExport the schema documentation so thenext person (or agent) does not have toreverse-engineer it.WHERE IT HAPPENSYou, in the service's own dashboardROW
      Row: Step 5
      List the fivequestions theapp asks of itsdata most often- the schemaserves those,not an imaginedfuture.Model entitiesandrelationshipswithdatabase-schema-designerand check everyrelationship fortheorphaned-recordquestion: whathappens when theparent isdeleted.Add theboring-but-essentialcolumns now:created_at,updated_at, anda real primarykey on everytable.Write the threemost commonqueries insql-query-builderand confirm eachcan use anindex.Export theschemadocumentation sothe next person(or agent) doesnot have toreverse-engineerit.Step 1Step 2Step 3Step 4Step 5MATRIX
      Who or what does each row: List the five questions the app asks of its data most often - the schema serves those, not an imagined future., Model entities and relationships with database-schema-designer and check every relationship for the orphaned-record question: what happens when the parent is deleted., Add the boring-but-essential columns now: created_at, updated_at, and a real primary key on every table., Write the three most common queries in sql-query-builder and confirm each can use an index., Export the schema documentation so the next person (or agent) does not have to reverse-engineer it.
      You, in the service's owndashboardDatabase Schema DesignerSQL Query BuilderStep 1Step 2Step 3Step 4Step 5MATRIX
      Who or what does each row: You, in the service's own dashboard, Database Schema Designer, SQL Query Builder
      3You, in the service's owndashboard1Database Schema Designer1SQL Query BuilderTALLY
      Tally by where it happens: You, in the service's own dashboard, Database Schema Designer, SQL Query Builder
      1Step 1List the five questions the app asks ofits data most often - the schema servesthose, not an imagined future.2Step 2Model entities and relationships withdatabase-schema-designer and check everyrelationship for the.3Step 3Add the boring-but-essential columnsnow: created_at, updated_at, and a realprimary key on every table.4Step 4Write the three most common queries insql-query-builder and confirm each canuse an index.5Step 5Export the schema documentation so thenext person (or agent) does not have toreverse-engineer it.INDEX
      Index: Step 1, Step 2, Step 3, Step 4, Step 5
      Step 1Step 2Step 3Step 4Step 5The wholeplan on onesheetMAP
      Map: Step 1, Step 2, Step 3, Step 4, Step 5
      Hands holding a smartphone above a laptop on a wooden table, banner image on the Design a database that survives growth page

      02 / 22

      02 / 22

      The result you are working toward

      A schema you will not have to migrate painfully when the app gets real users.

      Free tools

      The free tools in this guide, one by one

      DatabaseSchemaDesignerWHAT IT DOESType table names and fields such asemail: string(200) required unique.WHAT IS INSIDEROW
      Row: Database Schema Designer

      Each tool runs in your browser and needs no account. The table says what each one does and what it gives you.

      Database Schema Designer0SQL Query Builder4JSON Data Studio0
      ToolWhat it doesWhat is inside
      Database Schema DesignerType table names and fields such as email: string(200) required unique. The tool writes the CREATE TABLE statements for your dialect, works out foreign keys from names like customer_id or from an arrow, orders the tables so references exist when they are created, draws the relationships, and produces a Markdown data dictionary. Problems are listed with the line they came from. Everything runs in your browser. Nothing is uploaded.
      SQL Query BuilderPick the tables, tap the columns, set the filters. Clean, correct SQL assembles itself as you work, with joins wired by matching key names.Visual table and column picking. Name your tables and columns; the SELECT and FROM clauses assemble as you work. Joins by matching keys. Add a second table and the likely join condition is proposed from column names; edit it inline. Filters, order, limits. WHERE conditions, ORDER BY and LIMIT are guided fields, not syntax you recall. Dialect-clean output. Standard SQL that runs on Postgres, MySQL and SQLite, with identifiers quoted only when needed.
      JSON Data StudioPaste JSON and learn what is wrong with it, down to the line and column. Repair the usual mistakes with a visible list of every change. Then query it, browse it as a tree or a table, infer a schema, flatten it for a spreadsheet or a config file, and export. Everything runs in your browser. Nothing is uploaded or saved.
      SQL QueryBuilderWHAT IT DOESPick the tables, tap the columns, setthe filters. Clean, correct SQLassembles itself as you work, with joinswired by matching key names.WHAT IS INSIDEVisual table and column picking.ROW
      Row: SQL Query Builder
      JSON DataStudioWHAT IT DOESPaste JSON and learn what is wrong withit, down to the line and column.WHAT IS INSIDEROW
      Row: JSON Data Studio
      1Visual table andcolumn pickingName your tables and columns; the SELECTand FROM clauses assemble as you work.2Joins by matchingkeysAdd a second table and the likely joincondition is proposed from column names;edit it inline.3Filters, order,limitsWHERE conditions, ORDER BY and LIMIT areguided fields, not syntax you recall.4Dialect-clean outputStandard SQL that runs on Postgres,MySQL and SQLite, with identifiersquoted only when needed.INSIDE THE TOOL
      SQL Query Builder: Visual table and column picking, Joins by matching keys, Filters, order, limits, Dialect-clean output
      Type table names and fieldssuch as email: string(200)required unique. The toolwrites the CREATE TABLEstatements for your dialect,works out foreign keys fromnames like customer_id orfrom an arrow, orders thetables so references existwhen they are created, drawsthe relationships, andproduces a Markdown datadictionary. Problems arelisted with the line theycame from. Everything runsin your browser. Nothing isuploaded.Pick the tables, tap thecolumns, set the filters.Clean, correct SQL assemblesitself as you work, withjoins wired by matching keynames.Paste JSON and learn what iswrong with it, down to theline and column. Repair theusual mistakes with avisible list of everychange. Then query it,browse it as a tree or atable, infer a schema,flatten it for a spreadsheetor a config file, andexport. Everything runs inyour browser. Nothing isuploaded or saved.Database Schema DesignerSQL Query BuilderJSON Data StudioMATRIX
      Who or what does each row: Type table names and fields such as email: string(200) required unique. The tool writes the CREATE TABLE statements for your dialect, works out foreign keys from names like customer_id or from an arrow, orders the tables so references exist when they are created, draws the relationships, and produces a Markdown data dictionary. Problems are listed with the line they came from. Everything runs in your browser. Nothing is uploaded., Pick the tables, tap the columns, set the filters. Clean, correct SQL assembles itself as you work, with joins wired by matching key names., Paste JSON and learn what is wrong with it, down to the line and column. Repair the usual mistakes with a visible list of every change. Then query it, browse it as a tree or a table, infer a schema, flatten it for a spreadsheet or a config file, and export. Everything runs in your browser. Nothing is uploaded or saved.
      Visual table and column picking. Name yourtables and columns; the SELECT and FROMclauses assemble as you work. Joins bymatching keys. Add a second table and thelikely join condition is proposed fromcolumn names; edit it inline. Filters,order, limits. WHERE conditions, ORDER BYand LIMIT are guided fields, not syntaxyou recall. Dialect-clean output. StandardSQL that runs on Postgres, MySQL andSQLite, with identifiers quoted only whenneeded.Database Schema DesignerSQL Query BuilderJSON Data StudioMATRIX
      Who or what does each row: , Visual table and column picking. Name your tables and columns; the SELECT and FROM clauses assemble as you work. Joins by matching keys. Add a second table and the likely join condition is proposed from column names; edit it inline. Filters, order, limits. WHERE conditions, ORDER BY and LIMIT are guided fields, not syntax you recall. Dialect-clean output. Standard SQL that runs on Postgres, MySQL and SQLite, with identifiers quoted only when needed.
      1Database SchemaDesignerType table names and fields such asemail: string(200) required unique.2SQL Query BuilderPick the tables, tap the columns, setthe filters.3JSON Data StudioPaste JSON and learn what is wrong withit, down to the line and column.INDEX
      Index: Database Schema Designer, SQL Query Builder, JSON Data Studio
      A laptop in the dark with a rainbow-colored glow along its keyboard, banner image on the Design a database that survives growth page

      03 / 22

      03 / 22

      Where each step begins

      List the five questions the app asks of its data most often - the schema serves those, not an imagined future.

      Outside services

      The outside services, and what each connector does

      These steps happen in the service itself. The connector pages say what each connector does.

      ServiceWhat the connector does
      PostgreSQLSlow-query reports compile weekly with indexes suggested. Schema changes diff into a migration review note. Table-growth anomalies alert before disk pressure. Do this part in PostgreSQL itself.
      SupabaseNew rows in a signup table start the onboarding playbook. Edge-function errors file triage entries nightly. Database backups verify on a schedule with a pass/fail note. Do this part in Supabase itself.
      1PostgreSQLSlow-query reports compile weekly withindexes suggested.2SupabaseNew rows in a signup table start theonboarding playbook.IN ORDER
      In order: PostgreSQL, Supabase
      A laptop and a tablet showing photo grids on a desk, with headphones and a branch in a vase, banner image on the Design a database that survives growth page

      04 / 22

      04 / 22

      Done in the service itself

      Add the boring-but-essential columns now: created_at, updated_at, and a real primary key on every table.

      Tool by tool

      Database Schema Designer: what it can do for this guide

      The facts below are taken from the Database Schema Designer page itself. They are what the tool does, in the order the page lists them.

      Is my schema uploaded?
      No. Parsing, generating and drawing run in your browser tab.
      Why is a foreign key missing?
      The field name must be the table name plus _id, such as customer_id, or use ->customer. The table must exist in your text.
      Why is my table name in quotes?
      It is a reserved word in at least one dialect, such as order, user or group. Quoting keeps the SQL valid. A different name avoids the problem.
      Why does my field named id disappear?
      Every table already has an id primary key, so the extra one is skipped with a warning.
      Can I run the SQL as is?
      Read it first and try it on a test database of your version.
      Data Dedupe Cleaner
      Remove duplicate rows from a CSV or a list.
      Is my schema uploaded?Why is aforeign keymissing?Why is mytable name inquotes?Why does my field named iddisappear?Can I run theSQL as is?Data DedupeCleanerDatabaseSchemaDesignerfeaturesMAP
      Map: Is my schema uploaded?, Why is a foreign key missing?, Why is my table name in quotes?, Why does my field named id disappear?, Can I run the SQL as is?, Data Dedupe Cleaner
      People working together around a table with laptops, notebooks and drinks, banner image on the Design a database that survives growth page

      05 / 22

      05 / 22

      The facts below are taken from the Database Schema Designer page itself

      They are what the tool does, in the order the page lists them.

      More

      Database Schema Designer: What is inside the tool

      This comes from the Database Schema Designer page.

      Plain-text input
      A line with no colon starts a table. Fields are name:type with optional words: required, unique, index, default=VALUE and an arrow ->table for a foreign key. Comments start with #.
      Three dialects
      PostgreSQL, MySQL and SQLite. Types, auto-increment, UUID defaults, booleans, timestamps and identifier quoting change with the dialect. Reserved words such as order and user are quoted for you, with a warning.
      Foreign keys
      A field named customer_id points at the customer table when it exists. An arrow, ->customer or ->customer.code, sets it directly. The column takes the type of the key it points at. A foreign key to a column that is not unique is flagged.
      Order and loops
      Tables are written so that referenced tables come first. If two tables refer to each other, the loop is reported and the foreign key is added with ALTER TABLE afterwards (SQLite accepts it inside CREATE TABLE).
      Primary keys and options
      An id primary key on every table: auto-increment integer or UUID. Optional created_at and updated_at, optional index on foreign key columns, and a delete rule: cascade, set null or restrict.
      Relationship diagram
      Boxes for tables, a line for each foreign key, drawn as SVG you can download. Self-references and loops are drawn.
      Plain-text inputThreedialectsForeign keysOrder and loopsPrimary keysand optionsRelationshipdiagramDatabaseSchemaDesigner:What isMAP
      Map: Plain-text input, Three dialects, Foreign keys, Order and loops, Primary keys and options, Relationship diagram

      More

      Database Schema Designer: What each part on the tool page tells you

      This comes from the Database Schema Designer page.

      The summary line
      Tables, columns and foreign keys it found. If a foreign key you expected is missing, the name did not match a table or the arrow was misspelled. See the list under it.
      The warnings
      Each says which line and what it did instead, for example "unknown type, used text". When any part differs from what you wrote, a yellow box under the SQL lists each one and says to resolve them before you run it, and the SQL starts with a comment saying so.
      The diagram
      A line runs from the foreign key column to the id it points at. The filled dot is at the table being pointed at.
      The dictionary
      Use it as documentation. Required, unique and indexed show in the Rules column.
      The summary lineThe warningsThe diagramThedictionaryDatabaseSchemaDesigner:What eachMAP
      Map: The summary line, The warnings, The diagram, The dictionary

      More

      Database Schema Designer: Things that make a schema fail or behave oddly

      This comes from the Database Schema Designer page.

      A foreign key to a column that is not unique
      The database rejects it. The tool does not write that foreign key. It tells you and leaves the column plain until you mark the target column unique.
      Required column with delete rule set null
      Deleting the parent would have to write null into a column that cannot be null. The tool writes that foreign key without a delete rule and says so.
      Index or unique rule on TEXT in MySQL
      MySQL needs a length to index TEXT and JSON. The rule is left out with a note. Use string(n).
      Defaults that do not fit the type
      default=abc on an int, or a number on a bool. They are skipped with a warning instead of producing SQL that fails.
      Index names that collide
      Index names are unique across a schema, and a_b with column c and a with column b_c both want idx_a_b_c. The tool numbers the second.
      Reserved words as names
      order, user, group and key need quoting. The tool quotes them and warns.
      A foreign key to a columnthat is not uniqueRequiredcolumn withdelete ruleset nullIndex orunique ruleon TEXT inMySQLDefaults that do not fitthe typeIndex namesthat collideReservedwords asnamesDatabaseSchemaDesigner:Things thatMAP
      Map: A foreign key to a column that is not unique, Required column with delete rule set null, Index or unique rule on TEXT in MySQL, Defaults that do not fit the type, Index names that collide, Reserved words as names

      Steps

      Database Schema Designer: the steps, in order

      The steps are taken from the Database Schema Designer page.

      Type or paste your tables
      Type or paste your tables, or click Sample and edit it.
      Pick the dialect
      Pick the dialect and the primary key style.
      Read the warnings. Fix the
      Read the warnings. Fix the lines they name.
      Check the SQL tab
      Check the SQL tab and the diagram. Switch dialects to compare.
      Copy or download the SQL
      Copy or download the SQL, the SVG or the Markdown. Test the SQL on your database version before using real data.
      Type or paste your tablesPick thedialectRead thewarnings. FixtheCheck the SQLtabCopy ordownload theSQLDatabaseSchemaDesignerstepsMAP
      Map: Type or paste your tables, Pick the dialect, Read the warnings. Fix the, Check the SQL tab, Copy or download the SQL

      Limits

      Database Schema Designer: what it cannot do

      These limits are stated on the Database Schema Designer page.

      One column keys only
      Every table gets a single id primary key. There are no composite primary keys, composite unique constraints or composite foreign keys.
      No many-to-many shortcut
      Write the join table yourself, like order_line in the sample.
      No CHECK constraints, enums or partial indexes
      Add them to the SQL by hand.
      Updated-at triggers
      updated_at gets a default only. Refreshing it on update needs a trigger, which the tool does not write.
      Not a migration tool
      It writes CREATE statements for a new schema. It does not read an existing database or write ALTER scripts to change one.
      Versions
      The output for the sample and the edge cases was run on MySQL 8.4.3, SQLite and PostgreSQL (PGlite 0.6.1, PostgreSQL compiled to WebAssembly). Your version may differ. For example gen_random_uuid() needs PostgreSQL 13 or the pgcrypto extension, and DEFAULT (UUID()) needs MySQL 8.0.13 or later.
      One column keys onlyNomany-to-manyshortcutNo CHECKconstraints,enums orpartialindexesUpdated-at triggersNot amigrationtoolVersionsDatabaseSchemaDesignerlimitsMAP
      Map: One column keys only, No many-to-many shortcut, No CHECK constraints, enums or partial indexes, Updated-at triggers, Not a migration tool, Versions

      Tool by tool

      SQL Query Builder: what it can do for this guide

      The facts below are taken from the SQL Query Builder page itself. They are what the tool does, in the order the page lists them.

      Visual table and column picking
      Name your tables and columns; the SELECT and FROM clauses assemble as you work. Or describe the query in plain English and get a SELECT written against your schema.
      Joins by matching keys
      Add a second table and the likely join condition is proposed from column names; edit it inline.
      Filters, order, limits
      WHERE conditions, ORDER BY and LIMIT are guided fields, not syntax you recall.
      Dialect-clean output
      Choose Postgres/SQLite, MySQL or SQL Server: identifiers are quoted the right way and LIMIT becomes TOP where needed.
      Plain English in, SQL checked
      Describe the result in a sentence and the assistant drafts the SELECT, checked against the tables and columns you defined. SELECT only, by rule.
      Three dialects out
      Standard (Postgres and SQLite), MySQL or SQL Server. Identifiers quote and limits phrase the way the dialect expects.
      Joins by matching keys
      Add a join by picking two tables and the columns that match. The ON clause writes itself.
      Seven comparison operators
      Equals, not equals, greater, less, at-least, at-most and LIKE cover the filters real reporting needs.
      Visual table and columnpickingJoins bymatching keysFilters,order, limitsDialect-cleanoutputPlain English in, SQLcheckedThreedialects outJoins bymatching keysSevencomparisonoperatorsSQL QueryBuilderfeaturesMAP
      Map: Visual table and column picking, Joins by matching keys, Filters, order, limits, Dialect-clean output, Plain English in, SQL checked, Three dialects out, Joins by matching keys, Seven comparison operators

      Questions

      SQL Query Builder: what people ask before using it

      These answers come from the SQL Query Builder page.

      Which dialects?
      Standard SQL output that runs on Postgres, MySQL, SQLite and SQL Server with at most identifier-quote tweaks.
      INSERT/UPDATE?
      The builder focuses on SELECT, the query people reach for help with. Write-side statements are not covered.
      Is my schema uploaded?
      No. Everything assembles in your browser tab.
      Can it UPDATE or DELETE?
      No. The builder and the assistant produce SELECT queries only. Reading data is the job; changing it stays in your hands.
      Which dialects are supported?
      Standard SQL as Postgres and SQLite read it, plus MySQL and SQL Server variants for quoting and row limits.
      Does it connect to my database?
      No. It never sees your data. You describe the schema by typing table and column names, and the SQL builds locally.
      Which dialects?INSERT/UPDATE?Is my schemauploaded?Can it UPDATE or DELETE?Whichdialects aresupported?Does itconnect to mydatabase?SQL QueryBuilderquestionsMAP
      Map: Which dialects?, INSERT/UPDATE?, Is my schema uploaded?, Can it UPDATE or DELETE?, Which dialects are supported?, Does it connect to my database?

      Tool by tool

      JSON Data Studio: what it can do for this guide

      The facts below are taken from the JSON Data Studio page itself. They are what the tool does, in the order the page lists them.

      The status line
      "Valid JSON" with the size in bytes, or the error with its line and column. When it is not valid, the repair row lists every change it would make before you accept any of them.
      Tree, Query, Table, Schema, Stats
      Tree shows the structure. Query shows "N results" for your path. Table lays an array of objects out in columns. Schema and Stats describe what is in the data you pasted.
      Schema is inferred
      It describes the sample you pasted, not every document your system may produce. A field missing in the sample will be missing from the schema.
      Exports
      The CSV is built from the rows and columns of the Table tab. The box "Protect CSV from spreadsheet formulas" is ticked by default, so a cell that starts with =, +, - or @ gets a leading apostrophe and a spreadsheet will not run it as a formula. That changes the cell text. Untick the box if you need the raw values. Nothing is saved or sent.
      Trusting a repair without reading it
      Pressing Repair on {a:1,'b':True,c:None,d:[1,2,],} fixes it, and the note lists what changed: trailing commas, single quotes, unquoted keys, Python values, comments. A repair makes the text valid, not correct. Check the list against what you meant.
      Duplicate keys
      {"a":1,"a":2} is valid JSON, and parsers keep the last value. The tool names each duplicated key and its path so the first value is not lost without notice.
      Long numbers in ids
      12345678901234567890 stays exact in every view and export, so you can query and export it as a number. Past the stated limits (exponents over 9 digits, numbers over 10,000 digits) the tool shows the limit and produces no views or exports, so nothing is rounded.
      Query syntax from other tools
      Paths like $.a[0].b, $.a[*].b, $..b, $.a[-1], $.a[0:1] and filters such as $.a[?(@.b>1)] work. A form it does not support, such as $.a[b=2], gives an error naming the position instead of an empty result.
      The status lineTree, Query,Table,Schema, StatsSchema isinferredExportsTrusting a repair withoutreading itDuplicatekeysLong numbersin idsQuery syntaxfrom othertoolsJSON DataStudiofeaturesMAP
      Map: The status line, Tree, Query, Table, Schema, Stats, Schema is inferred, Exports, Trusting a repair without reading it, Duplicate keys, Long numbers in ids, Query syntax from other tools

      More

      JSON Data Studio: What is inside the tool

      This comes from the JSON Data Studio page.

      Strict validation with a location
      The scanner follows the JSON grammar and reports the line and column, what it expected, and the line with a marker under the problem.
      Repair with a change list
      One button fixes trailing commas, single quotes, unquoted keys, Python True, False and None, and comments. It tells you exactly what it changed, for example "2 trailing commas removed", and asks you to check the result. It never changes the data silently.
      Duplicate keys
      Most parsers keep the last value and drop the rest without a word. The studio lists each duplicated key and its path before you rely on the data.
      Format, minify, sort, escape
      Two spaces, four spaces or tabs. Sort keys at every depth. Escape a document into a JSON string and unescape it back, handy for payloads stored inside other payloads.
      Query with a JSONPath subset
      Use $.users[?(@.logins > 10)].name, slices like [0:2], negative indexes, wildcards, recursive ..key and filters with and, or and comparisons. No code is evaluated. Plain paths such as users[0].name also work.
      Tree, table, schema, stats
      Click a tree node to query it. Arrays of objects become a sortable, filterable table with CSV export. Infer a JSON Schema or TypeScript types, or read counts of keys, depth and value types.
      Strict validation with alocationRepair with achange listDuplicatekeysFormat, minify, sort,escapeQuery with aJSONPathsubsetTree, table,schema, statsJSON DataStudio: Whatis insidethe toolMAP
      Map: Strict validation with a location, Repair with a change list, Duplicate keys, Format, minify, sort, escape, Query with a JSONPath subset, Tree, table, schema, stats

      More

      JSON Data Studio: What each readout means

      This comes from the JSON Data Studio page.

      The status line
      "Valid JSON" with the size in bytes, or the error with its line and column. When it is not valid, the repair row lists every change it would make before you accept any of them.
      Tree, Query, Table, Schema, Stats
      Tree shows the structure. Query shows "N results" for your path. Table lays an array of objects out in columns. Schema and Stats describe what is in the data you pasted.
      Schema is inferred
      It describes the sample you pasted, not every document your system may produce. A field missing in the sample will be missing from the schema.
      Exports
      The CSV is built from the rows and columns of the Table tab. The box "Protect CSV from spreadsheet formulas" is ticked by default, so a cell that starts with =, +, - or @ gets a leading apostrophe and a spreadsheet will not run it as a formula. That changes the cell text. Untick the box if you need the raw values. Nothing is saved or sent.
      The status lineTree, Query,Table,Schema, StatsSchema is inferredExportsJSON DataStudio: Whateach readoutmeansMAP
      Map: The status line, Tree, Query, Table, Schema, Stats, Schema is inferred, Exports

      More

      JSON Data Studio: Before you ask

      This comes from the JSON Data Studio page.

      Is my JSON uploaded?
      No. Parsing, repair, queries and exports run in your browser tab. Opening a file reads it locally.
      Does it store my last input?
      No. Close the tab and it is gone.
      Why does repair show a list instead of just fixing it?
      Because an automatic fix can change meaning. You should see every change.
      Why does flatten fail with a collision?
      Two different paths would produce the same key, so one value would overwrite another. The tool stops and names them.
      Can I query with a plain path?
      Yes. users[0].name works as well as $.users[0].name.
      Is my JSON uploaded?Does it storemy lastinput?Why doesrepair show alist insteadof justfixing it?Why doesflatten failwith acollision?Can I querywith a plainpath?JSON DataStudio:Before youaskMAP
      Map: Is my JSON uploaded?, Does it store my last input?, Why does repair show a list instead of just fixing it?, Why does flatten fail with a collision?, Can I query with a plain path?

      Steps

      JSON Data Studio: the steps, in order

      The steps are taken from the JSON Data Studio page.

      Paste JSON or open a
      Paste JSON or open a file. The status line says Valid, or gives the line and column of the first problem.
      If it is invalid
      If it is invalid and the cause is a common one, press Repair and read the list of changes.
      Use Query or Tree
      Use Query or Tree to find the value you need. Click a tree node to get its path.
      For a list of records
      For a list of records, open Table, sort and filter, then copy or download CSV.
      Generate a schema or TypeScript
      Generate a schema or TypeScript types, or flatten the document for a flat config.
      Paste JSON or open aIf it isinvalidUse Query orTreeFor a list ofrecordsGenerate aschema orTypeScriptJSON DataStudio stepsMAP
      Map: Paste JSON or open a, If it is invalid, Use Query or Tree, For a list of records, Generate a schema or TypeScript

      Limits

      JSON Data Studio: what it cannot do

      These limits are stated on the JSON Data Studio page.

      The query language is a subset
      It covers the common JSONPath features listed above. It does not support script expressions, unions like [0,2], or functions. Different JSONPath tools disagree on edge cases, so check results that matter.
      Inferred schemas are a draft
      A schema inferred from one sample describes that sample. It cannot know a field is an enum, or that a string is a date. Review it before you enforce it.
      Large numbers
      Numbers such as 12345678901234567890 or 0.12345678901234567 are kept exactly as written in the tree, table, query, schema, CSV and every format operation, and a line under the status says how many there are. A query like @.id==12345678901234567890 compares the full digits, and the schema calls a long whole number an integer. Exponents longer than 9 digits and numbers longer than 10,000 digits are the limit: for those inputs the tool shows the limit instead of views, query and CSV, and leaves your input unchanged, so nothing is rounded.
      Duplicate keys are reported, not preserved
      After a duplicate, the last value wins, as in every browser parser. The warning is there so you can fix the source.
      Big inputs
      A 2 MB array of 30,000 objects loaded in about half a second in our test. The tree shows the first 200 children of each node and the table draws the first 500 rows, with a note when it cuts. CSV export has all rows.
      Not a validator against your schema
      It infers a schema. It does not check a document against one you supply.
      The query language is asubsetInferredschemas are adraftLarge numbersDuplicate keys arereported, not preservedBig inputsNot avalidatoragainst yourschemaJSON DataStudiolimitsMAP
      Map: The query language is a subset, Inferred schemas are a draft, Large numbers, Duplicate keys are reported, not preserved, Big inputs, Not a validator against your schema

      Problems

      JSON Data Studio: what goes wrong and what it does about it

      These cases come from the JSON Data Studio page.

      Trusting a repair without reading it
      Pressing Repair on {a:1,'b':True,c:None,d:[1,2,],} fixes it, and the note lists what changed: trailing commas, single quotes, unquoted keys, Python values, comments. A repair makes the text valid, not correct. Check the list against what you meant.
      Duplicate keys
      {"a":1,"a":2} is valid JSON, and parsers keep the last value. The tool names each duplicated key and its path so the first value is not lost without notice.
      Long numbers in ids
      12345678901234567890 stays exact in every view and export, so you can query and export it as a number. Past the stated limits (exponents over 9 digits, numbers over 10,000 digits) the tool shows the limit and produces no views or exports, so nothing is rounded.
      Query syntax from other tools
      Paths like $.a[0].b, $.a[*].b, $..b, $.a[-1], $.a[0:1] and filters such as $.a[?(@.b>1)] work. A form it does not support, such as $.a[b=2], gives an error naming the position instead of an empty result.
      Spreadsheet formulas in CSV
      A value starting with =, +, - or @ can run as a formula when the CSV is opened in a spreadsheet. The Protect CSV from spreadsheet formulas box is on by default and prefixes such values with an apostrophe. Turn it off only for data you trust.
      An inferred schema is a draft
      The schema and TypeScript types come from the values in this one document. A field that is always present here may be optional elsewhere. Review them before you rely on them.
      Trusting a repair withoutreading itDuplicatekeysLong numbersin idsQuery syntax from othertoolsSpreadsheetformulas inCSVAn inferredschema is adraftJSON DataStudioproblemsMAP
      Map: Trusting a repair without reading it, Duplicate keys, Long numbers in ids, Query syntax from other tools, Spreadsheet formulas in CSV, An inferred schema is a draft

      Worked examples

      Supabase: example tasks worked through

      These examples are read from the Supabase page itself.

      List projects across organizations
      Expected result: one request per project, each under its own project scope, none close to 120 a minute. Check: limits are per project, so the five projects do not share one budget. The project-list call itself counts against the user.
      Check logs for one project repeatedly
      Expected result: no more than 30 calls a minute for that project, with the reset header read after each reply. Check: the logs endpoint has a lower documented limit of 30 a minute than the 120 standard.
      Run beside a deploy
      Expected result: the run counts both against the same user and project budget and slows down when the remaining count drops. Check: Supabase says CLI commands that act on a remote project send Management API requests that count toward the same limits.
      New rows in a signup
      New rows in a signup table start the onboarding playbook.
      Edge-function errors file triage entries
      Edge-function errors file triage entries nightly.
      Database backups verify on a
      Database backups verify on a schedule with a pass/fail note.
      List projects acrossorganizationsCheck logsfor oneprojectrepeatedlyRun beside adeployNew rows in a signupEdge-functionerrors filetriageentriesDatabasebackupsverify on aSupabase:exampletasks workedthroughMAP
      Map: List projects across organizations, Check logs for one project repeatedly, Run beside a deploy, New rows in a signup, Edge-function errors file triage entries, Database backups verify on a

      Outcomes

      Related, guides 1 to 4: what each ends with

      Each line is the intended result printed on that guide.

      Add search to your app
      Users find things by typing instead of scrolling, with results that are actually relevant.
      Clean and analyze a dataset visually
      A documented cleaning order, a distribution check and one chart that answers your stated question.
      Enrich new signups with public data
      An enrichment plan for three chosen fields, written to separate fields with a no-match fallback.
      Let the agent fill repetitive forms
      A structured answers file and a review-before-submit routine for an agent you supply.
      Add search to your appClean andanalyze adatasetvisuallyEnrich new signups withpublic dataLet the agentfillrepetitiveformsRelated,guides 1 to4: what eachends withMAP
      Map: Add search to your app, Clean and analyze a dataset visually, Enrich new signups with public data, Let the agent fill repetitive forms

      Finish

      What you end with

      12Model entities3Add the boring-but-essentialcolumns now: created_at45STEPS
      Steps: Step 1, Step 2, Step 3, Step 4, Step 5

      A schema you will not have to migrate painfully when the app gets real users.

      Work through the steps in the order shown. Each one uses what the one before produced.

      1. Step 1List the five questions the app asks of its data most often - the schema serves those, not an imagined future.
      2. Step 2Model entities and relationships with database-schema-designer and check every relationship for the orphaned-record question: what happens when the parent is deleted.
      3. Step 3Add the boring-but-essential columns now: created_at, updated_at, and a real primary key on every table.
      4. Step 4Write the three most common queries in sql-query-builder and confirm each can use an index.
      5. Step 5Export the schema documentation so the next person (or agent) does not have to reverse-engineer it.
      1Step 1List the five questions the app asks ofits data most often - the schema servesthose, not an imagined future.2Step 2Model entities and relationships withdatabase-schema-designer and check everyrelationship for the orphaned-record.3Step 3Add the boring-but-essential columnsnow: created_at, updated_at, and a realprimary key on every table.4Step 4Write the three most common queries insql-query-builder and confirm each canuse an index.5Step 5Export the schema documentation so thenext person (or agent) does not have toreverse-engineer it.IN ORDER
      In order: Step 1, Step 2, Step 3, Step 4, Step 5
      Step 1Step 2Step 3Step 4Step 5What you endwithMAP
      What you end with. Map: Step 1, Step 2, Step 3, Step 4, Step 5
      A tablet showing charts and graphs next to a coffee cup, banner image on the Design a database that survives growth page

      22 / 22

      22 / 22

      You end with

      A schema you will not have to migrate painfully when the app gets real users.