Search Results asg_primary_key_hint_uk1




Overview

The ASG_PRIMARY_KEY_HINT table is a core data object within the ASG (CRM Gateway for Mobile Devices) product of Oracle E-Business Suite 12.1.1 and 12.2.2. It functions as a configuration and metadata repository that defines the primary key structure for publication items. The CRM Gateway for Mobile Devices facilitates the synchronization of data between the central E-Business Suite database and mobile devices. In this architecture, the ASG_PRIMARY_KEY_HINT table plays a critical role by storing "hints" that instruct the gateway framework on how to uniquely identify records for specific data items being published to mobile clients, ensuring data integrity during synchronization processes.

Key Information Stored

The table's structure is designed to map publication items to their identifying key columns. The essential columns are:

  • PRIMARY_HINT_ID: The unique system-generated identifier for each hint record, serving as the primary key (ASG_PRIMARY_KEY_HINT_PK).
  • ITEM_ID: A foreign key column that references ASG_PUBLICATION_ITEMS. This links the hint to a specific publication item or data entity configured for mobile synchronization.
  • KEY_COLUMN: Stores the name of the database column that constitutes (or is part of) the primary key for the business data associated with the publication item. For composite keys, multiple records with the same ITEM_ID would exist, each specifying one column of the key.

An additional unique constraint (ASG_PRIMARY_KEY_HINT_UK1) exists on the combination of ITEM_ID and KEY_COLUMN, preventing duplicate key column definitions for a given item.

Common Use Cases and Queries

This table is primarily accessed by the CRM Gateway's internal synchronization engine. Common operational and diagnostic queries include identifying all key definitions for a publication item or verifying the configuration. For example, to audit the primary key structure for all publication items, a developer or administrator might execute:

SELECT pi.ITEM_NAME, pk.KEY_COLUMN
FROM ASG_PRIMARY_KEY_HINT pk, ASG_PUBLICATION_ITEMS pi
WHERE pk.ITEM_ID = pi.ITEM_ID
ORDER BY pi.ITEM_NAME, pk.KEY_COLUMN;

To troubleshoot synchronization issues for a specific item, a query would join to the base application table to validate that the hinted key columns correctly identify records:
SELECT COUNT(DISTINCT <KEY_COLUMN>), COUNT(*) FROM <BASE_TABLE>;
This helps ensure the hinted column provides the necessary uniqueness for the publication set.

Related Objects

The ASG_PRIMARY_KEY_HINT table has a direct and integral relationship with other core objects in the CRM Gateway schema.

  • ASG_PUBLICATION_ITEMS: This is the primary parent table, linked via the foreign key on ITEM_ID. ASG_PUBLICATION_ITEMS defines what data entities are published.
  • ASG_PUB_ITEM_TABLES: While not listed in the provided metadata, this table typically maps publication items to physical application tables. The KEY_COLUMN from ASG_PRIMARY_KEY_HINT usually refers to a column in the table defined here.
  • The internal synchronization logic within the ASG product modules (packages and Java code) heavily depends on the hints stored in this table to generate efficient and correct SQL for data extraction and conflict resolution during mobile sync cycles.