Knowledge Graph Academy · Modules 3 to 5 · SKOS with the TBox and the ABox · instruments

Instruments in Three Layers

A taxonomy of instrument kinds and accessories, an ontology of musicians, physical instruments, makers and performances, and the facts about one concert: built up layer by layer until one question needs all three.

read seven sections, then fourteen questionsscore 0/14
1 · Kinds · CBox

A taxonomy of instrument kinds is the first layer, and every kind is a value

Every music graph needs the list of kinds of instrument. A kind is a term people pick from a list. It has a preferred name and the other names people use (Fiddle for Violin, Electric bass for Bass guitar), a definition, and a place among the other kinds: Bass guitar sits under Guitar, which sits under String instruments. That is a SKOS concept scheme, and the Module 3 rules apply to it unchanged: one skos:prefLabel per language, the other names as skos:altLabel, skos:broader to the parent, skos:inScheme on every concept, skos:topConceptOf on the roots.

# the Musical instruments scheme: twelve kinds in three branches (four shown)
ex:instruments a skos:ConceptScheme ; skos:prefLabel "Musical instruments"@en ;
    skos:definition "Kinds of instrument. A kind is a controlled value; the instrument in your hands is an instance of Physical instrument."@en ;
    skos:hasTopConcept ex:string-instruments, ex:percussion-instruments, ex:keyboard-instruments .

ex:string-instruments a skos:Concept ; skos:prefLabel "String instruments"@en ;
    skos:inScheme ex:instruments ; skos:topConceptOf ex:instruments ;
    skos:definition "Instruments that produce sound from vibrating strings."@en .
ex:guitar a skos:Concept ; skos:prefLabel "Guitar"@en ; skos:broader ex:string-instruments ; skos:inScheme ex:instruments .
ex:bass-guitar a skos:Concept ; skos:prefLabel "Bass guitar"@en ; skos:altLabel "Electric bass"@en ;
    skos:broader ex:guitar ; skos:inScheme ex:instruments ;
    skos:scopeNote "Use for the electric bass. For the acoustic upright instrument, use Double bass."@en .
ex:violin a skos:Concept ; skos:prefLabel "Violin"@en ; skos:altLabel "Fiddle"@en ;
    skos:broader ex:string-instruments ; skos:inScheme ex:instruments .
  • String instruments
    • Violin also: Fiddle
    • Cello also: Violoncello
    • Double bass also: Upright bass, Contrabass
    • Guitar
      • Acoustic guitar
      • Electric guitar
      • Bass guitar also: Electric bass
  • Percussion instruments
    • Drum kit also: Drums, Drum set
  • Keyboard instruments
    • Piano also: Pianoforte

A kind is a value. Nothing in this layer is a class, and no concept will ever be the object of rdf:type. The scheme's definition says so in words, because the next layer has a class whose name a reader could confuse with it.

2 · Classes · TBox

A kind is a concept; the instrument in your hands is an instance of a class

Paul McCartney plays bass guitar, and Paul McCartney owns one particular bass: a 1961 Höfner 500/1 with a serial number. "Bass guitar" is a kind, so it stays a concept. The Höfner is one object with a maker, a year and a serial number, so it is an instance of a class. The class is named Physical instrument on purpose: a different name for a different layer, so nobody writes rdf:type ex:bass-guitar by mistake. Section 7 shows the other ways to keep a shared word apart across layers.

The ontology has five classes and ten properties. Two of the properties take a controlled value from the Musical instruments scheme: plays, for the kind a musician plays, and is of kind, for the kind a physical instrument is. Both have the range skos:Concept. Every other object property links instances of classes, and the datatype properties take literals.

PropertyDomain → rangeThe value is
ex:playsMusician → skos:Conceptconcept a kind from Musical instruments
ex:ownsMusician → Physical instrumentinstance one object
ex:kindPhysical instrument → skos:Conceptconcept which kind this object is
ex:made-byPhysical instrument → Makerinstance a company or workshop
ex:year-made, ex:serial-numberPhysical instrument → xsd:integer, xsd:stringa literal
ex:performs-atMusician → Performanceinstance
ex:played-withPerformance → Physical instrumentinstance the objects on stage
ex:takes-place-at, ex:on-datePerformance → Venue, xsd:dateinstance, a literal
# the classes, documented with SKOS notes (annotations: they change nothing for a reasoner)
ex:musician a owl:Class ; rdfs:label "Musician"@en ;
    skos:scopeNote "What a musician plays is a kind, a controlled value. What a musician owns is a physical instrument, an instance."@en .
ex:physical-instrument a owl:Class ; rdfs:label "Physical instrument"@en ;
    skos:definition "One instrument you can hold: it has a maker, a year and a serial number."@en ;
    skos:example "Paul's 1961 Höfner 500/1 bass."@en .

# two properties draw their values from the taxonomy; the rest link instances or take literals
ex:plays a owl:ObjectProperty ; rdfs:domain ex:musician ; rdfs:range skos:Concept ;
    rdfs:comment "A controlled value from the Musical instruments taxonomy."@en .
ex:kind  a owl:ObjectProperty ; rdfs:domain ex:physical-instrument ; rdfs:range skos:Concept .
ex:owns  a owl:ObjectProperty ; rdfs:domain ex:musician ; rdfs:range ex:physical-instrument .
ex:year-made a owl:DatatypeProperty ; rdfs:domain ex:physical-instrument ; rdfs:range xsd:integer .

concept which kind

Bass guitar. Picked from a list, with synonyms and a definition, under Guitar in the taxonomy. The value of ex:plays and of ex:kind.

instance which one

Paul's 1961 Höfner 500/1. Typed ex:physical-instrument, with a maker, a year, a serial number, and an owner. The value of ex:owns and of ex:played-with.

3 · Required accessories · CBox + TBox

SKOS can say related; your TBox can say what the relation is

A violin needs a bow and rosin. An electric bass needs an amplifier, a cable and a strap. Every string instrument needs spare strings. That is knowledge about kinds, so it links concept to concept, and the accessories are a second scheme: Bow, Rosin, Spare strings, Amplifier, Instrument cable, Strap, Plectrum, Drumsticks, Drum key.

SKOS offers one associative link between concepts, skos:related, which says "these two are connected" and nothing about which one needs the other. ISO 25964, the thesaurus standard, allows custom relationship types, and the way to write one in SKOS is a sub-property. Declare ex:requires in the TBox as a sub-property of skos:related, with domain and range skos:Concept. A plain SKOS tool still sees a related link; your graph keeps which kind needs which accessory.

# TBox: a relationship type SKOS does not have, declared as a sub-property of skos:related
ex:requires a owl:ObjectProperty ; rdfs:subPropertyOf skos:related ;
    rdfs:label "requires accessory"@en ; rdfs:domain skos:Concept ; rdfs:range skos:Concept ;
    skos:scopeNote "Between concepts only. A requirement stated on a broader kind is inherited by its narrower kinds through skos:broader in a query, never by inference."@en .

# CBox: the accessories scheme, and the requirements stated on kinds
ex:accessories a skos:ConceptScheme ; skos:prefLabel "Instrument accessories"@en .
ex:bow a skos:Concept ; skos:prefLabel "Bow"@en ; skos:inScheme ex:accessories ; skos:topConceptOf ex:accessories .
ex:spare-strings a skos:Concept ; skos:prefLabel "Spare strings"@en ; skos:inScheme ex:accessories ; skos:topConceptOf ex:accessories .

ex:string-instruments ex:requires ex:spare-strings .                      # stated once, on the branch
ex:violin      ex:requires ex:bow, ex:rosin .
ex:bass-guitar ex:requires ex:amplifier, ex:instrument-cable, ex:strap .
ex:drum-kit    ex:requires ex:drumsticks, ex:drum-key .

Three consequences of the sub-property

The reasoner adds the symmetric link, and only that. skos:related is symmetric (condition S23), so from ex:violin ex:requires ex:bow a reasoner concludes ex:violin skos:related ex:bow and ex:bow skos:related ex:violin. It never concludes that a bow requires a violin: the sub-property still goes from the kind to the accessory.

Never between a kind and its own branch. skos:related is disjoint with skos:broaderTransitive (S27). ex:string-instruments ex:requires ex:violin would relate a kind to its own narrower kind, and the graph becomes inconsistent. Requirements go from a kind to an accessory, across schemes.

Inheritance is the query's job. Spare strings are stated on String instruments once. Nothing copies the statement down to Bass guitar; the query climbs skos:broader* from the kind to its branch and collects what each level requires. Section 5 shows the climb.

When the reasoner has to check itIf a reasoner must verify that every violin instance comes with a bow instance, that is an OWL restriction over classes, and the kinds would have to be classes. This module keeps kinds as concepts, states requirements between them, and lets the query do the climbing. The reasoner's check is Module 6 territory.
4 · Facts · ABox

The ABox puts real musicians, real instruments and real dates on both layers

Three musicians, three physical instruments, three makers, one concert, one venue. Every line is one of four kinds of fact: a type (rdf:type to a class), a controlled value (ex:plays, ex:kind to a concept), a link (ex:owns, ex:made-by, ex:performs-at, ex:played-with, ex:takes-place-at to an instance), or a value (ex:year-made, ex:serial-number, ex:on-date, a literal).

ex:paul-mccartney a ex:musician ; rdfs:label "Paul McCartney"@en ;
    ex:plays ex:bass-guitar, ex:piano ;                      # controlled values
    ex:owns ex:hofner-500-1 ;                                # a link to an instance
    ex:performs-at ex:concert-2026-09-25 .
ex:hofner-500-1 a ex:physical-instrument ; rdfs:label "Paul's 1961 Höfner 500/1 bass"@en ;
    ex:kind ex:bass-guitar ;                                 # which kind: a controlled value
    ex:made-by ex:hofner ; ex:year-made 1961 ; ex:serial-number "H61-0427" .
ex:hofner a ex:maker ; rdfs:label "Höfner"@en .

ex:ringo-starr a ex:musician ; rdfs:label "Ringo Starr"@en ; ex:plays ex:drum-kit ; ex:owns ex:ludwig-kit ; ex:performs-at ex:concert-2026-09-25 .
ex:ludwig-kit a ex:physical-instrument ; rdfs:label "Ringo's Ludwig kit"@en ; ex:kind ex:drum-kit ; ex:made-by ex:ludwig ; ex:year-made 1963 .
ex:mira-sato a ex:musician ; rdfs:label "Mira Sato"@en ; ex:plays ex:violin ; ex:owns ex:sato-violin ; ex:performs-at ex:concert-2026-09-25 .
ex:sato-violin a ex:physical-instrument ; rdfs:label "Mira's Lindqvist violin"@en ; ex:kind ex:violin ; ex:made-by ex:lindqvist ; ex:year-made 1998 .

ex:concert-2026-09-25 a ex:performance ; rdfs:label "Strings and rhythm night, 25 September 2026"@en ;
    ex:takes-place-at ex:wigmore-hall ; ex:on-date "2026-09-25"^^xsd:date ;
    ex:played-with ex:hofner-500-1, ex:ludwig-kit, ex:sato-violin .
Fact about PaulKind of factLayer it points into
a ex:musiciantypeTBox a class
ex:plays ex:bass-guitarcontrolled valueCBox a concept, picked
ex:owns ex:hofner-500-1linkABox another instance
ex:hofner-500-1 ex:year-made 1961valuea literal, typed by the TBox range

Mira Sato and her maker are invented; the Beatles and their instruments are the module's running example. The ABox never adds a class or a concept: when a violinist joins the band, three facts are written and nothing in the other layers changes.

5 · One question, three layers

One question needs all three layers, and the query shows which line uses which

"What must each musician bring to the concert?" The answer joins who performs (ABox), what they own and which kind it is (ABox facts over TBox properties), which branch that kind sits in (CBox), and what each level of the branch requires (the sub-property from Section 3).

SELECT ?musician ?kind ?accessory WHERE {
  ?musician rdf:type ex:musician ;                  # ABox: typed with a TBox class
            ex:performs-at ex:concert-2026-09-25 ;  # ABox: a link
            ex:owns ?instrument .                   # ABox: a link to a physical instrument
  ?instrument ex:kind ?kind .                       # ABox: a controlled value from the CBox
  ?kind skos:broader* ?branch .                     # CBox: climb from the kind to its branch
  ?branch ex:requires ?accessory .                  # CBox: what each level requires
} ORDER BY ?musician ?accessory
musiciankindaccessorystated on
Mira SatoViolinBowViolin
Mira SatoViolinRosinViolin
Mira SatoViolinSpare stringsString instruments, one step up
Paul McCartneyBass guitarAmplifierBass guitar
Paul McCartneyBass guitarInstrument cableBass guitar
Paul McCartneyBass guitarSpare stringsString instruments, two steps up
Paul McCartneyBass guitarStrapBass guitar
Ringo StarrDrum kitDrum keyDrum kit
Ringo StarrDrum kitDrumsticksDrum kit

Take any layer away and the question dies. Without the TBox, ex:owns and ex:kind have no declared meaning and no range to check. Without the CBox, Bass guitar is a string with no branch above it, and spare strings never reach Paul. Without the ABox, there is nobody on stage.

Two more questions, one layer each doing the climbing

# Which musicians play a string instrument? The CBox climbs; Paul (bass guitar) and Mira (violin) answer.
SELECT ?musician ?kind WHERE { ?musician rdf:type ex:musician ; ex:plays ?kind . ?kind skos:broader* ex:string-instruments . }

# Which instruments on stage were made before 1965? The ABox answers with a literal; the Höfner (1961) and the Ludwig kit (1963).
SELECT ?instrument ?year ?maker WHERE { ex:concert-2026-09-25 ex:played-with ?instrument . ?instrument ex:year-made ?year ; ex:made-by ?maker . FILTER(?year < 1965) }
Try itDownload the whole graph as Turtle: all three layers in one file, in the deck's ex: namespace. It loads into the SPARQL Practice Room and the SPARQL Playground for the queries above, and into the ABox Workbench to add a fourth musician, draw the graph, and watch the questions answer.
6 · Where everything goes

Everything in the music world lands in one layer, and the questions decide which

A kind of thing people pick from a list is a concept. A particular thing with its own properties is an instance of a class. A fact about a kind links concepts; a fact about a particular thing links instances or gives a value. The table applies that to the things a music graph meets once instruments are involved.

ThingLayerWhy
Bass guitarconcept in Musical instrumentsA kind, picked as the value of plays and is of kind.
Paul's 1961 Höfner 500/1instance of Physical instrumentOne object with a maker, a year and a serial number.
Höfner, the companyinstance of MakerA particular company; a question asks who made the bass.
1961literalThe value of year made; nothing is asked about the year itself.
"Electric bass"altLabel on Bass guitarAnother name for the same kind.
Bowconcept in Instrument accessoriesA kind of accessory; a question asks which kinds need one.
"A violin needs a bow"ex:requires between conceptsKnowledge about kinds, stated once on the kind.
Paul McCartneyinstance of MusicianA particular person who plays, owns and performs.
Wigmore Hall, the concertinstances of Venue and PerformanceParticular things with dates, places and links.
Rockconcept in a Genres schemeA kind of music, picked through a property such as plays genre.
Lead guitar, as a role in a bandconcept in a Roles schemeA kind of role; the person filling it is an instance.
A music lessoninstance of a Lesson classOnly if a question asks about lessons; a class with no question is maintenance.
Physical instrument and Musical instrumentsclass and schemeTwo names for two layers, so the kind and the object are never confused.
7 · Same word, three layers

The same word can live in all three layers; the IRIs are what must differ

A label is for people; an IRI is for machines. A query matches IRIs and never reads a label, and nothing in RDF, OWL or SKOS stops two resources from sharing a name: condition S14 limits one resource to one preferred label per language and says nothing about two resources with the same one. So the word Musician can be a class in the TBox, an occupation in the CBox and part of a person's name in the ABox, as long as each has its own IRI. This page chose two different labels, Physical instrument and Musical instruments, because beginners read labels before IRIs. That is one option among four.

# one word, three IRIs: a namespace per layer makes the layer visible in every line
@prefix ont:  <http://www.example.org/ontology#> .     # TBox
@prefix kind: <http://www.example.org/kinds/> .         # CBox
@prefix data: <http://www.example.org/data/> .          # ABox

ont:Musician  a owl:Class ;    rdfs:label     "Musician"@en .                                  # the class of people who play
kind:musician a skos:Concept ; skos:prefLabel "Musician"@en ; skos:inScheme kind:occupations . # the occupation, a value
data:paul-mccartney a ont:Musician ; rdfs:label "Paul McCartney"@en ; ont:has-occupation kind:musician .
OptionHow it looksWhat it costs
1. A namespace per layeront:Musician, kind:musician, data:paul-mccartney. The prefix says the layer in every line, and each layer can be versioned and published on its own. The ABox Workbench's "Namespace for instances" setting is this option for the ABox.Three prefixes to declare and keep straight. The usual choice once a graph is shared beyond one file.
2. One namespace, an IRI conventionex:Musician for the class, ex:musician for the concept, ex:paul-mccartney for the instance: UpperCamelCase for classes, lowerCamelCase for properties, lowercase with hyphens for concepts and instances. IRIs are case-sensitive, so the two are different resources.Relies on discipline, and on readers noticing one capital letter. One slip and two layers share an IRI.
3. Different labels, one namespaceex:physical-instrument "Physical instrument" beside the scheme "Musical instruments": what this page does. A homograph qualifier does the same in a thesaurus: "Musician (occupation)".The labels drift from the words people use, and a label can still be reused by accident in a third place.
4. One IRI for two layers (punning)ex:musician as both a class and a concept, which OWL 2 allows.Not an option in this course. A tool shows one thing with two natures, and a student writes rdf:type to it within the hour.

The clash that namespaces prevent

This page's file declares ex:musician as a class. The Module 5 music graph declares ex:musician as a concept, the occupation in its Occupations taxonomy, in the same ex: namespace. Load both files into one store and the IRI http://www.example.org/graph#musician is a class and a concept at once, with nobody having chosen that. Option 1 makes the collision impossible; option 2 makes it unlikely; option 3 does nothing against it, because the clash is in the IRI, never in the label.

Choose once, write it downWhichever option a project takes, it belongs in the ontology's header as a comment, next to the namespace declarations, so the next person who adds a class, a concept or an instance follows it. Rule 7 of the ABox Workbench says the rest: labels are for people, IRIs are for machines, and an IRI never changes to match a label.
8 · Knowledge check

Fourteen questions, one point each

Pick an answer and the explanation appears, with a link back to the section that teaches it. The matching questions award the point only when every row is right.

score 0/14