Previous Topic: Defining Entities with the Diagrammer

Next Topic: Defining Relationships Between Entities

Defining Attributes with the Diagrammer

The Task and Employee nodes do not have asterisks, as the Project entity did. This shows that these entities have no attributes, yet. In this section, you use the Diagrammer to define a primary key and non‑key attributes for both entities.

To define attributes for Task and Employee:

  1. Right-click the Task node, and choose Create Sub-Node, and then Primary Key from the pop-up menu.
  2. In the New Node dialog, type TASK ID and click OK.

    The Diagrammer creates the sub-node:

    PLEX--Defining Attributes with the Diagrammer

  3. Notice that the sub-node is not contained within the Task node. Right-click the Task node and choose AutoLayout from the pop-up menu.

    The AutoLayout function enlarges parent nodes so that they can hold all of their sub-nodes. It also organizes the sub-nodes within the parent node. In this case, it enlarges the Task node, and puts the Task ID node inside it.

    Note: When right-clicking entity nodes, make sure you are clicking the parent node, and not any of its sub-nodes.

  4. Right-click the Task node, choose Create Sub-Node, and then Attribute from the pop-up menu.
  5. Name the sub-node Task Description.
  6. For the Employee entity, repeat Steps 1 and 2 to define a primary key called Employee ID, and Steps 4 and 5 to define the following non-key attributes:
  7. Select the Employee and Task nodes and use Auto Layout. Make sure that each entity is in a corner of the Diagrammer window.

    PLEX--Defining Attributes with the Diagrammer (1)

  8. Open the Model Editor.

    Note: If it is already open, click the Clear Focus toolbar button:

    PLEX--Defining Attributes with the Diagrammer

    Defining entities and their attributes in the Diagrammer created corresponding triples in the model. In the next section, you define relationships between the entities (which also creates triples).