Skip to main content

ER diagram view definition

Overview

Next Design allows you to define a view for an ER diagram that can represent the structure of a model and the relationships between models in diagram form.

ER diagram example

ER diagram view definition allows you to express various diagram designs by specifying the following notation methods.

  • Shape: Shape of each entity
  • Connector: Relationship line between entities

There are the following types of shapes.

Shape types

Shape typesDescription
Title Only ShapeA title is added inside the shape.
Title and DescriptionA title and a body such as a description are added to the shape.
With LabelA title is added to the outside of the shape.
ContainerRelated models can be nested as shapes.
CompartmentMultiple fields can be displayed within the shape.
PortCan be placed on the edge of the shape as a connector contact.
Child ShapeRelated models can be nested as shapes.

There is only one type of connector. You can change the style of the connector to include a broken line or arrow.

The following describes how to define the ER diagram view in the following order.

  • Define a shape
  • Define a connector

Define a shape

Add a shape

To add a shape to the diagram view definition, follow the steps below from the Model Editor. Add a shape

note
  • Of the shape types, [Port] and [Child Shape] cannot be added unless the parent shape is selected. For details, see "Add a Child Shape" below.

Changing the type and shape of a shape

To change the type and shape of a shape that has already been added to a view definition, follow the steps below in the Model Editor.

Changing the type and shape of a shape

Procedure
  1. Select the shape you want to change on the view.
  2. To change the type of a shape, click [Add Shape] > [Node] > [Change Shape Type] on the ribbon, and click a type from the options.
  3. To change the shape of a shape, click [Add Shape] > [Style] > [Change Shape] on the ribbon, and click a shape from the options.
Using custom shapes
Caution
  • After changing the shape type, an extra label (such as the model name) may remain displayed. In that case, delete the unnecessary label by following "Changing the label of a shape" described later.

Change the default style of a shape

There are two ways to change the style of a shape:

  • Change the style of an individual model displayed in a diagram
  • Change the default style of a shape defined for each entity as a view definition of the diagram

This section describes the latter procedure. For the former, see Modeling > Edit Model > Edit ER Diagram.

To change the default style or size of a shape, follow the steps below.

Change the default style of a shape

Operation procedure
  1. Select the shape you want to change on the view.
  2. Change the default style of the shape using the following UI:
  • [Add Shape] > [Style] > [Change Shape], [Quick Style], [Fill Color], [Line Color], [Font Color] on the ribbon
  • [Shape Definition] tab > [Style] > [Diagram], [Color], [Border Thickness], [Show metamodel icon] on the Inspector
  1. Change the default size of the shape using one of the following methods.
  • Change the size of the selected shape and click the [Add Shape] > [Size] > [Set Default Size from Selected Shape] button on the ribbon.
  • Enter the width in the top row of [Add Shape] > [Size] > [Default Size] on the ribbon and the height in the bottom row.
  • Enter values in [Shape Definition] tab > [Default Size] > [Width] and [Height] in the Inspector.
note
  • Changing the default size of a shape does not change the size of the selected shape or existing shapes.
  • Shapes added after changing the default size will be the default size.

Changing the icon of an entity

To change the icon of an entity displayed in the Model Navigator and Toolbox, follow the steps below from the Inspector.

Change entity icon

Procedure
  1. Click [View] > [Pane] > [Inspector] from the ribbon to display the Inspector on the right side of the screen.
  2. Select the shape you want to change on the view.
  3. Select [Metamodel] from the tabs at the top of the Inspector.
  4. Click [Select] under [Class] > [Icon] and select an icon from the [Select icon] dialog.

Change shape label

To change the title of a shape or the fields displayed in its body, follow the steps below.

Change shape label

Procedure
  1. Select the shape you want to change on the view.
  2. To change the field to display in the title or body of the shape, select the field to display from the [Add Shape] > [Text] > [Title] or [Body] pull-down list on the ribbon.
  3. To change the text alignment of the title or body of the shape, click [Align Left], [Center], or [Align Right] under [Add Shape] > [Text] > [Title] or [Body] on the ribbon to switch between them.

To change the font settings of the title or body of the shape, follow the steps below.

Change the label of a shape

Operation procedure
  1. Select the shape to be changed on the view.
  2. To change the font settings of the title or body of the shape, click the [Font Setting] button on the ribbon under [Add Shape] > [Text] > [Title] or [Body] to display the [Font Setting] dialog.
  3. In the [Font Setting] dialog, set [Font Family], [Font Size], [Bold], [Italic], [Underline], [Strikethrough], and [Font Color], and then click the [OK] button.

To add or remove a label for a shape, follow the steps in the Inspector.

Operation Procedure
  1. Click [View] > [Pane] > [Inspector] from the ribbon to display the Inspector on the right side of the screen.
  2. Select the shape you want to change in the view.
  3. Select [Shape Definition] from the tabs at the top of the Inspector.
  4. To add a label, click the [+] button below the [Label] list.
  5. In the [New Label] dialog, select [Filelds] and [Layout], enter the text to be used when no value is set in [Hint Text], and click the [OK] button.
  6. To delete a label, select the relevant row from the [Label] list and click the [-] button below the list.

Deleting a shape

To delete a shape from the diagram view definition and return the corresponding shape to an undefined state for the entity, follow the steps below.

Delete a shape

Operation procedure
  1. Select the shape you want to delete on the view.
  2. Click [Add Shape] > [Add Shape] > [Delete] on the ribbon.
  3. All the corresponding shapes are deleted from the view, but the models remain. If you add the shapes again, the models will reappear on the view.
Caution
  • When you delete a shape from the ER diagram view definition, the connectors connected to that shape are also deleted from the view definition.

Adding a child shape

To be able to edit related elements of a model as nested shapes in an ER diagram, follow the steps below in the model editor.

Add a child shape

Operation procedure
  1. Select the shape that you want to have a nested shape in the view.
  2. Add a child shape in one of the following ways:
  • Click [Add Shape] > [Add Shape] > [Add Shape] on the ribbon, and click [Child Shape] from the shape list.
  • Click [Profile] > [Diagram] > [Add Shape] on the ribbon, and click [Child Shape] from the shape list.
  1. In the [New Shape] dialog, select the field that holds the related model from the [Target Field] pull-down list, and press the [OK] button.
  2. You can now drag and drop entities that can be added as related elements from the Tool Box into the shape.
note
  • If there are multiple types of entities that can be added as related elements, you need to add a child shape for each of those entities.

Add a port

To be able to place related elements of a model as ports on the edge of a shape in an ER diagram, follow the steps below in the Model Editor.

Add a port

Operation procedure
  1. Select the shape that you want to have a port on the view.
  2. Add a port in one of the following ways:
  • Click [Add Shape] > [Add Shape] > [Add Shape] from the ribbon, and click [Port] from the shape list.
  • Click [Profile] > [Diagram] > [Add Shape] from the ribbon, and click [Port] from the list of shapes.
  1. In the [New Port] dialog, select the field that holds the related model from the [Target Field] pull-down list.
  2. Next, select a location where the port can be placed in [Display Location].
  3. Next, select the port shape in [Diagram] and press the [OK] button.
  4. You can now drag and drop entities that can be added as related elements from [Tool Box] to the edge of the shape.
note
  • If you want to set up input and output ports, define two relationships in the metamodel, then add a port for each of those relationships.

Changing compartment partitions

If the shape type is [Compartment], you can display any field in the partition under the title. To add a field to the pane, follow the steps below.

Change a Compartment Pane

Instructions
  1. Select the shape you want to change on the view.
  2. Click [Add Shape] > [Label] > [Add Compartment] from the ribbon.
  3. In the [New Compartment] dialog, select the field you want to add from [Fields] and press the [OK] button.

To change the order of fields displayed in the pane or remove them from the pane to hide them, follow the steps below in the Inspector.

Instructions
  1. Click [View] > [Pane] > [Inspector] from the ribbon to display the Inspector on the right side of the screen.
  2. Select the shape with compartments you want to change on the view.
  3. Select [Shape Definition] from the tabs at the top of the Inspector.
  4. Select a field listed in [Compartments], and use the [↑] and [↓] buttons below the list to change the order, or the [-] button to remove it from the compartment.

Define a connector

Add a connector

If the reference relationships between entities are already defined in the metamodel, add a connector definition as in the following procedure.

If the reference relationship between entities is not yet defined, follow the steps below to add the reference relationship between entities and the connector definition at the same time.

Add Connector

Operation Procedure
  1. Select the two models you want to connect the relationship line between on the ER diagram by holding down the ctrl key and clicking them.
  2. From the ribbon, click [Profile] > [Diagram] > [Add Connector]. Click the [▼] at the bottom and click [Add Reference and Connector].
  3. Check the direction of the association in [Connection Source] and [Connection Target] in the [New ConnectorShape] dialog.
  4. Next, select [Icon] and set the [Style] item.
  5. When you press the [OK] button in the dialog, the reference association between entities and the connector definition are added to the metamodel, and the association line is added to the ER diagram.

Changing the default style of the connector

As with changing the style of the shape, there are two ways to change the style of the connector:

  • Change the style of each association line displayed in the ER diagram
  • Change the default style of the connector defined for each association as a view definition of the ER diagram

Here, we will explain the latter procedure. For the former, see Modeling > Edit Model > Edit ER Diagram.

To change the default style of a connector, follow these steps:

Change the default style of a connector

Operation procedure
  1. Select the connector you want to change on the view.
  2. Use the following UI to change the default style of the connector.
  • Ribbon [Add Connector] > [Style] > [Connection Source], [Connection Target], [Connection Form], [Quick Style], [Fill Color], [Line Color]
  • Inspector [Shape Definition] tab > [Style] > [Connection Source], [Connection Target], [Connection Form], [Color], [Border Thickness], [Line Style], [Show metamodel icon]

Change connector label

To add a label to a connector, follow these steps:

Change connector label

Operation procedure
  1. Select the connector you want to change on the view.
  2. Click [Add Connector] > [Add Label] from the ribbon.
  3. In the [New Label] dialog, select [Fields] and [Layout], enter text for when no value is set in [Hint Text], and click the [OK] button.
  4. Edit the connector field values in the [Property] tab of the Inspector.

To change or delete a connector label, follow the steps in the Inspector.

Operation procedure
  1. Click [View] > [Pane] > [Inspector] from the ribbon to display the Inspector on the right side of the screen.
  2. Select the connector you want to change on the view.
  3. Select [Shape Definition] from the tab at the top of the Inspector.
  4. To change the label of a connector, point to the corresponding line listed in [Label] and click the [Edit Label] button that appears at the right end of the line.
  5. In the [Setting - Label] dialog, change [Files] and [Layout] and click the [OK] button.
  6. To delete a connector label, select the corresponding line listed in [Label] and click the [-] button below the list.

Changing connector settings

To change settings such as the directionality of the connector connection, follow the steps below in the Inspector.

Operation procedure
  1. Click [View] > [Pane] > [Inspector] from the ribbon to display the Inspector on the right side of the screen.
  2. Select the connector you want to change on the view.
  3. Select [Shape Definition] from the tabs at the top of the Inspector.
  4. Change the settings in the [Add Shape] group.
Reference

Delete a connector

To delete a connector from the diagram view definition and return the connector corresponding to the association to an undefined state, follow these steps:

Delete a connector

Operation procedure
  1. Select the connector you want to delete on the view.
  2. Click [Add Connector] > [Add Shape] > [Delete] on the ribbon.
  3. All the corresponding connectors are deleted from the view, but the associations remain in the model. If you add the connector again, those associations will reappear on the view.