Search Results qa_sampling_custom_rules




Overview

QA_SAMPLING_CUSTOM_RULES is a table in the Oracle Quality (QA) application module, owned by the QA schema. It stores user-defined sampling rules that govern how sample sizes are determined for a given sampling plan, based on lot size ranges. In Oracle EBS 12.1.1 and 12.2.2, this table supports the Quality Management sampling engine, allowing quality organizations to define non-standard, tiered sampling logic that goes beyond seeded sampling schemes. Each record represents one rule that maps a lot-size interval to a specific sample size within the context of a parent sampling plan.

Under the heuristic Data Vault classification derived from its foreign key structure, this object is satellite-leaning. It exists to capture descriptive, effective-dated attributes (the tiered rule boundaries and sample quantities) that depend on a parent business key — the sampling plan. Rather than acting as an independent hub of business identity, its rows describe and qualify the plan they belong to, which is the characteristic behavior of a satellite table. This classification is offered as a modeling suggestion, not a physical constraint imposed by EBS.

Key Information Stored

The table contains ten documented columns. The most significant are listed below.

  • RULE_ID — The surrogate primary key for the table and the column underpinning the unique index QA_SAMPLING_CUSTOM_RULES_U1. This is the business-key candidate that uniquely identifies each user-defined sampling rule. Because it is the sole unique index column, it functions as the definitive identifier for a rule record.
  • SAMPLING_PLAN_ID — The foreign key linking the rule to its parent record in QA_SAMPLING_PLANS. This is the foundational relationship column that establishes which sampling plan the rule belongs to and drives all join-based reporting.
  • MIN_LOT_SIZE — The lower bound of the lot-size range to which the rule applies. Together with MAX_LOT_SIZE it defines the applicable interval for the rule.
  • MAX_LOT_SIZE — The upper bound of the lot-size range. When combined with MIN_LOT_SIZE, it produces the tiered banding that distinguishes custom sampling logic from simple fixed sampling.
  • SAMPLE_SIZE — The number of units to be sampled when a lot falls within the MIN_LOT_SIZE to MAX_LOT_SIZE interval. This is the outcome value the sampling engine consumes.
  • LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN — The standard Oracle EBS audit columns. They capture who created and last modified each rule and when, supporting auditability and concurrency tracking.

Common Use Cases and Queries

The primary use case is retrieving the effective sampling rule for a given plan and lot size. A typical query selects the sample size where the lot size falls within the defined band:

  • Resolving sample size for a qualification or inspection: SELECT SAMPLE_SIZE FROM QA_SAMPLING_CUSTOM_RULES WHERE SAMPLING_PLAN_ID = :plan_id AND :lot_size BETWEEN MIN_LOT_SIZE AND MAX_LOT_SIZE;
  • Listing all rules for a plan to review tier boundaries: SELECT RULE_ID, MIN_LOT_SIZE, MAX_LOT_SIZE, SAMPLE_SIZE FROM QA_SAMPLING_CUSTOM_RULES WHERE SAMPLING_PLAN_ID = :plan_id ORDER BY MIN_LOT_SIZE;
  • Audit reporting on who configured sampling logic and when, using LAST_UPDATED_BY and LAST_UPDATE_DATE.
  • Validating coverage — identifying gaps or overlaps between MIN_LOT_SIZE and MAX_LOT_SIZE bands across a plan.

Related Objects

The following objects are the most significant for integration and reporting.

  • QA_SAMPLING_PLANS — The direct parent table, joined via QA_SAMPLING_CUSTOM_RULES.SAMPLING_PLAN_ID = QA_SAMPLING_PLANS.SAMPLING_PLAN_ID. This is the authoritative FK relationship documented for the table.
  • QA_SAMPLING_PLAN_CRITERIA — Often consulted alongside sampling plans to understand the conditions triggering a plan.
  • QA_SAMPLING_PLANS_VL / QA_SAMPLING_PLANS_V — Views over sampling plans that provide denormalized access to plan headers for reporting.
  • QA_SAMPLE_RESULTS / QA_RESULTS — Downstream results tables where applied sampling ultimately influences inspection data.
  • QA Collection Plans and QA_PLANS — Higher-level quality configuration referencing sampling plans.

These relationships confirm the table's role as a dependent satellite whose business meaning is only fully realized in combination with its parent sampling plan.