RDF* and SPARQL*
An Alternatjve Approach to Statement-Level Metadata in RDF
Olaf Hartjg
@olafiartjg
RDF* and SPARQL* An Alternatjve Approach to Statement-Level - - PowerPoint PPT Presentation
RDF* and SPARQL* An Alternatjve Approach to Statement-Level Metadata in RDF Olaf Hartjg @olafiartjg Olaf Hartjg The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF 2 Picture
@olafiartjg
2 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF Picture source:htp://akae.blogspot.se/2008/08/dios-mo-doc-has-construido-una-mquina.html
4 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
htp://tjnkerpop.apache.org/docs/current/reference/#intro Picture source:htp://akae.blogspot.se/2008/08/dios-mo-doc-has-construido-una-mquina.html
5 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
6 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
But ...
Picture source:htp://akae.blogspot.se/2008/08/dios-mo-doc-has-construido-una-mquina.html
7 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
Welles name "Orson Welles" . Welles mentioned Kubrick . Kubrick name "Stanley Kubrick" . Kubrick influencedBy Welles . ??? significance 0.8 .
Kubrick Welles influencedBy significance = 0.8 name = "Stanley Kubrick" name = "Orson Welles" mentioned
8 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
Welles name "Orson Welles" . Welles mentioned Kubrick . Kubrick name "Stanley Kubrick" . Kubrick influencedBy Welles . ??? significance 0.8 .
Kubrick Welles influencedBy significance = 0.8 name = "Stanley Kubrick" name = "Orson Welles" mentioned
9 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
Welles name "Orson Welles" . Welles mentioned Kubrick . Kubrick name "Stanley Kubrick" . Kubrick influencedBy Welles . s significance 0.8 . s rdf:type rdf:Statement . s rdf:subject Kubrick . s rdf:predicate influencedBy . s rdf:object Welles .
Kubrick Welles influencedBy significance = 0.8 name = "Stanley Kubrick" name = "Orson Welles" mentioned
10 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x WHERE { ?x influencedBy Welles . ?t significance ?sig . ?t rdf:type rdf:Statement . ?t rdf:subject ?x . ?t rdf:predicate influencedBy . ?t rdf:object Welles . FILTER ( ?sig > 0.7 ) } Example 1: List all people that Welles had a significant influence on.
11 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x WHERE { ?x influencedBy Welles . Welles influencedBy ?x . ?t1 rdf:type rdf:Statement . ?t1 rdf:subject ?x . ?t1 rdf:predicate influencedBy . ?t1 rdf:object Welles . ?t1 significance ?sig1 . ?t2 rdf:type rdf:Statement . ?t2 rdf:subject Welles . ?t2 rdf:predicate influencedBy . ?t2 rdf:object ?x . ?t2 significance ?sig2 . FILTER (?sig1 > 0.7 && ?sig2 > 0.7) } Example 2:
12 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
– Query:
g1 { Kubrick influencedBy Welles } g1 significance 0.8 . SELECT ?x WHERE { GRAPH ?g { ?x influencedBy Welles } ?g significance ?sig . FILTER ( ?sig > 0.7 ) }
13 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
– Query:
Kubrick influencedBy Welles . Kubrick p1 Welles . p1 singletonPropertyOf influencedBy . p1 significance 0.8 . SELECT ?x WHERE { ?x influencedBy Welles . ?x ?p Welles . ?p singletonPropertyOf influencedBy . ?p significance ?sig . FILTER ( ?sig > 0.7 ) }
15 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
<<Kubrik influencedBy Welles>> significance 0.8
subject predicate
Kubrick influencedBy Welles . s rdf:type rdf:Statement . s rdf:subject Kubrick . s rdf:predicate influencedBy . s rdf:object Welles . s significance 0.8 .
16 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x WHERE { ?x influencedBy Welles . ?t significance ?sig . ?t rdf:type rdf:Statement . ?t rdf:subject ?x . ?t rdf:predicate influencedBy . ?t rdf:object Welles . FILTER ( ?sig > 0.7 ) } SELECT ?x WHERE { <<?x influencedBy Welles>> significance ?sig FILTER (?sig > 0.7) }
17 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x WHERE { ?x influencedBy Welles . ?t significance ?sig ; rdf:type rdf:Statement ; rdf:subject ?x ; rdf:predicate influencedBy ; rdf:object Welles . FILTER ( ?sig > 0.7 ) } SELECT ?x ?sig ?src WHERE { <<?x influencedBy Welles>> significance ?sig ; source ?src . }
18 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x ?sig ?src WHERE { BIND(<<?x influencedBy Welles>> AS ?t) ?t significance ?sig ; source ?src . } SELECT ?x ?sig ?src WHERE { <<?x influencedBy Welles>> significance ?sig ; source ?src . }
19 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x ?sig ?src WHERE { BIND(<<?x influencedBy Welles>> AS ?t) ?t significance ?sig ; source ?src . } SELECT ?t ?c WHERE { BIND(<<?x influencedBy Welles>> AS ?t) ?t certainty ?c . }
20 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x WHERE { ?x influencedBy Welles . Welles influencedBy ?x . ?t1 rdf:type rdf:Statement . ?t1 rdf:subject ?x . ?t1 rdf:predicate influencedBy . ?t1 rdf:object Welles . ?t1 significance ?sig1 . ?t2 rdf:type rdf:Statement . ?t2 rdf:subject Welles . ?t2 rdf:predicate influencedBy . ?t2 rdf:object ?x . ?t2 significance ?sig2 . FILTER (?sig1 > 0.7 && ?sig2 > 0.7) }
21 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
SELECT ?x WHERE { ?x influencedBy Welles . Welles influencedBy ?x . ?t1 rdf:type rdf:Statement . ?t1 rdf:subject ?x . ?t1 rdf:predicate influencedBy . ?t1 rdf:object Welles . ?t1 significance ?sig1 . ?t2 rdf:type rdf:Statement . ?t2 rdf:subject Welles . ?t2 rdf:predicate influencedBy . ?t2 rdf:object ?x . ?t2 significance ?sig2 . FILTER (?sig1 > 0.7 && ?sig2 > 0.7) } SELECT ?x WHERE { <<?x influencedBy Welles>> significance ?sig1 . <<Welles influencedBy ?x>> significance ?sig2 . FILTER (?sig1 > 0.7 && ?sig2 > 0.7) }
22 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
right, with the possibility of a dedicated physical schema
– Extension of the
RDF data model and of SPARQL to capture the notion
– Supported by
Blazegraph
top of standard RDF and SPARQL
– Can be parsed directly
into standard RDF and SPARQL
– Can be implemented
easily by a small wrapper on top of any existing RDF DBMS
23 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
right, with the possibility of a dedicated physical schema
top of standard RDF and SPARQL
(or singleton properties, or single-triple named graphs)
– By straightforward translation into ordinary SPARQL queries
– By translation into Gremlin, Cypher, etc.
24 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
top of standard RDF and SPARQL
right, with the possibility of a dedicated physical schema
– Information preservation and query result preservation
proof that they possess the desirable properties
25 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
right, with the possibility of a dedicated physical schema
– Extends the RDF data model with the notions
– Extends the semantics of SPARQL by defining the
result of a SPARQL* query Q over an RDF* graph G eval(Q,G) = { m1, m2, …, mn }
top of standard RDF and SPARQL
26 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
right, with the possibility of a dedicated physical schema
top of standard RDF and SPARQL
– Example:
<<Kubrik influencedBy Welles>> certainty 0.8 .
Kubrik influencedBy Welles .
– Query results are equivalent no matter whether
there is redundancy in an RDF* graph or not
redundant
27 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
right, with the possibility of a dedicated physical schema
top of standard RDF and SPARQL
Approach to Statement-Level Metadata in RDF.” In Proc. of the 11th Alberto Mendelzon International Workshop on Foundations of Data Management (AMW), 2017.
Approach to Reification in RDF.” CoRR abs/1406.3399, 2014
–
Specifies Turtle*
–
All relevant extensions of the SPARQL spec
28 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
… is this all theory only???
29 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
– “Reification done right” (RDR)
– Conversion tools
(RDF* ↔ RDF, SPARQL* → SPARQL, RDF* ↔ PGs)
– RDF* store
– Oracle Research, OpenLink (Virtuoso), Franz (AllegroGraph)
have indicated interest in standardizing something along the lines of RDF* & SPARQL*
30 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
Streaming data?
31 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
32 Olaf Hartjg – The RDF*/SPARQL* Approach to Statement-Level Metadata in RDF
right, with the possibility of a dedicated physical schema
top of standard RDF and SPARQL <<Kubrik influencedBy Welles>> significance 0.8
subject predicate
SELECT ?x WHERE { <<?x influencedBy Welles>> significance ?sig FILTER (?sig > 0.7) }