ER diagram
Interactive entity-relationship diagram. Visualize tables and foreign keys (including virtual relations), with isolate and focus workflows for navigating large schemas.
The ER diagram renders the schema of a connection as an interactive graph: each table is a node, each foreign key is an edge. It works on both real FOREIGN KEY constraints and on virtual relations you declare inside QoreDB, so it's useful even on schemas that lack proper FK constraints.
Opening the diagram
Open the ER diagram tab on a connection from:
- The connection's right-click menu, Show ER diagram.
- The global command palette (Cmd+K, then search "ER").
The first render samples the connection's schema and lays out the tables. Subsequent opens reuse the cached layout.
Reading the diagram
Each table is a node showing its name and a list of column headers. The columns shown by default are the primary key and the foreign-key columns; click a node to expand it for the full column list.
Each foreign key is an edge between two tables, drawn from the source column to the target column. Two visual styles distinguish the two flavors of FK:
- Real foreign keys are drawn as solid colored lines.
- Virtual relations (declared in QoreDB rather than in the schema) are drawn as purple dashed lines.
Hovering an edge shows a tooltip with source_table.column → target_table.column, the constraint name (if any), and a (virtual) marker for virtual relations.
Navigating large schemas
Two workflows make a schema with hundreds of tables manageable.
Isolate
Click the Isolate button (filter icon) on a table to hide every other table that isn't connected to it. The diagram shrinks down to that table plus its direct neighbors (parents and children, recursively, depending on configuration). Useful for understanding the immediate context of one entity in a sprawling schema.
While isolated, a Show All button appears at the top to reset the view.
Focus
Click the Focus button (crosshair icon) on a table to pan the canvas so the table is centered, without changing the zoom level or hiding anything. This is the lighter weight of the two: you keep the full diagram in view but jump to a specific table.
Search
A search field in the toolbar filters tables by name as you type. Press Enter to focus on the primary match. Useful for jumping straight to a table when you know its name but not where it lives on the canvas.
Zoom and pan
- Zoom: hold
Ctrl(orCmd) and scroll, or use the zoom buttons in the toolbar. The zoom range is0.4×to1.6×. - Pan: drag any empty area of the canvas.
- Fit to view: a button computes the right zoom level to show every visible table within the viewport, with a small padding margin.
What feeds the diagram
The set of tables and edges comes from QoreDB's normalized schema metadata, which is the same data that powers the sidebar tree and the foreign-key peek. Specifically:
- Tables: every table (and view, for engines that distinguish them) in the active namespace.
- Edges: every entry in the schema's
foreign_keyslist, whether real (is_virtual: false) or virtual (is_virtual: true).
If a relation you expect is missing, check the schema browser first. If the FK isn't there either, declare a virtual relation and the diagram will pick it up on the next reload.
Performance
The diagram is rendered as SVG. For schemas with a few hundred tables, the layout is instantaneous and pan/zoom stay smooth. For very large schemas (thousands of tables), expect the initial layout to take a moment; Isolate and Search are the right tools to bring the working set down to a manageable size before doing anything else.
Where to go next
- Schema browser for the tree-based, per-table inspection
- Vault and profiles to organize many connections
- Querying: editor and autocomplete to start querying the tables you discovered
Stay updated on new releases
Subscribe to get product releases, new drivers notifications, and technical tutorials.