Upto: Table of Contents of full book

Resource Description Framework

RDF is the key representation mechanism used in the Semantic Web. It is a simple mechanism, but the details required to use it in widely understood contexts make it very complex at times. This chapter only considers RDF 1.0. RDF 1.1 was published in 2014 and will replace RDF 1.0 in time. We will ignore it for now since it's main change is to IRIs - Internationalised Resource Identifers - and the additional complexities of that are not relevant right now.


RDF triples

RDF grew out of representation languages developed by the Artificial Intelligence (AI) community over the years. The AI community is an eternally optimistic group, and they need to be: on the one side they are bounded by the (sometimes) intelligent behaviour demonstrated by humans and on the other by massively complex computational problems which sometimes founder on mathematical barriers that cannot be overcome.

RDF uses what seem like almost the simplest of language constructs:

A is-a-something-of B
as in
Jan is the father of Katie
Linda is the wife of Jan
Jan is a professor at Box Hill Institute
In general the format is
subject predicate object

Now this is pretty straightforward. But it is also very limiting. The predicates here are only binary: to represent, say, n-ary relationships such as "Jan and Linda went to Bali in 2013" requires jumping through some hoops. These are addressed by Defining N-ary Relations on the Semantic Web .

Identifying things by URIs

if we want to use terms that have a fixed meaning across the world, we have to label them in a unique way with a well-understood semantics. Ordinary languages such as English are no good for this as many words are ambiguous, either with explicitly differing meanings (as in the noun 'duck' versus the verb 'duck') or with shades of meaning (as in 'love' a strong feeling of affection or 'love' a great interest and pleasure in something [Google, definition:love]). There are also many concepts which have no meaning or distinction in differing languages or cultures. For example, the Chinese only have a single concept for both flu and the common cold as 感冒 ('gǎn mào') and the only distinction is in the amount of 'wetness'.

This is where the concept of URIs comes: anything that has a URI has a universal identifier. Anyone who accesses this URI should get the same object. To be precise, anyone who accesses this URI should get a (possibly differing) representation of the same object.

We note that URIs are not only used for things such as Web resources or book ISBNs, but also for the predicates 'is father of', 'is author of', etc.

If something doesn't have a URI, then it can't be represented in RDF unless it is a "simple" value such as a string or integer. This means that there has to be a scramble of people or organisations busy creating URIs (and associated meanings) to objects and predicates. We shall see many of these later.

We actually saw this is in the chapter on Dublin Core. An original META tag of DC.title has become the URI http://purl.org/dc/elements/1.1/title and this labels the predicate "title of (using Dublin Core meanings)".

RDF triples

A simple - but ugly - way of representing an RDF triple is just to list the three URIs/simple values. For example, the web site www.gov.au has URI http://www.gov.au. This has the Dublin Core element DC.Rights with value "Copyright Commonwealth of Australia 2007" (a simple string). As an RDF triple it is

      "Copyright Commonwealth of Australia 2007"

XML representation of RDF triples

Turtle representation of RDF triples


Copyright © Jan Newmarch, jan@newmarch.name

If you like this book, please contribute using Flattr
or donate using PayPal