Sesam4 project presentation sparql - april 2011
-
Upload
sesam4able -
Category
Technology
-
view
784 -
download
0
description
Transcript of Sesam4 project presentation sparql - april 2011
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
NFR Verdikt Project no 2342453 Semantic Technology
SPARQLSPARQL Protocol And RDF Query Language
Robert Engels
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
from local to globalInformation management in the digital age
From Locally isolated ... ... to Globally interconnected
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
But What CAN you get out of this?
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
What is SPARQL? Query Language for interlinked graphs
represented using RDF/OWL annotations
SPARQL 1.0: W3C recommendation 2008
SPARQL 1.1: nearly a recommendation
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
Why SPARQL? allows for querying RDF/OWL data & models
allows to define globally unambiguous queries
allows for distributed querying of datasets
query results can be merged automatically
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
What can you do with SPARQL? various result types
DESCRIBE, SELECT, ASK & CONSTRUCT
create result sets using known operators a union of two sets (UNION) a set representing the reverse of a statement (NOT) ….
algoritmic operators like count, avg, & sum specific to SPARQL 1.1
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
SPARQL - “DESCRIBE”
Suppose The only thing you have is an Uri like this And no idea what is known about it....
http://data.esis.no/resource/projectID_111667
Simply send a SPARQL “DESCRIBE” to a sparql endpoint
DESCRIBE <http://data.esis.no/resource/projectID_111667>
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
“DESCRIBE” This node for me:
Result of SPARQL - “DESCRIBE”
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
Result of SPARQL - “DESCRIBE”
1
1
1
1
1
2
2
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
SPARQL - “SElect”
... or you know what to look for and want to select specific resources.
Send a sparql “select” to a sparql endpoint
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX dct: <http://purl.org/dc/terms/>PREFIX nfr: <http://data.esis.no/resource/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?projectID ?projectName WHERE { ?projectID a foaf:Project ;
dct:title ?projectName ; nfr:orgnrResponsibleOrg <https://ws.brreg.no/lod/enhet/962392687> .
}
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
SPARQL - “SELECT”
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
RESULT SPARQL - “SELECT”
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
SPARQL - “CONSTRUCT”
REPLACE NEW
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX dct: <http://purl.org/dc/terms/>PREFIX nfr: <http://data.esis.no/resource/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX funder: <http://research.data.gov.uk/def/project/>
CONSTRUCT { ?projectID funder:title ?title }
WHERE { ?projectID a foaf:Project; dct:title ?title ; nfr:orgnrResponsibleOrg <https://ws.brreg.no/lod/enhet/962392687> . }
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
SPARQL - “ASK”
TRUE or FALSE?
PREFIX nfr: <http://data.esis.no/resource/>ASK { ?projectID nfr:orgnrResponsibleOrg <https://ws.brreg.no/lod/enhet/962392687> }
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
Try it yourself!
http://data.esis.no:2020/query.html
http://opendata.computas.no:7001/joseki/
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
Further reading
SPARQL 1.0 - W3C recommendation 2008 http://www.w3.org/TR/rdf-sparql-query/
SPARQL 1.1 – W3C SPARQL working group Wiki http://www.w3.org/2009/sparql/wiki/Main_Page
Extensive tutorials by HP and Talis (and many others...) http://openjena.org/ARQ/Tutorial/index.html
http://www.slideshare.net/ldodds/sparql-tutorial
Technology PrimerSESAM4 2011
SESAM4 Consortium 2009 – 2011Published under Creative Commons license
www.sesam4.net