RDF Schema

Overview

The simplest extension to RDF that allows a modeler to manage inference is RDF Schema (RDFS). Triples that are inserted directly into an underlying RDF store are called asserted triples. Triples that are derived from inference rules are called inferred triples.

Classes

All things described by RDF are called resources. In RDFS, resources may be divided into groups called classes. The rdf:type property states a resource is an instance of a class. Associated with a class is its class extension, i.e. the set containing all of the instances of the class. A class may be a member of its own class extension.

Subclasses

If a class C is a subclass of a class C', then all instances of C will also be instances of C'. The rdfs:subClassOf property may be used to state that one class is a subclass of another.

CONSTRUCT { ?x a ?B }
WHERE { ?A rdfs:subClassOf ?B. ?x a ?A }

Intersection

Let A, B, and C be classes such that AB=C. RDFS is only able to model one side of this equality, namely: $$x \in C \implies x \in A \land x \in B$$

It does so using the following inference rules:

:C rdfs:subClassOf :A .
:C rdfs:subClassOf :B .

Union

Let A, B, and C be classes such that AB=C. RDFS is only able to model one side of this equality, namely: $$x \in A \lor x \in B \implies x \in C$$

It does so using the following inference rules:

:A rdfs:subClassOf :C .
:B rdfs:subClassOf :C .

Properties

A property P is often annotated with the rdfs:domain and rdfs:range properties.
For any triple involving P, these properties specify the classes the subject and object of the triple should be members of respectively.

CONSTRUCT { ?x a ?D }
WHERE { ?P rdfs:domain ?D. ?x ?P ?y }

CONSTRUCT { ?y a ?R }
WHERE { ?P rdfs:range ?R. ?x ?P ?y }

Subproperties

The rdfs:subPropertyOf property may be used to state that one property is a subproperty of another.

CONSTRUCT { ?x ?r ?y }
WHERE { ?x ?q ?y. ?q rdfs:subPropertyOf ?r }

Intersection

Let P, Q, and R be properties such that PQ=R. RDFS is only able to model one side of this equality, namely: $$x \in R \implies x \in P \land x \in Q$$

It does so using the following inference rules:

:R rdfs:subPropertyOf :P .
:R rdfs:subPropertyOf :Q .

Union

Let P, Q, and R be properties such that PQ=R. RDFS is only able to model one side of this equality, namely: $$x \in P \lor x \in Q \implies x \in R$$

It does so using the following inference rules:

:P rdfs:subPropertyOf :R .
:Q rdfs:subPropertyOf :R .
Powered by Forestry.md