Object Role Modeling

Object Role Modeling (ORM, English for modeling the roles of objects ) is used in the context of data modeling a part of the real world (german universe of discourse, UoD ) to describe. It describes objects and their roles to each other either in simple sentences, or in intuitive charts.

It is used for a in the conceptual phase of the application development of communication between users and developers, where only the what, ie the inherent logic, and not the how, so the technique is presented. Secondly, the ORM model is used in the implementation phase as a basis for the design of the database.

Example

In the picture on the right is a simple relation is shown: An employee working in a Department. This diagram presents the three basic types of objects:

  • Entities ( employee and department) are the actual objects of UoDs. Entities are represented as ellipses.
  • Roles ( work) (also fact type ) represent the relationship between entities (objects) dar. roles are represented as concatenated rectangles.
  • Label ( "Name of Angest. " And "Name of the Dep. " ) Are the types of the objects.

An instance in this example is an assignment of the table. For example: " Franz Otto works in sales. " Here, Franz Otto is an instance of Employee and selling an instance of Department.

Algorithm

To get from a table with (significant) entries in an ORM diagram, you can go through the following seven steps. It is a more formal way to an ORM diagram, but most (especially for complicated diagrams), it is helpful to think of the gradual and not to try to convert everything at once.

Algorithm as an example

Is given the following table. This is an ORM - diagram will be created.

Transformation known information into elementary facts

In this step, you try to be clear about the types and their context. First you try to convert the information given in meaningful sentences:

  • " Databases is held at 15:00 clock. "

To be able to easily connect to the diagram, you have to worry, now what an entity type, a label type and represents an instance of an entity types. The above theorem can be rephrased in:

  • " The lecture with the course name databases is held at the time of type time 15:00 clock. "

From this theorem one can read:

  • , Lecture ' and ' time ' are entity types
  • , Lecture Name 'and' time ' are label types and
  • , Databases ' and, 15:00 clock ' are instances of lecture and time and are of the type lecture name and time.

Because time really refers in this table only to the lecture, this sentence is correct and complete. Somewhat more complicated is when you look at the note.

Two false propositions:

  • "Student Müller got a rating of 2.0. " → Here the question of which course he has achieved it remains
  • " In the lecture databases the note was assigned 2.0. " → Here the question arises, for which the student applies.

Correct sentence:

  • "Student Müller achieved score 2.0 in the lecture databases. "

Now this is not a fact type more, spanning only two entity types.

Draw the fact types

From the set: " The course with the lecture name databases is held at the time of type time 15:00 clock. " You can now create the following diagram. It is allowed, the label type to write in parentheses below the entity type.

Because of this fact type only two entity types binds, which is a binary fact type

From the set: "Student Müller achieved score 2.0 in the lecture databases. " you will now create an ORM diagram with a ternary fact type, as this fact type three entity types binds.

602299
de