Defining Entities

Previous  Index  Next  How To Use

Entities are placeholders for data that represents a real-world "object" or "event". In a model where Employees are linked to Companies, there would be at least those two entities. Employee "Martin" would then be an occurrence of the entity Employee.

 

See also: Objects is a CDM, Entity

 

This topic holds the following items:

Creating an entity

Modifying an entity

Deleting an entity

Entities in sub-diagrams

 

The visual representation of an entity is a rectangle with a header and optional attributes.

 

An entity "OnlineCustomer"

 

In the above example, there's an entity named "OnlineCustomer", it has a key attribute "OnlineCustomerID" and several other attributes.

 

 

Creating an entity

Creating a new entity is done by using the Entity button ( ) on the Toolbox Toolbar, this will change the cursor and allows you to click on an empty space in the Editor Canvas. A new empty Entity will be created, added to the list in the Diagram Explorer and added to the Canvas.

 

An Entity needs at least 1 attribute in order to be useful. It is recommended to include an identifier for the Entity as well.

 

Each Entity has a name and a user written description under Notes for clarity and it's meaning in the model.

 

Double click the Entity in the Diagram Explorer or Canvas to show the Entity Properties dialog.

 

Entity Properties dialog

 

Use the checkbox in the ID column to set one or more attributes as to be part of the identifier for this Entity.

 

Length and Scale are only editable for datatypes that support it.

 

A checked box in the Req column means the attribute is required.

 

See also:

Entities in sub-diagrams

 

Back to Top

 

 

Modifying an entity

By double clicking an entity in the Diagram Explorer or using the context menu and selecting Properties from the popup menu, you can start the Entity Properties dialog for existing entities. You can also use the context menu in the Editor Canvas and select Attributes from the menu to start the Entity Properties dialog at the Attributes page.

 

Use the OK button to accept your changes or ESC on your keyboard or the Cancel button to discard your changes.

 

See also:

Defining Relationships

 

Back to Top

 

 

Deleting an entity

You can delete an entity by using the context menu and selecting Delete Entity from the popup menu. If you're deleting from the Canvas in the main diagram, a special confirmation dialog will be shown.

 

If you delete from the Diagram Explorer, the object will always be fully deleted.

 

When deleting a entity that has relationships to other entities, these relationships will be deleted as well.

 

Back to Top

 

 

Entities in sub-diagrams

You can create new entities in sub-diagrams as well. They will be added to the Entities list in the Diagram Explorer and to the diagram. To re-use existing entities, drag them from the Diagram Explorer onto the Canvas.

 

If there are any existing relationships for the entities in the diagram, you can use the context menu and select Visualize Relationships to re-establish visual links between the entities.

 

A "before" and "after" screenshot of Visualize Relationships

 

Back to Top