Resource Description Framework Schema (RDFS) extends RDF with simple organisational constructions. These help define concepts more explicitly and also allow for inferences to be generated with a reasoning engine.
Classes and Subclasses
An rdfs:Class is a set of elements — it is an organisational construct rather than a tangible object. The element rdfs:SubClassOf defines a subclass relationship. If Novels are a subclass of Book and ‘Great Expectations’ is a member of the class Novel, then (through inference) ‘Great Expectations’ is also a member of the class Book. This is shown in predicate logic below:
An rdfs:Class is just a set of elements. As this is a set, the order of elements is not important. The class is an organising construct and should correspond to naturally occurring groups in the domain of discourse.
The element rdfs:subClassOf defines a subclass relationship. These subclass relationships are transitive. If thrillers are a subclass of novels which in turn are a subclass of books; then through inference, thrillers are a subclass of books.
RDFS facilitates the creation of property hierarchies as well as class hierarchies. The rationale is that there are specialisation / generalisation relationships between verbs as well as nouns.
While ‘David freelances at z’ it can be inferred that ‘David works for z’. RDFS allows for this type of inference with sub-properties. For example, the following two statements below:
David FreelancesTo z
FreelancesTo rdfs:subPropertyOf worksFor
Allows the conclusion: ‘David works for z’ . Formally, this is shown as follows:
Independence of Properties
Another difference when comparing RDFS to many object orientated languages is that properties are not class members and therefore are defined independently. A corollary of this is that a subclass cannot override the methods of a superclass because properties are not attached to classes. In RDFS (and OWL), a subclass can always be used in place of a superclass — a condition, that due to method overriding is not always try in object orientated programming.
Inference Using Properties
Mathematically, an RDFS property is a relation rather than a function. This is because a set of arguments cannot be constrained such that it maps to a unique image.
Using the rdfs:range and rdfs:domain elements, it is possible to attach additional information to properties such that inferences can be created. For example, the worksFor property could be defined as having the domain of class people and the range of class Organisation. This means that the statement “David works for ABC” generates the inference that “David is a person” and “ABC is an organisation.