Inverse-of-relation attribute. The following figure shows a relation and an inverse relation between two objects,
A and B. The relation X is the relation name, and the relation Y is the inverse relation. The arrow between the two objects represents the relation.
![]() |
If you define a relation with an inverse, concluding an instance of that relation also concludes an instance of the inverse relation.
A is the First-class and B is the Second-class, you can conclude that A is related to B, or that B is related to A. previous-linestation-for could specify an inverse relation named next-linestation-for, as this table shows.
Note: If you have specified an inverse relation, you cannot also specify that the relation is symmetrical. The Relation-is-symmetric attribute must be no. A symmetrical relation creates its own inverse relation, which has the same name as the relation, as described in Defining a Symmetric Relation.
The inverse of a relation has the inverse cardinality of that relation, as this table shows.
| If the relation's cardinality is... | then its inverse relation is... |
|---|---|
|
One-to-one
|
One-to-one
|
|
One-to-many
|
Many-to-one
|
|
Many-to-one
|
One-to-many
|
|
Many-to-many
|
Many-to-many
|
To create an inverse relation:
Type-of-relation attribute.
no for the Relation-is-symmetric attribute.
Inverse-of-relation attribute.
Inverse-of-relation attribute when the Relation-is-symmetric attribute is yes.