Entities, Attributes and Index
Creating a New Entity
After selecting the New Entity button, click on any area within the ERD pane to place the entity. The Edit Entity box will open afterwards.
Making Changes to an Entity
To edit an entity, you can
- double-click anywhere on the entity box; or
- right-click on the entity box and select Edit Entity
Under the General tab, you can specify options of an entity that will be used when generating the corresponding CREATE TABLE statements. Leaving an option empty means the default value will be used in the SQL statements generated. Unless you understand exactly what an option does, it is usually safe to leave it un-touched.
For a complete explanation of those options, please refer to:
Adding Attributes to an Entity
Inside the Edit Entity box, select the Attributes tab and then the Add button. You can then define these properties of the attribute:
- name
- data type
- length (when applicable)
- decimal (when applicable)
- if it's a primary key
- if it can be null
For other properties, select the attribute row and click on the Edit button to open the Edit Attributes box.
Creating Index
Inside the Edit Entity box, select the Indexes tab and then the Add button. After entering the name for the index, you can then start defining the index. Select the Unique check box to create a unique index.
Creating Unique Constraints
Inside the Edit Entry box, select the Unique Constraints tab and then the Add button.
Please note that some database systems may create an implicit index for the unique constraints defined; saving you the effort to create an unique index manually.
Removing an Entity
You can either
- click on the entity and then click the Delete button on the menu bar; or
- right-click on the entity and then select Delete Entity

