Skip to main content

ER diagram view definition

Overview

With Next Design, you can define an ER diagram view that can express model structures and relationships between models in a diagram format.

ER diagram example

By specifying the following notation method in the ER diagram view definition, diagrams with various designs can be expressed.

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

The following types of shapes are available:

Shape types

Shape typeDescription
Title Only ShapeA title is added inside the shape.
Title and DescriptionA body containing the title and description of the shape is attached.
With LabelAdds a title to the outside of the shape.
ContainerCan have related models as nested shapes.
CompartmentYou can display multiple fields that you specify within a shape.
PortCan be placed on the edge of a shape as a contact point for a connector.
Child ShapeAllows related models to be nested shapes.

There is only one type of connector. By changing the style of the connector, you can make it have polylines or arrows.

Below, we will explain how to define an ER diagram view in the following order:

  • Define the shape
  • Define the connector

Define the shape

add shapes

To add a shape to a diagram's view definition, from the model editor:

Add shape

Operating instructions
  • For operating instructions, please refer to the following content:

[Quickstart > Profile Definition > Define Diagram View > Add Shapes for Each Entity](../../quick-start/profile-definition/define-diagram-view#define-diagram-view--add- shape-by-each-entities)

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

Change the shape type or shape

To change the type or shape of a shape that has been added to a view definition, do the following from the model editor:

Change shape type and shape

Operating instructions
  1. Select the shape you want to change on the view.
  2. To change the shape type, click Add Shape > Node > Change Shape Type from the ribbon and click a type from the choices.
  3. To change the shape of the shape, click Add Shape > Style > Change Shape from the ribbon and click a shape from the selection.
Using custom shapes
  • In addition to the standard built-in shapes, you can also use your own images as shapes.
  • For more information, see [How To > Profile Definition > View Definition > Display Images in Diagrams](../../../how-to/profile-definition/view-definition/use-images-in-diagrams .md).
Caution
  • Extra labels (such as model name) may remain visible after changing the shape type. In that case, please delete unnecessary labels according to "Change shape labels" below.

Change the default style of shapes

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

  • Change the style of individual models displayed on the diagram
  • Change the default style of shapes defined per entity as view definitions in diagrams

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

To change a shape's default style or size:

Change the default style of shapes

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

Change an entity's icon

To change the icon of an entity displayed in the model navigator or toolbox, do the following from the Inspector:

Change the entity icon

Operating instructions
  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 choose an icon from the Select icon dialog.

Change a shape's label

To change the fields that appear on a shape's title or body, follow these steps:

Change shape label

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

To add or remove labels from a shape, from the Inspector:

Operating instructions
  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 Shape Definition from the tabs at the top of the inspector.
  4. To add a label, click the + button below the Label list.
  5. Select [Fields] and [Layout] in the [New Label] dialog, enter the text when no value is set in [Hint Text], and press the [OK] button.
  6. To delete a label, select the relevant line from the [Label] list and click the [-] button below the list.

Delete a shape

To remove a shape from a diagram's view definition and return the shape corresponding to an entity to an undefined state, follow these steps:

Delete shape

Operating instructions
  1. Select the shape you want to delete on the view.
  2. Click Add Shape > Add Shape > Delete from the ribbon.
  3. All relevant shapes will be deleted from the view, but the model will remain. Adding the shapes again will cause them to reappear on the view.
Caution
  • When you remove a shape from the view definition of an ER diagram, the connectors leading to that shape are also removed from the view definition.

Add child shapes

To enable editing of related elements of a model as nested shapes in an ER diagram, do the following from the model editor:

Add child shape

Operating instructions
  1. Select the shape you want to have a nested shape on the view.
  2. Add child shapes using one of the following methods:
    • Click [Add Shape] > [Add Shape] > [Add Shape] from the ribbon and click [Child Shape] from the list of shapes.
    • Click [Profile] > [Diagram] > [Add Shape] from the ribbon, and then click [Child Shape] from the list of shapes.
  3. 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.
  4. 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 must add a child shape for each entity.

add port

To be able to place related elements of a model as ports on the edge of a shape in an ER diagram, from the model editor, do the following:

Add port

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

Change compartment partitions

If the shape type is Compartment, any field can be displayed in the compartment below the title. To add fields to display on a parcel:

Change compartment partition

Operating 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 to add from [Fields] and press the [OK] button.

To change the order of fields displayed in a pane or remove them from the pane to hide them, from the Inspector:

Operating instructions
  1. Click View > Pane > Inspector from the ribbon to display the inspector on the right side of the screen.
  2. Select the compartmented shape 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, and the [-] button to remove it from the compartment.

Define a connector

Add a connector

If your metamodel already defines reference relationships between entities, add a connector definition as in the next step.

reference

[Quickstart > Profile Definition > Define Diagram View > Add connectors for reference relationships between entities](../../quick-start/profile-definition/define-diagram-view#define-diagram-view- -add-connector-for-references-between-entities)

To add a reference relationship between entities and a connector definition at the same time when the reference relationship between entities is undefined, follow these steps:

Add connector

Operating instructions
  1. Select the two models on the ER diagram by holding down the ctrl key and clicking them.
  2. From the ribbon, click Profile > Diagram > Add Connector, click ▼ at the bottom, and click Add Reference and Connector.
  3. In the New ConnectorShape dialog, check the Connection Source and Connection Target to determine the direction of the relationship.
  4. Next, select [Icon] and set the [Style] items.
  5. Click the [OK] button in the dialog to add reference relationships and connector definitions between entities to the metamodel, and to add relationship lines on the ER diagram.

Change the default style of a connector

Similar to changing the style of a shape, there are two ways to change the style of a connector:

  • Change the style of individual association lines displayed on the ER diagram
  • Change the default style of connectors defined for each association as a view definition in the ER diagram

This section describes 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 connector style

Operating instructions
  1. Select the connector you want to modify on the view.
  2. Change the default style of the connector using the following UI:
    • 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 the connector label

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

Change connector label

Operating instructions
  1. Select the connector you want to modify on the view.
  2. Click Add Connector > Add Label from the ribbon.
  3. Select [Fields] and [Layout] in the [New Label] dialog, enter the text when no value is set in [Hint Text], and press the [OK] button.
  4. Edit the connector's field values ​​in the Inspector's Property tab.

To change or remove a connector's label, from the Inspector:

Operating instructions
  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 modify on the view.
  3. Select Shape Definition from the tabs at the top of the inspector.
  4. To change the connector's label, point to the appropriate row listed under Label and click the Edit Label button that appears at the far right of the row.
  5. Change [Fields] and [Layout] in the [Setting - Label] dialog and press the [OK] button.
  6. To delete a connector label, select the line listed under Label and click the - button below the list.

Change connector settings

To change settings such as the orientation of a connector connection, follow these steps from the Inspector:

Operating instructions
  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 modify 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 remove a connector from a diagram's view definition and return the associated connector to an undefined state, follow these steps:

Delete connector

Operating instructions
  1. Select the connector you want to delete on the view.
  2. Click Add Connector > Add Shape > Delete from the ribbon.
  3. All applicable connectors will be deleted from the view, but the relationship will remain as a model. Re-adding the connector will cause those relationships to reappear on the view.