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.
What's on the screen
| No. | Name | Description |
|---|---|---|
| 1 | Toolbar | Choose what to do on the canvas (the mode), and use the Auto Layout, Fit View, Lock Interaction and Export Image... buttons. See 'Toolbar' below. |
| 2 | Table | One table. How to edit its columns is explained in Table node. The lines are relationships (foreign keys) between tables. |
| 3 | Zoom | The Zoom In and Zoom Out buttons and the zoom bar. |
| 4 | Mini-map | Shows 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. |
| 5 | Info panel | Shows 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. | Tool | What it does |
|---|---|---|
| 1 | Select & Move button | Select tables and drag them. Dragging on an empty area selects the tables inside the rectangle. |
| 2 | Pan button | Drag to move the view. In other modes, dragging while holding Alt (⌥ on macOS) also moves the view. |
| 3 | Add New Table button | Creates a new table where you click on the canvas. It is a virtual table that does not exist in the database yet. |
| 4 | Non-Identifying Relationship button | Draws a non-identifying relationship: the child table refers to the parent with columns that are not part of its primary key. |
| 5 | Identifying Relationship button | Draws an identifying relationship: the child table refers to the parent with its primary key columns. |
| 6 | Add Comment button | Places a note where you click on the canvas, for design intent that does not fit in a table. |
| 7 | Add Group button | Creates a group from a rectangle you drag on the canvas, to show tables of one business area together. |
| 8 | Auto Layout button | Arranges the tables automatically along their relationships. |
| 9 | Fit View button | Sets the zoom and position so that all tables fit on the screen. |
| 10 | Lock Interaction button | Locks the layout and editing. While locked, you can only move the view and zoom. Click again to unlock. |
| 11 | Export Image... button | Opens the dialog that exports the ERD as an image. See Export as image. |
Placing tables and drawing relationships
- 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.
- Click the Non-Identifying Relationship button (4) or the Identifying Relationship button (5).
- Click the parent table that has a primary key, then the child table that receives the foreign key. The Add Foreign Key dialog opens.
- 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.
- Save the ERD with the Save button in the info panel, or press
Ctrl+S(Cmd+Son 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
- Click the Auto Layout button in the toolbar. The tables are rearranged along their relationships.
- 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
| Action | What it does |
|---|---|
| Scroll with the wheel or trackpad | Moves the view. |
Drag while holding Alt (⌥) | Moves the view regardless of the current mode. |
| Drag on an empty area | Selects 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. |
Esc | Returns 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, Backspace | Deletes 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.
| Menu | What it does |
|---|---|
| Same as the mode button in the toolbar. | |
| Same as the mode button in the toolbar. | |
| Same as the mode button in the toolbar. | |
| Same as the mode button in the toolbar. | |
| Same as the mode button in the toolbar. | |
| Same as the mode button in the toolbar. | |
| Pastes copied or cut tables where you right-clicked. Shown only when there are tables that can be pasted. | |
| Arranges the tables automatically. | |
| Opens the image export dialog. | |
| 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
Deletekey 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.
Related screens
- 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.