Overview of
RDF Data Model
Eric Prud'hommeaux
World Wide Web Consortium
MIT, Cambridge, MA, USA
Harold Solbrig
Mayo Clinic, USA
Jose Emilio Labra Gayo
WESO Research group
University of Oviedo, Spain
Iovka Boneva
LINKS, INRIA & CNRS
University of Lille, France
Short history of RDF
Around 1997 - PICS, Dublin core, Meta Content Framework
1997 1st Working draft https://www.w3.org/TR/WD-rdf-syntax-971002
RDF/XML
1999 1st W3c Rec https://www.w3.org/TR/1999/REC-rdf-syntax-19990222/
First applications RSS, EARL
2004 - RDF Revised https://www.w3.org/TR/2004/REC-rdf-concepts-20040210/
Emergence of SPARQL, Turtle, Linked Data
2014 - RDF 1.1 https://www.w3.org/TR/rdf11-concepts/
RDF Data Model
RDF Graph = set of triples
A triple = (subject, predicate, object)
Example:
http://example.org/alice
http://example.org/bob
http://schema.org/knows
subject predicate object
<http://example.org/alice> <http://xmlns.com/foaf/0.1/knows> <http://example.org/bob> .
N-Triples representation
RDF Graph
RDF Graph = set of triples
Example:
http://example.org/alice
http://example.org/bob
http://example.org/carol
http://schema.org/birthPlace
http://dbpedia.org/resource/Oviedo
http://schema.org/knows
http://schema.org/knows
http://schema.org/knows
http://schema.org/birthPlace
http://schema.org/knows
RDF Graph
N-triples representation
<http://example.org/alice> <http://schema.org/knows> <http://example.org/bob> .
<http://example.org/bob> <http://schema.org/knows> <http://example.org/carol> .
<http://example.org/carol> <http://schema.org/knows> <http://example.org/alice> .
<http://example.org/carol> <http://schema.org/knows> <http://example.org/bob> .
<http://example.org/alice> <http://schema.org/birthPlace> <http://dbpedia.org/resource/Oviedo> .
<http://example.org/carol> <http://schema.org/birthPlace> <http://dbpedia.org/resource/Oviedo> .
Turtle Syntax
Some simplifications
prefix declarations
; when triples share the subject
, when triples share subject and
object
prefix : <http://example.org/>
prefix schema: <http://schema.org/>
prefix dbo: <http://dbpedia.org/ontology/>
prefix dbr: <http://dbpedia.org/resource/>
:alice schema:birthPlace dbr:Oviedo ;
schema:knows :bob .
:bob schema:knows :carol .
:carol schema:birthPlace dbr:Oviedo ;
schema:knows :alice ,
:bob .
Literals
Objects can also be literals
Literals contain a lexical form and a datatype
Typical datatypes: XML Schema primitive datatypes
If not specified, a literal has type xsd:string
:bob
Robert
schema:name
25
foaf:age
xsd:integer
xsd:string
:bob schema:name "Robert"^^<xsd:string> ;
foaf:age 25^^<xsd:integer> .
:bob schema:name "Robert" ;
foaf:age 25 .
Blank nodes
Subjects and objects can also be Blank nodes
Blank nodes can have local identifiers
:bob
schema:knows
23
foaf:age
"Bob knows someone whose age is 23"
:bob foaf:knows _:1 .
_:1 foaf:age 23 .
:bob foaf:knows [
foaf:age 23
] .
or
Language tagged strings
String literals can be qualified by a language tag
They have datatype rdfs:langString
:spain rdfs:label "Spain"@en ;
rdfs:label "España"@es .:spain
Spain
rdfs:label
España
rdfs:label
es
en
...and that's all?
Yes, the RDF Data model is simple
Exercise
Define the following information in RDF
:alice
schema:name: Alice Cooper
schema:birthDate: 1980-06-09
:bob
schema:givenName: Bob, Robert
schema:lastName: Smith
schema:knows schema:knows
?
foaf:age: 21
:carol
foaf:age: 25
schema:knows
:OurCompany
schema:worksFor
schema:worksFor
Try it: http://goo.gl/Ve66q1
Continue with RDF Validation tutorial
http://www.slideshare.net/jelabra/rdf-validation-tutorial

RDF data model

  • 1.
    Overview of RDF DataModel Eric Prud'hommeaux World Wide Web Consortium MIT, Cambridge, MA, USA Harold Solbrig Mayo Clinic, USA Jose Emilio Labra Gayo WESO Research group University of Oviedo, Spain Iovka Boneva LINKS, INRIA & CNRS University of Lille, France
  • 2.
    Short history ofRDF Around 1997 - PICS, Dublin core, Meta Content Framework 1997 1st Working draft https://www.w3.org/TR/WD-rdf-syntax-971002 RDF/XML 1999 1st W3c Rec https://www.w3.org/TR/1999/REC-rdf-syntax-19990222/ First applications RSS, EARL 2004 - RDF Revised https://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ Emergence of SPARQL, Turtle, Linked Data 2014 - RDF 1.1 https://www.w3.org/TR/rdf11-concepts/
  • 3.
    RDF Data Model RDFGraph = set of triples A triple = (subject, predicate, object) Example: http://example.org/alice http://example.org/bob http://schema.org/knows subject predicate object <http://example.org/alice> <http://xmlns.com/foaf/0.1/knows> <http://example.org/bob> . N-Triples representation
  • 4.
    RDF Graph RDF Graph= set of triples Example: http://example.org/alice http://example.org/bob http://example.org/carol http://schema.org/birthPlace http://dbpedia.org/resource/Oviedo http://schema.org/knows http://schema.org/knows http://schema.org/knows http://schema.org/birthPlace http://schema.org/knows
  • 5.
    RDF Graph N-triples representation <http://example.org/alice><http://schema.org/knows> <http://example.org/bob> . <http://example.org/bob> <http://schema.org/knows> <http://example.org/carol> . <http://example.org/carol> <http://schema.org/knows> <http://example.org/alice> . <http://example.org/carol> <http://schema.org/knows> <http://example.org/bob> . <http://example.org/alice> <http://schema.org/birthPlace> <http://dbpedia.org/resource/Oviedo> . <http://example.org/carol> <http://schema.org/birthPlace> <http://dbpedia.org/resource/Oviedo> .
  • 6.
    Turtle Syntax Some simplifications prefixdeclarations ; when triples share the subject , when triples share subject and object prefix : <http://example.org/> prefix schema: <http://schema.org/> prefix dbo: <http://dbpedia.org/ontology/> prefix dbr: <http://dbpedia.org/resource/> :alice schema:birthPlace dbr:Oviedo ; schema:knows :bob . :bob schema:knows :carol . :carol schema:birthPlace dbr:Oviedo ; schema:knows :alice , :bob .
  • 7.
    Literals Objects can alsobe literals Literals contain a lexical form and a datatype Typical datatypes: XML Schema primitive datatypes If not specified, a literal has type xsd:string :bob Robert schema:name 25 foaf:age xsd:integer xsd:string :bob schema:name "Robert"^^<xsd:string> ; foaf:age 25^^<xsd:integer> . :bob schema:name "Robert" ; foaf:age 25 .
  • 8.
    Blank nodes Subjects andobjects can also be Blank nodes Blank nodes can have local identifiers :bob schema:knows 23 foaf:age "Bob knows someone whose age is 23" :bob foaf:knows _:1 . _:1 foaf:age 23 . :bob foaf:knows [ foaf:age 23 ] . or
  • 9.
    Language tagged strings Stringliterals can be qualified by a language tag They have datatype rdfs:langString :spain rdfs:label "Spain"@en ; rdfs:label "España"@es .:spain Spain rdfs:label España rdfs:label es en
  • 10.
    ...and that's all? Yes,the RDF Data model is simple
  • 11.
    Exercise Define the followinginformation in RDF :alice schema:name: Alice Cooper schema:birthDate: 1980-06-09 :bob schema:givenName: Bob, Robert schema:lastName: Smith schema:knows schema:knows ? foaf:age: 21 :carol foaf:age: 25 schema:knows :OurCompany schema:worksFor schema:worksFor Try it: http://goo.gl/Ve66q1
  • 12.
    Continue with RDFValidation tutorial http://www.slideshare.net/jelabra/rdf-validation-tutorial