Design tables on the diagram (Visual Designer)
DatabaseVisual Designer. The bar at the top only changes the view (zoom, arrange, layout, types / badges / views); table positions are kept in this browser as you move them; Layouts ▾ saves the arrangement under a name (Overview, Billing …) — where the tables are, which groups are collapsed, where the free notes are — and one click goes back to it (Undo works; the ↻ beside a layout updates it, the pencil renames it, × deletes it; a table added later stays where it is); Reset (two arrows) goes back to the default arrangement, brings back dismissed suggestions and removes relations drawn only on the diagram; to take back a move or Auto-Arrange use Undo (Ctrl+Z); everything that does something is in the Tools bar beside the diagram — at the top, bottom, left or right (drag it by its grip: a dashed box shows the side it goes to; or pick the side in its menu); at the left or right it is vertical, in two columns when it doesn’t fit the height.
The Tools bar and the panels (View, Suggestions, Changes) sit beside the diagram, never over the tables; the minimap and the zoom buttons stay on the diagram. When the bar has no room for its labels every tool shows its icon (the name is the tooltip), except Changes and Review SQL.
HomeSettingsVisual Designer sets the bar’s side, the default zoom (Reset Zoom and Ctrl+0 come back to it) and whether the diagram opens with everything in view; Types, Badges and Views stay as you last set them. Find table (top bar) lists the tables shown on the diagram as you type (hidden views are left out) and jumps to the one you pick; PNG / SVG save the diagram as an image.
Click a relation line to change its ON DELETE / ON UPDATE or remove it (a pending one: undo it; a suggested one: add it). The table dialog has two tabs, Columns and Indexes (right-click a tableIndexes… opens it on Indexes): add, change or drop indexes there — Add index gives an empty row: pick its columns from “+ column” in the order you want (× takes one out), the name follows them (ix_city_name, uq_… when Unique) until you type your own (an index a relation needs can’t be dropped while the relation exists); a table’s Constraints panel lists its indexes too.
The dialog checks as you type: a wrong field is outlined red with the reason below it (a missing name, two columns with one name, an index on the same columns as another …), its tab gets a red dot, and Add column / Add index / Save wait until it is fixed. Template (Tools) starts from a ready-made table — the Database Wizard’s Blog, Online shop, CRM, Tasks, Inventory, Users and Library tables, Basic or Extended, with search (“jobs” finds tasks): one table opens in the table dialog to adjust it first, “The whole …” adds a set at once (tables the diagram already has are reused) — with “Whole set as a group” (on unless you switch it off) its new tables go in a group named after it (Blog, Tasks …), and a link such as customer_id goes to a table of that kind on the diagram (customers, or clients …) with the column type matched to it — without one the column stays and the relation can be added later.
TemplateLink table makes a many-to-many table between two tables. In the table dialog, Standard adds id, created_at / updated_at or deleted_at.
Copy / paste tables: select tables (Ctrl+click for more) and press Ctrl+C (or right-clickCopy Table) — their structure as drawn, with indexes and the relations between them, is kept in this browser (the CREATE script also goes to the clipboard); in the Visual Designer of another database, on any server, press Ctrl+V or Paste in the tools: tick the tables, rename any (a name that is taken is red), and on the same server tick Rows to copy their rows too (INSERT … SELECT after the table is created). A relation to a table you didn’t copy goes to a table of that kind there, else the column stays without it.
Between servers only the structure comes over (rows: Export / Import) and column collations follow the database. Import SQL (tools): paste a script, open a .sql file or drop it on the dialog — or drop a .sql file straight on the diagram, which opens Import SQL with it — CREATE TABLE statements (hand-written, from another tool, or a whole mysqldump / phpMyAdmin export) with their columns, primary keys, indexes and relations; keys and AUTO_INCREMENT that an export adds later with ALTER TABLE, and CREATE INDEX, count too.
As you type it says what it found and what it leaves out (rows, views, routines, triggers). Next shows the tables as Paste does: untick any, rename any (a name that is taken is red); a table the database already has starts unticked and relations go to the one that is there; “Put them in a group” (ticked, named after the file) puts the new tables in a group — Paste has it too, not ticked.
Notes say what changed on the way: MyISAM becomes InnoDB, FULLTEXT / SPATIAL indexes, CHECK and relations on more than one column are left out, a generated column becomes a plain one. The tables go into the changes like new ones — Review SQL creates them.
Group (tools): select tables and click Group (or right-clickGroup…) — give it a name and a colour, or add them to an existing group (a table is in one group at most). The tables come together in a coloured box; drag its header to move them as one, click ⌄ (or double-click the header) to collapse it to a list — relation lines then end at the box — and use ⋯ for Name & colour, Show only this group (the rest hides until Show all), Select or Arrange its tables, Ungroup (the tables stay), and Drop group… — its tables and views go into the changes as drops (a pending new one is just not made), with its notes and the group itself; relations of other tables to them are removed first (ticked — MySQL refuses the drop otherwise), and the tables that link to others are dropped before the ones they link to.
Nothing is deleted until Review SQLApply; Ctrl+Z takes it all back. Right-click a tableRemove From Group.
Dragging a group to the edge of the visible diagram scrolls it. The minimap shows the groups in their colours; the arrows in its header move it to another corner.
Auto-Arrange moves every group as one block and leaves its tables as you placed them inside it; to tidy one group, click its header (its tables are selected, the box is outlined) and then Auto-Arrange — only that group is arranged (or ⋯ → Arrange its tables). Dragging a table or a group stops at the edge of the canvas as a whole — the gaps between the tables stay — and when the pointer comes back the table is under it again.
Find lists groups too, and tables inside a collapsed group (“in Orders” — picking one opens the group). Groups only arrange the diagram, are kept in this browser, and undo / redo works for them.
Note (tools): a sticky note where you look — type, then Ctrl+Enter or click outside (Esc cancels; a new note left empty goes). Right-click a tableAdd Note attaches one to it: it stays beside the table when the table moves (drag, group, Auto-Arrange), a dashed line joins them, and it hides when the table does.
A click selects a note: Edit and Drop in the tools then work on it (Drop deletes it at once, Ctrl+Z brings it back). Drag a note by its header (as a table: it stays under the pointer and stops at the canvas edge), double-click to edit it, resize it from its corner; ⋯ gives Edit text, colour, Detach and Delete.
Notes are kept in this browser, undo works for them, and the minimap shows them. Auto-Arrange tidies them too: free notes go in rows under the diagram, and an attached note that would cover a table moves to the nearest clear spot beside its own table.
Notes in the top bar hides or shows them all (a hidden note is left out of the minimap and the export). Export ▾ (top bar): Image (PNG / SVG) saves the diagram as you see it — tables, relation lines, group boxes and the notes shown.
Export ▾ → Documentation makes a page of the whole database for others to read: a title and an optional About text, the contents (by your groups), the diagram, and every table with its comment, notes, columns (type, null, default, PK / FK / UNI, extra, comment), indexes and relations both ways (with ON DELETE / ON UPDATE), linked to each other; views with their columns and their SQL. Download HTML gives one file that opens anywhere; Print / PDF opens the browser’s print (Save as PDF).
It shows the database as it is — pending changes are named, not included. View (tools): build a view on the diagram.
A panel opens on the right; click columns on the diagram — a column’s table comes in with it, and the joins follow the relations (tables in between are added to join through, shown as “via” — click one of their columns, or the table, and it counts as picked; × on a via chip says which tables it joins); click a table to add or remove it (× on its chip takes it out with its columns); when its last column is taken out, the table goes too (unless the WHERE uses it), and a table that adds no columns is pointed out — its JOIN can still leave the view with fewer rows. Each table shows its alias in the SQL (customers c, orders o …) and keeps it while it is in the view — a WHERE that uses a table you took out turns red; the arrows beside a column change the order of the columns in the view, and you can give each one another name (AS); two columns with the same name are marked red (MySQL refuses that in a view) and “Name them table_column” fixes it.
Pick JOIN or LEFT JOIN, add a WHERE condition (“Insert a column…” under it puts c.name at the cursor), watch the SQL, and Preview rows shows the first 10 from the database. Add to changes makes a pending CREATE VIEW — it appears on the diagram as a new view and is created with Review SQLApply (undo works).
Path (tools): how two tables connect — select two and click Path, or click Path and then the two tables (right-clickPath From Here… starts from that table). The shortest chain of relations stays lit and the rest fades; the bar at the bottom shows the chain with the join columns, columns to select (click them on the lit tables — they get a ✓ and show in the bar, × takes one out, All columns resets; none picked = every column), JOIN or LEFT JOIN (keep every row of the first table), Copy JOIN (the SELECT with the joins) and SQL Console (opens it there).
Esc or × ends it; suggested relations don’t count. Columns (top bar): All, Keys (only primary and foreign keys, + how many others) or Names (table names only) — kept in this browser.
Undo / Redo: Ctrl+Z and Ctrl+Y (or Ctrl+Shift+Z), or the arrows at the start of the tools — every change in the list and every move of tables (a drag, Auto-Arrange); the tooltip says what will be undone, the status bar what was. It lasts while the page is open, and applying the changes starts afresh (SQL that ran can’t be undone).
Tools: New Table, Edit / Drop for the selected table (or double-click a table’s header, or right-clickEdit Table…) to rename it and add, change, reorder or drop columns, right-clickDrop Table…. Edit and Drop work on a view too: select it, double-click its header or right-click it.
A view opens with its SQL and Preview rows, and the change goes into the list as CREATE OR REPLACE VIEW; afterwards the view runs under your login. Only a view not made yet can be renamed there.
Add Relation (or accept a suggestion) for a foreign key with its ON DELETE rule — checked the way MySQL will: the column it points to must exist and be a key, and both columns need the same type (if not, it offers to change the column too, in the same changes). Suggestions are only guesses from column names; tables without a primary key get none.
Nothing runs at once: the changes are listed under Changes and drawn as the database will be — new tables green, changed amber, dropped red; pending relations as amber dashed lines. × beside a change removes it (a new table takes its relations with it; Ctrl+Z brings it back); Discard all removes them all. Review SQL lists every change with a checkbox (untick what should wait — it stays in the list; × removes a change, and “Remove the … unticked” removes all the unticked ones) and shows the script with warnings (data that is deleted, a new table whose name already exists, tables other tables link to, MyISAM tables that can’t keep foreign keys).
For a new relation it counts the rows that point to nothing in the other table — MySQL refuses the foreign key while they exist (error 1452) — and lets you set their value to NULL or delete them first; Apply runs it statement by statement and stops at the first error — what ran is done, the rest stays in the list with MySQL’s message. Columns and indexes you don’t change are left exactly as they are; the primary key of an existing table: its Structure page.
The list is kept in this browser until you apply or discard it; leaving the diagram with changes waiting asks first (SettingsMistake guard).