Microsoft Data Platform Norway · Meetup

What Are Ontologies,
and Why Should We Care?

A practical introduction to knowledge graphs for data engineers.
Veronika Heimsbakk  ·  Data Treehouse

About

Veronika Heimsbakk

Veronika Heimsbakk

Knowledge Graph Specialist at Data Treehouse

Today's promise

You'll leave with a vocabulary, not a verdict.

Ontologies are not new. The standards are open, well-documented, and decades old.

What is new is that major vendors are now selling them. A good reason to understand what we're being sold before we buy.

The goal: by the end of this talk, you should be able to ask sharp questions about any vendor's ontology product, including the one Brian will show you next.
Part 1

Where meaning
begins.

The semiotic triangle

Three things we keep collapsing into one.

  • Term: the string "customer"
  • Concept: what you mean by it
  • Referent: the actual person

A database column is a term. The semantics live in the concept, which usually lives nowhere except in someone's head.

Beyond the triangle

Four pieces, working together.

Concept
The idea of a thing. Not necessarily a physical thing. It lives in your head before it lives in your data.
Term
The word we choose for the concept. A column header. A class name. The visible label.
Definition
What bounds interpretation: what counts, what doesn't. Short. Precise. Substitutable for the term.
Context
How the concept relates to others. Customer isn't meaningful alone. It lives next to subscription, ticket, contract.
A column called customer gives you only the term. The other three pieces usually live nowhere except in someone's head.

One term, many concepts

Whose "customer" is the right one?

CRM says:

Anyone we've ever pitched to. Lifetime concept. Includes prospects.

Finance says:

An entity we've invoiced this fiscal year. Strictly transactional.

Legal says:

A counterparty with a signed master agreement. Contract-bound.

Three departments, three databases, three definitions, one word. Every joining query silently lies.

The underlying logic

Classes are sets. That's the whole trick.

Universe, classes (Person, City, Organisation), subclass Company inside Organisation, disjoint Non Profit, with elements Alice, Oslo, Equinor, Red Cross and relationships works for, lives in, based in.
  • Universe: everything we model lives in Thing.
  • Class: a set of things (Person, City, Organisation).
  • Subclass: a set inside a set (CompanyOrganisation).
  • Disjoint: sets that share nothing (CompanyNonProfit = ∅).
  • Element: an instance of a class (AlicePerson).
  • Relationship: directed between classes.

Not metaphysics. Just disambiguation at scale, that machines can check.

Stepping back

Ontologies live in the intersection.

Everything in this section so far has come from two old traditions:

Philosophical logic gives us concepts, terms, definitions, categories. What we mean.

Mathematical logic gives us sets, relations, inference. How machines can check what we said.

An ontology needs both. Concepts without formality stay in your head. Formality without concepts models nothing.
Philosophical logic Mathematical logic Concepts Definitions Categories Existence Sets Subsets Relations Inference Ontologies (and knowledge graphs)
Part 2

The semantic
stack.

IRIs: global identifiers

How many "Alice"s does your data hold?

Strings are ambiguous. The atom of a knowledge graph is the IRI: a globally unique identifier.

<crm:cust-4711>     a  ex:Customer .

<billing:acct-882>  a  ex:Account .

<zendesk:user-39>   a  ex:Contact .

Three systems, three IRIs, three meanings. No more COALESCE on email columns hoping that two systems spelled it the same way.

The flip side: when two systems both use <ex:Alice>, they are talking about the same Alice. Merging is free. No join keys. No fuzzy matching.

This is how schema.org, Wikidata, and Google Knowledge Graph all work.

It's not exotic. It's the quiet backbone of the modern web.

RDF — the data model

Everything is a triple.

Subject — Predicate — Object. That's it.

<ex:Alice>  a                   ex:Customer .
<ex:Alice>  ex:hasSubscription  ex:ProPlan .
<ex:Alice>  ex:signedUpOn       "2026-01-15"^^xsd:date .

URIs are global identifiers. Same URI in two datasets = same thing. This is the whole basis for federation.

RDFS — lightest possible schema

Just enough to say "is a".

Classes, subclasses, properties with domain and range. Nothing more.

# Schema
ex:Customer  rdfs:subClassOf  ex:Party .
ex:hasSubscription
              rdfs:domain      ex:Customer ;
              rdfs:range       ex:Subscription .

# Data
ex:Alice ex:hasSubscription ex:ProPlan .

If you only ever do this much, you've already eliminated half the ambiguity in your data warehouse.

Party subClassOf Customer Subscription hasSubscription type Alice type ProPlan hasSubscription

OWL — when you need logic

Constraints, equivalence, inference.

OWL is RDFS with set theory turned on.

  • Disjoint classes
  • Cardinality restrictions
  • Inverse and transitive properties
  • Equivalence axioms

A reasoner can now derive facts you never stated explicitly. That's the magic, and the responsibility.

# Already declared in the schema:
ex:hasSubscription rdfs:range ex:Subscription .

# Then we state this fact:
:Alice ex:hasSubscription :ProPlan .

# Reasoner concludes:
:ProPlan rdf:type ex:Subscription .

# Without anyone writing it down.
Open-world assumption: silence is not denial.

SHACL — validation

"My data should look like this."

Where OWL says what can be inferred, SHACL says what must hold.

ex:CustomerShape a sh:NodeShape ;
  sh:targetClass ex:Customer ;
  sh:property ex:HasSubscriptionShape .

ex:HasSubscriptionShape a sh:PropertyShape ;
  sh:path     ex:hasSubscription ;
  sh:minCount 1 ;
  sh:class    ex:Subscription .

This is what makes semantic tech production-ready:

  • Closed-world: silence is denial
  • Validation reports, not inferences
  • Complements OWL, doesn't replace it
  • Standardised in 2017, mature tooling

Most enterprise pipelines need SHACL more than OWL. Start here.

SPARQL — the query language

Pattern-match against the graph.

PREFIX ex: <https://ex.org/>

SELECT ?customer ?planLabel
WHERE {
  ?customer a                   ex:Customer ;
            ex:hasSubscription  ?plan ;
            ex:signedUpOn       ?date .
  ?plan     rdfs:label          ?planLabel .
  FILTER(?date >= "2026-01-01"^^xsd:date)
}

If you can read SQL, you can read this.

The real superpower: federated queries across multiple SPARQL endpoints in a single statement.

SPARQL is also a W3C standard. Any compliant triplestore speaks it. There is no equivalent for property graphs.

The stack working together

Five layers, one job each.

SPARQL
→ how you use the data (query, federate, integrate)
SHACL
→ what you expect (validation, constraints)
OWL
→ what can be inferred (logic, reasoning)
RDFS
→ what things are (classes, properties)
RDF
→ how data is shaped (triples, URIs)
Each layer is a W3C standard. Each tool is interchangeable. Nothing is proprietary.

From DataFrame to knowledge graph

The whole stack in a handful of Python.

from maplib import Model
import polars as pl

m = Model()

# Integrate heterogeneous sources
m.map_default(pl.read_delta("s3://lake/customers"),    primary_key_column="customer_iri")
m.map_default(pl.read_delta("s3://lake/subscriptions"), primary_key_column="sub_iri")

# Model business concepts
m.read("ontology.ttl")

# Reason and query
m.infer(open("rules.dlog").read())
df = m.query(open("customers_with_pro_plan.rq").read())

# Validate
m.read("shapes.ttl", graph="urn:g:shapes")
report = m.validate(shape_graph="urn:g:shapes")

One script. Four jobs:

  • Integrate two Delta tables into one graph through shared IRIs (no JOIN, no COALESCE).
  • Model business concepts by loading the ontology you already wrote.
  • Reason over the data using Datalog or SPARQL rules.
  • Validate against SHACL shapes and get a structured report back.

All on a Polars-backed engine. DataFrame speeds, semantic richness.

Part 3

Two graph
worlds.

LPG vs RDF

Same word. Different worlds.

Labelled Property GraphRDF
IdentityInternal IDs, local scopeURIs, globally unique
QueryGQL (ISO/IEC 39075, 2024)SPARQL (W3C, 2008)
Schema sharingNo standard formatOWL, portable vocabularies
FederationNot in the standardBuilt-in (SERVICE clause)
ReasoningNot part of the modelFormal logic (OWL profiles)
ValidationVendor-specificSHACL, the standard
ExamplesNeo4j, TigerGraph, Fabric GraphStardog, GraphDB, Virtuoso, Jena

Neither is wrong. LPG is great when the graph is internal structure. RDF wins when the data must carry interoperable, machine-readable semantics.

Part 4

Orden i
eget hus.

«Orden i eget hus», the Norwegian framework

You probably already have to care.

Built on the EU's SEMIC work, mandated for public-sector data:

  • DCAT-AP-NO: data catalogues
  • SKOS-AP-NO: controlled vocabularies
  • DCAT-AP-NO-SSB: statistical data
  • Begrepskatalogen: shared business concepts
  • data.norge.no: built on this stack
Every one of these standards is RDF-based. They are not optional add-ons. They are the deliverable for public-sector data.

If your platform makes it hard to expose data as DCAT-AP-NO or hold a SKOS vocabulary, your platform makes compliance hard. That is a real cost, paid by real teams.

Part 5

Why this
really matters.

The business case (Gartner, May 2026)

80% more accuracy. 60% lower cost.

Gartner's strategic planning assumption for 2027:

Organisations that prioritise semantics in AI-ready data will increase agentic AI accuracy by up to 80% and reduce costs by up to 60%.

And yet: only 26% of D&A leaders polled at the 2026 Gartner summit said they were already using ontologies in AI projects.

The gap between expected impact and current adoption is where the opportunity sits.

What Gartner recommends:

  • Prioritise ontology development in the use cases where it pays off fastest.
  • Adopt standards-based approaches (W3C) for long-term value and interoperability.
  • Collaborate across teams — business and technical experts together.
  • Use agile methods: minimum viable ontologies, minimum viable graphs.

Why agents need this

LLMs are probabilistic. Business operations aren't.

An LLM can be fluent. Fluency is not accuracy.

When an agent does something — approves an expense, transfers data, contacts a customer — you need more than confident output. You need:

  • A formal model of what things mean
  • Constraints the agent cannot violate
  • A semantic audit trail for every decision
  • Federation across decoupled systems

That's a knowledge graph. SHACL gives you the guardrails; the ontology gives you the meaning; the graph gives you the audit.

Gartner calls this neurosymbolic AI: the probabilistic strength of LLMs combined with the deterministic rigor of formal logic.

The semantic web community has been building exactly this infrastructure for two decades.

Agents are finally creating the demand to use it.

Three things to take home

Beyond the syntax.

1

Semantics is work, not a product.

You can buy AI agents that hallucinate. You can't buy a shared concept of "customer." That has to be modelled — by people who understand both the domain and the formalism.

2

Interoperability is a time dimension.

Data outlives systems. A patient record, a property register, an archive: these will exist long after Fabric, Databricks, and Snowflake. Your model is a bet on the future.

3

Lock-in is a cost, not a sin.

Every vendor-specific format you encode logic into raises your switching cost. Open standards are the refund policy. Proprietary systems aren't wrong — but the trade-off should be conscious.

Up next

Over to Brian.

You now have the vocabulary. Brian will show you how Fabric IQ implements this thinking in the Microsoft stack.

A few questions worth holding in your head:

  • What is the Ontology item built on, RDF or LPG?
  • What's the query language? What goes in, what comes out?
  • How does it meet DCAT-AP-NO and SKOS-AP-NO?
  • If I leave the platform, what comes with me?

These aren't gotcha questions. They're the ones you need answered to build responsibly.

Takk.
veronika@data-treehouse.com
Meetup Knowledge Graph Oslo
Questions before we switch speakers?
1 / 20