Schema Diagram
An interactive ER diagram of your SQLite, PostgreSQL or MySQL schema in Axil Studio, with foreign-key edges, pan, zoom, fit and find table.
On this page5
The Schema view (#/schema, shortcut g s) draws an entity-relationship diagram of your database: every table as a card and every foreign key as a connecting line. It is built in the browser as inline SVG from GET /api/studio/schema.
Reading the diagram
Each table card shows:
- The table name and its row count.
- Up to 14 columns, each with its type. Primary-key columns are marked
PKand foreign-key columnsFK. Longer tables end with "+N more columns".
Each foreign key is a curved line from the FK column to the referenced column, with a dot at both ends. Hover a line to see orders.user_id → users.id. A table that references itself gets a loop on its right edge.
The toolbar shows the number of tables and relations. If foreign keys could not be read, a relations unavailable badge appears and only the table cards are drawn.
Layout
Tables are arranged in columns by dependency:
- Tables that reference no other table go in the first column, the most-referenced ones at the top.
- Each other table goes one column to the right of the deepest table it references.
- Within a column, tables are ordered by the position of the tables they reference, so lines cross as little as possible.
In a typical app this puts users and products on the left, orders in the middle and order_items on the right.
Navigating
| Action | How |
|---|---|
| Pan | Drag the background, or scroll horizontally |
| Zoom | Scroll the mouse wheel (zooms around the pointer; Ctrl + wheel or a trackpad pinch zooms faster), or use the + and − buttons |
| Fit | Fit in the toolbar or the fit button in the corner frames the whole diagram |
| Highlight | Hover or focus a table to highlight it, its relations and the tables they connect; everything else is dimmed |
| Open a table | Click a table card (without dragging), or focus it and press Enter, to open it in the Database browser |
Zoom ranges from 20% to 250%; the current level is shown in the bottom-right corner. When you first open the view, the diagram fits the window, and resizing the window fits it again. When you come back to the view later, your previous pan and zoom are restored, as long as the set of tables hasn't changed.
Find table
Type part of a table name in Find table… and press Enter. Studio centers the first match, zooms in to at least 90% and briefly highlights it with its relations. If nothing matches, a warning toast says so.
Theme
The diagram is styled with the theme colors, so it switches along with the light or dark theme.
Tip
The legend at the bottom of the canvas sums it up: PK primary key, FK foreign key, "Drag to pan · scroll to zoom · click to open".
Was this page helpful?