RTblRelships SQL Table

Meta Data Services Programming

Meta Data Services Programming

RTblRelships SQL Table

RTblRelships stores instance data for each version combination present in a two-way versioned relationship.

Column name Data type Description
OrgID RTIntID The internal identifier for the origin object of the relationship.
Z_OrgBrID_Z RTBrID Indicates the branch of the version graph containing the origin object version.
Z_OrgVS_Z RTVerID Indicates the lower limit of the range of origin object versions that have version-to-version relationships described by this row.
Z_OrgVE_Z RTVerID Indicates the upper limit of the range of origin object versions that have version-to-version relationships described by this row. It can be a special value indicating that the range is unlimited.
Z_OrgLClock_Z RTLClock For internal use only.
DstID RTIntID The internal identifier for the destination object of the relationship.
Z_DstBrID_Z RTBrID For relationship rows, indicates the branch of the version graph containing the destination object version.

For auxiliary rows, it can indicate the branch containing the pinned object version of an origin versioned relationship.

Z_DstVS_Z RTVerID For relationship rows, indicates the lower limit of the range of destination object versions that have version-to-version relationships described by this row.

For auxiliary rows, it can indicate the pinned object version of an origin versioned relationship.

Z_DstVE_Z RTVerID Indicates the upper limit of the range of destination object versions having version-to-version relationships described by this row.
Z_DstLClock_Z RTLClock For internal use only.
OrgTypeID RTIntID The internal identifier for the class to which the origin object conforms. It is redundantly stored in this table for performance reasons.
RelTypeID RTIntID The internal identifier for the relationship type.
DstTypeID RTIntID The internal identifier for the class to which the destination object conforms. It is redundantly stored in this table for performance reasons.
PrevDstID RTIntID This property is NULL for every relationship row and any auxiliary row of a nonsequenced relationship. For an auxiliary row describing an item in a sequenced relationship collection, this column has a nonNULL value that refers to the previous relationship in the sequenced collection. Specifically, the value is the internal identifier of the previous relationship; that is, the value in the DstID column of the relationship row describing that previous relationship.
DstName RTNameString The name of the destination object. More precisely, the name (as defined by this naming relationship) by which each origin version (in the range of origin versions) refers to each destination version (in the range of destination versions). If the relationship is not a naming relationship, then this field is NULL.
DstNameLong Text,
16 bytes
If the name of the destination object is too long for the DstName field, this field contains the full name. Otherwise, this field is NULL. The maximum length for this value is 16 bytes.
Z_RelFlags_Z RTFlags A value of 2 indicates that the row is a relationship row; a value of 1 indicates it is an auxiliary row.

Remarks

The RTblRelships table stores information about each object version combination that exists in a two-way versioned relationship. Within a relationship where both objects are versioned, multiple versions can exist for each object pairing. For example, one instance of a relationship may associate Object_X version 3 with Object_Y version 2, a second instance may associate Object_X version 4 with Object_Y version 5, and so on. This table tracks data about each combination of versioned objects.

Another SQL table stores relationship definition properties. For more information, see RTblRelshipDefs SQL Table.

The primary key for this table is formed from the OrgID, Z_OrgBrID_Z, Z_OrgVS_Z, DstID, Z_DstBrID_Z, Z_DstVS_Z, RelTypeID, and Z_RelFlags_Z columns.

Examples

The RTblRelships table stores two kinds of rows: relationship rows and auxiliary rows. Relationship rows store data about specific combinations of versioned objects. Auxiliary rows contain pinning and sequence information for an origin versioned relationship. Examples illustrate each case and explain how to interpret instance data in the table.

Relationship Row Examples
  • In the simplest case, a relationship row describes exactly one version-to-version relationship. For more information, see RTblRelships Example One RTblRelships Example One.

  • In the ideal case, a relationship row describes as large a range as possible. For more information, see RTblRelships Example Two.

  • A relationship row can describe an unbounded range. For more information, see RTblRelships Example Three.

  • In some situations, several relationship rows exist when one would theoretically suffice. For more information, see RTblRelships Example Four.
Auxiliary Row Examples

Not every origin versioned relationship has a corresponding auxiliary row. If the origin versioned relationship is not part of a sequencing collection and does not have any member of its TargetVersions collection pinned, it does not have an auxiliary row.

See Also

Relationship Class

Repository SQL Data Types

Repository SQL Schema

Repository SQL Tables