RDF Schema (RDFS) provides the foundational vocabulary for defining the structure and relationships within RDF data. It allows for the creation of lightweight ontologies by defining classes and properties.
The core of RDFS taxonomy is the rdfs:subClassOf property. It establishes a specialization relationship where every instance of a subclass is mathematically an instance of its superclass.
C1 subClassOf C2 and C2 subClassOf C3, then C1 subClassOf C3.SoftwareEngineer is a subclass of Engineer allows a query for all "Engineers" to automatically include all "SoftwareEngineers".RDFS uses domain and range to provide semantic context to predicates. Crucially, these are Inference Rules, not validation constraints.
Specifies the class of the Subject of a property.
P rdfs:domain D and a triple S P O exists, then S is inferred to be of type D.hasProgrammingLanguage has domain SoftwareEngineer, and we assert Alice hasProgrammingLanguage Java, RDFS infers Alice rdf:type SoftwareEngineer.Specifies the class of the Object of a property.
P rdfs:range R and a triple S P O exists, then O is inferred to be of type R.worksFor has range Organization, and we assert Alice worksFor AcmeCorp, RDFS infers AcmeCorp rdf:type Organization.Properties can also be organized hierarchically.
hasFather rdfs:subPropertyOf hasParent.Bob hasFather John, the reasoner automatically asserts Bob hasParent John.| Construct | Purpose | Mathematical Effect |
|---|---|---|
| rdfs:Class | Defines a type | Sets a set boundary |
| subClassOf | Specialization | C1 \subseteq C2 |
| subPropertyOf | Property specialization | P1 \subseteq P2 |
| rdfs:domain | Subject typing | \forall s, o : P(s,o) \implies D(s) |
| rdfs:range | Object typing | \forall s, o : P(s,o) \implies R(o) |
RDFS is the "Type System" of the Semantic Web. By using simple logical rules, it transforms a flat graph of triples into a structured knowledge base where information about types and relationships can be discovered through automated reasoning rather than manual labeling.