SlideShare a Scribd company logo
1 of 50
Querying the Web of DataKennissystemen, December 2010 Rinke Hoekstra
Overview Linked (Open) Data The Web of Data Scalability issues Technology RDF Syntaxes RDF Storage and Querying Kennissystemen 2010
The Semantic Web Ideology Identity is everything Partial solutions are great too! Layer cake OWL Kennissystemen 2010
The Web of Data … does it exist? Kennissystemen 2010
Linked Data Kennissystemen 2010
Semantic Web ,[object Object]
`Metadata’ for web pages
Since ~2006
`Web of Data’
Semantic web as data source in its own right
Linked Data
A ‘Databaseesque’ Web
RDF Triple stores
Query languagesKennissystemen 2010
Storage (on the web) As documents .rdf, .n3, .turtle, .html RDF triple stores Sesame, Joseki, 4Store, AllegroGraph, OpenLink Virtuoso, SDB/TDB, Open Calais, SWI Prolog  Reasoners ‘on top’, or via DIG Pellet, OWLIM, etc. SPARQL Endpoints Results as JSON, XML, CSV etc. Kennissystemen 2010
Data and the Web Need to add this ‘meta’ to my ‘data’ ‘Linking’ data across sites Web of Documents and the Web of Data Old fashioned HTML:<link rel='meta' type='application/rdf+xml' href='http://www.leibnizcenter.org/~hoekstra/foaf.rdf' title='FOAF'>  URL-based HTTP 303 `see other’http://www.w3.org/TR/swbp-vocab-pub/ RDFa Kennissystemen 2010
BBC Music Kennissystemen 2010
Kennissystemen 2010
Kennissystemen 2010
Kennissystemen 2010
Integration: 303 See Other Kennissystemen 2010
Integration: Inline  RDFa Attributes on XHTML elements http://www.w3.org/TR/xhtml-rdfa-primer Kennissystemen 2010
Integration: RDFa Example ,[object Object],<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"           "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html xmlns:cal="http://www.w3.org/2002/12/cal/ical#">     <head><title>Jo's Friends and Family Blog</title></head>     <body>     <pinstanceof="cal:Vevent">         I'm holding         <span property="cal:summary">one last summer Barbecue</span>,         on         <span property="cal:dtstart" content="20070916T1600-0500">             September 16th at 4pm.         </span>     </p>     </body> </html> ,[object Object],_:blanknode0 rdf:typecal:Vevent;  cal:summary ”one last summer Barbecue"; cal:dtstart "20070916T1600-0500" . Kennissystemen 2010
Legal InformationRetrievalforLaymen Kennissystemen 2010
Voorbeeld Kennissystemen 2010
So, where’s that data? I repeat: does it really exist? Kennissystemen 2010
Linked Open Data Kennissystemen 2010
November 2009: 13.1 Billion triples, 142 Million links  Kennissystemen 2010
September 2010: 25 Miljard triples, 395 Miljoenlinks  Kennissystemen 2010
Scalability How to deal with massive amounts of data? Consequences for reasoning Billion Triple Challenge (864.8 Million Triples) Consequences for querying Table lookups, joins etc. … and what about … Dealing with change, provenance, trust? Kennissystemen 2010
A rough idea… I can crash a DL reasoner using an ontology of ~15 classes and 5 individuals (honestly) What if my ontology contains thousands of classes and billions of individuals? Kennissystemen 2010
Reasoning Reasoning with  inconsistent knowledge incomplete knowledge Complete vs. incomplete reasoning Kennissystemen 2010
Reasoning ,[object Object]
Realtime vs. in advance
Lightweight reasoning (RDFS, OWL 2 RL)
Implementable using forward chaining rules
Still problems with scalability
Distributed reasoning (DAS-3)
MaRVIN
‘SpeedDate’ distrubution of triples across nodes
MapReduce
Full closure of BTC in 57 minutes
Output: 30B triples
And what to do with the results?Kennissystemen 2010
2 Degrees from Kevin Bacon PREFIX p: http://dbpedia.org/property/ SELECT ?film1 ?actor1 ?film2 ?actor2 WHERE {   	?film1 p:starring <http://dbpedia.org/resource/Kevin_Bacon> .   	?film1 p:starring ?actor1 .   	?film2 p:starring ?actor1 .   	?film2 p:starring ?actor2 .} DBPedia: 150M triples Kennissystemen 2010
Another rough idea… ,[object Object]
Load time
… a couple of hours
Simple table lookup (one-variable query)
… about 5 minutes

More Related Content

What's hot

RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031kwangsub kim
 
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven RecipesReasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven RecipesOntotext
 
Property graph vs. RDF Triplestore comparison in 2020
Property graph vs. RDF Triplestore comparison in 2020Property graph vs. RDF Triplestore comparison in 2020
Property graph vs. RDF Triplestore comparison in 2020Ontotext
 
LDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked DataLDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked DataOlaf Hartig
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...Olaf Hartig
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Olaf Hartig
 
Ks2008 Semanticweb In Action
Ks2008 Semanticweb In ActionKs2008 Semanticweb In Action
Ks2008 Semanticweb In ActionRinke Hoekstra
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...Olaf Hartig
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphsandyseaborne
 
Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLJerven Bolleman
 
Rethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result VisualizationRethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result VisualizationOlaf Hartig
 
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panicoDiego Valerio Camarda
 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapesJose Emilio Labra Gayo
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD VivaAidan Hogan
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIsJosef Petrák
 

What's hot (20)

RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031
 
Jesús Barrasa
Jesús BarrasaJesús Barrasa
Jesús Barrasa
 
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven RecipesReasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
Reasoning with Big Knowledge Graphs: Choices, Pitfalls and Proven Recipes
 
Property graph vs. RDF Triplestore comparison in 2020
Property graph vs. RDF Triplestore comparison in 2020Property graph vs. RDF Triplestore comparison in 2020
Property graph vs. RDF Triplestore comparison in 2020
 
LDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked DataLDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked Data
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
 
Triple Stores
Triple StoresTriple Stores
Triple Stores
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
 
Ks2008 Semanticweb In Action
Ks2008 Semanticweb In ActionKs2008 Semanticweb In Action
Ks2008 Semanticweb In Action
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 3 (...
 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphs
 
Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQL
 
Rethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result VisualizationRethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result Visualization
 
Democratizing Big Semantic Data management
Democratizing Big Semantic Data managementDemocratizing Big Semantic Data management
Democratizing Big Semantic Data management
 
Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF Ist16-04 An introduction to RDF
Ist16-04 An introduction to RDF
 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
 
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
#sod14 - ok, è un endpoint SPARQL non facciamoci prendere dal panico
 
Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
 
Aidan's PhD Viva
Aidan's PhD VivaAidan's PhD Viva
Aidan's PhD Viva
 
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
2011 4IZ440 Semantic Web – RDF, SPARQL, and software APIs
 

Viewers also liked

Summary of SIGIR 2011 Papers
Summary of SIGIR 2011 PapersSummary of SIGIR 2011 Papers
Summary of SIGIR 2011 Paperschetanagavankar
 
Enterprise Use of Twitter by Doug Ross
Enterprise Use of Twitter by Doug RossEnterprise Use of Twitter by Doug Ross
Enterprise Use of Twitter by Doug RossThe Circuit
 
Concept- en Definitie Extractie
Concept- en Definitie ExtractieConcept- en Definitie Extractie
Concept- en Definitie ExtractieRinke Hoekstra
 
Experience aware Item Recommendation in Evolving Review Communities
Experience aware Item Recommendation in Evolving Review CommunitiesExperience aware Item Recommendation in Evolving Review Communities
Experience aware Item Recommendation in Evolving Review CommunitiesSubhabrata Mukherjee
 
QBer - Connect your data to the cloud
QBer - Connect your data to the cloudQBer - Connect your data to the cloud
QBer - Connect your data to the cloudRinke Hoekstra
 

Viewers also liked (6)

Summary of SIGIR 2011 Papers
Summary of SIGIR 2011 PapersSummary of SIGIR 2011 Papers
Summary of SIGIR 2011 Papers
 
Enterprise Use of Twitter by Doug Ross
Enterprise Use of Twitter by Doug RossEnterprise Use of Twitter by Doug Ross
Enterprise Use of Twitter by Doug Ross
 
Concept- en Definitie Extractie
Concept- en Definitie ExtractieConcept- en Definitie Extractie
Concept- en Definitie Extractie
 
SIGIR 2011
SIGIR 2011SIGIR 2011
SIGIR 2011
 
Experience aware Item Recommendation in Evolving Review Communities
Experience aware Item Recommendation in Evolving Review CommunitiesExperience aware Item Recommendation in Evolving Review Communities
Experience aware Item Recommendation in Evolving Review Communities
 
QBer - Connect your data to the cloud
QBer - Connect your data to the cloudQBer - Connect your data to the cloud
QBer - Connect your data to the cloud
 

Similar to Querying the Web of Data

State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic WebIvan Herman
 
20100614 ISWSA Keynote
20100614 ISWSA Keynote20100614 ISWSA Keynote
20100614 ISWSA KeynoteAxel Polleres
 
CSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialCSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialLeeFeigenbaum
 
(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web PagesMichael Nelson
 
Ks2009 Semanticweb In Action
Ks2009 Semanticweb In ActionKs2009 Semanticweb In Action
Ks2009 Semanticweb In ActionRinke Hoekstra
 
Visualize open data with Plone - eea.daviz PLOG 2013
Visualize open data with Plone - eea.daviz PLOG 2013Visualize open data with Plone - eea.daviz PLOG 2013
Visualize open data with Plone - eea.daviz PLOG 2013Antonio De Marinis
 
Information Extraction and Linked Data Cloud
Information Extraction and Linked Data CloudInformation Extraction and Linked Data Cloud
Information Extraction and Linked Data CloudDhaval Thakker
 
Semantic Web
Semantic WebSemantic Web
Semantic Webhardchiu
 
SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsRinke Hoekstra
 
Spark Community Update - Spark Summit San Francisco 2015
Spark Community Update - Spark Summit San Francisco 2015Spark Community Update - Spark Summit San Francisco 2015
Spark Community Update - Spark Summit San Francisco 2015Databricks
 
Linked Data and Locah, UKSG2011
Linked Data and Locah, UKSG2011 Linked Data and Locah, UKSG2011
Linked Data and Locah, UKSG2011 Jane Stevenson
 
MuseoTorino, first italian project using a GraphDB, RDFa, Linked Open Data
MuseoTorino, first italian project using a GraphDB, RDFa, Linked Open DataMuseoTorino, first italian project using a GraphDB, RDFa, Linked Open Data
MuseoTorino, first italian project using a GraphDB, RDFa, Linked Open Data21Style
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data TutorialSören Auer
 
Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?Museums Computer Group
 
Sustainable queryable access to Linked Data
Sustainable queryable access to Linked DataSustainable queryable access to Linked Data
Sustainable queryable access to Linked DataRuben Verborgh
 
Getting Started With The Talis Platform
Getting Started With The Talis PlatformGetting Started With The Talis Platform
Getting Started With The Talis PlatformLeigh Dodds
 
The Lonesome LOD Cloud
The Lonesome LOD CloudThe Lonesome LOD Cloud
The Lonesome LOD CloudRuben Verborgh
 
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4jExplicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4jConnected Data World
 
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...Jennifer Bowen
 

Similar to Querying the Web of Data (20)

State of the Semantic Web
State of the Semantic WebState of the Semantic Web
State of the Semantic Web
 
20100614 ISWSA Keynote
20100614 ISWSA Keynote20100614 ISWSA Keynote
20100614 ISWSA Keynote
 
CSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web TutorialCSHALS 2010 W3C Semanic Web Tutorial
CSHALS 2010 W3C Semanic Web Tutorial
 
(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages
 
Ks2009 Semanticweb In Action
Ks2009 Semanticweb In ActionKs2009 Semanticweb In Action
Ks2009 Semanticweb In Action
 
Visualize open data with Plone - eea.daviz PLOG 2013
Visualize open data with Plone - eea.daviz PLOG 2013Visualize open data with Plone - eea.daviz PLOG 2013
Visualize open data with Plone - eea.daviz PLOG 2013
 
Information Extraction and Linked Data Cloud
Information Extraction and Linked Data CloudInformation Extraction and Linked Data Cloud
Information Extraction and Linked Data Cloud
 
Semantic Web
Semantic WebSemantic Web
Semantic Web
 
SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n Bolts
 
Spark Community Update - Spark Summit San Francisco 2015
Spark Community Update - Spark Summit San Francisco 2015Spark Community Update - Spark Summit San Francisco 2015
Spark Community Update - Spark Summit San Francisco 2015
 
Linked Data and Locah, UKSG2011
Linked Data and Locah, UKSG2011 Linked Data and Locah, UKSG2011
Linked Data and Locah, UKSG2011
 
MuseoTorino, first italian project using a GraphDB, RDFa, Linked Open Data
MuseoTorino, first italian project using a GraphDB, RDFa, Linked Open DataMuseoTorino, first italian project using a GraphDB, RDFa, Linked Open Data
MuseoTorino, first italian project using a GraphDB, RDFa, Linked Open Data
 
Linked data and voyager
Linked data and voyagerLinked data and voyager
Linked data and voyager
 
Linked Data Tutorial
Linked Data TutorialLinked Data Tutorial
Linked Data Tutorial
 
Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?Lee Iverson - How does the web connect content?
Lee Iverson - How does the web connect content?
 
Sustainable queryable access to Linked Data
Sustainable queryable access to Linked DataSustainable queryable access to Linked Data
Sustainable queryable access to Linked Data
 
Getting Started With The Talis Platform
Getting Started With The Talis PlatformGetting Started With The Talis Platform
Getting Started With The Talis Platform
 
The Lonesome LOD Cloud
The Lonesome LOD CloudThe Lonesome LOD Cloud
The Lonesome LOD Cloud
 
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4jExplicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
Explicit Semantics in Graph DBs Driving Digital Transformation With Neo4j
 
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...Moving Library Metadata Toward Linked Data:  Opportunities Provided by the eX...
Moving Library Metadata Toward Linked Data: Opportunities Provided by the eX...
 

More from Rinke Hoekstra

Knowledge Representation on the Web
Knowledge Representation on the WebKnowledge Representation on the Web
Knowledge Representation on the WebRinke Hoekstra
 
Managing Metadata for Science and Technology Studies: the RISIS case
Managing Metadata for Science and Technology Studies: the RISIS caseManaging Metadata for Science and Technology Studies: the RISIS case
Managing Metadata for Science and Technology Studies: the RISIS caseRinke Hoekstra
 
An Ecosystem for Linked Humanities Data
An Ecosystem for Linked Humanities DataAn Ecosystem for Linked Humanities Data
An Ecosystem for Linked Humanities DataRinke Hoekstra
 
Jurix 2014 welcome presentation
Jurix 2014 welcome presentationJurix 2014 welcome presentation
Jurix 2014 welcome presentationRinke Hoekstra
 
Provenance and Reuse of Open Data (PILOD 2.0 June 2014)
Provenance and Reuse of Open Data (PILOD 2.0 June 2014)Provenance and Reuse of Open Data (PILOD 2.0 June 2014)
Provenance and Reuse of Open Data (PILOD 2.0 June 2014)Rinke Hoekstra
 
Prov-O-Viz: Interactive Provenance Visualization
Prov-O-Viz: Interactive Provenance VisualizationProv-O-Viz: Interactive Provenance Visualization
Prov-O-Viz: Interactive Provenance VisualizationRinke Hoekstra
 
Linkitup: Link Discovery for Research Data
Linkitup: Link Discovery for Research DataLinkitup: Link Discovery for Research Data
Linkitup: Link Discovery for Research DataRinke Hoekstra
 
A Network Analysis of Dutch Regulations - Using the Metalex Document Server
A Network Analysis of Dutch Regulations - Using the Metalex Document ServerA Network Analysis of Dutch Regulations - Using the Metalex Document Server
A Network Analysis of Dutch Regulations - Using the Metalex Document ServerRinke Hoekstra
 
Linked (Open) Data - But what does it buy me?
Linked (Open) Data - But what does it buy me?Linked (Open) Data - But what does it buy me?
Linked (Open) Data - But what does it buy me?Rinke Hoekstra
 
Linked Science - Building a Web of Research Data
Linked Science - Building a Web of Research DataLinked Science - Building a Web of Research Data
Linked Science - Building a Web of Research DataRinke Hoekstra
 
Semantic Representations for Research
Semantic Representations for ResearchSemantic Representations for Research
Semantic Representations for ResearchRinke Hoekstra
 
A Slightly Different Web of Data
A Slightly Different Web of DataA Slightly Different Web of Data
A Slightly Different Web of DataRinke Hoekstra
 
The Knowledge Reengineering Bottleneck
The Knowledge Reengineering BottleneckThe Knowledge Reengineering Bottleneck
The Knowledge Reengineering BottleneckRinke Hoekstra
 
SIKS 2011 Semantic Web Languages
SIKS 2011 Semantic Web LanguagesSIKS 2011 Semantic Web Languages
SIKS 2011 Semantic Web LanguagesRinke Hoekstra
 
The MetaLex Document Server - Legal Documents as Versioned Linked Data
The MetaLex Document Server - Legal Documents as Versioned Linked DataThe MetaLex Document Server - Legal Documents as Versioned Linked Data
The MetaLex Document Server - Legal Documents as Versioned Linked DataRinke Hoekstra
 
History of Knowledge Representation (SIKS Course 2010)
History of Knowledge Representation (SIKS Course 2010)History of Knowledge Representation (SIKS Course 2010)
History of Knowledge Representation (SIKS Course 2010)Rinke Hoekstra
 
Making Sense of Design Patterns
Making Sense of Design PatternsMaking Sense of Design Patterns
Making Sense of Design PatternsRinke Hoekstra
 
Publicatie van Linked Open Overheids Data
Publicatie van Linked Open Overheids DataPublicatie van Linked Open Overheids Data
Publicatie van Linked Open Overheids DataRinke Hoekstra
 

More from Rinke Hoekstra (20)

Knowledge Representation on the Web
Knowledge Representation on the WebKnowledge Representation on the Web
Knowledge Representation on the Web
 
Managing Metadata for Science and Technology Studies: the RISIS case
Managing Metadata for Science and Technology Studies: the RISIS caseManaging Metadata for Science and Technology Studies: the RISIS case
Managing Metadata for Science and Technology Studies: the RISIS case
 
An Ecosystem for Linked Humanities Data
An Ecosystem for Linked Humanities DataAn Ecosystem for Linked Humanities Data
An Ecosystem for Linked Humanities Data
 
Jurix 2014 welcome presentation
Jurix 2014 welcome presentationJurix 2014 welcome presentation
Jurix 2014 welcome presentation
 
Provenance and Reuse of Open Data (PILOD 2.0 June 2014)
Provenance and Reuse of Open Data (PILOD 2.0 June 2014)Provenance and Reuse of Open Data (PILOD 2.0 June 2014)
Provenance and Reuse of Open Data (PILOD 2.0 June 2014)
 
Prov-O-Viz: Interactive Provenance Visualization
Prov-O-Viz: Interactive Provenance VisualizationProv-O-Viz: Interactive Provenance Visualization
Prov-O-Viz: Interactive Provenance Visualization
 
Linkitup: Link Discovery for Research Data
Linkitup: Link Discovery for Research DataLinkitup: Link Discovery for Research Data
Linkitup: Link Discovery for Research Data
 
A Network Analysis of Dutch Regulations - Using the Metalex Document Server
A Network Analysis of Dutch Regulations - Using the Metalex Document ServerA Network Analysis of Dutch Regulations - Using the Metalex Document Server
A Network Analysis of Dutch Regulations - Using the Metalex Document Server
 
Linked (Open) Data - But what does it buy me?
Linked (Open) Data - But what does it buy me?Linked (Open) Data - But what does it buy me?
Linked (Open) Data - But what does it buy me?
 
Linked Science - Building a Web of Research Data
Linked Science - Building a Web of Research DataLinked Science - Building a Web of Research Data
Linked Science - Building a Web of Research Data
 
COMMIT/VIVO
COMMIT/VIVOCOMMIT/VIVO
COMMIT/VIVO
 
Semantic Representations for Research
Semantic Representations for ResearchSemantic Representations for Research
Semantic Representations for Research
 
A Slightly Different Web of Data
A Slightly Different Web of DataA Slightly Different Web of Data
A Slightly Different Web of Data
 
The Knowledge Reengineering Bottleneck
The Knowledge Reengineering BottleneckThe Knowledge Reengineering Bottleneck
The Knowledge Reengineering Bottleneck
 
Linked Census Data
Linked Census DataLinked Census Data
Linked Census Data
 
SIKS 2011 Semantic Web Languages
SIKS 2011 Semantic Web LanguagesSIKS 2011 Semantic Web Languages
SIKS 2011 Semantic Web Languages
 
The MetaLex Document Server - Legal Documents as Versioned Linked Data
The MetaLex Document Server - Legal Documents as Versioned Linked DataThe MetaLex Document Server - Legal Documents as Versioned Linked Data
The MetaLex Document Server - Legal Documents as Versioned Linked Data
 
History of Knowledge Representation (SIKS Course 2010)
History of Knowledge Representation (SIKS Course 2010)History of Knowledge Representation (SIKS Course 2010)
History of Knowledge Representation (SIKS Course 2010)
 
Making Sense of Design Patterns
Making Sense of Design PatternsMaking Sense of Design Patterns
Making Sense of Design Patterns
 
Publicatie van Linked Open Overheids Data
Publicatie van Linked Open Overheids DataPublicatie van Linked Open Overheids Data
Publicatie van Linked Open Overheids Data
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Querying the Web of Data

  • 1. Querying the Web of DataKennissystemen, December 2010 Rinke Hoekstra
  • 2. Overview Linked (Open) Data The Web of Data Scalability issues Technology RDF Syntaxes RDF Storage and Querying Kennissystemen 2010
  • 3. The Semantic Web Ideology Identity is everything Partial solutions are great too! Layer cake OWL Kennissystemen 2010
  • 4. The Web of Data … does it exist? Kennissystemen 2010
  • 6.
  • 10. Semantic web as data source in its own right
  • 15. Storage (on the web) As documents .rdf, .n3, .turtle, .html RDF triple stores Sesame, Joseki, 4Store, AllegroGraph, OpenLink Virtuoso, SDB/TDB, Open Calais, SWI Prolog Reasoners ‘on top’, or via DIG Pellet, OWLIM, etc. SPARQL Endpoints Results as JSON, XML, CSV etc. Kennissystemen 2010
  • 16. Data and the Web Need to add this ‘meta’ to my ‘data’ ‘Linking’ data across sites Web of Documents and the Web of Data Old fashioned HTML:<link rel='meta' type='application/rdf+xml' href='http://www.leibnizcenter.org/~hoekstra/foaf.rdf' title='FOAF'> URL-based HTTP 303 `see other’http://www.w3.org/TR/swbp-vocab-pub/ RDFa Kennissystemen 2010
  • 21. Integration: 303 See Other Kennissystemen 2010
  • 22. Integration: Inline RDFa Attributes on XHTML elements http://www.w3.org/TR/xhtml-rdfa-primer Kennissystemen 2010
  • 23.
  • 26. So, where’s that data? I repeat: does it really exist? Kennissystemen 2010
  • 27. Linked Open Data Kennissystemen 2010
  • 28. November 2009: 13.1 Billion triples, 142 Million links Kennissystemen 2010
  • 29. September 2010: 25 Miljard triples, 395 Miljoenlinks Kennissystemen 2010
  • 30. Scalability How to deal with massive amounts of data? Consequences for reasoning Billion Triple Challenge (864.8 Million Triples) Consequences for querying Table lookups, joins etc. … and what about … Dealing with change, provenance, trust? Kennissystemen 2010
  • 31. A rough idea… I can crash a DL reasoner using an ontology of ~15 classes and 5 individuals (honestly) What if my ontology contains thousands of classes and billions of individuals? Kennissystemen 2010
  • 32. Reasoning Reasoning with inconsistent knowledge incomplete knowledge Complete vs. incomplete reasoning Kennissystemen 2010
  • 33.
  • 34. Realtime vs. in advance
  • 37. Still problems with scalability
  • 40. ‘SpeedDate’ distrubution of triples across nodes
  • 42. Full closure of BTC in 57 minutes
  • 44. And what to do with the results?Kennissystemen 2010
  • 45. 2 Degrees from Kevin Bacon PREFIX p: http://dbpedia.org/property/ SELECT ?film1 ?actor1 ?film2 ?actor2 WHERE { ?film1 p:starring <http://dbpedia.org/resource/Kevin_Bacon> . ?film1 p:starring ?actor1 . ?film2 p:starring ?actor1 . ?film2 p:starring ?actor2 .} DBPedia: 150M triples Kennissystemen 2010
  • 46.
  • 48. … a couple of hours
  • 49. Simple table lookup (one-variable query)
  • 50. … about 5 minutes
  • 52. … a couple of hours
  • 54. Harddisk access times are the bottleneck (9ms)
  • 55. More targeted reasoning, querying, federation.Kennissystemen 2010
  • 56. SPARQL Querying the linked data cloud Kennissystemen 2010
  • 57.
  • 59.
  • 63. ... but can be about other RDF triples as well.Kennissystemen 2010
  • 64. Languages: RDF(S)/XML <rdf:RDF xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns:rdfs="http://www.w3.org/TR/rdf-schema/" xmlns:owl=“http://www.w3.org/2002/07/owl#” xmlns:uva=“http://www.uva.nl/rdf#” xmlns=“http://www.uva.nl/people”> <rdf:Descriptionrdf:ID=“#radboud”> <rdf:typerdf:resource=“http://www.uva.nl/rdf#AssociateProfessor”/> <uva:name>RadboudWinkels</uva:name> <uva:teachesrdf:resource=“http://www.uva.nl/courses#ks2009”/> </rdf:Description> <uva:Courserdf:about=“http://www.uva.nl/courses#ks2009”/> <rdfs:Classrdf:about=“http://www.uva.nl/rdf#AssociateProfessor”> <rdfs:subClassOfrdf:resource=“http://www.uva.nl/rdf#StaffMember”/> </rdfs:Class> <owl:ObjectPropertyrdf:about=“http://www.uva.nl/rdf#teaches”> <rdfs:domainrdf:resource=“http://www.uva.nl/rdf#Professor”/> <rdfs:rangerdf:resource=“http://www.uva.nl/rdf#Course”/> </owl:ObjectProperty> </rdf:RDF> Kennissystemen 2010
  • 65. Languages: FS Namespace(=<http://www.uva.nl/people#>) Namespace(owl=<http://www.w3.org/2002/07/owl#>) Namespace(uva=<http://www.uva.nl/rdf#>) Namespace(courses=<http://www.uva.nl/courses#>) Declaration(Class(uva:Course)) Declaration(Class(uva:StaffMember)) Declaration(Class(uva:AssociateProfessor)) SubClassOf(uva:AssociateProfessoruva:StaffMember) Declaration(DataProperty(uva:name)) Declaration(ObjectProperty(uva:teaches)) ObjectPropertyDomain(uva:teachesuva:AssociateProfessor) ObjectPropertyRange(uva2:teaches uva:Course) Declaration(Individual(courses:ks2009)) Declaration(Individual(radboud)) ObjectPropertyAssertion(uva:teachesradboud courses:ks2009) DataPropertyAssertion(uva:nameradboud "RadboudWinkels") Kennissystemen 2010
  • 66. Languages: Turtle @prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix rdfs:<http://www.w3.org/TR/rdf-schema/>. @prefix owl:<http://www.w3.org/2002/07/owl#>. @prefix uva:<http://www.uva.nl/rdf#>. @prefix courses:<http://www.uva.nl/courses#>. @prefix :<http://www.uva.nl/people#>. uva:AssociateProfessor a rdfs:Class; rdfs:subClassOfuva:StaffMember. uva:teaches aowl:ObjectProperty; rdfs:domainuva:AssociateProfessor; rdfs:rangeuva:Course. :radboud a uva:AssociateProfessor; uva:name ”RadboudWinkels”^^xsd:string; uva:teachescourses:ks2009. courses:ks2009 a uva:Course. Kennissystemen 2010
  • 67. Turtle Syntax Simple abbreviations :xgeo:name “A’dam” . :xgeo:areacode “020” . :xgeo:name “A’dam” ; geo:areacode “020” . Nesting :nlgeo:capital [ geo:name “A’dam” ] . Blank nodes :nlgeo:capital _:bnode1 . _:bnode1 geo:name “A’dam” . Kennissystemen 2010
  • 68. Querying Originally there were many languages SPARQL, nRQL, SeRQL, etc. SPARQL: SPARQL Query Language for RDF http://www.w3.org/TR/rdf-sparql-query/ Version 1.1 in the making... Kennissystemen 2010
  • 69. Do you know SQL? Formulate a query on the relational model students(name, age, address) Structured Query Language SELECT namedata needed FROM student data source WHERE age > 20 data constraint Kennissystemen 2010
  • 70. SPARQL Query Syntax Inspired by SQL (select-from-where) select: the entities (variables) you want to returnSELECT ?city from: a datasource (RDF graph)FROM <http://example.org/geo.rdf> where: the (sub)graph you want to get information fromWHERE {?city geo:areacode “010”. } Including additional constraints on objects, using operatorsWHERE {?city geo:areacode ?c . FILTER (?c > 010). } PREFIX geo: <http://example.org/geo/> SELECT ?city FROM <http://example.org/geoData.rdf> WHERE { ?city geo:areacode ?c . FILTER (?c > 010) } Kennissystemen 2010
  • 71. SPARQL Graph Patterns WHERE clause specifies graph pattern pattern should be matched pattern can match more than once Graph pattern: an RDF graph with some nodes/edges as variables :EuropeanCountry “020”^^xsd:integer :hasCapital ? rdf:type ? ? Kennissystemen 2010
  • 72. Basis: triple patterns Triples with one/more variables Turtle syntax ?xgeo:hasCapitalgeo:Amsterdam ?xgeo:hasCapital ?y ?xgeo:areacode “020”^^xsd:integer ?x ?p ?y All of them match the graph: “020”^^xsd:integer :Netherlands :Amsterdam geo:areacode geo:hasCapital Kennissystemen 2010
  • 73. Conjunctions: several patterns A pattern with several graphs, all must match equivalent to PREFIX geo: <http://example.org/geo/> SELECT ?x FROM <http://example.org/geoData.rdf> WHERE { {?xgeo:hasCapital ?y } {?ygeo:areacode “020”^^xsd:integer } } PREFIX geo: <http://example.org/geo/> SELECT ?x FROM <http://example.org/geoData.rdf> WHERE { ?xgeo:hasCapital ?y . ?ygeo:areacode “020”^^xsd:integer . } Kennissystemen 2010
  • 74. Conjunctions: several patterns (2) A pattern with several graphs, all must match equivalent to PREFIX geo: <http://example.org/geo/> SELECT ?x FROM <http://example.org/geoData.rdf> WHERE { {?xgeo:hasCapital ?y } {?ygeo:areacode “020”^^xsd:integer } } PREFIX geo: <http://example.org/geo/> SELECT ?x FROM <http://example.org/geoData.rdf> WHERE { ?xgeo:hasCapital [ geo:areacode “020”^^xsd:integer ]. } Kennissystemen 2010
  • 75. Alternatives: UNION A pattern with several graphs At least one should match PREFIX geo: <http://example.org/geo/> SELECT ?city FROM <http://example.org/geoData.rdf> WHERE { { ?city geo:name “Parijs”@nl . } UNION { ?city geo:name “Paris”@fr . } } Kennissystemen 2010
  • 76. Optional Graphs RDF allows for ‘partial’ representations “Give me all people with names, and if known their email address” Use an OPTIONAL graph expression PREFIX geo: <http://example.org/geo/> SELECT ?person ?name ?email WHERE { ?person :name ?name . OPTIONAL { ?person :email ?email } } Kennissystemen 2010
  • 77. Testing values of nodes Tests in FILTER clause have to be validated for matching subgraphs Functions isLiteral(?aNode) isURI(?aNode) str(?aResource) for resources with partially known names for literals with unknown language tag PREFIX geo: <http://example.org/geo/> SELECT ?x ?n WHERE { ?x ?p ?n. FILTER ( str(?p) = “areacode”) } Kennissystemen 2010
  • 78. Testing values of nodes Tests in FILTER clause Comparison (<=, <, =, etc.) Arithmetic operators (+, -, etc.) String matching using regular expressions regex(?x, “netherlands”, “i”) ... matches “The Netherlands” Boolean combination of these && (and), || (or), ! (not) (?y >10 && ?y <30) || !regex(?z, “Rott”) Kennissystemen 2010
  • 79. Boolean comparisons and datatypes RDF has basic datatypes for literals xsd:integer, xsd:float, xsd:string, xsd:dateTime etc. Datatypes can be used in value comparisons ?x < “21”^^xsd:integer ... and be obtained from literals datatype(?aLiteral) Kennissystemen 2010
  • 80. Solution modifiers Sorting using ORDER BY Limiting the number of results: LIMIT PREFIX geo: <http://example.org/geo/> SELECT ?dog ?age WHERE { ?dog a :Dog; ?dog :age ?age .} ORDER BY DESC(?age) PREFIX geo: <http://example.org/geo/> SELECT ?dog ?age WHERE { ?dog a :Dog; ?dog :age ?age .} ORDER BY ?dog LIMIT 10 Kennissystemen 2010
  • 81. SPARQL query types SELECT: table with variable bindings SELECT ... WHERE { ... } CONSTRUCT: returns a graph CONSTRUCT { ... } WHERE { ... } ASK: returns yes/no ASK { ... } DESCRIBE: returns a graph DESCRIBE dbpedia:Amsterdam Kennissystemen 2010
  • 82. SELECT Query Results Solutions consist of variable bindings For each variable in the query, it gives a value (or list) The result is a table, where each column is a variable and each row a combination of variable bindings PREFIX geo: <http://example.org/geo/> SELECT ?x >y ?x WHERE { ?xgeo:contains ?y . OPTIONAL { ?ygeo:areacode ?z }} Kennissystemen 2010
  • 83. CONSTRUCT query results Construct queries return RDF statements The query result is either a subgraph or a transformed graph. PREFIX geo: <http://example.org/geo/> CONSTRUCT {?xgeo:hasCapital ?y . } WHERE { ?xgeo:containsCity ?y . ?ygeo:name “Amsterdam”@nl. } Kennissystemen 2010
  • 84. Recap SPARQL is the query language for the web of data Queries are sent to ‘endpoints’ on the web Queries describe graph patterns with variables Graph patterns match the graphs in the triple store Results are typically returned as a table Kennissystemen 2010