Reasoning using RDFS

RDF Schema introduces a very limited range of logical terms based mostly on the concept of class, or rdfs:Class, a concept absent from RDF.

It is possible to state directly that a resource denotes a class, using a triple such as the following (to save space we omit prefixes):

mo:MusicGroup rdf:type rdfs:Class .

We have already seen an example of the predicate rdfs:subClassOf, through which we can assert that the resource in subject position is a subclass of the resource in object position – a relationship often expressed in English by sentences of the form All X are Y (e.g., “All pianists are musicians”). A similar predicate is provided for properties rather than classes, illustrated by the following triple in which subject, predicate and object are all property resources:

ex:hasSinger rdfs:subPropertyOf ex:hasPerformer .

This means that if a subject and object are related by the ex:hasSinger predicate, they must also be related by the ex:hasPerformer predicate.

Note that even though these are properties, they may occur in subject and object position – in other words, we can make statements about properties, as well as using them to express relationships among other resources.

Two important facts about any property are its domain and range, which constrain the resources that can be employed in subject and object position when the property is used as a predicate; these can also be defined using RDFS resources, as follows:

ex:hasSinger rdfs:domain mo:Performance .
ex:hasSinger rdfs:range foaf:Agent .

This means that any resource occurring as subject of ex:hasSinger must belong to the class mo:Performance (only performances have singers), while any resource occurring as object of ex:hasSinger must belong to the class foaf:Agent (only agents are singers).

RDFS entailment rules

The RDFS entailment regime is defined by thirteen rules, which are listed here. In brief, their import is as follows:

rdfs1

Allocates a blank node to a literal, and classifies this node as a member of the class rdfs:Literal.

rdfs2

Uses a rdfs:domain statement to classify a resource found in subject position (in a triple containing the relevant property as predicate).

rdfs3

Uses a rdfs:range statement to classify a resource found in object position (in a triple containing the relevant property as predicate).

rdfs4

Classifies a resource found in subject or object position in a triple as belonging to the class rdfs:Resource.

rdfs5

Inference based on the transitivity of rdfs:subPropertyOf.

rdfs6

Infers that any resource classified as a property is a sub-property of itself.

rdfs7

Uses a rdfs:subPropertyOf statement to infer that two resources are related by a property P if they are related by a subproperty of P.

rdfs8

Infers that any resource classified as a class is a subclass of rdfs:Resource.

rdfs9

Infers that a resource belongs to a class if it belongs to its subclass.

rdfs10

Infers that any class is a subclass of itself.

rdfs11

Uses the transitivity of rdfs:subClassOf to infer that the subclass of a class C is a subclass of the superclass of C.

rdfs12

Infers that any resource belonging to rdfs:ContainerMembershipProperty is a subproperty of rdfs:member.

rdfs13

Infers that any resource belonging to rdfs:Datatype is a subclass of rdfs:Literal.

Following these rules and using rdfs:subClassOf as an example, the pattern follows Aristotelian syllogism:

“Socrates is a man.

All men are mortal.

Therefore, Socrates is mortal.”


This work is a derivative of ‘Using Linked Data Effectively’ by The Open University (2014) and licensed under CC by 4.0 International Licence adapted and used by the University of Southampton. http://www.euclid-project.eu/

Share this article:

This article is from the free online course:

Introduction to Linked Data and the Semantic Web

University of Southampton

Get a taste of this course

Find out what this course is like by previewing some of the course steps before you join: