Upload
marklogic
View
251
Download
0
Embed Size (px)
DESCRIPTION
John Snelson, a lead engineer at MarkLogic, will introduce you to RDF and SPARQL, how they work, and how they improve MarkLogic in version 7.
Citation preview
© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED.
Introduction to SPARQL John Snelson, Lead Engineer @jpcs
© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 2
RDF – DISTRIBUTED GRAPH DATA
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 3
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
RDF: Distributed Graph Data Dean
Allemang Semantic Web for
the Working Ontologist
wrote
Stephen Buxton
John Snelson
knows
likes
Sem Web Meetup
attends
SemTechBiz
speaking at
MarkLogic
works for
knows
speaking at
speaking at
works for
attends
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 4
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
RDF: Distributed Graph Data Dean
Allemang
Stephen Buxton
Sem Web Meetup
attends
meetup.com attends
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 5
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
RDF: Distributed Graph Data Dean
Allemang
Stephen Buxton
John Snelson
knows
MarkLogic
works for
linkedin.com works for
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 6
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
RDF: Distributed Graph Data Dean
Allemang Semantic Web for
the Working Ontologist
wrote
workingontologist.com
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 7
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
RDF: Distributed Graph Data Dean
Allemang Semantic Web for
the Working Ontologist
John Snelson
likes
knows
facebook.com
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 8
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
RDF: Distributed Graph Data Dean
Allemang
Stephen Buxton
John Snelson
SemTechBiz
speaking at
speaking at
speaking at
semanticweb.com
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 9
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
RDF: Distributed Graph Data Dean
Allemang Semantic Web for
the Working Ontologist
wrote
Stephen Buxton
John Snelson
knows
likes
Sem Web Meetup
attends
SemTechBiz
speaking at
MarkLogic
works for
knows
workingontologist.com facebook.com
linkedin.com meetup.com
speaking at
speaking at
works for
semanticweb.com
attends
© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 10
SPARQL – RDF QUERY LANGUAGE
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 11
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Data: John Snelson
SemTechBiz
speaking at
Query:
SPARQL
Queries look like the data
?who SemTechBiz
speaking at
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 12
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Query: ?who SemTechBiz
speaking at
select * where { ?who :speaking-at “SemTechBiz” . }
Data: John Snelson
SemTechBiz
speaking at
:jsnelson :speaking-at “SemTechBiz” .
SPARQL
Queries look like the data
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 13
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
select * where { ?author :wrote ?book ; :speaking-at “SemTechBiz” . :jsnelson :likes ?book . }
Graph Patterns
Dean Allemang
Semantic Web for the Working Ontologist
wrote
Stephen Buxton
John Snelson
knows likes
Sem Web Meetup
attends
SemTechBiz
speaking at
MarkLogic
works for
knows
speaking at
speaking at
works for
attends
?author ?book wrote
John Snelson
likes
SemTechBiz
speaking at
Which authors speaking at SemTechBiz wrote a book I
like?
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 14
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Graph Patterns
Dean Allemang
Semantic Web for the Working Ontologist
wrote
Stephen Buxton
John Snelson
knows likes
Sem Web Meetup
attends
SemTechBiz
speaking at
MarkLogic
works for
knows
speaking at
speaking at
works for
attends
select * where { ?author :wrote ?book ; :speaking-at “SemTechBiz” . :jsnelson :likes ?book . }
?author ?book
:dallemang “Semantic Web for the Working Ontologist”
Which authors speaking at SemTechBiz wrote a book I
like?
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 15
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Graph Patterns
Dean Allemang
Semantic Web for the Working Ontologist
wrote
Stephen Buxton
John Snelson
knows likes
Sem Web Meetup
attends
SemTechBiz
speaking at
MarkLogic
works for
knows
speaking at
speaking at
works for
attends Who works for my company and knows the author of a
book I like?
?author wrote
?who John Snelson
knows likes ?company
works for works for
?book select * where { ?who :works-for ?company ; :knows ?author . :jsnelson :works-for ?company ; :likes ?book . ?author :wrote ?book . }
© COPYRIGHT 2014 DEAN ALLEMANG, MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 16
This slide is derived from a presentation by Dean Allemang, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Graph Patterns
Dean Allemang
Semantic Web for the Working Ontologist
wrote
Stephen Buxton
John Snelson
knows likes
Sem Web Meetup
attends
SemTechBiz
speaking at
MarkLogic
works for
knows
speaking at
speaking at
works for
attends Who works for my company and knows the author of a
book I like?
?who ?company ?author ?book
:sbuxton :MarkLogic :dallemang
“Semantic Web for
the Working
Ontologist”
select * where { ?who :works-for ?company ; :knows ?author . :jsnelson :works-for ?company ; :likes ?book . ?author :wrote ?book . }
© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 17
MARKLOGIC AND SPARQL
© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 18
TRIPLE
XQY XSLT SQL SPARQL
GRAPH SPARQL
© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 19
Triples Embedded in Documents
© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 20
The Best of Both Worlds
© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 28
Thank you!