18. Terms
IRI : URI reference within an RDF graph
<http://www.w3.org>
<http://semantic.naver.com/#Movie>
<abc.rdf> //base URI
foaf:name //prefix URI , PREFIX
#x00 (X) //UNICODE
Datatype IRI : datatype URI
<http://www.w3.org/2001/XMLSchema#string>
<http://www.w3.org/2001/XMLSchema#integer>
Plain Literal : lexical form, optionally language tag, @ko
“Semantic web” , “ ”@ko
Typed Literal : lexical form, datatype URI
“30”^^xsd:integer
“kwangsub”^^http://www.w3.org/2001/XMLSchema#string
Blank node : dummy node, node ,
_:a, _n06968595988
19. Terms
NameSpace :Vocabulary URI
http://www.w3.org/1999/02/22-rdf-syntax-ns#
http://purl.org/dc/elements/1.1/
http://xmlns.com/foaf/0.1/
Prefix : URI
rdf, dc, foaf
RDF Graph : A Set of RDF Triples
RDF Triple : S-P-O
Subject : IRI or Blank Node
Predicate : IRI
Object : IRI or Blank Node or Literal
20. Terms
Match
: Graph SPO Query Pattern Match
Solutions : Match
?x = “ ”
Query Variable : Solutions
?x or $name
24. Syntax - RDF Term Syntax
IRI
<http://example.org/book/book1>
BASE <http://example.org/book/>
<book1>
PREFIX book: <http://example.org/book/>
book:book1
25. Syntax -Triple Pattern Syntax
PREFIX, BASE
PREFIX dc: <http://purl.org/dc/elements/purl.org/>
SELECT ?title
WHERE { <http://example.org/book/book> dc:title ?title }
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://example.org/book/>
SELECT $title
WHERE { :book1 dc:title $title }
BASE <http://example.org/book/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT $title
WHERE { <book1> dc:title $title }
26. Play #
kwangsub email ?
:like
_person book:book_3
:name book:name
kwangsub@en
BASE <http://RDFTutorial.net/2009/>
PREFIX book: <http://example.org/book/>
SELECT ?book_name
WHERE {
?person :like book:book_3.
book:book_3 book:name ?book_name.
}
27. Syntax - RDF Term Syntax
Query Var
?var or $var
Blank
[ :p “v”]. == [] :p “v”.
Unique Blank - IRI
_b57 :p “v”. //
[ foaf:name ?name ;
foaf:mbox <mailto:ss@c.com>] //
_b11 foaf:name ?name ; S PO .
_b11 foaf:mbox <mailto:ss@c.com>
36. Solution Sequences and Modifiers
Order
SELECT ?people, ?name
WHERE {
?people :name ?name
}
ORDER BY ?name // A-Z, DESC(?name)
SELECT ?s ?p ?o
WHERE {
?s ?p ?o
} // SPO
ORDER BY ?o // ???
37. Play #
?
_d
_b
_a _c
:age
:age
:age :age
45
33
21 26
PREFIX : <http://RDFTutorial.net/2009/>.
SELECT ?user
WHERE {
?user :age ?age.
}
ORDER BY ?age.
54. Garlik’s JXT
Aggregate Functions Dave Beckett’s Redland
Subqueries ARQ
Open Anzo’s Glitter
Negation Virtuoso
Projection Expressions ARC
SeRQL
Service description RDF::Query
Update (REST) SQL
XSPARQL
IBM’s Jazz Foundation
Garlik’s JXT Dave ARQ Open Anzo’s Virtuoso ARC SeRQL RDF::Query SQL XSPARQL IBM’s Jazz
Beckett’s Glitter Foundation
Redland
Aggregation COUNT() O O O O O O
SUM() O O O O
AVG() O O O O
MAX() O O O
MIN() O O O
Subqueries O O
Negation O O O O
Project expressions O O O O O O
Service description O O O
UPDATE O O
Protocol O O
Enhancements for
Update
* WG , .
55. Links
http://groups.google.com/group/semanticwebstudy?hl=ko
http://delicious.com/kwangsub.kim/bundle:RDFTutorial2009
SPARQL (IBM DevWorks) :
http://www.ibm.com/developerworks/kr/library/tutorial/x-sparql/
SPARQL Working Group :
http://www.w3.org/2009/sparql/wiki/Main_Page