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.
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 .
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.
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.
| Property | Domain → range | The value is |
|---|---|---|
ex:plays | Musician → skos:Concept | concept a kind from Musical instruments |
ex:owns | Musician → Physical instrument | instance one object |
ex:kind | Physical instrument → skos:Concept | concept which kind this object is |
ex:made-by | Physical instrument → Maker | instance a company or workshop |
ex:year-made, ex:serial-number | Physical instrument → xsd:integer, xsd:string | a literal |
ex:performs-at | Musician → Performance | instance |
ex:played-with | Performance → Physical instrument | instance the objects on stage |
ex:takes-place-at, ex:on-date | Performance → Venue, xsd:date | instance, 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 .
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.
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.
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 .
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.
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 Paul | Kind of fact | Layer it points into |
|---|---|---|
a ex:musician | type | TBox a class |
ex:plays ex:bass-guitar | controlled value | CBox a concept, picked |
ex:owns ex:hofner-500-1 | link | ABox another instance |
ex:hofner-500-1 ex:year-made 1961 | value | a 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.
"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
| musician | kind | accessory | stated on |
|---|---|---|---|
| Mira Sato | Violin | Bow | Violin |
| Mira Sato | Violin | Rosin | Violin |
| Mira Sato | Violin | Spare strings | String instruments, one step up |
| Paul McCartney | Bass guitar | Amplifier | Bass guitar |
| Paul McCartney | Bass guitar | Instrument cable | Bass guitar |
| Paul McCartney | Bass guitar | Spare strings | String instruments, two steps up |
| Paul McCartney | Bass guitar | Strap | Bass guitar |
| Ringo Starr | Drum kit | Drum key | Drum kit |
| Ringo Starr | Drum kit | Drumsticks | Drum 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.
# 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) }
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.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.
| Thing | Layer | Why |
|---|---|---|
| Bass guitar | concept in Musical instruments | A kind, picked as the value of plays and is of kind. |
| Paul's 1961 Höfner 500/1 | instance of Physical instrument | One object with a maker, a year and a serial number. |
| Höfner, the company | instance of Maker | A particular company; a question asks who made the bass. |
| 1961 | literal | The value of year made; nothing is asked about the year itself. |
| "Electric bass" | altLabel on Bass guitar | Another name for the same kind. |
| Bow | concept in Instrument accessories | A kind of accessory; a question asks which kinds need one. |
| "A violin needs a bow" | ex:requires between concepts | Knowledge about kinds, stated once on the kind. |
| Paul McCartney | instance of Musician | A particular person who plays, owns and performs. |
| Wigmore Hall, the concert | instances of Venue and Performance | Particular things with dates, places and links. |
| Rock | concept in a Genres scheme | A kind of music, picked through a property such as plays genre. |
| Lead guitar, as a role in a band | concept in a Roles scheme | A kind of role; the person filling it is an instance. |
| A music lesson | instance of a Lesson class | Only if a question asks about lessons; a class with no question is maintenance. |
| Physical instrument and Musical instruments | class and scheme | Two names for two layers, so the kind and the object are never confused. |
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 .
| Option | How it looks | What it costs |
|---|---|---|
| 1. A namespace per layer | ont: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 convention | ex: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 namespace | ex: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. |
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.
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.