Screens: ERD

ERD canvas

The ERD canvas is the workspace where you place tables, draw relationships and arrange the diagram. It appears when you open an ERD document tab in a project. When the changes you make on the canvas reach the real database is explained in ERDs and the real database.

Where you can use itWebDesktopWithout signing inSigned inLocal projectsAccount projects

What's on the screen

No.NameDescription
1ToolbarChoose what to do on the canvas (the mode), and use the Auto Layout, Fit View, Lock Interaction and Export Image... buttons. See 'Toolbar' below.
2TableOne table. How to edit its columns is explained in Table node. The lines are relationships (foreign keys) between tables.
3ZoomThe Zoom In and Zoom Out buttons and the zoom bar.
4Mini-mapShows which part of the whole ERD you are looking at. Tables with a color are drawn in that color. Drag on the Mini-map to move the view there.
5Info panelShows and saves the ERD's ERD Name, display mode and Included Tables. See Info panel.

Toolbar

The first seven buttons from the top (1 to 7) are modes that decide what you do on the canvas. Only one is on at a time, and pressing Esc returns to the Select & Move mode.

No.ToolWhat it does
1Select & Move buttonSelect tables and drag them. Dragging on an empty area selects the tables inside the rectangle.
2Pan buttonDrag to move the view. In other modes, dragging while holding Alt (⌥ on macOS) also moves the view.
3Add New Table buttonCreates a new table where you click on the canvas. It is a virtual table that does not exist in the database yet.
4Non-Identifying Relationship buttonDraws a non-identifying relationship: the child table refers to the parent with columns that are not part of its primary key.
5Identifying Relationship buttonDraws an identifying relationship: the child table refers to the parent with its primary key columns.
6Add Comment buttonPlaces a note where you click on the canvas, for design intent that does not fit in a table.
7Add Group buttonCreates a group from a rectangle you drag on the canvas, to show tables of one business area together.
8Auto Layout buttonArranges the tables automatically along their relationships.
9Fit View buttonSets the zoom and position so that all tables fit on the screen.
10Lock Interaction buttonLocks the layout and editing. While locked, you can only move the view and zoom. Click again to unlock.
11Export Image... buttonOpens the dialog that exports the ERD as an image. See Export as image.

Placing tables and drawing relationships

  1. Click the Add New Table button (3) and click an empty area of the canvas. A new table appears there. If the ERD holds several schemas, choose the schema for the table first.
  2. Click the Non-Identifying Relationship button (4) or the Identifying Relationship button (5).
  3. Click the parent table that has a primary key, then the child table that receives the foreign key. The Add Foreign Key dialog opens.
  4. Choose the child table's columns that pair with the parent's primary key, and click the Add Foreign Key button. A relationship line appears.
  5. Save the ERD with the Save button in the info panel, or press Ctrl+S (Cmd+S on macOS).

Saving does not change the database. To create the new tables and foreign keys in the database, apply them with the Apply Changes to DB... button.

Arranging with Auto Layout

  1. Click the Auto Layout button in the toolbar. The tables are rearranged along their relationships.
  2. If you like the layout, save it with the Save button in the info panel.

You cannot run auto layout while the ERD is locked.

Mouse and keyboard

ActionWhat it does
Scroll with the wheel or trackpadMoves the view.
Drag while holding Alt (⌥)Moves the view regardless of the current mode.
Drag on an empty areaSelects the tables inside the rectangle.
Click a table while holding Ctrl (Cmd on macOS)Adds a table to the selection or removes it, one at a time.
EscReturns to the Select & Move mode and clears copied or cut tables.
Ctrl+C, Ctrl+X, Ctrl+V (Cmd on macOS)Copies, cuts and pastes the selected tables.
Delete, BackspaceDeletes what is selected: a table is handled like Remove from ERD (it leaves the ERD), a relationship line removes its foreign key from the design, and columns selected inside a table are deleted.
Ctrl+S (Cmd+S on macOS)Saves the ERD.
  • Copied tables can be pasted into another ERD, or an ERD of another schema, as long as it uses the same connection. They cannot be pasted into an ERD of a different connection.

Context menu

Right-clicking an empty area of the canvas shows the menu below. The menu for right-clicking a table is explained in Table node.

MenuWhat it does
ERD canvas context menuSelect & MoveSame as the mode button in the toolbar.
ERD canvas context menuPanSame as the mode button in the toolbar.
ERD canvas context menuAdd New TableSame as the mode button in the toolbar.
ERD canvas context menuNon-Identifying RelationshipSame as the mode button in the toolbar.
ERD canvas context menuIdentifying RelationshipSame as the mode button in the toolbar.
ERD canvas context menuAdd CommentSame as the mode button in the toolbar.
ERD canvas context menuPaste TablePastes copied or cut tables where you right-clicked. Shown only when there are tables that can be pasted.
ERD canvas context menuAuto LayoutArranges the tables automatically.
ERD canvas context menuExport Image...Opens the image export dialog.
ERD canvas context menuImport Tables from DDL...Opens the dialog that creates virtual tables from DDL statements. Shown only in ERDs with a connection. See Import tables from DDL.

Things to keep in mind

  • The Delete key works like Remove from ERD: it takes the table out of the ERD but does not delete the table from the database. How to delete a database table, and the difference, is explained in ERDs and the real database.
  • When you zoom out far, only table names are shown, in large type. You can turn this off with the Zoom out option in the info panel.
  • In a locked ERD you cannot edit tables or columns either. To edit, unlock it with the Unlock Interaction button.
  • Table node: edit a table's columns and keys directly on the canvas.
  • Info panel: the ERD's ERD Name, display mode and Included Tables.
  • Table detail panel: edit the keys, indexes and constraints of the selected table below the canvas.
  • Export as image: save the ERD as a PNG or SVG image.