The Diagram View

This section describes the diagram view of the model.

Diagram Elements

The diagram view contains two main elements, rounded rectangles—which represent nodes—and lines, as shown in Figure 1.

Figure 1  A diagram view of an entity model

Nodes

Nodes are the base elements in the model—the entities.

A node may be split into two sections: The title bar containing the name of the entity, and a compartment that shows attributes and relationships (see Figure 4).

Lines

Lines represent relationships between entities and entity inheritance hierarchies.

A line with one or two open arrow heads represents a relationship. A single arrowhead denotes a to-one relationship; a double arrowhead denotes a to-many relationship. The direction of an arrow indicates the direction of the relationship—the arrow points to the destination entity. Figure 1 shows an example of the diagram view of a simple data model, with all compartments expanded.

A line with a closed arrowhead denotes inheritance.

Diagram Tools

The diagram view provides several tools, whose function should be familiar from other drawing packages. You select the tools from the palette in the bottom-left corner of the diagram view, shown in Figure 2.

Figure 2  Diagram tools
Diagram tools

Editing the Model

You can edit the model directly from the diagram:

Layout

There are a number of options for moving and resizing elements; you can also constrain the way the elements can be moved and resized, and even prevent them from being moved and resized. Furthermore, you can zoom into and out of the diagram and arrange the page layout as you wish.

Roll-Up and Expansion

You can display a node and the compartments within it in a variety of ways:

Figure 4  A rolled-up node and a partially expanded rolled-down node
A rolled up node and a partially expanded rolled down node

To roll up or roll down the node, choose, respectively, Design > Roll Up Compartments or Design > Roll Down Compartments. To hide or expose compartment information, you use the disclosure triangle within a compartment or choose Design > Expand Compartments (or Design > Collapse Compartments).

Colors and Fonts

The diagram view provides default coloring for various elements. By default, all text is black, and the title bar and outline of drawing elements are colored. In the data model the color is the same for all entities.

You change the background color of the title bar and color of the outline of elements by dropping a color swatch from the Color panel onto the element. You change the other color settings, and the font used for the title, property, and operations text, using the Appearance pane of the Info window (inspector). You can also select multiple elements and change their color and text settings simultaneously, as shown in Figure 5.

Figure 5  Appearance pane showing multiple selection
Appearance pane showing multiple selection

You can also change the default settings for the entire model using the Appearance pane—see The Info Window.