본문으로 건너뛰기
Workshop overview
Chapter 4 of 7
15 min

Expand a product into branch, region, and supplier context

Materialize the enriched result as an ontology and inspect its operational relationships.

Question for this chapter

Which branch and supplier context should be checked with a price-review candidate?

Why this matters now

A product name with a large price gap does not identify the responsible branch or affected region. Connecting product, branch, region, and supplier exposes that context without switching among tables.

Try it

Open Ontology → Modeling and select Retail Inventory Analysis. Inspect the product, branch, region, and supplier entities and their stocked-at, located-in, and supplied-by relations.

Ontology model with product, branch, region, supplier, and three relations
Inspect how four entities and three relations support the operations question.

Run Retail Ontology Materialization Pipeline. Verify that data appears in all four entity and three relation datasets.

Pipeline splitting the enriched result into ontology entities and relations
One enriched result becomes product, branch, region, and supplier context.

Select Retail Inventory Analysis in Graph explorer, then open Query console.

MATCH path = (p:ri_product)-[:ri_stocked_at]->(b:ri_branch)
             -[:ri_located_in]->(reg:ri_region)
OPTIONAL MATCH (p)-[:ri_supplied_by]->(s:ri_supplier)
RETURN path, p, b, reg, s
LIMIT 25

The first path connects a product to a stocking branch and that branch's region. The optional relation also returns its supplier while preserving the earlier path when no supplier exists.

Product relationship query entered in the Graph explorer query console
Run the path from product to branch, region, and supplier.

Success looks like this

The current seed creates 8 products, 11 branches, 11 regions, and 8 suppliers. It creates 11 located-in, 56 stocked-at, and 8 supplied-by relations.

3D Graph explorer result with product and branch nodes connected by lines
Inspect the connection lines and selected-node context rather than only the result count.

Interpret the result

The 46,700 raw rows aggregate to 56 stocked-at relationships at product × branch level. Price and inventory remain on ri_stocked_at, so a candidate product can be traced to its affected branches.

Next decision

Relationships explain a candidate's context but do not choose a priority. Next, read the dashboard in a fixed order and decide the response.