Back-End Design: plan a PostgreSQL database as an ER diagram

Draw tables, keys and relations on a canvas, fill them with sample rows and run real SQL in your browser. AI writes the SQL, seeds the data and saves versions.

Back-End Design

Model the Data Before You Build On It

Draw a PostgreSQL schema as an ER diagram, fill it with sample rows and run real queries — all in your browser.

Real PostgreSQL
Nothing to install
Export to SQL
Shop BackendBack-End · PostgreSQL
KN
Export SQLRun
Databases
shop
Tables
Enums
order_status
Scripts
seed.sql
top_customers.sql
analytics
Versions
Add reviewsnow
Orders v22d
Main diagramreviewstop_customers.sqlArrangePNG · SVG · PDF
users
ColumnType
iduuid
emailtext
full_nametext
created_attimestamptz
Nattaya
orders
ColumnType
idint8
user_iduuid
statusorder_status
totalnumeric
placed_attimestamptz
order_items
ColumnType
order_idint8
product_idint8
quantityint4
products
ColumnType
idint8
nametext
pricenumeric
reviewsAI · new
ColumnType
idint8
product_idint8
user_iduuid
ratingint2
top_customers.sqlRun
select u.full_name, count(o.id) as orders,
       sum(o.total) as spent
from users u join orders o on o.user_id = u.id
where o.status = 'paid'
group by 1 order by spent desc limit 5;
ResultsMessages5 rows · 4 ms · PostgreSQL in your browser
full_nameordersspent
Nattaya S.14฿48,920
Krit P.11฿37,450
Mai T.9฿29,180
Somchai K.8฿25,600
Ploy W.7฿21,340
Ask AI
Add product reviews from users, then seed 20 sample rows.
Added reviews with keys to products and users, and a check that rating is 1–5.
apply_schema_sql
edit_rows · reviews +20
Ask about your schema…
Build
  • Tables, keys and relations you can drag
  • Real SQL, run in your browser
  • Sample rows from AI or by hand
  • Versions, diffs and SQL export
02Back-End Design

Model the data behind it, and query it for real.

Draw a PostgreSQL schema as an ER diagram, fill it with sample rows and run real SQL. Postgres runs in your browser, so there is nothing to install.

ER diagram
Tables, columns, keys and relations, arranged on a canvas.
Run real SQL
Scripts run against a real PostgreSQL engine, right in the page.
Sample data
Edit rows in a grid, or let AI seed believable data for you.
AI that writes SQL
Ask for a change: it applies the SQL, explains it and saves a version.
Versions & diffs
Save versions of a schema and compare what changed between them.
Export
A full SQL script, the data alone, or the diagram as PNG, SVG or PDF.
Start a Back-End Design project
Compare versionsOrders v2 → Add reviews
+create table reviews (
+ id int8 primary key,
+ product_id int8 references products(id),
+ user_id uuid references users(id),
+ rating int2 check (rating between 1 and 5)
+);
alter table orders
- add column note varchar(80);
+ add column note text;
reviews20 rows seeded by AI
idproductrating
1Cold brew★★★★★
2Thai tea latte★★★★★
3Butter croissant★★★★★
4Matcha★★★★★

From an empty canvas to a schema you trust

  1. 01Draw the schemaAdd tables and columns, pick their types, and drag a key onto another table to relate them. Or describe it and let AI draw it.
  2. 02Fill it and query itAdd sample rows by hand or have AI seed them, then run the queries your app will need and see the results at once.
  3. 03Version it and hand it onSave a version before a big change, compare what moved, and export a SQL script for the people who will build it.

Frequently
asked questions

A project for planning the data behind a product. You draw a PostgreSQL schema as an ER diagram, fill its tables with sample rows and run real SQL against it, so the design is tested before anyone builds on it.

Yes. Queries run on PostgreSQL itself, running right in your browser, so there is no server to set up and nothing to install. The tables and their sample rows are saved with the design.

Yes. A project can hold several databases, each with its own tables, rows and diagrams, alongside the SQL scripts you write against them.

It reads your schema and changes it for you: it writes and applies the SQL, adds or edits sample rows, runs queries, arranges the diagram, and saves and compares versions. Ask in plain language, and it explains what it changed.

Export it. Download a full SQL script of the schema and its data, or just the data, and run it on your own PostgreSQL. The diagram exports as PNG, SVG or PDF for documents and reviews.

Yes. Invite people by email to edit, comment or view. Changes appear for everyone as they are made, and you can see who is in the design and which table they have open.

Design the database
before the code depends on it.