ORM (Object-Relationship Model) Tutorial

This is a hypertext tutorial for the ORM (Object-Relationship Model) of OSA.

The ORM is the "static" part of OSA. That is, the ORM describes the "database" of a model: what objects may exist, what object classes they belong to, and what relationships exist between objects.

ORM Concepts and Terms

An ORM diagram is composed of several components which are described below.

Objects

An object is any unique person, place, or thing, either physical or conceptual. It is represented by a black dot.

Every object is inherently unique. For example, an object can have more than one name, and the same name may be used for more than one object. (See synonyms and homonyms.)

Formally, every object is a constant singleton object class.

Object Classes

Objects with common properties can be grouped into sets called object classes. An object class is represented by a rectangle containing the name of the object class.

Unlike most object-oriented languages, object classes in OSA are sets. Thus, an object may join or leave an object class.

Lexical Object Classes

A lexical object class is an object class in which each member has a one-to-one mapping with its representation. It is represented by a dashed rectangle containing the name of the class.

Relational Object Classes

A relational object class is an object class whose members are relationships. It is represented by a rectangle containing a relationship set.

High-Level Object Classes

A high-level object class is an object class that contains other object classes, relationship sets, constraints, and notes. It has an exploded and an imploded representation.

Relationships

A relationship is a statement of some connection between objects. It is represented by a line connecting the objects, labeled with the relationship name.

Relationships can have arbitrary arity. That is, a relationship can occur between two, three, four, or more objects simultaneously.

Relationship Sets

Relationships between objects in object classes can be grouped into relationship sets. A relationship set is represented by a line connecting the object classes, labeled with the relationship set name.

Special Relationship Sets

The following types of relationships can all be represented by normal relationship sets, but they occur often enough that short hand notations are defined for them:

High-Level Relationship Sets

A high-level relationship set is a relationship set that contains other relationship sets, object classes, constraints, and notes. It has an exploded and an imploded representation.

Constraints

Constraints can be imposed on various parts of an ORM diagram. OSA includes several types of constraints.

Object Class Cardinality Constraints

The number of objects in an object class can be constrained by object-class cardinality constraints (also called simply cardinality constraints).

Participation Constraints

A participation constraint determines how many times each object in an object class can participate in a given relationship set.

Co-occurrence Constraints

We use co-occurrence constraints in relationship sets with arity of three or more. They specify how many different objects can appear with a given object or group of objects in a relationship set.

Specialization Constraints

Specialization constraints qualify the relationship between a generalization and its specializations. A specialization constraint can be a union constraint, a mutual exclusion constraint, a partition or an intersection constraint.

General Constraints

A general constraint expresses constraints which are not otherwise expressible. General constraints are often written in English, but they can be expressed in more formal terms.

Notes

A note is information which may prove helpful to people reading an ORM diagram. Semantically, it has no significance.


Go to the OSA Tutorial

Go to the OBM Tutorial

Begin the ORM tutorial with Object


 OSM Home Page CS Dept Home Page  BYU Home Page


Last updated 30 Sept 1994.
by Brent Goodman (mbg@byu.edu)