Skip to main content

TBox and ABox: Schema versus Data

📍 Where we are: Part I · Knowledge Representation — Chapter 3. RDF and OWL gave the academic world a web-standard skin of globally named triples and logical constructors; this chapter lifts that vocabulary into a description-logic knowledge base and finds it falls into two boxes — general rules in one, specific facts in the other.

Every knowledge base in this volume has two halves that do genuinely different jobs. One half states the laws of the domaina professor is a researcher; professors and students never overlap — laws that bind every object, named or not. The other half states the facts on the groundalice is a professor; alice advises bob — claims about specific, named things. Description logic gives these two halves separate names, separate notation, and, as this chapter will show, separate reasoning questions. Learning to keep them apart is the first real skill of knowledge representation.

The simple version

Imagine a field guide sitting next to a day's sightings logbook. The field guide says things like "every sparrow is a bird" and "no creature is both a bird and a fish" — laws about kinds, true no matter which animals wander past, and never mentioning any individual by name. The logbook says "the bird at feeder 3 is a sparrow, and it chased the one at feeder 5" — specific, named, dated observations. The guide is rewritten once a decade; the logbook fills up by the hour. You would never scribble a single sighting into the field guide, nor a general law into the logbook. A description-logic knowledge base makes that separation official: the field guide is the TBox, the logbook is the ABox.

What this chapter covers

  • The split in one line — the TBox (terminological box) is the schema, saying what kinds of things exist and how they relate; the ABox (assertional box) is the data, saying which named individuals are what.
  • Reading the TBox aloud — the academic world's 14 general axioms, quoted from the companion and read in plain English: a concept hierarchy, a role chain, a disjointness, and two deliberately unsatisfiable concepts.
  • Reading the ABox aloud — concept assertions C(a)C(a) and role assertions r(a,b)r(a,b), and how the companion builds all 31 of them mechanically, retyping nothing by hand.
  • Provably the same world — the ABox is a pure function of Volume 1's kb.FACTS, so professor(alice) becomes exactly Professor(alice), and the counts are computed rather than claimed.
  • Semantics — interpretations, models, and entailment KBα\text{KB} \models \alpha, and the two questions this buys — subsumption (a TBox query) and instance checking (an ABox query) — laid out in a table.
  • The open-world reading — an ABox is incomplete: a missing role assertion means "unknown," not "false," a theme the open-world chapter returns to in force.

The split in one line

A description-logic knowledge base is a pair KB=(T,A)\text{KB} = (\mathcal{T}, \mathcal{A}) [1]. The first component, the TBox T\mathcal{T} (short for terminological box), is a set of general axioms about concepts and roles — statements with no individual's name in them, true of every object that fits the pattern. The second, the ABox A\mathcal{A} (short for assertional box), is a set of assertions about specific named individuals. Read the names literally: terminological knowledge is knowledge about the terms — the vocabulary of kinds and relationships; assertional knowledge asserts particular facts about particular things [2].

Three pieces of vocabulary carry the rest. A concept is a class of individuals — Professor, Student, Person, written with a capital letter, the description-logic counterpart of an OWL class. A role is a binary relationship between individuals — advises, authored, cites, the counterpart of an OWL property. An individual is a single named thing — alice, p1, mit. The TBox talks only about concepts and roles; the ABox talks about individuals through those concepts and roles. That one sentence is the whole architecture; the rest of the chapter fills it in on a single concrete world.

A tall diagram split by a horizontal divider into two stacked boxes over one shared world. The upper box is labeled TBox, schema, general axioms, and draws the concept hierarchy as nested ovals with Professor and Student both inside Researcher inside Person, a subsumption arrow reading Professor is subsumed by Person, a small chain glyph reading advises then advises is subsumed by grandAdvisor, and a red crossed-out overlap between Professor and Student labeled disjoint, with a faded unsatisfiable concept TenuredStudent collapsing onto the bottom concept. The lower box is labeled ABox, data, assertions, and draws named dots alice and bob tagged Professor, carol and dave and erin tagged Student, paper dots p1 p2 p3 tagged Paper, and institution dots mit and cmu, with labeled arrows advises from alice to bob and from bob to carol and authored from alice to p1. A thin band beneath both boxes is labeled interpretation, mapping every name to an element of a domain, and a footer stamp reads 14 axioms above, 13 concept assertions and 18 role assertions over 13 individuals below. The two boxes of a knowledge base: a TBox of general schema axioms sitting above an ABox of specific data assertions, both interpreted over one shared domain of individuals. Original diagram by the authors, created with AI assistance.

Reading the TBox: axioms about concepts and roles

The academic world's TBox lives in ontology.py (lines 125–174) as a Python list named TBOX, one entry per axiom. Most entries are general concept inclusions (GCIs), written LRL \sqsubseteq R and read "LL is subsumed by RR" — every individual in the left concept is necessarily in the right one. A few are role axioms: a role inclusion rsr \sqsubseteq s, or a role chain r1r2sr_1 \circ r_2 \sqsubseteq s (the ∘ reads "composed with" — follow r1r_1 then r2r_2 and you land in ss). Here are the first four axioms exactly as the file spells them, so you can see the surface syntax that builds each concept expression (lines 128–133):

Sub("Professor", "Researcher"),
Sub("Student", "Researcher"),
Sub("Researcher", "Person"),

# (4) Every professor advises some student. Normal form A ⊑ ∃r.B.
Sub("Professor", Some("advises", "Student")),

Sub(L, R) is the constructor for a GCI LRL \sqsubseteq R, and Some(r, C) builds the existential restriction r.C\exists r.C, read "related by role rr to some member of CC." So axiom (4) reads Professoradvises.Student\text{Professor} \sqsubseteq \exists\,\text{advises}.\text{Student}: every professor advises at least one student. Two more axioms carry much of this chapter's weight — the disjointness and the role chain (lines 143 and 147):

Sub(And("Professor", "Student"), BOT),
...
Chain("advises", "advises", "grandAdvisor"),

And(...) builds a conjunction \sqcap (read "and"), BOT is the bottom concept ⊥ (the empty, impossible class), and Chain(r1, r2, s) builds the role chain. So axiom (6) is ProfessorStudent\text{Professor} \sqcap \text{Student} \sqsubseteq \bot: anything that is both a professor and a student belongs to the impossible class — the description-logic way to declare the two concepts disjoint, that nobody is both. Axiom (7) is advisesadvisesgrandAdvisor\text{advises} \circ \text{advises} \sqsubseteq \text{grandAdvisor}, the very role chain Volume 1 wrote as a Horn rule.

Running python3 ontology.py renders all 14 axioms in textbook notation. This is the real, committed output:

10 named concepts, 6 roles, 14 TBox axioms; ABox: 13 concept assertions, 18 role assertions over 13 individuals.

TBox:
Professor ⊑ Researcher
Student ⊑ Researcher
Researcher ⊑ Person
Professor ⊑ ∃advises.Student
∃advises.⊤ ⊑ Researcher
Professor ⊓ Student ⊑ ⊥
advises ∘ advises ⊑ grandAdvisor
Dean ⊑ Professor
Dean ⊑ ∃advises.Professor
TenuredStudent ⊑ Professor
TenuredStudent ⊑ Student
TenuredStudentAdvisor ⊑ ∃advises.TenuredStudent
∃advises.∃authored.Paper ⊑ Person
Person ⊓ ∃authored.Paper ⊑ Researcher

Read a few aloud. Lines 1–3 are the concept hierarchy ProfessorResearcherPerson\text{Professor} \sqsubseteq \text{Researcher} \sqsubseteq \text{Person}: professors and students are researchers, and researchers are persons. Line 5, advises.Researcher\exists\,\text{advises}.\top \sqsubseteq \text{Researcher} (⊤ is the top concept, the class of everything), says anyone who advises anything at all is a researcher. Lines 10–12 are a deliberate trap: TenuredStudent is declared both a professor and a student, and by axiom (6) that overlap is impossible, so a correct reasoner must find TenuredStudent unsatisfiable — a concept that can have no members. Axiom (12) then poisons TenuredStudentAdvisor in turn, since it must advise an impossible thing. These two concepts exist precisely to make the ⊥ machinery earn its keep; a reasoner that fails to flag them is broken. Notice what is absent from every line: no individual's name. That absence is the signature of a TBox axiom.

Reading the ABox: assertions about named individuals

Where the TBox is silent about individuals, the ABox is nothing but individuals. It has exactly two kinds of assertion. A concept assertion C(a)C(a) says the individual aa is a member of concept CCProfessor(alice), Paper(p1). A role assertion r(a,b)r(a,b) says individuals aa and bb stand in role rradvises(alice, bob), authored(alice, p1). That is the entire assertional language: type an individual, or link two individuals.

The load-bearing design decision is that not one of these assertions is typed by hand. The companion builds the whole ABox from Volume 1's fact list by mapping predicate names, in _build_abox (ontology.py, lines 183–205). The mapping tables sit two lines above it (lines 179–180): _CONCEPT_OF = {"professor": "Professor", "student": "Student"} and _ROLE_OF = {"advises", "authored", "cites", "affiliated", "about"}. The loop then walks every fact and routes it (lines 194–205):

for fact in FACTS:
if len(fact) == 2 and fact[0] in _CONCEPT_OF:
concept_assertions.append((_CONCEPT_OF[fact[0]], fact[1]))
elif len(fact) == 3 and fact[0] in _ROLE_OF:
role_assertions.append((fact[0], fact[1], fact[2]))
for p in PAPERS:
concept_assertions.append(("Paper", p))
for i in INSTITUTIONS:
concept_assertions.append(("Institution", i))
for t in TOPICS:
concept_assertions.append(("Topic", t))
return concept_assertions, role_assertions

A length-2 fact whose predicate is in _CONCEPT_OF becomes a concept assertion; a length-3 fact whose predicate is a role becomes a role assertion; and the paper, institution, and topic vocabularies — which Volume 1 kept as plain entity lists rather than typed facts — are typed here. The result is 13 concept assertions and 18 role assertions over 13 individuals: alice, bob, carol, dave, erin, the three papers, two institutions, and three topics. Both totals decompose with no remainder, which is the quickest way to see nothing was lost in translation:

ABox partcounthow it breaks down
concept assertions C(a)C(a)132 Professor + 3 Student + 3 Paper + 2 Institution + 3 Topic
role assertions r(a,b)r(a,b)184 advises + 4 authored + 2 cites + 5 affiliated + 3 about
individuals135 people + 3 papers + 2 institutions + 3 topics

Every one of those 18 role edges is a binary fact of Volume 1, and every one of the 5 person-typing assertions is a Volume 1 unary fact — the other 8 concept assertions type the entities Volume 1 tracked as bare vocabulary.

Provably the same world as Volume 1

This is not a retelling of Volume 1's world; it is that world, re-viewed. The proof is that the ABox is a pure function of Volume 1's data — kb.FACTS together with its PAPERS, INSTITUTIONS, and TOPICS entity lists. So professor(alice), a Horn fact in Volume 1, is transformed mechanically into the concept assertion Professor(alice), and advises(alice, bob) becomes the role assertion advises(alice, bob). Nothing is invented, dropped, or renamed except the capitalization the mapping tables specify. The summary function (lines 216–220) counts what came out:

def summary() -> str:
return (f"{len(CONCEPTS)} named concepts, {len(ROLES)} roles, "
f"{len(TBOX)} TBox axioms; ABox: {len(CONCEPT_ASSERTIONS)} concept "
f"assertions, {len(ROLE_ASSERTIONS)} role assertions over "
f"{len(INDIVIDUALS)} individuals.")

Those counts — 10 named concepts, 6 roles, 14 TBox axioms; 13 concept assertions, 18 role assertions, 13 individuals — are computed from the data structures, not typed into the prose, so they cannot silently drift from the facts they summarize. The TBox is where the genuinely new content lives: Volume 1's rules became schema axioms, joined by fresh ones like the disjointness and the two unsatisfiable concepts. The ABox is Volume 1's facts, unchanged. That is exactly what "the running example, re-read as an ontology" means — same individuals, same edges, richer schema.

Semantics: interpretations, models, and entailment

We have been reading ⊑, ⊓, ∃, ⊥ as if their meaning were obvious. It is made exact by an interpretation [3]. An interpretation is a pair I=(ΔI,I)\mathcal{I} = (\Delta^{\mathcal{I}}, \cdot^{\mathcal{I}}): a nonempty set ΔI\Delta^{\mathcal{I}} called the domain — the universe of things that exist in this possible world — and an interpretation function I\cdot^{\mathcal{I}} that hands every name a meaning inside that domain. A concept name AA becomes a set of domain elements, AIΔIA^{\mathcal{I}} \subseteq \Delta^{\mathcal{I}}; a role name rr becomes a binary relation, rIΔI×ΔIr^{\mathcal{I}} \subseteq \Delta^{\mathcal{I}} \times \Delta^{\mathcal{I}}; an individual name aa becomes a single element, aIΔIa^{\mathcal{I}} \in \Delta^{\mathcal{I}}. The compound concepts inherit their meaning compositionally:

I=ΔI,I=,(CD)I=CIDI,(r.C)I={xΔI:y.(x,y)rIyCI}.\top^{\mathcal{I}} = \Delta^{\mathcal{I}}, \quad \bot^{\mathcal{I}} = \varnothing, \quad (C \sqcap D)^{\mathcal{I}} = C^{\mathcal{I}} \cap D^{\mathcal{I}}, \quad (\exists r.C)^{\mathcal{I}} = \{\, x \in \Delta^{\mathcal{I}} : \exists y.\, (x,y) \in r^{\mathcal{I}} \wedge y \in C^{\mathcal{I}} \,\}.

An interpretation satisfies an axiom when the sets line up its way. It satisfies a GCI CDC \sqsubseteq D exactly when CIDIC^{\mathcal{I}} \subseteq D^{\mathcal{I}}; a concept assertion C(a)C(a) when aICIa^{\mathcal{I}} \in C^{\mathcal{I}}; a role assertion r(a,b)r(a,b) when (aI,bI)rI(a^{\mathcal{I}}, b^{\mathcal{I}}) \in r^{\mathcal{I}}. An interpretation that satisfies every axiom of T\mathcal{T} and every assertion of A\mathcal{A} is a model of the knowledge base. A knowledge base normally has infinitely many models — every consistent way the world could be, differing in all the facts it left open.

Reasoning is asking what holds in all of them. We write KBα\text{KB} \models \alpha, read "KB entails α\alpha," to mean that every model of the knowledge base also satisfies α\alpha. Entailment, not lookup, is the point. KBPerson(alice)\text{KB} \models \text{Person}(\text{alice}) holds even though Person(alice) appears nowhere in the ABox, because Professor(alice) is asserted and the TBox forces ProfessorResearcherPerson\text{Professor} \sqsubseteq \text{Researcher} \sqsubseteq \text{Person}, so in every model alice's element lands inside Person. That entailment is exactly the reasoning the later chapters automate.

This single relation \models answers two different-looking questions, and the split mirrors the two boxes:

dimensionTBox query — subsumptionABox query — instance checking
what it asksis concept CC always a kind of DD?is individual aa an instance of concept CC?
notationKBCD\text{KB} \models C \sqsubseteq DKBC(a)\text{KB} \models C(a)
what it readsmainly the TBox (schema)TBox and ABox (schema + data)
a "yes" hereProfessorPerson\text{Professor} \sqsubseteq \text{Person}Person(alice)\text{Person}(\text{alice})
a "no" hereStudentProfessor\text{Student} \sqsubseteq \text{Professor}Professor(carol)\text{Professor}(\text{carol})
the extreme caseTenuredStudent\text{TenuredStudent} \sqsubseteq \bot (unsatisfiable)consistency: no model at all if A\mathcal{A} clashes with T\mathcal{T}

Subsumption compares two concepts and is a statement about the schema; instance checking tests one individual and therefore needs the data too. The unsatisfiability test CC \sqsubseteq \bot is just subsumption with ⊥ on the right — which is why the deliberately broken TenuredStudent is a TBox problem, catchable before a single individual is ever asserted.

The open-world reading

One habit from databases must be unlearned here. An ABox is read under the open-world assumption (OWA): what is not asserted is unknown, not false [2]. The ABox records advises(alice, bob) but says nothing about advises(alice, carol). A database would treat that missing row as a closed "no"; a description-logic reasoner refuses to. Because there are models where alice advises carol and models where she does not, the knowledge base entails neither the fact nor its negation — the honest answer is unknown:

KB⊭advises(alice,carol)andKB⊭¬advises(alice,carol).\text{KB} \not\models \text{advises}(\text{alice}, \text{carol}) \quad\text{and}\quad \text{KB} \not\models \neg\,\text{advises}(\text{alice}, \text{carol}).

So where do the genuine "no" answers come from? Only from the TBox forcing a clash. The reasoner concludes KB¬Student(alice)\text{KB} \models \neg\,\text{Student}(\text{alice}) not because "student" is absent from alice's record, but because Professor(alice) is asserted and axiom (6), ProfessorStudent\text{Professor} \sqcap \text{Student} \sqsubseteq \bot, makes professor-and-student impossible in every model. Negative knowledge is earned from a disjointness axiom, never assumed from silence. This is why that one axiom is not decoration: under the open-world assumption it is the only thing that lets the academic world ever say no.

The unsolved part

We have leaned on ⊑, ⊓, ∃, ⊥ and on the phrase "in every model" as though a concept were a settled object — but this chapter never defined what concepts and roles are, only how a handful of them behave. Which constructors are allowed on each side of a ⊑? Is \exists enough, or do we also get \forall (universal restrictions), full negation, number restrictions? Each choice yields a different description logic at a different price: the family called EL\mathcal{EL} keeps essentially ⊓ and ∃ (plus the top concept ⊤) and decides subsumption in polynomial time, while adding disjunction and full negation pushes the cost up to exponential. Until that grammar is pinned down, "the same world" and "KBα\text{KB} \models \alpha" still rest on intuition about a language we have only sampled. And the two-box picture hides one more open choice: the boundary between schema and data is a decision, not a law. Is "alice is tenured" a TBox axiom about a kind of person, or an ABox fact about alice? Different ontologies answer differently, and the answer changes what a reasoner can prove.

Why it matters

The TBox/ABox split is the load-bearing wall of every symbolic system in this volume, and it is exactly the seam a neuro-symbolic system must respect. Schema axioms are the guarantees a learner is not free to violate — a model that predicts advises(alice, carol) had better not thereby make alice both a professor and a student. Data assertions are the evidence a learner both consumes and produces. Later volumes hang embeddings and neural scorers on the ABox — the facts, which are noisy, incomplete, and endlessly extensible — while treating the TBox as hard constraints those predictions must obey. Knowing which box a piece of knowledge belongs in tells you which half of a hybrid system should hold it, and the open-world reading names the one mistake a learner must never make: reading a missing assertion as a false one.

Key terms

  • TBox (terminological box) — the schema: general axioms about concepts and roles, with no individual named; the academic world's TBox has 14.
  • ABox (assertional box) — the data: concept assertions C(a)C(a) and role assertions r(a,b)r(a,b) about named individuals; here 13 and 18 respectively over 13 individuals, built mechanically from Volume 1's facts.
  • General concept inclusion (GCI) — a TBox axiom LRL \sqsubseteq R, "everything in LL is in RR"; the hierarchy ProfessorResearcherPerson\text{Professor} \sqsubseteq \text{Researcher} \sqsubseteq \text{Person} is three of them.
  • Role axiom — a role inclusion rsr \sqsubseteq s or a role chain r1r2sr_1 \circ r_2 \sqsubseteq s, e.g. advisesadvisesgrandAdvisor\text{advises} \circ \text{advises} \sqsubseteq \text{grandAdvisor}.
  • Disjointness / bottom concept ⊥ProfessorStudent\text{Professor} \sqcap \text{Student} \sqsubseteq \bot says nothing is both; ⊥ is the impossible class, and CC \sqsubseteq \bot means CC is unsatisfiable.
  • Interpretation / model — an interpretation maps names to a domain; a model is one that satisfies every axiom and assertion.
  • Entailment KBα\text{KB} \models \alphaα\alpha holds in every model of the knowledge base; reasoning is computing entailments, not looking facts up.
  • Subsumption vs instance checking — the TBox query KBCD\text{KB} \models C \sqsubseteq D versus the ABox query KBC(a)\text{KB} \models C(a).
  • Open-world assumption (OWA) — a missing assertion is unknown, not false; negatives come only from TBox clashes like disjointness.

Where this leads

We now have the architecture — two boxes, a semantics, and two reasoning questions — but only an informal grip on the language inside the boxes. The next chapter, Description Logic, defines that language precisely: its concepts, roles, and constructors, the exact grammar of what may appear on each side of a ⊑, and the model-theoretic meaning of every symbol we have so far used on trust. With the grammar fixed, the TBox and ABox stop being intuitive containers and become a formal object a reasoner can decide.