Search Results okc_rep_contract_rels




Overview

OKC_REP_CONTRACT_RELS is a Contracts Core (OKC) table in Oracle E-Business Suite that stores the relationship between two contracts. Each row captures an associative link in which one contract (CONTRACT_ID) is associated with a second contract (RELATED_CONTRACT_ID), and RELATED_CONTRACT_ROLE expresses the role or function that the related contract plays with respect to the primary contract. The table is a core component of the Contracts repository and supports cross-contract referencing used by contract authoring, hierarchy, and reporting functionality.

Within a Data Vault modeling perspective, the structure of this table — a composite uniqueness constraint over two contract identifiers plus a relationship role, together with foreign keys to OKC_REP_CONTRACTS_ALL — suggests classifying it as a link table. It resolves the many-to-many association between contracts rather than describing a single contract entity.

Key Information Stored

The table is documented with nine physical columns. The most important columns and their roles are:

  • CONTRACT_RELATIONSHIP_ID — The surrogate primary key, defined by the OKC_REP_CONTRACT_RELS_PK constraint. It uniquely identifies each contract-to-contract relationship row.
  • CONTRACT_ID — The primary contract in the pairing. This column carries a foreign key to OKC_REP_CONTRACTS_ALL.
  • RELATED_CONTRACT_ID — The second, related contract. Together with CONTRACT_ID, it defines the direction of the association.
  • RELATED_CONTRACT_ROLE — The role or function performed by the related contract relative to the primary contract.
  • RELATIONSHIP_ROLE1_ID — A role identifier participation column. It appears in the unique index OKC_REP_CONTRACT_RELS_U1 and is a documented column of the physical schema.
  • RELATIONSHIP_TYPE_ID — Identifies the relationship type; documented as a foreign-key-bearing column, though the target table is not fully resolved in the supplied metadata.
  • OBJECT_VERSION_NUMBER — Optimistic-locking version column used by the framework to detect concurrent updates.
  • CREATED_BY, CREATION_DATE — Standard audit columns recording the creating user and creation timestamp.
  • LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN — Standard audit columns recording the last modifying user, timestamp, and login session.

The business-key candidate is the unique index OKC_REP_CONTRACT_RELS_U1, built on (CONTRACT_ID, RELATED_CONTRACT_ID, RELATIONSHIP_ROLE1_ID). This composite distinguishes the natural identity of a relationship from the surrogate primary key.

Common Use Cases and Queries

Typical usage includes finding all contracts related to a given contract, resolving the role a related contract plays, and reporting on cross-contract linkages for legal or commercial analysis. A representative query joins the relationship table to the contracts table:

  • SELECT r.CONTRACT_ID, r.RELATED_CONTRACT_ID, r.RELATED_CONTRACT_ROLE FROM OKC.OKC_REP_CONTRACT_RELS r WHERE r.CONTRACT_ID = :contract_id;
  • SELECT r.CONTRACT_ID, c.CONTRACT_NUMBER, r.RELATED_CONTRACT_ID FROM OKC.OKC_REP_CONTRACT_RELS r, OKC.OKC_REP_CONTRACTS_ALL c WHERE r.CONTRACT_ID = c.CONTRACT_ID;
  • Reverse lookup: WHERE RELATED_CONTRACT_ID = :contract_id to identify parent or originating contracts.

Reporting scenarios include contract hierarchy reports, related-agreement listings, and impact analysis when a master agreement is amended. Because the table carries full audit columns, change-tracking extracts are also practical.

Related Objects

The most significant associated objects are:

  • OKC_REP_CONTRACTS_ALL — Referenced twice via CONTRACT_ID and the related contract column, forming the principal join target for both sides of the relationship.
  • OKC_REP_CONTRACT_RELS_PK — The primary key constraint on CONTRACT_RELATIONSHIP_ID.
  • OKC_REP_CONTRACT_RELS_U1 — The unique index on (CONTRACT_ID, RELATED_CONTRACT_ID, RELATIONSHIP_ROLE1_ID).
  • Relationship type reference object — The target of RELATIONSHIP_TYPE_ID, used to classify the nature of the link.
  • Contract role/party objects — Role identifiers such as RELATIONSHIP_ROLE1_ID integrate with role definitions used across the Contracts schema.

These objects together support the contract relationship model within the OKC schema.