Structured Entity Relationship Model

from Wikipedia, the free encyclopedia

The Structured Entity-Relationship Modeling ( SERM ) claims to the data modeling according to the Entity-Relationship to expand method. It was originally published by Elmar Sinz in 1988 .

aims

  1. Structuring of large data schemes through a quasi-hierarchical arrangement (see types of graphs in graph theory ) of the entity types (from left to right)
  2. Visualization of existence dependencies through relationship semantics
  3. Avoidance of inconsistencies by not allowing circular references
  4. Avoidance of unnecessary relation types through key inheritance

The data object types in a SERM can either be original or dependent. The dependency can be both one-sided and reciprocal.

notation

SERM symbols

The graphic notation in SER diagrams differs markedly from ER diagrams. The relationship type from ER diagrams is not used, instead there are two new types: Entity-Relationship-Type (ER-Type) and Relationship-Type (R-Type). The entity type is still used (E type).

Relationships between the types are illustrated as arrows. The cardinality of the respective relationship determines the arrow used. (There are different notations for this, e.g. the one shown here, which, however, differs from the representation originally presented by Sinz).

It should be noted that SER diagrams primarily illustrate the dependencies between the types. To see this clearly, diagrams are drawn according to the following rules:

  • Edges come from the left and go to the right (never the other way around). Leftmost types are therefore independent. Types on the right are dependent on types on the left as soon as an arrow from there enters the type.
  • SER diagrams can contain circles but not cycles. (A circle is represented by a closed sequence of edges, a cycle is a closed sequence of edges in which the direction of the edges is taken into account).
  • The edges of a SER diagram provide information about the relationship between the types. Edges are labeled with PK for primary key and FK for foreign key (not shown in the example).

Example data model

SERM example

  • Customer and article are independent (original) entities. Their existence does not depend on anything else.
    Note that it is enough that a type could be independent for it to be drawn as an E-type. If you model the example slightly differently, namely in such a way that an invoice is not connected to the customer with a (0, *) but with a (1, *) edge, nothing changes in the arrangement of the types (!) . Only the edge from customer to invoice changes, although the customer is now also dependent on the invoice , in the form that a customer is only created if at least one invoice is created.
  • Each order relates to exactly one customer. Orders without customers are not permitted (order is ER type), customers without orders are permitted (customer is E type).
  • Each order has at least one order item. The order and the order item are mutually dependent.
  • Each order item relates to an article. An article can appear in several order items.
  • Each invoice relates to exactly one customer. Customers without invoices are again permitted, but invoices without customers are not.
  • Each invoice has at least one invoice item. The invoice and invoice item are mutually dependent.
  • Each invoice item relates to exactly one order item. An order line may or may not be calculated.

Procedure for converting an ER diagram into an SER diagram

If there is an ER diagram in min-max notation , it can be converted into an SER diagram using the following Staud procedure (from p. 196 below).

  1. Find out which types exist in the SER diagram:
    1. Look at all entity and relationship types in the ER diagram. For every two that are connected with a (1,1) edge, create an ER type in the SER diagram.
    2. For all remaining entity types in the ER diagram, create a corresponding E type in the SER diagram.
    3. For all remaining relationship types in the ER diagram, create a corresponding R type in the SER diagram.
  2. Write all the E-types you just identified to the left in a column.
  3. Add the ER and R types based on their existential dependencies (with simple examples, the ER types are usually in the second column and the R types are usually in the third column). Connect all types with edges according to the cardinalities in the ER diagram.

example

The following ER diagram in min-max notation is available:
Example-ER2SERM-Start.png

Characteristics of the diagram:

  • A skilled worker has at least one performance that he is good at. A service belongs to exactly one specialist. (The company calculates the staff very carefully.)
  • A service consists of any number of components, but each component belongs to at least one service.

The following SER diagram can be created using the above procedure:
Example-ER2SERM-Ende.png

Of power and can be an ER type, as these with a (1,1) are connected -edge. The remaining types are then converted 1: 1. The edges result from the cardinalities in the ER diagram.

Individual evidence

  1. ^ Elmar J. Sinz: The Entity-Relationship-Model (ERM) and its extensions. In: HMD. 152: 17-29 (1990).
  2. ^ Josef Staud: SERM - Structured Entity-Relationship-Models . In: Data Modeling and Database Design . Springer, Berlin / Heidelberg 2005, ISBN 3-540-26684-4 , pp. 193-202.