Set Primary Key to ERD Entity (ER Diagram Editing)

A primary key uniquely identifies a tuple/row of entity (data set, table). It may be an attribute or a set of attributes. Primary key attributes are marked with + symbol, alternatively with PK acronym or a key icon.

If you are editing an attribute of an ERD entity in the ER diagram editor you can set the primary key by typing + before the attribute name. You may set multiple attributes to be part of a primary key.

Alternatively, you may set primary key right-clicking on an attribute and choosing Primary Key from the context menu. If you want to add multiple attributes to the primary key, select them clicking on each while holding CTRL-key. Then right-click on the last attribute (still holding CTRL key) and choose the Primary key from the context menu.

Set ERD Entity Primary Key using Context Menu
Set ERD entity primary key using the context menu

If you want to adjust the primary key and also other parameters of attributes of an ERD entity, the fastest way in our ERD tool is to open the Properties dialog, switch to Attributes tab and edit the attributes in the grid.

Set ERD Entity Primary Key using Properties Dialog
Set ERD entity primary Key using properties dialog

New Comment

Comment