rdfs:subClassOf and entailment

Declare a hierarchy; get extra triples for free.

0/3 done

Theory

rdfs:subClassOf says every instance of A is also an instance of B.

:Ninja  rdfs:subClassOf :Person .
:Donatello a :Ninja .

RDFS entailment lets a reasoner conclude :Donatello a :Person . without you stating it. Inference is free triples.

Crucial mindset shift: RDFS is entailment, not constraint. Declaring :Ninja rdfs:subClassOf :Person does not reject data — it adds new triples (:Donatello a :Person .) on top of what you stated. If you want to reject invalid data, that's SHACL's job (Level 6). RDFS makes your graph bigger; SHACL keeps it honest.

Analogy

If every dachshund is a dog and every dog is a mammal, then your dachshund is a mammal — even if nobody wrote it down. Subclass hierarchies make that leap automatic.

And like in biology, the inference is cumulative: declare two levels of subclass and every fact true of mammal becomes true of dachshund too. You model the spine of the tree once; the reasoner fills in every branch.

Visualization

Thing Person Student Master subClassOf subClassOf subClassOf

A subclass hierarchy is a tree of is-a relationships. Anything true of a parent is automatically true of every descendant.

Reading in progress · 0 of 3 activities done