sign in
Home | Updates | Pages | Users | Admin | Help
Comparing version 6 and version 5 back

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. 

h2. Basic RDF Concepts

_RDF_ stands for Resource Description Framework, and the purpose of RDF is to 
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, similar to the URLs you type into 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

h2. 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. h2. Further Information If you want some further homework, check out these resources: * The xml.com "What is RDF":http://www.xml.com/pub/a/2001/01/24/rdf.html Article on XML.comarticle is a good introduction to RDF, if you don't have much time, * "What is RDF and what is it good for?":http://www.rdfabout.com/intro/?section=contents is longer, compares RDF to XML, and introduces RDF Schema, * The "RDF Primer":http://www.w3.org/TR/rdf-primer/ of the W3C is the official introduction to RDF, which gives you the complete picture. If you have read this, then welcome to the club, you now officially know RDF! * For more information about the Big Vision behind the Semantic Web, read Tim Berners-Lee's Scientific American "article":http://www.sciam.com/print_version.cfm?articleID=00048144-10D2-1C70-84A9809EC588EF21.
Powered by JunebugWiki v0.0.31