axiothOntology Hub

Learn what an ontology is / Part 1. Foundations · Lesson 4 of 16

RDF, RDFS, OWL, SKOS, SHACL

Many names, each with a different job.

Searching for ontologies brings a flood of acronyms. All of them are built on triples, and each layer lets you say more.

NameJobTypical terms
RDFThe data model: facts as triplesrdf:type
RDFSClasses, properties, their hierarchy, domain and rangerdfs:subClassOf, rdfs:domain
OWLRicher logic: equivalence, disjointness, cardinality, property characteristicsowl:equivalentClass, owl:inverseOf
SKOSConcepts in taxonomies and thesauriskos:broader, skos:prefLabel
SHACLChecks the shape data must havesh:NodeShape, sh:minCount
SPARQLThe query language for graphsSELECT … WHERE

OWL says what is true. SHACL checks whether data has the expected form. They are used together, not instead of each other.

What a file looks like

The same triples can be saved in several syntaxes. Turtle (.ttl) is the easiest to read; RDF/XML (.rdf, .owl) and JSON-LD are also common. Knowing that a file is Turtle does not tell you whether it holds an ontology, constraint shapes or instance data.

@prefix ex:   <https://example.org/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

# blueprint (classes and properties)
ex:Cat     rdfs:subClassOf ex:Mammal .
ex:Mammal  rdfs:subClassOf ex:Animal .
ex:keeps   rdfs:domain ex:Person ;
           rdfs:range  ex:Animal .

# data (individuals)
ex:nabi    a ex:Cat ;
           rdfs:label "Nabi"@en .
ex:minji   ex:keeps ex:nabi .

See it in a real ontology

Read more in the specifications