Using the ERD tool v8
The ERD Tool is available in PEM 8.1.0 and later.
The Entity-Relationship Diagram (ERD) tool is a database design tool that provides a graphical representation of database tables, columns, and inter-relationships. ERD can give sufficient information for the database administrator to follow when developing and maintaining the database. You can access the ERD Tool via the
ERD Tool menu option on the
Tools menu. The ERD Tool allows you to:
- Design and visualize the database tables and their relationships.
- Add notes to the diagram.
- Auto-align the tables and links for cleaner visualization.
- Save the diagram and open it later to continue working on it.
- Generate ready to run SQL from the database design.
- Generate the database diagram for an existing database.
You can open multiple copies of the ERD tool in individual tabs simultaneously. To close a copy of the ERD tool, click the
X in the upper-right hand corner of the tab bar.
The ERD Tool toolbar uses context-sensitive icons that provide shortcuts to frequently performed tasks. The option is enabled for the highlighted icon and is disabled for the grayed-out icon.
|Click the ||Ctrl + O|
|Click the ||Ctrl + S|
|Click the ||Ctrl + Shift + S|
|Click the ||Option + Ctrl + S|
|Click the ||Option + Ctrl + I|
|Click this button to add a new table to the diagram. On clicking, this will open a table dialog where you can put the table details.||Option/Alt + Ctrl + A|
|Click this button to edit a table on the diagram. On clicking, this will open a table dialog where you can change table details. This will enable when a table is selected.||Option/Alt + Ctrl + E|
|Click this button to clone the complete table structure, name it with a auto generated name and put it in the diagram.||Option/Alt + Ctrl + C|
|You can drop a table or link using this button. You need to select a table or link and click on this button to drop it.||Option/Alt + Ctrl + D|
|Click this button to open a one-to-many relationship dialog to add a relationship between the two tables. The selected table becomes the referencing table and will have the ||Option/Alt + Ctrl + O|
|Click this button to open a many-to-many relationship dialog to add a relationship between the two tables. This option will create a new table based on the selected columns for the two relating tables and link them.||Option/Alt + Ctrl + M|
|Click this button to make notes on tables nodes while designing the database.||Option/Alt + Ctrl + N|
|Click this button to auto align all tables and links to make it look more cleaner.||Option/Alt + Ctrl + L|
|Click this button to toggle the column details visibility. It allows you to show few or more column details.||Option/Alt + Shift + D|
|Click this button to zoom in/out automatically and fit all the tables to the view.||Option/Alt + Shift + F|
|Click this button to zoom in the diagram.||Option/Alt + Shift + "+"|
|Click this button to zoom out the diagram.||Option/Alt + Shift + "-"|
The table dialog allows you to:
- Change the table structure details.
- It can be used edit an existing table or add a new one.
- Refer Table dialog for information on different fields.
The table node shows table details in a graphical representation:
- The top bar has a
details toggle buttonthat is used to toggle column details visibility. There is also a
note buttonthat is visible only if there is some note added. you can click on this button to quickly change the note.
- The first row shows the schema name of the table. Eg.
publicin above image.
- The second row shows the table name. Eg.
usersin above image.
- All other rows below the table name are the columns of the table along with data type. If the column is a primary key then it will have lock key icon eg. id is the primary key in above image. Otherwise, it will have column icon.
- You can click on the node and drag to move on the canvas.
- Upon double click on the table node or by clicking the edit button from the toolbar, the table dialog opens where you can change the table details. Refer Table dialog for information on different fields.
The one to many link dialog allows you to:
- Add a foregin key relationship between two tables.
Local Tableis the table that references a table and has the
Local Columnis the column that references.
Referenced Tableis the table that is being referred and has the
Referenced Columnis the column that is being referred.
The many to many link dialog allows you to:
- Add a many to many relationship between two tables.
- It creates a relationship tables having columns derived from the two tables and link them to the tables.
Left Tableis the first table that is to be linked. It will receive the
oneendpoint of the link with the new relation table.
Left Columnis the column of the first table, that will always be a primary key.
Right Tableis the second table that is to be linked. It will receive the
oneendpoint of the link with the new relation table.
Right Columnis the column of the second table, that will always be a primary key.
The table link shows relationship between tables:
- The single line endpoint of the link shows the column that is being referred.
- The three line endpoint of the link shows the column that refers.
- If one of the columns that is being referred or that refers is removed from the table then the link will get dropped.
- You can click on the link and drag to move on the canvas.
- You can use the notes popup to mark some notes while designing the database.
- You open the pop-up using the toolbar note button.
- If some note is added to a table then it will have notes button on the table node. You can click on the button to check/update notes.