Entity Relationship Modeling procedure

There are two different approaches for modeling databases:

  • The first is the top-down approach, which must be used when physical entity types, entity relationships and entity relationship diagrams are not created yet. Therefore, you must manually create and define all entity types and relationships.
  • The second is reverse engineering. This is a quick way to model entity relationship diagrams. You can select existing database or table definitions for which a diagram is created automatically. Reverse engineering can only be used in the case of LN.

Carrying out the Entity Relationship Modeling procedure results in a model that shows the relations between different databases.

The Entity Relationship Modeling top-down procedure consists of these sessions:

  • Entity Types (tgerm2500m000)
  • Tables by Entity Type (tgerm4100m000)
  • Entity Type Relationships (tgerm3500m000)
  • Entity Relationship Diagrams (tgerm1500m000)
Entity Types (tgerm2500m000)

To create the entity types, use the Entity Types (tgerm2500m000).

To define an entity type:

  • In the Entity Types (tgerm2500m000) session, click New.
  • In the Entity Type field, specify an ID for the entity type.
  • Click Save.
Key fields for the Entity Type Details (tgerm2100s000) session
FieldDescription
Owner PackageThe package to which the entity type is related.
Owner ModuleThe module to which the entity type is related.
Link to DiagramThe entity-relationship diagram into which an entity type is decomposed. At a different level in the DEM-Tool, you can see the entity-type relationship between the current entity type and other entity types.
Entity Type CategoryIf this check box is selected,, the entity type is a physical entity type or a logical entity type related to the Baan package.
Associative Entity TypeIf this check box is selected,, the entity type serves as a link between two other entity types that have a many-to-many relationship between them.

 

Tables by Entity Type (tgerm4100m000)

Select one or more tables from the Table Definitions (ttadv4526m000) session. To link those tables to the selected entity type, use the Tables by Entity Type (tgerm4100m000) session.

To start this session:

  • Go to the Entity Types (tgerm2500m000) session.
  • Click the appropriate menu.
  • Select Link ERP Tables to Entity Type...

One entity type can be linked to several tables. The interdependent relations between these tables are shown at different levels in the Modeler.

Entity Type Relationships (tgerm3500m000)

To list and define entity type relationships, use the Entity Type Relationships (tgerm3500m000) session. The relationships listed in the Entity Type Relationships (tgerm3500m000) session are established between the entity types listed in the Entity Types (tgerm2500m000) session.

To define entity type relationships, in the Entity Type Relationship Details (tgerm3100s000) session, select the entity types between which relationships are to be established. You can also define the cardinality of the relationship between the selected entity types.

In the case of an M:N relationship, an associative entity type can be created, and a table can be selected from the Table Definitions (ttadv4526m000) session to serve as a link between two entity types.

To define a relationship between two entity types:

  • In the Data Entity Relationship field, specify an ID for the relationship.
  • In the FromEntity Type field, select the first entity type involved in the relationship.
  • In the ToEntity Type field, select the other entity type involved in the relationship.
  • In the Min Cardinality From - To field, specify the number of possible entities for each entity type of a pairing for the entity type you selected in the FromEntity Type field.
  • In the Min Cardinality To - From field, for the entity type you have selected in the ToEntity Type field, specify the number of possible entities per entity type of a pairing.
  • Click Save
Key fields for the Entity Type Relationship Details (tgerm3100s000) session
FieldDescription
Relationship is SubtypeIf this check box is selected,, the entity-type relationship is between a subtype and a supertype entity type; it is used to indicate that the supertype’s attribute also applies to the subtype.
Physical Database Relation existsIf this check box is selected,, the entity-type relationship is between entity types that have tables from the LN data dictionary linked to them.
Associative TableAn LN table used to link two entity types that have a many to many relationship between them
InfiniteIf this check box is selected,, the maximum to-from relationship is infinite.

 

Entity Relationship Diagrams (tgerm1500m000)

To create and maintain the entity-relationship diagrams, use the Entity Relationship Diagrams (tgerm1500m000) session. An entity-relationship diagram is a graphical design of the relational data model structure. The diagram shows a multilevel structure that consists of entity types and entity-type relationships.

To create an entity-type relationship diagram:

  • In the Entity Rel. Diagram field, specify an ID for the entity relationship diagram.
  • In the Owner field, select the LN user who created or is responsible for the entity relationship diagram.
  • Select who is authorized to modify the diagram by selecting one of the check boxes under To be modified by.
  • Click Save