There are a couple of very good introductions to RDF on the web, but I will outline the most important things to know on this page.
RDF is actually a very simple data model:
A triple always consists of a subject, a predicate and an object - just like a sentence in the natural language. Triples are also called statements.
Here is an example for a triple:
| Subject | Predicate | Object |
|---|---|---|
| http://reegle.info/actors/2354 | http://xmlns.com/foaf/0.1/name | "Renewable Energy and Energy Efficiency Partnership" |
Here is another example triple, stating that the same actor as above is active in a certain country:
| Subject | Predicate | Object |
|---|---|---|
| http://reegle.info/actors/2354 | http://reegle.info/schema#activeIn | http://reegle.info/countries/AT |
The object is the URI of another resource: Austria. As you can see, it is very simple to express n..m relationships between resources in RDF
The namespaces cause quite a bit of overhead, so often prefixes are used in serialized RDF data:
| Prefix | Namespace |
|---|---|
| foaf | http://xmlns.com/foaf/0.1/ |
| actors | http://reegle.info/actors/ |
| reegle | http://reegle.info/schema# |
Here are the two example triples from above - using prefixes in the URIs:
| Subject | Predicate | Object |
|---|---|---|
| actors:2354 | foaf:name | "Renewable Energy and Energy Efficiency Partnership" |
| actors:2354 | reegle:activeIn | http://reegle.info/countries/AT |
That were the very basics of RDF. If you feel the need to dive deeper into RDF and especially linked data, check out one of these guides: