The RDFS Vocabulary in Ten Minutes

rdfs:Class, rdfs:Property, subClassOf, subPropertyOf, domain, range — almost the whole language.

0/3 done

Six terms

Six terms, one language

RDFS adds exactly six things to RDF that you'll use daily:

TermMeans
rdfs:ClassThe class of all classes
rdf:PropertyThe class of all properties
rdfs:subClassOfC1 ⊑ C2 — every C1 is a C2
rdfs:subPropertyOfP1 ⊑ P2 — every (s,p1,o) entails (s,p2,o)
rdfs:domainIf (?s p ?o), then ?s is of class D
rdfs:rangeIf (?s p ?o), then ?o is of class R

Important gotcha: domain and range are not constraints. They're type inferences. Asserting :hasAuthor rdfs:domain :Book does NOT reject (:Movie :hasAuthor :Alice) — instead, it infers that :Movie is a :Book. If you want validation semantics, use SHACL (covered in L4).

Grammar for a shared language

RDFS is the rules of grammar in a brand-new shared language — six little words that let two strangers agree what counts as a sentence.

Think of rdfs:Class and rdf:Property as the parts of speech (nouns and verbs). rdfs:subClassOf is the relationship 'a poodle is a dog is a mammal'. rdfs:subPropertyOf is 'to sprint is a kind of to run'. rdfs:domain says 'the verb to author takes a writer as its subject'; rdfs:range says 'and a book as its object'.

Crucially, the grammar is descriptive, not prescriptive — like English grammar in a dictionary, RDFS doesn't reject an odd sentence. If you write 'the movie authored the recipe', RDFS doesn't shout 'wrong!' — it shrugs and concludes 'then movie must also be a writer and recipe must also be a book'. That weird tolerance is exactly why we need SHACL later: when you want a strict editor instead of a permissive dictionary.

Reading in progress · 0 of 3 activities done