Skip to main content

ER Diagram

View all tables and foreign key relationships in your schema as an interactive diagram. Right-click a database in the sidebar and select View ER Diagram, or use the menu bar View > ER Diagram.
ER diagram

Layout

Tables are arranged automatically using a layered layout algorithm. Tables with foreign keys (child tables) are placed above the tables they reference (parent tables). Tables with no relationships are placed in a grid below. Each table node shows:
  • Header: table name with icon
  • Columns: name and data type, with badges for primary keys and foreign keys
  • Edges: lines connecting FK columns to their referenced tables
ActionInput
PanClick and drag on empty space, or scroll wheel / trackpad
ZoomPinch on trackpad, or Cmd + scroll wheel
Zoom inClick + or press Cmd =
Zoom outClick - or press Cmd -
Fit to windowClick fit button or press Cmd Shift 0
Reset to 100%Click the zoom percentage label or press Cmd 0

Moving Tables

Click and drag any table node to reposition it. Positions are saved automatically and persist across sessions. Drag a table toward the edge of the viewport to auto-scroll the canvas in that direction. Click Reset Layout (the circular arrow button) to return all tables to their computed positions.

Compact Mode

Toggle compact mode with the filter button in the toolbar. In compact mode, each table shows only primary key and foreign key columns.

Edge Notation

Edges use crow’s foot notation:
  • A fork (three lines) marks the “many” side of the relationship (the table that holds the foreign key)
  • A bar (single perpendicular line) marks the “one” side (the referenced table)
For example, an edge from orders.user_id to users.id has the fork at orders and the bar at users.

Export

Click the export button in the toolbar to save the diagram as a PNG image. You can also press Cmd C to copy the diagram to the clipboard.

Database Support

ER diagrams work with any database that supports foreign key introspection:
DatabaseSupport
MySQL / MariaDBFull
PostgreSQL / RedshiftFull
SQLiteFull
SQL ServerFull
OracleFull
DuckDBFull
Cassandra / ScyllaDBLimited (no FK metadata)
MongoDBNot supported (no relational schema)
RedisNot supported
The diagram shows foreign keys defined in the current schema. Cross-schema foreign keys are included if the referenced table is in the same schema.