Clone this wiki locally
This is a short info burst about RDF, which represents the foundation of the Semantic Web, and how the concepts of RDF relate to ActiveRDF. Read this if you have no prior knowledge about the Semantic Web. Don’t worry, we’ll be short and to the point.
Basic RDF Concepts
RDF, the Resource Description Framework, is designed to describe store graphs of interconnected information. Such a graph is made out of triples, and every triple has a subject, predicate and object. A triple is like a simple sentence in English and might for example express information such as: “Peter knows Paula”. There are three types of “information objects” that you can use in a triple:
- URI: a uniform resource identifier (a globally unique identifier, like the URLs you type in your browser),
- literals: simple values such as numbers or strings,
- blank nodes: which are like strangers in a crowd that you cannot really identify: you can see the skinny red-haired girl in the crowd but you don’t have her name or her telephone number.
Using three URIs we can construct a triple to express that Peter knows Paula:
person:peter fact:knows person:paula .
How ActiveRDF relates to the concepts of RDF
In the real world we talk about persons, things and concepts, which have properties: We might know a Person, of this Person, we know a lot of things, like an age, email address or occupation. Because in the real world the focus is on objects and their properties, we naturally express this in ActiveRDF through Ruby objects, their properties and the accessors to those properties. In ActiveRDF Peter simply is a Ruby object, with properties age, email and occupation:
Peter = FOAF::Person.new Peter.age = "33" Peter.mbox = "emailto:peter@NoRealPlace.net" puts Peter.occupation ... "student"
ActiveRDF handles all the details about storing the right triples in the triple store for you. Even better, you don’t have to worry about long and tedious URIs. Just use the part of the URI behind the last ”/” or ”#” and Active RDF will figure out what property you mean on its own. (In “Peter.email”, the property “email” might just be an abbreviation for “http://xmlns.com/foaf/0.1/mbox”).
Just remember: In order for Active RDF to be able to fill in the complete URIs for the abbreviations you use, there has to be some data in the triple store. It does not work with an empty store, but we are working on ways to most easily define the mapping between URIs and properties manually, in case you want to start from scratch, with an empty store.
If you want some further homework, check out these resources:
- What is RDF article is a good and short introduction to RDF;
- What is RDF and what is it good for? compares RDF to XML, and introduces RDF Schema;
- The official RDF Primer should give you the complete picture.
- For the Big Vision behind the Semantic Web, read Tim Berners-Lee’s Scientific American article.