Draw your database. Export the SQL.
A DrawSQL-class schema designer built right into your workspace. Drag out tables, draw foreign keys, and round-trip real SQL for Postgres, MySQL, and SQLite — no extra tool, no extra login.
Database design lives in the wrong places
Whiteboard photos and Figma boxes look nice but produce no SQL. Standalone diagram tools are yet another login, and the diagram drifts the moment you close the tab. Hand-written DDL is precise but invisible — nobody can see the shape of the database.
dotby closes the loop: design visually, export real SQL, and keep the diagram in the same workspace as the project it belongs to — so the picture and the work never drift apart.
From CREATE TABLE to canvas — and back
Paste your existing dump and get a diagram. Design a diagram and get clean, dialect-correct SQL. Nothing is lost in either direction.
CREATE TABLE projects (
id uuid PRIMARY KEY,
owner_id uuid NOT NULL,
name varchar(120) NOT NULL,
created_at timestamptz DEFAULT now(),
FOREIGN KEY (owner_id)
REFERENCES users (id)
ON DELETE CASCADE
);Built for people who think in tables and keys
Real SQL, both ways
Paste a CREATE TABLE dump and watch it become a diagram; design a diagram and export faithful CREATE TABLE SQL. Tables, columns, types, primary keys, foreign keys, and constraints survive the round trip.
The diagram isn’t decoration — it’s the source you can actually ship.
Four dialects, one model
Export to PostgreSQL, MySQL, SQLite, or standard SQL from the same diagram. Types, identifier quoting, and auto-increment idioms are translated correctly per dialect. Switch the target and the SQL re-generates instantly.
Design once, target whatever database you’re actually using.
Full-fidelity columns
Every column carries what a real schema needs: type with length/precision/scale, nullable, primary key, unique, default, auto-increment, and comments. Foreign keys carry ON DELETE / ON UPDATE actions.
The generated SQL is complete, not a toy sketch you finish by hand.
It catches your mistakes
A live warnings panel flags the things that bite later: dangling foreign keys, duplicate column names, tables with no primary key, type mismatches across a relation. Warnings keep you honest — they never block you.
You find the broken relationship in the canvas, not in production.
Native to your workspace
The canvas is themed to match the app — automatic dark and light mode, no third-party branding, no watermark. Diagrams live in folders, can be favorited, and carry per-diagram public/private access just like your docs and whiteboards.
It feels like part of dotby, not a bolted-on iframe.
Safe by design
It’s a design tool, not a migration runner — it never touches a live database. Autosave is conflict-aware: if a teammate edits the same diagram, you get a clear “someone else edited this” instead of a silent overwrite.
The speed of a shared canvas, without the fear of losing work.
A full schema tool, not a sketch
It lives next to the work it’s about
The schema you design sits beside your projects, tasks, docs, and whiteboards — one login, one bill, one source of truth. Native dark and light theming, zero watermark, and design-only on purpose: it generates SQL, you decide when it runs.