company logo

inverse relationship

Relationships are bi-directional in many cases, i.e. when instance A has a relationship to B then B has a relationship to A as well. Even though, relationships of higher order are possible, bi-directional relationships are rather common and especially supported.

A special case is the inverse relationship for a shared base structure. This allows traversing all specializations for a given base instance. When defining inverse relationships for shared base structures, which can be derived to different types (as a person might have specializations as employee and patient), the relationship in the base structure is a weak-typed collection, usually.

A pair of relationships is expressed in terms of inverse relationships, where each relationship is the inverse of the other relationship, i.e. it is not important in principle, whether A sets up a relationship to B or reverse. This, in fact, creates database redundancy, which is maintained by the OODBMS. Inverse relationships in ODABA are also required for maintaining base collections for local collections.

Related topics