SPARQL: introduction Semantic Web and Linked Data Module 3 Lesson 1 Dr. Idafen Santana Pérez [email protected] Ontology Engineering Group

Querying over RDF. The Basics Application

Application

SQL queries

SPARQL queries RDF(S) OWL

Relational database

SPARQL

2

Querying over RDF. The Basics Application

Application

SQL queries

SPARQL queries RDF(S) OWL

Relational database

• Supported by the most relevant APIs and triple stores – Jena, Sesame, etc. – Virtuoso, Stardog, 4store, Fuseki, etc.

SPARQL

3

Querying over RDF. Examples (I) • Sample RDF graph person:hasColleague

person:hasColleague data:Asun

data:Oscar

person:hasHomePage

person:hasName “Óscar Corcho García”

data:Raul

http://www.oeg-upm .net/

• Query: “Tell me the persons that have Raúl as a colleague”

– Result: data:Asun

SPARQL

4

Querying over RDF. Examples (I) • Sample RDF graph person:hasColleague

person:hasColleague data:Asun

data:Oscar

person:hasHomePage

person:hasName “Óscar Corcho García”

data:Raul

http://www.oeg-upm .net/

• Query: “Tell me the persons that have Raúl as a colleague” person:hasColleague ?

data:Raul

– Result: data:Asun

SPARQL

5

Querying over RDF. Examples • Sample RDF graph person:hasColleague

person:hasColleague data:Asun

data:Oscar

person:hasHomePage

person:hasName “Óscar Corcho García”

data:Raul

http://www.oeg-upm .net/

• Query: “Tell me which relationships exist between Oscar and Asun” ?

data:Oscar

– Result: person:hasColleague

SPARQL

6

data:Asun

Querying over RDF. Examples • Sample RDF graph person:hasColleague

person:hasColleague data:Asun

data:Oscar

person:hasHomePage

person:hasName “Óscar Corcho García”

data:Raul

http://www.oeg-upm .net/

• Query: “Tell me the Web page of Oscar’s colleagues” data:Oscar

person:hasColleague person:hasHomePage

– Result: “http://www.oeg-upm.net/” SPARQL

7

?

Querying over RDF. SPARQL examples

• Find names and websites of PlanetRDF collaborators: PREFIX foaf: SELECT ?name ?website FROM WHERE { ?person foaf:weblog ?website . ?person foaf:name ?name . ?website a foaf:Document }

SPARQL

8

Querying over RDF. SPARQL examples

• Find names and websites of PlanetRDF collaborators: PREFIX foaf: SELECT ?name ?website FROM WHERE { ?person foaf:weblog ?website . ?person foaf:name ?name . ?website a foaf:Document }

SPARQL

9

Querying over RDF. SPARQL examples

• Find names and websites of PlanetRDF collaborators: PREFIX foaf: SELECT ?name ?website FROM WHERE { ?person foaf:weblog ?website . ?person foaf:name ?name . ?website a foaf:Document }

SPARQL

10

Querying over RDF. SPARQL examples

• Find names and websites of PlanetRDF collaborators: PREFIX foaf: SELECT ?name ?website FROM WHERE { ?person foaf:weblog ?website . ?person foaf:name ?name . ?website a foaf:Document }

SPARQL

11

Querying over RDF. SPARQL examples

• Find names and websites of PlanetRDF collaborators: PREFIX foaf: SELECT ?name ?website FROM WHERE { ?person foaf:weblog ?website . ?person foaf:name ?name . ?website a foaf:Document }

SPARQL

12

Querying over RDF. SPARQL examples

• Find names and websites of PlanetRDF collaborators: PREFIX foaf: SELECT ?name ?website FROM WHERE { ?person foaf:weblog ?website . ?person foaf:name ?name . ?website a foaf:Document }

SPARQL

13

SPARQL is also a protocol • SPARQL is also a protocol

http://.../qps?query-lang=http://www.w3.org/TR/rdfsparql-query/ &graphid=http://planetrdf.com/bloggers.rdf&query=PREFIXfoaf :
• This comprises – – – –

SPARQL

Services evaluating SPARQL queries over an RDF dataset (a set of graphs) + a transport protocol to invoke the services + service description using Web services + several output formats

14

SPARQL endpoints • SPARQL protocol service – Implements the SPARQL Protocol for RDF (SPROT) specification

• Some SPARQL endpoint listings – http://esw.w3.org/topic/SparqlEndpoints – http://sparqles.okfn.org/

SPARQL

15

SPARQL endpoints • SPARQL protocol service – Implements the SPARQL Protocol for RDF (SPROT) specification

• Some SPARQL endpoint listings – http://esw.w3.org/topic/SparqlEndpoints – http://sparqles.okfn.org/

• Examples: Project

Endpoint

DBpedia

http://dbpedia.org/sparql

AragoDBpedia

http://opendata.aragon.es/sparql

Biblioteca Nacional

http://datos.bne.es/sparql

Bathing Water Quality UK

http://environment.data.gov.uk/lab/sparql.html

European Data Portal

http://www.europeandataportal.eu/sparql

SPARQL

16

SPARQL: introduction Idafen Santana Pérez Acknowledgements: Oscar Corcho and Raúl García

Querying over RDF. SPARQL examples (II) • ¿Which bullfighters have been married to “copla” singers? PREFIX dcterms: SELECT ?torero ?cantante WHERE{ ?torero rdf:type dbpedia-owl:BullFighter . ?torero dbpedia-owl:spouse ?cantante . ?cantante dcterms:subject }

http://es.dbpedia.org/sparql?default-graphuri=&query=PREFIX+dcterms:+%3Chttp://purl.org/dc/terms/%3ESELECT+?torero+?cantante+WHERE%7 B++?torero+rdf:type+dbpedia-owl:BullFighter+.++?torero+dbpediaowl:spouse+?cantante+.++?cantante+dcterms:subject+%3Chttp://es.dbpedia.org/resource/Categor%C3% ADa:Cantantes_de_coplas%3E%7D&should-sponge=&format=text/html&timeout=0&debug=on

SPARQL

18

SPARQL, introduction Francisco Javier Cervigon Ruckauer.pdf ...

There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. SPARQL ...

2MB Sizes 2 Downloads 226 Views

Recommend Documents

RDF(S) introduction Francisco Javier Cervigon Ruckauer.pdf ...
RDF. Database XML RDF(S). Schema. Data. Whoops! There was a problem loading this page. RDF(S) introduction Francisco Javier Cervigon Ruckauer.pdf.

Scoop.it Francisco Javier Cervigon Ruckauer.pdf
Scoop.it Francisco Javier Cervigon Ruckauer.pdf. Scoop.it Francisco Javier Cervigon Ruckauer.pdf. Open. Extract. Open with. Sign In. Main menu.

Open Source Business Intelligence Francisco Javier Cervigon ...
Open Source Business Intelligence Francisco Javier Cervigon Ruckauer.pdf. Open Source Business Intelligence Francisco Javier Cervigon Ruckauer.pdf. Open.

Pinterest Francisco Javier Cervigon Ruckauer.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Pinterest ...

Additional information GEARS Francisco Javier Cervigon Ruckauer ...
Additional information GEARS Francisco Javier Cervigon Ruckauer.pdf. Additional information GEARS Francisco Javier Cervigon Ruckauer.pdf. Open. Extract.

Exploiting Linked Data Francisco Javier Cervigon Ruckauer.pdf ...
Exploiting Linked Data Francisco Javier Cervigon Ruckauer.pdf. Exploiting Linked Data Francisco Javier Cervigon Ruckauer.pdf. Open. Extract. Open with.

Vocabularies, Dublin Core Francisco Javier Cervigon Ruckauer.pdf ...
Vocabularies, Dublin Core Francisco Javier Cervigon Ruckauer.pdf. Vocabularies, Dublin Core Francisco Javier Cervigon Ruckauer.pdf. Open. Extract.

SVM. Support Vector Machines. Francisco Javier Cervigon ...
Page 4 of 8. SVM. Support Vector Machines. Francisco Javier Cervigon Ruckauer.pdf. SVM. Support Vector Machines. Francisco Javier Cervigon Ruckauer.pdf.

Vagueness and the Sorites Paradox Francisco Javier Cervigon ...
Vagueness and the Sorites Paradox Francisco Javier Cervigon Ruckauer.pdf. Vagueness and the Sorites Paradox Francisco Javier Cervigon Ruckauer.pdf.

Extensión del Gameplay Francisco Javier Cervigon Ruckauer.pdf ...
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

Link Building Strategy III Francisco Javier Cervigon Ruckauer.pdf ...
Link Building Strategy III Francisco Javier Cervigon Ruckauer.pdf. Link Building Strategy III Francisco Javier Cervigon Ruckauer.pdf. Open. Extract. Open with.

Cifosis y lordosis Francisco Javier Cervigon Ruckauer.pdf ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Cifosis y ...

Linking with Open Refine Francisco Javier Cervigon Ruckauer.pdf ...
Linking with Open Refine Francisco Javier Cervigon Ruckauer.pdf. Linking with Open Refine Francisco Javier Cervigon Ruckauer.pdf. Open. Extract. Open with.

Factoría de Información Corporativa Francisco Javier Cervigon ...
Factoría de Información Corporativa Francisco Javier Cervigon Ruckauer.pdf. Factoría de Información Corporativa Francisco Javier Cervigon Ruckauer.pdf.

10.1 Shortcode 'Tuitea' esto Francisco Javier Cervigon Ruckauer.pdf ...
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

The energy crisis Francisco Javier Cervigon Ruckauer.pdf ...
The energy crisis Francisco Javier Cervigon Ruckauer.pdf. The energy crisis Francisco Javier Cervigon Ruckauer.pdf. Open. Extract. Open with. Sign In.

Sistemas de Social BI Francisco Javier Cervigon Ruckauer.pdf ...
Sistemas de Social BI Francisco Javier Cervigon Ruckauer.pdf. Sistemas de Social BI Francisco Javier Cervigon Ruckauer.pdf. Open. Extract. Open with. Sign In.

Formulas for dimensionning of gears Francisco Javier Cervigon ...
Formulas for dimensionning of gears Francisco Javier Cervigon Ruckauer.pdf. Formulas for dimensionning of gears Francisco Javier Cervigon Ruckauer.pdf.

Sistemas de Big Data. Definición. Francisco Javier Cervigon ...
Sistemas de Big Data. Definición. Francisco Javier Cervigon Ruckauer.pdf. Sistemas de Big Data. Definición. Francisco Javier Cervigon Ruckauer.pdf. Open.

CV Francisco Javier Ferrero Muñoz.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. CV Francisco Javier Fe

Francisco Javier Gil Martín Jesús Vega Encabo ...
valuable insights in this regard in Putnam's recent book Ethics without ..... more interested in Dewey's recovery of the Aristotelian idea that “the judge of the good.