Your SlideShare is downloading. ×
Introduction to the
RDF Data Model
Sources:
Ian Davis (Talis),
Prof. Praveen Rao (UMKC),
http://rdfabout.com/

1
Introduction
•

RDF stands for Resource Description Framework

•
•

•
•

Companies developing RDF storage solutions
Allegr...
The Relational Model

3
RDF Data Model
• RDF represents data as (s,p,o) triples
•
•

s means subject, p means predicate or property, o means objec...
Example

5
Example
• Relationship between entities/resources

6
Global Naming
•
•
•

•
•

URIs (!= URLs) provide the ability to identify things globally
and uniquely
RDF names things/res...
RDF Graphs
• Can have named things, literals (text or numeric
values), named relations/properties, unnamed things…

8
RDF Graphs

• Subjects can be URIs or unnamed
(a.k.a blank nodes)

• Predicates are URIs
• Objects can be URIs, literals, ...
Merging RDF Graphs
• Graphs from different sources can be merged
• Nodes with the same URI are considered identical
• Blan...
Example (1/2)

11
Example (2/2)

12
RDF vs. RDBMS

• Relational (RDBMS) model
•
•
•
•

Separate databases with own schemas
Table row: assertion that relation ...
RDF vs. RDBMS example
foaf:name (predicate/property)
subject

object

_:personA

“John”

_:personB

“Jane”

_:personC

“Fr...
RDF vs XML
• Not another XML format
• XML means
•
•

Angle-brackets-slashes notation (think HTML)

Data model: tree (DAG) ...
RDF Formats
• All are plain-text serialization formats
• RDF/XML: XML notation
• Notation3 (N3): superset of TTL, beyond R...
Turtle

• Terse RDF Triple Language (TTL)
• Triples are terminated with a full stop
• URIs are enclosed in angle brackets ...
Turtle: Same Subject
@PREFIX ex: <http://example.com/> .
ex:thing ex:relation "Some Text" .
ex:thing ex:otherrelation ex:o...
Turtle: Same Subject-Predicate
@PREFIX ex: <http://example.com/> .
ex:thing ex:relation "Some Text" .
ex:thing ex:relation...
Turtle: Blank Node
@PREFIX ex: <http://example.com/> .
ex:thing ex:relation _:a .
_:a ex:property "foo" .
_:a ex:property ...
Turtle: Literals
• Literals can have a language
@PREFIX ex: <http://example.com/> .
ex:thing ex:relation "Hello"@en .
ex:t...
Vendor 1:

Vendors example

vendor1:productX

dc:title "Cool-O-Matic" .

vendor1:productX

retail:price

vendor1:productX
...
Links
• Government (US, UK), Wikipedia, World Bank, U.S.
Census, U.S. SEC, NYTimes, etc.

•
•
•

http://www.w3.org/wiki/Da...
Upcoming SlideShare
Loading in...5
×

Introduction to RDF Data Model

828

Published on

Introduction to RDF Data Model.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
828
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
16
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Represent information about resources in the WWW and the relationships b/w themDesigned to represent knowledge in a distributed worldParticularly concerned with meaning
  • Relation = tableTuple = rowAttribute = column
  • URIs you see in RDF documents are merely verbose names for entities, nothing more
  • As a set of statements (triples) vs. as a graph
  • All (other than RDF/XML) are non-XML and are designed with human-readability in mindS,p,o,c
  • RDF/XML, notation3, triples, turtle, ntriples, nquads
  • RDF allows the vendors and reviewers to agree on what they need to agree on, without forcing anyone to use one particular vocabulary.Unconstraining while allowing the application to relate information together.Interoperability: v1’s format is interoperable with v2 even though didn’t have to agree on common meanings
  • Transcript of "Introduction to RDF Data Model"

    1. 1. Introduction to the RDF Data Model Sources: Ian Davis (Talis), Prof. Praveen Rao (UMKC), http://rdfabout.com/ 1
    2. 2. Introduction • RDF stands for Resource Description Framework • • • • Companies developing RDF storage solutions AllegroGraph, Virtuoso, BigOWLIM, Garlik 4store/5store, Mulgara, etc. Companies managing data using RDF model • • • W3C spec: http://www.w3.org/RDF/ 1st spec in 1999, current standard from 2004 • • Is a data model (like XML) BBC, Google, Yahoo!, Best Buy, Newsweek, Pfizer, etc. http://data.nytimes.com/home/about.html To allow anyone to say anything about anything 2
    3. 3. The Relational Model 3
    4. 4. RDF Data Model • RDF represents data as (s,p,o) triples • • s means subject, p means predicate or property, o means object Can represent any assertion • • An assertion may or may not be a fact Together, triples form a directed, labeled graph 4
    5. 5. Example 5
    6. 6. Example • Relationship between entities/resources 6
    7. 7. Global Naming • • • • • URIs (!= URLs) provide the ability to identify things globally and uniquely RDF names things/resources with URIs Can name infinite number of things using URIs • Can use the fragment identifier ‘#’ Create different URIs for different things If two users refer to the same URI, then they are talking about the same thing 7
    8. 8. RDF Graphs • Can have named things, literals (text or numeric values), named relations/properties, unnamed things… 8
    9. 9. RDF Graphs • Subjects can be URIs or unnamed (a.k.a blank nodes) • Predicates are URIs • Objects can be URIs, literals, or unnamed 9
    10. 10. Merging RDF Graphs • Graphs from different sources can be merged • Nodes with the same URI are considered identical • Blank nodes can be kept separate • Any RDF graph can be merged with any other RDF graph • Any number of RDF graphs can be merged 10
    11. 11. Example (1/2) 11
    12. 12. Example (2/2) 12
    13. 13. RDF vs. RDBMS • Relational (RDBMS) model • • • • Separate databases with own schemas Table row: assertion that relation is true for values in row SELECT query: filter on assertions for given conditions A relation is true (row exists) or false • RDF model • • • (Semantic) Web: a single giant graph database s, p, o identified uniquely with URIs across the web A relation is true (triple exists) or is unknown • RDF more like OO model than RDBMS 13
    14. 14. RDF vs. RDBMS example foaf:name (predicate/property) subject object _:personA “John” _:personB “Jane” _:personC “Fred” RDF triples expressed as binary relations in RDBMS 14
    15. 15. RDF vs XML • Not another XML format • XML means • • Angle-brackets-slashes notation (think HTML) Data model: tree (DAG) with different nodes (elements, attributes) • RDF means • • Notation: RDF/XML, Turtle, N-triples etc. Data model: directed graph, uses URIs 15
    16. 16. RDF Formats • All are plain-text serialization formats • RDF/XML: XML notation • Notation3 (N3): superset of TTL, beyond RDF • Turtle (TTL): subset of N3, used only for RDF • N-Triples (NT), N-Quads (NQ): subset of TTL and N3 • • Simpler/minimal Easier to parse/generate 16
    17. 17. Turtle • Terse RDF Triple Language (TTL) • Triples are terminated with a full stop • URIs are enclosed in angle brackets (< and >) • Literals are enclosed by double quotes • <http://example.com/thing> <http://example.com/relation> “Hello World" . • Use @PREFIX to shorten URIs • • @PREFIX ex: <http://example.com/> . ex:thing ex:relation “Hello World" . 17
    18. 18. Turtle: Same Subject @PREFIX ex: <http://example.com/> . ex:thing ex:relation "Some Text" . ex:thing ex:otherrelation ex:otherthing . @PREFIX ex: <http://example.com/> . ex:thing ex:relation "Some Text" ; ex:otherrelation ex:otherthing . 18
    19. 19. Turtle: Same Subject-Predicate @PREFIX ex: <http://example.com/> . ex:thing ex:relation "Some Text" . ex:thing ex:relation ex:otherthing . @PREFIX ex: <http://example.com/> . ex:thing ex:relation "Some Text" , ex:otherthing . 19
    20. 20. Turtle: Blank Node @PREFIX ex: <http://example.com/> . ex:thing ex:relation _:a . _:a ex:property "foo" . _:a ex:property "bar” . • Use _: followed by a label • ‘a’ is the label – valid only within that particular RDF document • If _a: appears in a different document, it would refer to a different node 20
    21. 21. Turtle: Literals • Literals can have a language @PREFIX ex: <http://example.com/> . ex:thing ex:relation "Hello"@en . ex:thing ex:relation "Bonjour"@fr . • Literals can have a datatype @PREFIX ex: <http://example.com/> . ex:thing ex:relation "49"^^<http://www.w3.org/2001/XMLSchema#int> . • But not both! 21
    22. 22. Vendor 1: Vendors example vendor1:productX dc:title "Cool-O-Matic" . vendor1:productX retail:price vendor1:productX vendor1:partno vendor1:productY dc:title "Fluffertron" . vendor1:productY retail:price vendor1:productY vendor1:partno "$50.75" . "TTK583" . "$26.50" . "AAL132" . Vendor 2: vendor2:product1 dc:title "Can Closer" . vendor2:product2 dc:title "Dust Unbuster" . Reviewer 1: vendor1:productX dc:description "This product is good buy!" . Reviewer 2: vendor2:product2 dc:description "Who needs something to unbust dust? A dust buster would be a better idea, and I wish they posted the price." . vendor2:product2 review:rating review:Excellent . 22
    23. 23. Links • Government (US, UK), Wikipedia, World Bank, U.S. Census, U.S. SEC, NYTimes, etc. • • • http://www.w3.org/wiki/DataSetRDFDumps http://data.nytimes.com/ http://data.gov.uk/ • http://librdf.org/parse • http://www.rdfabout.com/demo/validator/ 23

    ×