Search Results pqh_ref_templates_pk




Overview

The PQH_REF_TEMPLATES table is a core data object within the Public Sector HR (PQH) module of Oracle E-Business Suite (EBS) versions 12.1.1 and 12.2.2. It functions as a relational mapping table that manages the hierarchical and referential relationships between templates. Specifically, it records which templates are designated as "copy" or "reference" templates for a given parent template. This structure is essential for enabling template reuse, standardization, and inheritance of rules or content across complex public sector HR processes, such as position management, job evaluation, or budget control. Its role is to maintain the integrity of these template relationships within the application's data model.

Key Information Stored

The table's primary function is to link templates via foreign key relationships. The critical columns are:

  • REF_TEMPLATE_ID: The primary key column, uniquely identifying each relationship record.
  • PARENT_TEMPLATE_ID: A foreign key referencing the PQH_TEMPLATES table. This identifies the template for which a reference or copy is being defined.
  • BASE_TEMPLATE_ID: A foreign key also referencing the PQH_TEMPLATES table. This identifies the template that is being referenced or copied by the parent template.

The table enforces data integrity through its primary key (PQH_REF_TEMPLATES_PK on REF_TEMPLATE_ID) and a unique key constraint (PQH_REF_TEMPLATES_UK) on the combination of PARENT_TEMPLATE_ID and BASE_TEMPLATE_ID, preventing duplicate relationships.

Common Use Cases and Queries

A primary use case is analyzing template dependencies for impact assessment or auditing. For instance, before modifying a base template, an administrator may need to identify all parent templates that reference it. A typical query would be:

  • Find all parent templates referencing a specific base template:
    SELECT parent_template_id FROM hr.pqh_ref_templates WHERE base_template_id = <template_id>;

Conversely, to understand the composition of a specific parent template, one would query for all templates it references:

  • Find all templates referenced by a specific parent template:
    SELECT base_template_id FROM hr.pqh_ref_templates WHERE parent_template_id = <template_id>;

These queries are foundational for custom reports on template hierarchy, data lineage, and ensuring configuration consistency across the PQH module.

Related Objects

The PQH_REF_TEMPLATES table has a direct and exclusive relationship with the PQH_TEMPLATES table, which serves as the master repository for template definitions. Two foreign key constraints enforce this:

  • One from PQH_REF_TEMPLATES.PARENT_TEMPLATE_ID to PQH_TEMPLATES.
  • One from PQH_REF_TEMPLATES.BASE_TEMPLATE_ID to PQH_TEMPLATES.

This design indicates that PQH_TEMPLATES is the central object, with PQH_REF_TEMPLATES acting as a junction table defining the many-to-many relationships between templates. Any application logic, APIs, or user interfaces managing template relationships will ultimately read from or write to this table to persist those associations.