Concept
An ontology is a shared definition of the kinds of things a domain contains, how they
connect, and the rules they follow. Think of it as the legend on a map: it says what
each symbol means, so everyone reading the map reads it the same way. In data work, an
ontology names types such as Customer, Contract, and Invoice, the links allowed
between them, and the rules the data must pass, so records from many systems land in
one consistent knowledge graph.
Learning objectives
After reading this article you will be able to:
- Name the parts of an ontology: types, properties, links, identifiers, and rules
- Explain how an ontology differs from a database schema
- Describe why an ontology helps when data lives in many systems
- Outline how to build and version an ontology over real data
What is in an ontology?
An ontology lists types of things, the properties each type has, the links between types, how to tell two records of a type apart, and rules the data should follow.
For example, a software company’s ontology might connect customers, the contracts they
sign, the invoices billed against those contracts, and the tickets they open:
The ontology describes shapes, not instances.
Customer is in the ontology; a
particular customer is a record in the graph that follows it. Stored in a
graph database, types usually become
node labels and links become edge labels, as in a
property graph.
What is the difference between an ontology and a schema?
A schema says how data is stored; an ontology says what the data means. A schema is like a filing cabinet’s drawer labels, and an ontology is the company glossary that explains what each label refers to and how the files relate.
The two are complementary. A mapping connects them: it says which table and columns
fill each type and link, so the same
Customer can be filled from a billing system and
a CRM at once. Formal ontology languages, such as OWL in the RDF world, add precise
semantics and automated inference; see
property graph vs RDF. Application
ontologies over a property graph tend to be lighter: types, links, identifiers, and
rules the data is checked against.
Try Helix Foundry
Connect your company’s data, let an agent draft an ontology over it, and load it into HelixDB as one graph.
Why does a business need an ontology?
Because the same thing is described differently in every system. Billing calls it an account, the CRM calls it a company, and a contract PDF calls it “the Client”. An ontology gives them one name and one shape, so a question about customers means the same thing whichever system the answer comes from. That pays off in three places:- Questions across systems. “Which customers with open support tickets have a contract renewing this quarter?” needs tickets, contracts, and customers joined by meaning, not by whichever IDs each system happens to use.
- AI grounding. A language model answers better from typed, connected facts than from loose text. Retrieval that follows links, often called GraphRAG, needs an ontology to know which links exist. It also gives retrieval-augmented generation (RAG) and agent memory a fixed shape to store facts in.
- Trust. Rules catch records that break expectations, and identifiers decide when two records are the same thing, the job of entity resolution. Each fact can carry its source, its provenance, so a person can check it.
How do you build an ontology?
Start from the questions you want answered, look at the data you already have, draft the smallest set of types and links that answers them, then test the draft against the data and revise.1
Write down the questions
List the questions the ontology must answer, in plain words. They decide which
types and links earn a place; anything no question needs can wait.
2
Survey the sources
Inventory the tables, apps, and documents that hold the answers. Structured tables
map onto types almost directly. Documents such as contracts or call notes hold
facts that need extraction.
3
Draft types, links, and identifiers
Name each type and link, list each type’s properties, and choose identifiers that
pick out one record. An LLM can draft this from samples of your data and your
questions, but a person should read the draft.
4
Map the sources
Say which table and columns fill each type and link, and which documents may fill
which types. Mappings let the ontology stay stable while sources change.
5
Add rules
Add constraints the data should pass, such as cardinality (“one customer per
contract”), and rules that derive new facts from existing ones.
6
Load, check, and revise
Load real data, look at what breaks the rules or fails to link, and revise. Keep
each revision as a new version rather than editing in place.
How do you change an ontology over time?
Treat it like code: make each change a new, immutable version, review it, choose which version is current, and roll back by making an older one current.- Version, don’t edit. A version that never changes can be compared, cited, and restored. Loads record which version they followed.
- Reload after a change. A new type or link only holds data once the sources are loaded through it again. Keeping the previous load alongside the new one lets you compare them before switching.
- Grow with the questions. When a new question needs a link the ontology lacks, add the link in a new version instead of forcing the data into an existing one.
How does Helix Foundry build an ontology?
Helix Foundry drafts and versions ontologies over a company’s data and loads them into a HelixDB database:- An agent drafts each version. A generation reads the synced tables, API sources, and document sets you choose, plus the questions you write, and drafts types, links, mappings, document routes, rules, and the questions the version should answer. The agent may stop to ask what only you can answer.
- Versions never change. Each draft is stored beside the others, with tabs for its
types (with their keys and identifiers), links, mappings, sources, rules, and its
ontology.tomlandmappings.toml. Edits to routes, identifiers, rules, and constraints make a new version. You choose the current version and roll back by making an older one current. - Loads follow the current version. A load writes the current version’s tables and documents into the ontology’s HelixDB database, and lists the records that break its constraints. Rules can derive facts that an entity’s page shows, worked out when read and never stored.
Frequently asked questions
Is an ontology the same as a knowledge graph?
No. The ontology defines the types, links, and rules; the knowledge graph is the data that follows them. One ontology can describe many graphs, such as a test load and a production load.Do you need OWL or RDF to have an ontology?
No. OWL and RDF are standards suited to publishing and reasoning over shared vocabularies. An application ontology over a property graph works well when the goal is querying and grounding AI on your own data.Can an LLM write an ontology?
An LLM can draft one quickly from data samples and your questions, and it is good at naming types and spotting links. It can also invent links the data does not support or miss a rule only your team knows, so review each draft and test it against real data.What is the difference between an ontology and a semantic layer?
A semantic layer defines metrics, such as monthly revenue, so every report computes them the same way from warehouse tables. An ontology defines entities and how they connect across every system and document. Many companies use both.How big should an ontology be?
As small as the questions allow. A few dozen types answer most business questions; a large ontology nobody loads data into is harder to maintain than a small one that is used every day.Related topics
What is a knowledge graph?
The connected facts an ontology organizes.
What is entity resolution?
Deciding when records and mentions refer to the same thing.
What is data provenance?
Recording where every value came from, so answers can be checked.
What is a property graph?
Labeled nodes and edges with typed properties on both.
Property graph vs RDF
Two ways to model a knowledge graph, compared side by side.
What is GraphRAG?
Retrieval that follows relationships, compared with vector RAG.