The TBox lists the types of thing. The ABox lists the things. Every adjective in a class name is a value that belongs in the ABox, and the class count shows it.
An ontology file has two layers that look alike in Turtle and do different jobs. The TBox (terminology) declares classes and properties: Person is a class, plays instrument is a property from a person to an instrument type. The ABox (assertions) states facts about individuals: Dana K is a person, Dana K plays guitar, Dana K was born on 14 March 1991. Between them sits the CBox (categories), the controlled lists the ABox picks values from: the instrument types, the genres, the occupations.
# one namespace for the whole music graph; the prefix says what the terms are about
@prefix music: <https://jesstalisman-ia.github.io/KGA-Knowledge-Checks/music#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
# TBox: the types of thing, and the properties that connect them music:person a owl:Class ; rdfs:label "Person"@en . music:plays-instrument a owl:ObjectProperty ; rdfs:domain music:person ; rdfs:range skos:Concept . music:date-of-birth a owl:DatatypeProperty ; rdfs:domain music:person ; rdfs:range xsd:date .
# CBox: the values a person may pick music:guitar a skos:Concept ; skos:inScheme music:instruments ; skos:broader music:strings ; skos:prefLabel "Guitar"@en .
# ABox: one person, three facts music:dana-k a music:person ; music:name "Dana K" ; music:date-of-birth "1991-03-14"^^xsd:date ; music:plays-instrument music:guitar .
Could this have many members? If yes, it describes a type. A type with its own properties and rules is a class in the TBox; a type that is one answer among a fixed list is a concept in the CBox. Can you point at it, date it, give it a serial number? If yes, it is one thing, and everything said about it goes in the ABox. "Guitarist" has members. "Dana K" has a birthday.
| Layer | Changes when | How often | Edited by |
|---|---|---|---|
| TBox | a new type of thing, or a new type of relationship, enters the domain | a few times a year | the ontologist |
| CBox | a new allowed value appears: a genre, an instrument, a city | monthly | the vocabulary editor |
| ABox | a fact is learned: a new musician, a concert, a release | daily | whoever enters data |
music:, for https://jesstalisman-ia.github.io/KGA-Knowledge-Checks/music#. The SPARQL Practice Room binds the same terms to a shorter prefix; the names after the colon are the ones that count.A fact about one musician must never require an edit to the schema. That sentence is the whole argument of this page. Every rule below is a way of keeping it true.
A student wants to record that Dana plays jazz. The quickest way in Protégé is a new class: music:jazz-musician rdfs:subClassOf music:person. Rock, punk, house and the other genres follow, one class each. Dana also plays guitar, so the student adds music:jazz-guitarist, and the genres and instruments multiply: 12 genres and 30 instruments give 360 classes. Dana is based in Portland, so Portland and Seattle double it to 720. Then a new genre is added. Before a single fact about any musician is written, the ontologist has to create one genre class, 30 genre-and-instrument classes and 60 genre-instrument-city classes: 91 edits to the schema, for one word.
Dana plays guitar and electric guitar, in jazz and in rock. Under the subclass scheme Dana needs four types at once, and every one of them is a schema object somebody has to maintain. That is class explosion: the TBox grows as the product of the dimensions, and every fact about an individual turns into a schema edit.
music:jazz-guitarist-in-portland rdfs:subClassOf music:jazz-guitarist, which is a subclass of music:jazz-musician, which is a subclass of music:person. Dana gets four types. The genre list lives in class names.
music:dana-k a music:person ; music:performs-genre music:jazz, music:rock ; music:plays-instrument music:guitar, music:electric-guitar ; music:based-in music:portland . One type. The genre list is a SKOS scheme.
The question the subclasses were meant to answer survives the change. "Which jazz guitarists are based in Portland?" is three triples in a WHERE clause, and the class JazzGuitaristInPortland never has to exist.
PREFIX music: <https://jesstalisman-ia.github.io/KGA-Knowledge-Checks/music#>
SELECT ?name WHERE {
?p music:performs-genre music:jazz ;
music:plays-instrument music:guitar ;
music:based-in music:portland ;
music:name ?name .
}
JazzMusician is "a person whose genre is jazz". The part after whose is a property; the part after is is a value. Both belong outside the class name: the property in the TBox, the value in the CBox, the fact in the ABox.JazzMusician equivalent to Person and performs-genre value jazz. A reasoner then computes the members from the ABox facts, and nobody types the class on a person. The facts stay where they were. That is Module 6 material; this page keeps the values in the ABox.rdfs:subClassOf is a promise about every member for all time. Stating that Loud Weekend is a festival makes it an event in every query and every inference, because every festival is an event. The promise is cheap to make and expensive to break, so each subclass has to pass three questions.
| Candidate | Verdict | Because |
|---|---|---|
| Festival under Event | class | new properties (days, site) and a new rule (several headliners) |
| Band beside Person | class | different properties altogether: members, founding year; a band is never a person |
| Pianist under Person | value | no new property; Noor would need two sibling classes |
| JazzMusician under Person | value | an adjective in the name: performs-genre jazz |
| Composer under Person | value | an occupation; Sam is a musician and a composer, so has-occupation takes two values |
| StringInstrument under Instrument | concept | a branch of the instrument taxonomy; skos:broader, climbed by a query |
The Module 5 music graph describes ten people, five bands, four venues, five events and four albums with twelve classes, fourteen properties and twenty-four concepts in three schemes. Its deepest hierarchy is two levels: Event with Concert and Festival under it. Depth in a TBox is rare; depth in a taxonomy is normal, because a taxonomy is where the types of types go.
A domain and a range in OWL are not checks. They are inferences. music:held-at has domain Event, so when somebody writes music:dana-k music:held-at music:blue-door, a reasoner concludes that Dana K is an event. No error appears; Dana is now an event in every query that asks for events. A property's domain and range therefore have to be true of every use of the property, for as long as the property exists. Three habits break that promise by multiplying properties.
| Habit | What it produces | Instead |
|---|---|---|
| one property per pair of classes | performs-at-concert, performs-at-festival, performs-at-venue | one music:performs-at with range Event. The event already knows whether it is a concert or a festival. |
| one property per value | plays-piano, plays-guitar, plays-cello: thirty properties, and a new instrument is a schema edit | one music:plays-instrument, with the instrument as the object and the list in a SKOS scheme |
| a relationship and its inverse both typed in by hand | member-of and has-member as separate data, which drift apart the first time one is edited | assert one. Declare owl:inverseOf if has-member is wanted as well, and let the reasoner or a ^music:member-of path supply it |
The first two habits share a tell: a class name or a value name inside the property name. performs-at-festival contains a class; plays-piano contains a value. Fold the class into the range and the value into the object, and the property is general again.
A headliner performs at an event and also closes it. That is one property with extra meaning, so it is a sub-property: music:headliner rdfs:subPropertyOf music:performs-at. A query for performers then returns the headliners too, and a query for headliners returns only them. A sub-property adds meaning; a property per class or per value only adds names.
In the music graph music:name is used on people, bands, venues, events and albums, so it declares no domain. A domain of Person on music:name would turn every named venue into a person by inference. Declare a domain when every subject really is of that class; otherwise leave it open and let the class of the subject come from rdf:type.
A data property's value is a literal: a string, a number, a date. Nothing can link to a literal, nothing can be said about it, and it cannot be picked from a list. That makes the choice between the two property types a question about the value. Measurements, dates, names and codes are literals, and they take a data property with an xsd type. Anything people pick from a list, or that other things need to link to, is a node: a concept in the CBox or an individual in the ABox, reached through an object property.
music:blue-door music:city "Portland" and, three rows later, music:riverside-arena music:city "Portand". Two cities now exist, one of them misspelt, and neither has a population, a region or a link to anything.
music:blue-door music:located-in music:portland, where music:portland is one concept with one preferred label. A typo in a label is one fix; a query for venues in Portland finds both halls.
The Module 5 graph keeps music:city as a string because it is a small teaching set and the SPARQL lessons use FILTER(?city = "Seattle"). The moment a city needs a second fact, or a second spelling appears, it becomes a node.
price-usd, price-eur, price-text; date, date-string, year. One property with one datatype: music:ticket-price as xsd:decimal, music:date as xsd:date. The year comes from YEAR(?date) in the query, as in lesson 3 of the SPARQL Practice Room.music:venue-name and music:venue-city on an event copy the venue's facts onto every event held there, and the copies drift. The name belongs to the venue: give the venue a node, link the event to it with music:held-at, and ask for the name through the link."2026-09-30" is a string; "2026-09-30"^^xsd:date is a date. Only the second one compares as a date, sorts as a date, and answers YEAR(). Type every literal, and tag every label with its language.Separation of concerns in a knowledge graph means that each layer is edited by the people who own it, at the speed its content changes, without touching the others. The music graph ships as one file for teaching; a real project keeps three, and the boundary between them is the set of rules on this page.
| Layer | Contains | What breaks when it leaks into another layer |
|---|---|---|
| TBox | classes, properties with domain and range, the few subclass and sub-property links that add meaning | a class per value: data entry has to edit the schema; a property per class: every query has to list a dozen properties for one relationship |
| CBox | concept schemes: one preferred label per language, skos:broader, definitions and scope notes | a concept used as a class: rdf:type music:jazz confuses every tool; a class used as a concept: skos:broader between classes is invisible to a reasoner |
| ABox | individuals with rdf:type, their links to other individuals and to concepts, their literals | a string where a node should be: nothing can link to it, and spellings multiply; a fact typed in as a class: one-member classes everywhere |
JazzMusician, PortlandVenue, SoldOutConcert.performs-at-festival, plays-piano.rdfs:subClassOf.Each of the seven is a layer boundary being crossed. The fix is the same every time: find which layer the content belongs to, move it there, and connect it back with a property.
Pick an answer; the explanation appears at once, with a link back to the section that teaches it.