Diagram
See the tables and relations of a schema, arrange them, and leave notes for the team.
The Diagram page (/modules/database/diagram) draws the tables of one schema and the relations between them. Pick the schema in the top-left picker, or open the page from a table with ?schema=<schema>&table=<table>.

Read the diagram
Each table lists its columns with their types. Icons mark the primary key, relations, objects and encrypted columns; the legend sits at the bottom-left. A relation is drawn as an arrow from the column to the table it points to; a relation to a table that is not drawn (another schema, or one the search leaves out) ends on a dashed chip that opens that table.
A table with more than 12 columns comes folded: it shows its first 12 columns, plus its primary key and every column an arrow starts or ends on, then a + N columns row. Click that row (or focus it and press Enter) to unfold the table, and Fold columns to fold it back. Finding a column that a folded table hides unfolds that table. Folding is a setting of your own view: it is not saved with the team's layout.
A large schema opens at a readable zoom (40 %) on the top-left corner of the diagram instead of shrinking it to fit; the overview map at the bottom-right and Fit view (1) show the whole of it.
Double-click a table to open its inspector in a drawer on the right, titled with the table's name, as on the Schemas page. A relation opens the other table in the same drawer. The diagram's tables are not a list, so the drawer has no position and no J / K.
On an external database
With an external database picked in the switcher, the diagram draws that database's schemas. Its arrows are the foreign keys its catalog reports: one arrow per column of a key, to the table the key points to. MongoDB has no foreign keys, so a MongoDB database's diagram shows its tables without arrows. When the catalog does not answer, the diagram says so and draws the tables alone.
The layout and the notes of an external database's schema are its own: a schema of the same name in the project's database keeps its layout and notes.
Arrange the layout
Drag tables to arrange them. The layout saves itself (Layout saved) and is shared by everyone who opens the diagram. Auto layout previews a computed arrangement first: keep it or go back to yours. Undo and redo cover every move.
The computed arrangement keeps each group of related tables together, left to right along their relations, and sets the groups (largest first) and then the tables without relations in rows shaped like the canvas. Tables without relations are sorted by name, so tables named with a common start, such as order_items and order_lines, sit side by side. Tables count at their folded height, and the arrangement keeps clear of the notes, which never move. A table the team has not placed yet takes its place in that arrangement; tables already placed stay where they are until you run Auto layout.
Notes
Note (or N) drops a sticky note on the canvas. Double-click a note to write in it. Notes are saved with the schema of the database they were written on and shared with the team.
Keyboard shortcuts
| Key | Action |
|---|---|
F | Find a table or a column |
N | Add a note |
V / H | Select / pan |
1 / 0 | Fit the diagram / reset the zoom |
Ctrl Z | Undo |
Ctrl Shift Z, Ctrl Y | Redo |
Esc | Step back |
The DMS Shortcuts settings page lists them with every other module's shortcuts.