Oracle RMS Merchandise Hierarchy
The merchandise hierarchy is the backbone of Oracle RMS. Every item, every pricing rule, every replenishment parameter, every report — they all roll up through this six-level structure. If you don't understand the hierarchy, you don't understand RMS.
What is the Merchandise Hierarchy?
In Oracle Retail Merchandising System (RMS), the Merchandise Hierarchy is the foundational classification structure that organises every product in your retail business. Think of it as the taxonomy of your entire catalog — a pyramid with six levels, from the broadest classification at the top down to the most granular at the bottom.
The hierarchy exists at the heart of almost every functional area in RMS. Pricing rules are defined at Department level. Replenishment parameters default from the Subclass. Reporting aggregates roll up through the hierarchy. Buyer and Merchandiser responsibilities are assigned at the Department. The hierarchy is not just a way to group products — it is the governance structure for how products behave inside RMS.
When you write custom PL/SQL in RMS, when you build integration staging
tables, or when you query inventory data — you will encounter DEPT,
CLASS, and SUBCLASS columns constantly. Understanding what
these represent in the business context makes you a far more effective RMS
developer.
The six levels of the Oracle RMS Merchandise Hierarchy are:
Company → Division → Group → Department → Class → Subclass
Every item in RMS must belong to exactly one Subclass. That single Subclass membership places the item into a Class, a Department, a Group, a Division, and ultimately under the umbrella of the Company — giving every product a precise position in the classification tree.
All Six Levels — In Depth
Now let's go through each level properly — what it represents in retail, how it behaves in Oracle RMS, and the database specifics you need as a developer.
The Company is the apex of the merchandise hierarchy. In a standard Oracle RMS deployment, there is exactly one company — your retail business. The COMPHEAD table holds the company's base currency and language settings, while SYSTEM_OPTIONS holds the broader RMS configuration parameters that govern the entire system.
As a developer, you rarely need to interact with the Company level directly in your business logic. Its significance is primarily as the root of all rollup reporting — every financial figure in RMS ultimately aggregates to Company level.
| Column | Type | Description |
|---|---|---|
CURRENCY_CODEPK | VARCHAR2(3) | Base currency for the company (e.g. INR, USD) |
LANGPK | NUMBER(6) | Default language code for the RMS instance |
A Division represents the broadest trading category within the company. Retailers typically have two to eight divisions. A fashion retailer might have: Apparel, Footwear, and Accessories. A book retailer might have: Books & Media, Stationery, and Gifts.
In RMS, each Division is assigned a Buyer and a Merchandiser, establishing the top-level ownership of trading responsibility. These assignments default down through Groups and Departments but can be overridden at each level.
| Column | Type | Description |
|---|---|---|
DIV_NOPK | NUMBER(4) | Unique division identifier |
DIV_NAME | VARCHAR2(120) | Division name (translated via DIVISION_DESC) |
BUYER | VARCHAR2(4) | ID of the buyer responsible for this division |
MERCH | VARCHAR2(4) | ID of the merchandiser responsible |
Groups sit beneath Divisions and provide an intermediate trading layer. In a fashion business, the Apparel Division might have Groups like Men's Clothing, Women's Clothing, and Kids' Clothing. Each Group belongs to exactly one Division via the DIV_NO foreign key.
The RMS table is named GROUPS (plural). Never try to reference it as
GROUP — that is a reserved keyword in Oracle SQL and will raise a
syntax error. When joining in complex queries, always alias it:
FROM groups g.
| Column | Type | Description |
|---|---|---|
GROUP_NOPK | NUMBER(4) | Globally unique group identifier |
GROUP_NAME | VARCHAR2(120) | Group name |
DIV_NOFK | NUMBER(4) | Foreign key to DIVISION.DIV_NO |
BUYER | VARCHAR2(4) | Buyer for this group (can differ from Division buyer) |
MERCH | VARCHAR2(4) | Merchandiser for this group |
The Department is the most operationally significant level in the Oracle RMS hierarchy for developers. Almost all rule-setting in RMS happens at Department level — VAT treatment, open-to-buy budgets, pricing percentage thresholds, and markdown calendar assignments are all attached here.
The table is named DEPS — not DEPARTMENT. This trips up many developers new to RMS. The primary key column is simply DEPT (a number). When you see a column called DEPT on almost any RMS table, it is referencing DEPS.DEPT.
New developers frequently write FROM DEPARTMENT and get ORA-00942
(table not found). The correct table is DEPS. Always. There is no
table called DEPARTMENT in Oracle RMS.
| Column | Type | Description |
|---|---|---|
DEPTPK | NUMBER(4) | Unique department number |
DEPT_NAME | VARCHAR2(120) | Department name |
GROUP_NOFK | NUMBER(4) | Foreign key to GROUPS.GROUP_NO |
BUYER | VARCHAR2(4) | Buyer ownership for this department |
MERCH | VARCHAR2(4) | Merchandiser for this department |
VAT_REGION | NUMBER(4) | Default VAT region for items in this dept |
VAT_TYPE | VARCHAR2(6) | Default VAT type — SIMPLE, COMPOUND, etc. |
TOTAL_MARKET_AMT | NUMBER(20,4) | Total addressable market for OTB planning |
PROFIT_CALC_TYPE | VARCHAR2(6) | How profit is calculated for this dept |
Class provides the second-to-last tier of product classification. Within the Men's Shirts Department, you might have Classes like Formal Shirts, Casual Shirts, and Sports Shirts.
The critical thing to understand as a developer: Class numbers are not globally unique. They are unique only within a Department. Class 1 in Department 10 is a completely different classification from Class 1 in Department 20. The primary key of the CLASS table is a composite: DEPT + CLASS. This composite key pattern continues into Subclass, and also appears on every item in ITEM_MASTER.
| Column | Type | Description |
|---|---|---|
DEPTPKFK | NUMBER(4) | Part of composite PK. FK to DEPS.DEPT |
CLASSPK | NUMBER(4) | Class number — unique within a Department |
CLASS_NAME | VARCHAR2(120) | Class name |
VAT_CODE | VARCHAR2(6) | VAT code override at class level |
Subclass is the leaf node of the merchandise hierarchy — the most granular level of product classification in RMS. Every item must belong to exactly one Subclass. This is non-negotiable in Oracle RMS: you cannot create an item without assigning it to a Dept/Class/Subclass combination.
Within the Formal Shirts Class, you might have Subclasses like White Formal, Printed Formal, and Slim-Fit Formal. The composite primary key is DEPT + CLASS + SUBCLASS — three columns together.
Many RMS batch processes and integrations pass the three values together. When you see :v_dept, :v_class, :v_subclass as bind variables in RMS PL/SQL — this is exactly the pattern referencing the Subclass level.
| Column | Type | Description |
|---|---|---|
DEPTPKFK | NUMBER(4) | Part of composite PK. FK to DEPS.DEPT |
CLASSPKFK | NUMBER(4) | Part of composite PK. FK to CLASS(DEPT, CLASS) |
SUBCLASSPK | NUMBER(4) | Subclass number — unique within a Class |
SUB_NAME | VARCHAR2(120) | Subclass name |
How Items Attach to the Hierarchy
Every item in Oracle RMS is stored in the ITEM_MASTER table. Three columns on that table directly reference the bottom of the merchandise hierarchy:
-- Key hierarchy columns on ITEM_MASTER
SELECT im.item,
im.item_desc,
im.dept, -- FK → DEPS.DEPT
im.class, -- Part of FK → CLASS(DEPT, CLASS)
im.subclass, -- Part of FK → SUBCLASS(DEPT, CLASS, SUBCLASS)
im.item_type, -- ITEM, REF, PACK
im.item_level, -- 1=Transaction Item, 2=Style, 3=SKU
im.status -- A=Active, D=Discontinued, etc.
FROM item_master im
WHERE im.dept = :v_dept
AND im.class = :v_class
AND im.subclass = :v_subclass
AND im.status = 'A'
ORDER BY im.item;This direct attachment means that if you know an item's DEPT, CLASS, and SUBCLASS values, you can immediately traverse the entire hierarchy upward — through Classes, Departments, Groups, Divisions — using a single join chain.
In RMS development, joining from ITEM_MASTER up through the entire
hierarchy in a single query is a pattern you will write dozens of times.
Memorise: IM → SUBCLASS → CLASS → DEPS → GROUPS → DIVISION. The join
keys are always DEPT, then DEPT+CLASS, then
DEPT+GROUP_NO, then DIV_NO.
RC:Storefront brings the same disciplined thinking to your own e-commerce store — departments, categories, attributes, all organised and synced in real time with your RC:OMS inventory. Self-hosted on your VPS. Zero transaction fees. Full data ownership.
See RC:Storefront →Key Database Tables — Quick Reference
Print this table out and pin it to your monitor when you start RMS development.
Practical SQL Examples
These are the queries you'll find yourself writing repeatedly as an RMS developer or integrations engineer.
1. Get full hierarchy path for a given item
-- Full hierarchy path for a single item
SELECT im.item,
im.item_desc,
d.div_name,
g.group_name,
dp.dept_name,
c.class_name,
s.sub_name
FROM item_master im
JOIN subclass s ON s.dept = im.dept
AND s.class = im.class
AND s.subclass = im.subclass
JOIN class c ON c.dept = im.dept
AND c.class = im.class
JOIN deps dp ON dp.dept = im.dept
JOIN groups g ON g.group_no = dp.group_no
JOIN division d ON d.div_no = g.div_no
WHERE im.item = :v_item;2. Count active items per Department/Class
-- Active item counts rolled up to Dept → Class
SELECT dp.dept,
dp.dept_name,
c.class,
c.class_name,
COUNT(im.item) AS item_count
FROM deps dp
JOIN class c ON c.dept = dp.dept
JOIN item_master im ON im.dept = c.dept
AND im.class = c.class
WHERE im.status = 'A'
GROUP BY dp.dept, dp.dept_name,
c.class, c.class_name
ORDER BY dp.dept, c.class;3. Validate that a Dept/Class/Subclass combination exists
This pattern is used heavily in integration staging validation — confirming that incoming data references a valid hierarchy combination before allowing it into RMS.
FUNCTION hier_exists (
p_dept IN subclass.dept%TYPE,
p_class IN subclass.class%TYPE,
p_subclass IN subclass.subclass%TYPE
) RETURN BOOLEAN IS
l_count PLS_INTEGER := 0;
BEGIN
SELECT COUNT(1)
INTO l_count
FROM subclass
WHERE dept = p_dept
AND class = p_class
AND subclass = p_subclass;
RETURN (l_count > 0);
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END hier_exists;
Common Gotchas for Developers
These are the mistakes every developer makes at least once when they first start working with the RMS hierarchy.
- !
Querying FROM DEPARTMENT instead of DEPS. The table is
DEPS. There is no DEPARTMENT table in Oracle RMS. You will get ORA-00942 immediately. Burn this into memory:DEPS. - !
Treating CLASS as a globally unique key. Class 5 in Dept 10 and Class 5 in Dept 20 are different classes. Always filter or join using both
DEPTandCLASStogether. Forgetting the DEPT when joining to the CLASS table will produce a cross-join and a massive result set. - !
Using GROUP as a table name in SQL.
GROUPis an Oracle reserved keyword. The table isGROUPS. If you writeFROM group, Oracle will try to parse it as part of a GROUP BY clause and throw a syntax error. - !
Assuming Buyer on DEPS always matches Buyer on DIVISION. Buyer and Merchandiser assignments can be overridden at each level. Do not assume the Division buyer is the Department buyer — always read from the correct level for your business logic.
- !
Creating an item without a valid Subclass. RMS enforces referential integrity at the database level. An item's DEPT+CLASS+SUBCLASS must resolve to a real row in the SUBCLASS table. Integration scripts that skip this validation will fail at the database constraint level.
- !
Forgetting that hierarchy changes are not retroactive to stock ledger history. If you move items to a new Department, historical stock ledger entries still reference the original Department. Reporting queries that don't account for this will show incorrect historical rollups.
Key Takeaways
- ✓The RMS merchandise hierarchy has six levels: Company → Division → Group → Department → Class → Subclass
- ✓The tables are COMPHEAD, DIVISION, GROUPS (plural!), DEPS (not DEPARTMENT!), CLASS, and SUBCLASS
- ✓CLASS and SUBCLASS use composite primary keys — CLASS(DEPT + CLASS), SUBCLASS(DEPT + CLASS + SUBCLASS)
- ✓Every item in ITEM_MASTER must have valid DEPT, CLASS, and SUBCLASS values pointing to a real Subclass row
- ✓Department (DEPS) is the most operationally significant level — VAT, pricing rules, OTB, and buyer ownership all live here
- ✓The standard hierarchy join order when starting from an item is: IM → SUBCLASS → CLASS → DEPS → GROUPS → DIVISION
