Defining Entities |
Previous Top Next |
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:
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 a new entity is done by using the Entity button (
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 Workspace 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:
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 Workspace 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:
You can delete an entity by using the context menu and selecting Delete Entity from the popup menu. If you're deleting from the Workspace 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.
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 Workspace.
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.
|