RDF Primer

> reading the RDF Primer @ http://www.w3.org/TR/rdf-primer/

This Primer is so long - I couldn't make it to the end of the document, yet. The more I read the more complex this whole topic seem to become.

Till paragraph 2.4 it explains the basic structure of RDF. Data or any information is formed as triples, separated in a predicate, an subject and an object. When you are not using any abbreviations it would look like this:

<http://example.de> <http://information.de/what-type-of/data/> <http://example.de/data/value/>

The first defines let's say the "thing" we want to bind information to. The second defines what type of information we are saving here. And the third is the value.  The value could also be a literal string like "value", instead of a resource to the value.

Fortunately this can be made shorter. You can define abbreviations for long URIrefs (in this case the URLs). These are called QNames (qualified names). So you could say "ex:" stands from now on for "http://example.de". Then you can reference it like this:

ex:index.html info:data exdata:value

(where info = "http://information.de/what-type-of/" and exdata = "http://example.de/data/") When you use QNames you don't need the brackets < and > around the resources. Just when the resource is a URI than you have to wrap them with brackets.

Basically you could define your own dictionary (the "abbreviations") with your own meaning for what is what. There are no restrictions from RDF. But if everybody defines his "own crap" it would get quickly very messy in the web and no one (especially no software) would understand what is meant. So it is considered best practise to use already well defined dictionaries, like this one http://purl.org/dc/elements/1.1/ . This way everything is more clean and if you find an RDF document referencing to this dict you can be sure what it is about. Of course you could also define your own one and reference to it - but why try to invent the wheel again 😉

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.