After reading a bit about RDFS on Wikipedia (, I found a section that explains how you can use certain RDFS vocabulary such as rdfs:type, rdfs:range, rdfs:subClassOf and others, to achieve the so called regime of entailment.

So you can basically build a simple triple database that contains some of those predicates, and SPARQL sort of knows about them to infere specific things, such as: if ex:cat1 rdfs:type ex:cat, and ex:cat rdfs:subClassOf ex:animal then whenever you query for { ?animal a ex:animal . } it will return ex:cat1.

This means that SPARQL needs to know about these predicates to be able to do this sort of decision making.

My question is: what other predicates does SPARQL know about? Is there a standard list somewhere on the web that SPARQL implements? And when I'm building my own vocabulary, does SPARQL read it to also use my defined relationships to do some inference, even though my vocabulary isn't a standard one and therefore SPARQL doesn't know about it?

asked 30 Jan '13, 04:29

Luca%20Matteis's gravatar image

Luca Matteis
accept rate: 13%

edited 30 Jan '13, 04:35

In terms of entailment there is a specification that defines different entailment regimes - see SPARQL 1.1 Entailment Regimes

Note that an implementation doesn't really know about any predicate. In the case of an entailment regime it simply recognizes it as a term that may trigger some extra behaviors, so in a few cases it does need to know about a predicate but on the whole it does not.

SPARQL is primarily a pattern matching language so from an implementations perspective URIs are just strings on which it matches (internal implementation details of this are usually a bit more advanced than that but that is a whole other discussion).

You can use whatever vocabularies you like and define whatever relationships you need. It is considered good practice to reuse existing vocabularies where possible but this is by no means required. The exception to this is that most entailment regimes are defined in terms of RDFS and OWL so you would need to use those to help define your vocabulary if entailment is something you want or might need in the future.

permanent link

answered 30 Jan '13, 05:17

Rob%20Vesse's gravatar image

Rob Vesse ♦
accept rate: 29%

edited 30 Jan '13, 05:18

Ok I figured that SPARQL implementations wouldn't just "hardcore" a list of predicates in their system. But if I'm building a vocabulary from scratch, say using RDFS, I most likely need to define relationships such as ex:Crop rdfs:subClassOf ex:Plant so that when someone queries some RDF data annotated using my vocabulary, for { ?plant rdf:type ex:Plant . } it will also return things of type ex:Crop. So it seems crucial to know which standard vocabularies SPARQL 1.1 implements, otherwise how do you achieve this sort of reasoning?

(30 Jan '13, 05:25) Luca Matteis Luca%20Matteis's gravatar image

Like, what's the point of using my own relationships in my vocabulary, if at the end of the day, SPARQL implementations can't make sense of it?

(30 Jan '13, 05:32) Luca Matteis Luca%20Matteis's gravatar image

The link I provided details standard vocabularies that can be used for entailment regimes. However using entailment involves a performance trade off so this is typically an optional feature often turned on/off on a per-query basis.

The other alternative is to use a reasoner to materialize all the additional triples that RDFS/OWL would entail and then put this into your triple store so that your SPARQL engine does not need to do the entailments itself.

(30 Jan '13, 05:36) Rob Vesse ♦ Rob%20Vesse's gravatar image

A SPARQL implementation is no different from a traditional RDBMS in many ways, your RDBMS does not interpret your column names as anything other than arbitrary identifiers in the same way that a SPARQL implementation treats RDF terms as arbitrary identifiers.

(30 Jan '13, 05:38) Rob Vesse ♦ Rob%20Vesse's gravatar image

use a reasoner to materialize all the additional triples that RDFS/OWL would entail -- I think this is the important bit I am missing. You mean that if I query for { ?plant rdf:type ex:Plant . } and I want it to return ex:crop1 from that, because ex:crop1 is of type ex:Crop which is a subClassOf ex:Plant. The reasoner would need to break all this down into triples such as ex:crop1 rdf:type ex:Plant? What are the reasoners that do this kind of thing?

(30 Jan '13, 05:45) Luca Matteis Luca%20Matteis's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 30 Jan '13, 04:29

question was seen: 1,447 times

last updated: 30 Jan '13, 05:45