views:

464

answers:

1

Could anybody be so kind to give me a simple example of reification in RDF-XML ? I want to see if I understood it correctly.

For example, I propose the following case

Tolkien -> wrote -> Lord of the rings
           /|\
            |
        Wikipedia said that

How would you write it with and without reification (i.e. as a simple RDF statement with no need for reification) ?

+2  A: 

"Tolkien wrote Lord of the Rings" can be expressed as a simple statement (subject, predicate, object) like this:

:Tolkien :wrote :LordOfTheRings .

By the way, this is using the Turtle notation for RDF. There are tools online for converting it to RDF/XML.

Using reification, you can have a separate resource representing a statement so you can state additional things about the statement itself, like "Wikipedia said that":

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
_:x rdf:type rdf:Statement .
_:x rdf:subject :Tolkien .
_:x rdf:predicate :wrote .
_:x rdf:object :LordOfTheRings .
_:x :said :Wikipedia .


In real life, you would want to use shared vocabularies, so that whoever or whatever is consuming the RDF will that you are talking about that Tolkien and that LOTR:

<http://dbpedia.org/resource/The_Lord_of_the_Rings&gt; <http://dbpedia.org/property/author&gt; <http://dbpedia.org/resource/dbppedia/J._R._R._Tolkien&gt; .
Jukka Matilainen
thanks for the answer. If I understand correctly, you have to provide both of them when you perform reification, or just the reification is sufficient to express the reified statement as well ? (apparently it should, but technically what is the best practice?)
Stefano Borini
The reified version of a statement does not imply the original statement. This is explained in the Reification section of the RDF Semantics document linked above. It is only logical: from "Wikipedia said that Tolkien wrote LOTR" it does not follow that "Tolkien wrote LOTR".
Jukka Matilainen
In practice, if you store reified versions of all your statements, you end up multiplicating the number of triples you have to store. If you only need to record the provenance of your statements, you might want to consider named graphs/quad stores as an alternative.
Jukka Matilainen