Searching for ontologies brings a flood of acronyms. All of them are built on triples, and each layer lets you say more.
| Name | Job | Typical terms |
|---|---|---|
| RDF | The data model: facts as triples | rdf:type |
| RDFS | Classes, properties, their hierarchy, domain and range | rdfs:subClassOf, rdfs:domain |
| OWL | Richer logic: equivalence, disjointness, cardinality, property characteristics | owl:equivalentClass, owl:inverseOf |
| SKOS | Concepts in taxonomies and thesauri | skos:broader, skos:prefLabel |
| SHACL | Checks the shape data must have | sh:NodeShape, sh:minCount |
| SPARQL | The query language for graphs | SELECT … 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 .