Previous Topic

Book Contents

Book Index

Next Topic

Example: Time Related N:M Relationship

As an example of a time-related n:m relationship we have chosen System : Location. A System can have many locations over time, but one and only one location at any given time. Many systems may be located at a given location.

For the relation between Systems and Locations, a new table is required where Systems and Locations are allocated to one another. The primary key of this new table is the combination of the Systems, Locations and period of validity during which a particular allocation is valid. This table defines the relation between Systems and Locations.

The System business object has a relation to the SystemLocation relation table, and the Location business object also has a relation with the SystemLocation relation table. These must be defined first using the Relation Wizard.

  • First we define the relation between the Systemlocation relation table and the System business object.
  • Next, the Relation between the SystemLocation Relation and the Location BO is defined.
  • Select the two relations from the combo boxes.
  • Restrict maximal cardinality of the time related association to 1 at a time

    This function is coupled with time-related relation. For instance, a System can have different Locations over a period of time. Define an m:n relation between System and Location and specify it as time-related relation (the linking object has a time related object type flag set to true in Objecttype Customizer) and that it simulates "time- related" n:1.

    By simulating this, you trigger the Valuemation functionality. By checking the Restrict maximal cardinality of the time related association to 1 at a time, you specify that the System can have just one location at any given point in time.

Now save a new n:m relation by clicking the 'Save' button. If you open the Relation main window again, you can find this new 'System - Location' m:n relation in the list of relations.

See Also

Examples

Example: Contract Item - Contract Relation in Detail

Example: Various Relation Scenarios

Example: N:M Relationship

Example: Cost Center "is managed by" Person

Example: Organizational Unit "is managed by" Person

Example: Person "works for" Organizational Unit

Example: Person "is assigned to" Cost Center

Example: System "is of" System Type