mlw 2014 lightning talk - introduction to sparql

21
© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. Introduction to SPARQL John Snelson, Lead Engineer @jpcs

Upload: marklogic

Post on 01-Jul-2015

249 views

Category:

Technology


0 download

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.

TRANSCRIPT

Page 1: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED.

Introduction to SPARQL John Snelson, Lead Engineer @jpcs

Page 2: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 2

RDF – DISTRIBUTED GRAPH DATA

Page 3: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 4: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 5: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 6: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 7: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 8: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 9: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 10: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 10

SPARQL – RDF QUERY LANGUAGE

Page 11: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 12: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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

Page 13: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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?

Page 14: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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?

Page 15: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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 . }

Page 16: MLW 2014 Lightning Talk - Introduction to SPARQL

© 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 . }

Page 17: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 17

MARKLOGIC AND SPARQL

Page 18: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 18

TRIPLE

XQY XSLT SQL SPARQL

GRAPH SPARQL

Page 19: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 19

Triples Embedded in Documents

Page 20: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 20

The Best of Both Worlds

Page 21: MLW 2014 Lightning Talk - Introduction to SPARQL

© COPYRIGHT 2013 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED. SLIDE: 28

Thank you!