Triples and vocabularies
Statements as triples, and the vocabularies that describe catalogues, concepts and observations: DCAT, SKOS and SOSA.
What you’ll learn
By the end of this module you’ll be able to:
- read and write statements as subject, predicate and object
- explain how triples that share a URI join into a graph
- give a literal value the right datatype or language
- recognise a value with structure and no name of its own
- say which vocabulary a statement comes from, and why
Everything about AN-CORBY on this page comes from the Environment Agency’s Water Quality service. The concept URIs use domains ending .example and are made up for this course, following the same pattern as the rest of the course. The vocabularies are the ones the DSP Application Profile sets out for environmental data on environment.data.gov.uk.
A statement in three parts
Linked Data says things one small statement at a time. Each statement has three parts, so it’s called a triple:
- Subject
- The thing the statement is about. Always a URI.
- Predicate
- What is being said about it. Also a URI, taken from a shared vocabulary.
- Object
- The value: either another thing’s URI, or a plain value such as a name, a number or a date.
Here are three triples about the sampling point. Each row is one statement.
| Subject | Predicate | Object |
|---|---|---|
<sampling-point/ | skos:notation | "AN-CORBY" |
<sampling-point/ | skos:prefLabel | "CORBY STW FINAL EFFLUENT" |
<sampling-point/ | skos:altLabel | "CORBY STW F/E" |
These are the notation and label you met in Module 1, now as statements of their own. skos:prefLabel is the preferred label, the name to show a person, and skos:altLabel is another name the same thing goes by.
Two kinds of shorthand keep the tables readable. A URI in angle brackets, such as <sampling-point/, is relative to the Water Quality service’s address, https://environment.data.gov.uk/, in the same way a link on a web page can be relative to its site. Where a URI is long, … stands for the start of its path, so <…/ is the observation of determinand 0111 in sample 2119744. Names such as skos:prefLabel are prefixed names, which you met in Module 2.
Prefixes used on this page
skos:http://www.w3.org/ 2004/ 02/ skos/ core# sosa:http://www.w3.org/ ns/ sosa/ qudt:http://qudt.org/schema/ qudt/ unit:http://qudt.org/vocab/ unit/ geo:http://www.opengis.net/ ont/ geosparql# dcat:http://www.w3.org/ ns/ dcat# dct:http://purl.org/dc/ terms/ defra-core:http://environment.data.gov.uk/ontology/ core/ xsd:http://www.w3.org/ 2001/ XMLSchema# rdf:http://www.w3.org/ 1999/ 02/ 22-rdf-syntax-ns# rdfs:http://www.w3.org/ 2000/ 01/ rdf-schema# owl:http://www.w3.org/ 2002/ 07/ owl# ex:http://www.example.org/ dataset:https://data.example/determinand:https://data.example/determinands/ Concept/ area:https://data.example/areas/ Concept/ sampling-point-type:https://data.example/sampling-point-types/ Concept/
A row becomes several triples
A row in a table packs several facts together. In triples, each fact is stated on its own, and sometimes a row turns out to describe more than one thing.
Turn a row into triples
This activity’s URI: #activity-1Module 1’s Samples table had this row:
| Sample | Sampling point | Sampled on |
|---|---|---|
2119744 | AN-CORBY | 15 November 2025, 08:43 |
Write it as triples. You’ll need three predicates:
sosa:isSampleOf, from a sample to what it was taken fromsosa:isResultOf, from a sample to the sampling, the act of collecting itsosa:startTime, from a sampling to when it started
The sampling has the URI <sampling-point/.
Show the answer
| Subject | Predicate | Object |
|---|---|---|
<…/ | sosa:isSampleOf | <sampling-point/ |
<…/ | sosa:isResultOf | <…/ |
<…/ | sosa:startTime | "2025-11-15T08:43:00" |
One row became three triples about two things. The date belongs to the sampling, not the sample: the sample is the water, and the sampling is the act of collecting it. The table had been holding both in one row. You’ll meet the ^^xsd:dateTime on the end of the date in Literals: values with a type.
Triples join into a graph
Here are the observation of ammoniacal nitrogen in sample 2119744 and the triples around it:
| Subject | Predicate | Object |
|---|---|---|
<…/ | sosa:hasSample | <…/ |
<…/ | sosa: | determinand:0111 |
<…/ | sosa: | "2025-11-15T08:43:00" |
<…/ | sosa:isSampleOf | <sampling-point/ |
<sampling-point/ | skos:prefLabel | "CORBY STW FINAL EFFLUENT" |
determinand:0111 | skos:prefLabel | "Ammoniacal Nitrogen as N" |
Wherever the same URI appears in two triples, the two statements are about the same thing, so they connect. Draw each URI once and each triple as an arrow, and the statements become a graph:
- A thing with a URI
- A literal value
- A thing with no URI of its own
This is the join from Module 1, done without a lookup. There, you matched codes across three tables and needed to know which table each code came from. Here, the URIs carry that knowledge, so following an arrow is the join.
Graphs from different places combine the same way. Put the triples from two sources together and any URI they share becomes a single point where the two graphs meet. That’s why the Environment Agency’s observations, a council’s sensors and a water company’s samples can be combined without a mapping table, as long as they use the same URIs for the things they share.
Follow the graph
This activity’s URI: #activity-2Start at the observation. Which predicates do you follow, in order, to find the name of the place the effluent was collected?
Show the answer
sosa:hasSample to the sample, sosa:isSampleOf to the sampling point, then skos:prefLabel to its name, CORBY STW FINAL EFFLUENT.
Three hops, three triples, and no lookup file. In Module 9 you’ll ask exactly this question in SPARQL.
Literals: values with a type
An object is either a URI, which links to another thing, or a literal: a plain value. A literal can carry a datatype, written after ^^, which says what kind of value it is.
| Literal | What it is |
|---|---|
"AN-CORBY" | A string: the sampling point’s notation |
"2025-11-15T08:43:00" | A date and time: when the sampling started |
"2025-12-24" | A date: when the sampling’s result became available |
"0.132" | A decimal number: the upper bound of a result |
The datatype is what makes a value behave. As a date, "2025-12-24" sorts, compares and falls inside a date range correctly. As a number, "0.132" can be checked against a limit. Without the datatype, both are just characters, and characters sort in the wrong order: as text, “10” comes before “9”.
Labels in more than one language
A string meant for people can carry a language tag after @, so the same thing can be labelled in each language its readers use. The application profile’s own example labels Wales in English and Welsh:
| Subject | Predicate | Object |
|---|---|---|
ex:W92000004 | skos:prefLabel | "Wales"@en |
ex:W92000004 | skos:prefLabel | "Cymru"@cy |
ex:W92000004 | skos:notation | "W92000004" |
The labels carry language tags; the notation carries none. A notation is a code, the same in every language, which is the difference between a notation and a label from Module 1.
Literal or link?
This activity’s URI: #activity-3For each of these objects, say whether it’s a literal or a link to another thing. For each literal, say what kind of value it is.
"CORBY STW F/E"<sampling-point/AN-CORBY> "2025-12-24"^^xsd: date unit:MilliGM-PER-L "Cymru"@cy
Show the answer
- A literal: a string, the sampling point’s alternative label.
- A link, to the sampling point.
- A literal: a date.
- A link, to the published unit milligrams per litre. A prefixed name is a URI written short, so it’s a link too.
- A literal: a string in Welsh.
Values with structure
The ammoniacal nitrogen result is <0.132 mg/l. That short value says three things: there is a result, it’s at most 0.132, and it’s measured in milligrams per litre. The < means the amount was too small to measure more precisely than that.
The observation states the result twice: once as the text a person reads, and once with its parts separated so a program can work with them.
| Subject | Predicate | Object |
|---|---|---|
<…/ | sosa: | "<0.132" |
<…/ | sosa:hasResult | _:result |
_:result | a | qudt: |
_:result | qudt:upperBound | "0.132" |
_:result | qudt:hasUnit | unit: |
The result is a thing in its own right, with a value and a unit, but it’s only ever reached through its observation. It has no URI of its own. A thing like this is called a blank node, and _:result is a label for it that only means something inside this set of triples. In the graph above, it’s the dashed circle.
Compare AN-CORBY#Geometry from Module 2. The location gets a hash URI because people link to it directly. The result goes with its observation, which already has a URI.
Vocabularies
Every predicate on this page comes from a published vocabulary: a set of predicates and classes that an organisation has defined, published under its own domain and promised to keep. Reusing them is the same decision as reusing a unit URI in Module 2. When everyone says “preferred label” with skos:prefLabel, everyone’s labels can be found the same way.
Each vocabulary answers one kind of question.
| Vocabulary | Prefix | Answers |
|---|---|---|
| SKOS | skos: | What is this called, what is its code, and how do concepts relate? |
| SOSA/SSN | sosa: | What was sampled, what was observed, and what was found? |
| QUDT | qudt: unit: | What quantity, in which unit? |
| GeoSPARQL | geo: | Where is it, and what is it within? |
| DCAT | dcat: | Which datasets exist, and in which catalogue? |
| Dublin Core | dct: | Who published it, and on what terms? |
| RDFS and OWL | rdfs: owl: | Which classes and predicates exist? |
| Defra core | defra-core: | Which kind of this thing is it? |
SKOS: concepts and their codes
SKOS (Simple Knowledge Organization System) describes concepts: the determinands, sampling point types and areas from Module 1. Each concept has a notation and a preferred label, and belongs to a concept scheme, the group it comes from. Concepts can be arranged into a hierarchy with skos:broader and skos:narrower.
| Subject | Predicate | Object |
|---|---|---|
determinand:0111 | skos:notation | "0111" |
determinand:0111 | skos:prefLabel | "Ammoniacal Nitrogen as N" |
determinand:0111 | skos:altLabel | "Ammonia(N)" |
determinand:0111 | skos:inScheme | dataset: |
This is the determinand lookup from Module 1, published once as data, where every observation can point at it.
SOSA/SSN: sampling and observing
SOSA (Sensor, Observation, Sample and Actuator) describes the chain you’ve followed all along. The sampling point is the feature of interest, the thing being studied. A sampling collects a sample from it, and an observation measures a property of the sample and records a result.
QUDT: quantities and units
QUDT (Quantities, Units, Dimensions and Types) describes numbers with units: the qudt: holding the result, its qudt:upperBound, and the unit it’s measured in.
GeoSPARQL: places and shapes
GeoSPARQL describes where things are. The sampling point has a geometry, a point on the British National Grid, and sits within an area:
| Subject | Predicate | Object |
|---|---|---|
<sampling-point/ | geo:hasGeometry | <sampling-point/ |
<sampling-point/ | geo:sfWithin | area:M |
area:M | skos:prefLabel | "ANGLIAN - LINCS AND NORTHANTS" |
This is the link from Module 2: the sampling point keeps its own URI and points at its area, which can be redrawn. A later module covers GeoSPARQL in depth.
DCAT: catalogues and datasets
DCAT (Data Catalog Vocabulary) describes what is published. Each service has a catalogue that lists its datasets. A concept scheme, such as the determinands, is a dataset too, so it’s listed in the catalogue alongside the observations. A dataset of observations declares which concept schemes classify its members:
| Subject | Predicate | Object |
|---|---|---|
dataset: | dcat: | dataset: |
That one triple tells a program, before it reads a single observation, that observations in this dataset can be filtered by determinand.
Dublin Core: who published it, and on what terms
Dublin Core provides general-purpose predicates for describing published things, such as dct:title, dct:publisher and dct:license. Every dataset in a catalogue carries them:
| Subject | Predicate | Object |
|---|---|---|
dataset: | dct:title | "Water quality observations"@en |
dataset: | dct:publisher | <https://environment.data.gov.uk/ |
dataset: | dct:license | <https:// |
A licence that is a URI can be followed and checked by a program, the same as any other link.
RDFS and OWL: when nothing fits
Sometimes no published vocabulary has the predicate or class you need. Then you define your own with RDFS and OWL, under a domain you control, giving each one a label and a comment that says when to use it. Defra’s domain model does this for regulatory and water terms, under the prefix defra-core:. Check the vocabularies above first: a predicate someone else already publishes is one every reader already understands. One of Defra’s own predicates, defra-core:, is covered in Classifications.
Which vocabulary?
This activity’s URI: #activity-4Which vocabulary does each predicate come from, and what question does it answer?
skos:notationsosa:observedProperty qudt:hasUnitgeo:sfWithindcat:themeTaxonomy dct:license
Show the answer
- SKOS: what is this thing’s code?
- SOSA/SSN: what property did this observation measure?
- QUDT: which unit is this value in?
- GeoSPARQL: what is this thing within?
- DCAT: which concept schemes classify this dataset’s members?
- Dublin Core: on what terms can this be used?
The prefix tells you the vocabulary, as long as you know what the prefix stands for.
Classes and classifications
One predicate says what kind of thing something is: rdf:type, usually written as just a. Its object is a class, and a thing can belong to more than one:
| Subject | Predicate | Object |
|---|---|---|
<sampling-point/ | a | sosa: |
<sampling-point/ | a | geo:Feature |
<sampling-point/ | a | sosa:Sample |
<…/ | a | sosa:Observation |
AN-CORBY is both a feature of interest, something observed, and a feature, something with a place on a map. Each class brings its own vocabulary’s predicates with it, which is how one sampling point can have SOSA observations and a GeoSPARQL geometry at the same time.
Classifications: a finer kind without a new class
A class says what something fundamentally is. Often you also need to say which kind of that thing it is. You could make a class for every kind, such as River, Lake and Canal, but then every new kind means changing the vocabulary itself.
Defra’s domain model keeps the class general and adds a classification: a concept from a concept scheme, attached with defra-core:. The River Irwell is a water body, and its classification says which kind of water body:
| Subject | Predicate | Object |
|---|---|---|
ex:irwell | a | ex:WaterBody |
ex:irwell | defra-core: | ex:river |
ex:river | a | skos:Concept |
A sampling point is classified the same way, by its sampling point type:
| Subject | Predicate | Object |
|---|---|---|
<sampling-point/ | defra-core: | sampling-point-type: |
sampling-point-type: | skos:notation | "SA" |
sampling-point-type: | skos:prefLabel | "SEWAGE DISCHARGES - FINAL/ |
A new kind of sampling point is a new concept in the scheme, which can be added without touching any class. Because each classification is a concept, it has a notation and a label like any other, and a dataset can declare the scheme with dcat: so programs know they can filter by it.
The predicate’s range is what makes it fit. The range of a predicate says what its object should be. defra-core: has the range skos:Concept, so its object is always a concept with a notation and a label. Dublin Core’s dct:type has the range rdfs:Class, so it suits pointing at a class.
Check your understanding
Choose an answer to see whether it’s right. You can change your answer as often as you like.
You’ve answered of 5 questions and got right.
Module 3 complete
You answered every question correctly
Summary
In this module you learned that:
- a triple is one statement: a subject, a predicate and an object
- triples that share a URI join into a graph, and graphs from different places combine the same way
- an object is a link to another thing or a literal, and a literal can carry a datatype or a language tag
- a value with structure that is only reached through its parent can be a blank node
- predicates and classes come from published vocabularies, each answering one kind of question
asays what class a thing belongs to, a thing can belong to several, anddefra-core:adds a finer kind as a concepthasClassification
Module 4 writes these same triples in the formats you’ll meet: Turtle, N-Triples, RDF/XML, JSON-LD and RDFa, and asks one URI for different formats.