The data model in the Modeler

Next to the Enterprise Structure Model, the Business Function Model, and the Business Process Model, the data model is the fourth type of diagram you can model in the Modeler.

When you create or modify an entity relationship diagram, the following buttons are available in the Modeler.

An entity type represents a cluster of associated data. There are two alternative entity types. To change the entity type, right-click an entity type, point to Type, and click one of these two options:

  • Норм.
    The logical data set (table)
  • Тип ассоциативн.сущность
    This is an entity type used to represent a many-to-many relationship between two entities. Normally, a table is used to create a many-to-many relationship.

To link a LN table to an entity type, complete these steps:

  • Right-click an entity type.
  • Click Таблица
  • In the window that opens, click Добавление
  • In the Table Definitions (ttadv4526m000) session, select a LN table.
  • Click OK.

To link an underlying entity relationship diagram to an entity type:

  • Right-click an entity type.
  • Click Properties
  • In the Типы сущностей (tgerm1130s000) zoom in the Decomposed Diagram field.
  • In the Диаграммы отношений сущностей (tgerm1500m000) session, select an entity relationship diagram.
  • Click OK

A relationship defines a relation between two entity types.

The cardinality of a relationship defines the expected number of related occurrences for each of the two entity types.

To change the cardinality of a relationship:

  • Right-click a relationship and point to Cardinality.
  • Select one of the options; One to One, One to Many or Many to Many.

You can show that one way or both ways of the relationship are optional. To make a relationship optional:

  • Right-click a relationship.
  • Depending on which part of the relationship you want to make optional, click either Optional From –To or Optional To – From

The subtype relationship is a relationship between a subtype and a supertype; it is used to indicate that the attributes of the supertype also apply to the subtype.

The diagram shows the relationships between versions, entity types, entity type categories, and database tables in the Modeler.

The relationship between tables, entity types and versions as
		  shown in the Process Modeler Workbench
The relationship between tables, entity types and versions as shown in the Process Modeler Workbench
Sessions used in the Modeler

The following sessions are only accessible from the Modeler:

  • Свойства диаграммы отношений сущностей (tgerm1102s000)
    Use this session to view or change the details of an entity relationship diagram.
  • Создание диаграммы отношений сущностей (tgerm1103s000)
    Use this session to define the details of an entity relationship diagram when you create a new diagram from the editor.
  • Типы сущностей (tgerm1130s000)
    Use this session to change entity type details or replace the selected entity type by a new one. In this session, you can also link a child diagram to an entity type by zooming to the Диаграммы отношений сущностей (tgerm1500m000) session.
  • Отношения типов сущностей (tgerm1140s000)
    Use this session to change entity type relationship details such as cardinality and relationship category. This session also lets you include an associative table in the diagram.

To modify the fields and indices of the tables linked to an entity type, double-click the entity type icon, or right-click an entity type, point to Редактировать, and click Таблицы. To modify the field or index data, in the Window that appears, click Show Table Fields icon or Show Table Indices.

The reverse-engineering procedure

Instead of creating entity relationship diagrams from scratch, you can use reverse engineering when you create a data model consisting of LN tables.

Reverse engineering lets you use information from an existing database. You can either select entity types that have not been used before in entity relationship diagrams, or generate a new set of entity types for which entity relationships or entity relationship diagrams already exist.

Figure 14.8 shows the two sessions that make up the procedure for reverse engineering.

The reverse engineering procedure
The reverse engineering procedure
Создать типы сущностей и связей на базе словаря данных ERP (tgerm1210m000)

To generate entity types and entity-type relationships by reverse engineering, use the Создать типы сущностей и связей на базе словаря данных ERP (tgerm1210m000) session.

Only LN tables entity types can be created by means of reverse engineering.

To start this session:

  • On the соответствующий menu of the Типы сущностей (tgerm2500m000) session, click Создать типы сущностей на основе ERP DD...; alternatively, on the соответствующий menu of the Отношения типов сущностей (tgerm3500m000) session, click Создать связи на основе ERP DD...

The newly generated entity types and entity relationships can be used in existing or new entity-relationship diagrams.

To generate entity types and relationships from LN tables:

  • In the Table fields, select the range of tables for which you want to create entity types, and between which you want to establish relationships.
  • To create the relationships between the selected LN tables, select the Генерация отношений типов сущностей check box.
  • To create entity types for the selected range of LN tables, select the Generate Entity Types check box.
  • In the Хранить в версии field, select a version in which the generated entity types and entity-type relationships are stored.
  • Click Создание
Создать диаграммы связи сущностей на основе типов (tgerm1220m000)

To select a range of entity types for which you want to create entity-relationship, use the Создать диаграммы связи сущностей на основе типов (tgerm1220m000) session.

To start this session:

  • On the specific menu of the Диаграммы отношений сущностей (tgerm1500m000) session, click Генерация ERD из сущностей/отношений
  • For each entity type, an entity-relationship diagram is added in the Диаграммы отношений сущностей (tgerm1500m000) session.

To create entity relationship diagrams from entity types and entity type relationships, complete these steps:

  • In the Тип сущности field, select the range of entity types for which you want to create entity type relationships.
  • In the Хранить в версии field, select the version in which the entity type diagrams must be stored.
  • Click Создание
Примечание

If you select the Переписать check box, entity relationship diagrams that already exist in the selected version are overwritten by the newly created diagrams.