Sparql Examples.

Slides:



Advertisements
Similar presentations
Dr. Bhavani Thuraisingham February 18, 2011 Building Trustworthy Semantic Webs RDF and RDF Security.
Advertisements

SPARQL : Simple Protocol and RDF Query Language 第一版整理人 : 簡學群 Date : 2014 / 12.
Using JavaScript in Linked Data Applications Oshani Seneviratne Oct 12, 2010.
Ontology Engineering Lab #8 October 21, Review - Trial Query Exercises  What are the bones of the foot? (not sure this can be done in a single.
ESDSWG2011 – Semantic Web session Semantic Web Sub-group Session ESDSWG 2011 Meeting – Semantic Web sub-group session Wednesday, November 2, 2011 Norfolk,
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
SPARQL RDF Query.
Chapter 3 Querying RDF stores with SPARQL. TL;DR We will want to query large RDF datasets, e.g. LOD SPARQL is the SQL of RDF SPARQL is a language to query.
5/17/20151 FOAF. 5/17/20152 Introduction Metadata is data about data The terms refer to data used to identify, describe, or locate information resources.
CSCI 572 Project Presentation Mohsen Taheriyan Semantic Search on FOAF profiles.
Using PHP in Linked Data Applications Jie Bao Oct 12.
Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.
Semantic Web Bootcamp Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
Logics for Data and Knowledge Representation SPARQL Protocol and RDF Query Language (SPARQL) Feroz Farazi.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Publishing data on the Web (with.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
Introduction to SPARQL. Acknowledgements This presentation is based on the W3C Candidate Recommendation “SPARQL Query Language for RDF” from
Entity Recognition via Querying DBpedia ElShaimaa Ali.
1 Bibliothèque nationale de France use case Pauline Chougnet ISNI AGM October 2014.

SPARQL Semantic Web - Spring 2008 Computer Engineering Department Sharif University of Technology.
Chapter 3 Querying RDF stores with SPARQL. Why an RDF Query Language? Why not use an XML query language? XML at a lower level of abstraction than RDF.
SPARQL W3C Simple Protocol And RDF Query Language
SPARQL AN RDF Query Language. SPARQL SPARQL is a recursive acronym for SPARQL Protocol And Rdf Query Language SPARQL is the SQL for RDF Example: PREFIX.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
Logics for Data and Knowledge Representation SPARQL -- Exercises Feroz Farazi.
1 SPARQL A. Emrah Sanön. 2 RDF RDF is quite committed to Semantic Web. Data model Serialization by means of XML Formal semantics Still something is missing!
Semantic Web Basics Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
The Semantic Web Matt Klubertanz. What is it? “The Semantic Web is an extension of the current web in which information is given well- defined meaning,
05/01/2016 SPARQL SPARQL Protocol and RDF Query Language S. Garlatti.
Chapter 3 Querying RDF stores with SPARQL
Alexandra Cristea 1.  pronounced "sparkle“  recursive acronym for: ◦ SPARQL Protocol and RDF Query Language  a semantic query language  a query language.
Graph and RDF Databases Context : Course of Advanced Databases Prepared by : Nassim BAHRI Nabila HOSNI February 19th, 2015.
Lecture 8: RDF& SPARQL Dr. Taysir Hassan A. Soliman December 13, 2015 INF411 Information Engineering Information Systems Dept. Faculty of Computers & Information.
Semantic Web in Depth SPARQL Protocol and RDF Query Language Dr Nicholas Gibbins –
Power to the people! Introducing Open Linked Data services to the national legal database of the Library of the National Congress of Chile.
A Semantic Data Federation Engine: Design, Implementation, and Applications in Educational Information Management Mathew Cherian 02/04/2011.
SPARQLing SERVICES Leigh Dodds Engineering Manager, Ingenta XTech, May 2006.
More on SPARQL.
Vincenzo Maltese, Fausto Giunchiglia University of Trento
SPARQL.
OpenRIF and VIVO Mike Conlon, PhD
Introduction to SPARQL
Resource Description Framework
Laurea Magistrale in Scienze di Internet
CWM Closed World Machine
SPARQL SPARQL Protocol and RDF Query Language
A Little SPARQL in your Analytics Dr. Neil Brittliff
SPARQL: A query language for RDF
Jan Pettersen Nytun, UiA
SPARQL + RDF Based on: Prof. Benny Kimelfled’s lecture notes
SPARQL Exercise Much of this exercise has been copied from: INF3580/INF4580 – MANDATORY EXERCISE 3
Jena Sparql (for Mac) 9/22/2018.
Bus Routes.
DBpedia – A Crystallization Point for the Web of Data
Logics for Data and Knowledge Representation
Hong Sun, AGFA Healthcare
Population Structures
How can DDI make the most of RDF?
Cellar: semantic DB of EU Law and Publications. Query demo
SPARQL Exercise Most of this exercise has been copied from: INF3580/INF4580 – MANDATORY EXERCISE 3
CHEAR (Child Health Environmental Assessment Resource) Ontology
Example: Jena and Fuseki
RDFa: Embedding RDF Knowledge in HTML
CWM Closed World Machine
Logics for Data and Knowledge Representation
Triple Stores.
Linked Data 101 Things, URIs, RDF, Triples, Turtle, Ontologies, Vocabularies and SPARQL Linked Data is our Implementation choice for FAIR.
wikiKnows a Qustion Answering System based on Wikipedia Knowledge
Introduction to the OntoLex-Lemon Model
Presentation transcript:

Sparql Examples

Q1: Querying Berners-Lee’s FOAF data Redland Rasqal RDF Query Demonstration http://librdf.org/2005/sparqling Data: http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf Query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name WHERE { ?person foaf:name ?name . }

Q2: Querying Berners-Lee’s FOAF data Redland Rasqal RDF Query Demonstration http://librdf.org/2005/sparqling Data: http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf Query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT * WHERE { ?person foaf:name ?name . ?person foaf:mbox ?email . }

Q3: Querying Berners-Lee’s FOAF data Redland Rasqal RDF Query Demonstration http://librdf.org/2005/sparqling Data: http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf Query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX card: <http://www.w3.org/People/Berners-Lee/card#> SELECT ?homepage WHERE { card:i foaf:knows ?known . ?known foaf:homepage ?homepage . }

Q4: DBPedia http://dbpedia.org/snorql/ Prefix: PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX : <http://dbpedia.org/resource/> PREFIX dbpedia2: <http://dbpedia.org/property/> PREFIX dbpedia: <http://dbpedia.org/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

Q4: People who were born in Berlin before 1900 Query: SELECT ?name ?birth ?death ?person WHERE { ?person dbo:birthPlace :Berlin . ?person dbo:birthDate ?birth . ?person foaf:name ?name . ?person dbo:deathDate ?death . FILTER (?birth < "1900-01-01"^^xsd:date) . } ORDER BY ?name

Q5: German musicians with German and English descriptions Query: SELECT ?name ?description_en ?description_de ?musician WHERE {?musician foaf:name ?name . OPTIONAL { ?musician rdfs:comment ?description_en . FILTER (LANG(?description_en) = 'en') . } OPTIONAL { ?musician rdfs:comment ?description_de . FILTER (LANG(?description_de) = 'de') . } }

Q6: German musicians who were born in Berlin Query: SELECT ?name ?birth ?description ?person WHERE { ?person a dbo:MusicalArtist . ?person dbo:birthPlace :Berlin . ?person dbo:birthDate ?birth . ?person foaf:name ?name . ?person rdfs:comment ?description . FILTER (LANG(?description) = 'en') . } ORDER BY ?name

Q7: Soccer players who are born in a country with more than 10 million inhabitants, who played as goalkeeper for a club that has a stadium with more than 30,000 seats and the club country is different from the birth country Query: SELECT distinct ?soccerplayer ?countryOfBirth ?team ?countryOfTeam ?stadiumcapacity { ?soccerplayer a dbo:SoccerPlayer ; dbo:position|dbp:position <http://dbpedia.org/resource/Goalkeeper_(association_football)> ; dbo:birthPlace/dbo:country* ?countryOfBirth ; #dbo:number 13 ; dbo:team ?team . ?team dbo:capacity ?stadiumcapacity ; dbo:ground ?countryOfTeam . ?countryOfBirth a dbo:Country ; dbo:populationTotal ?population . ?countryOfTeam a dbo:Country . FILTER (?countryOfTeam != ?countryOfBirth) FILTER (?stadiumcapacity > 30000) FILTER (?population > 10000000) } order by ?soccerplayer

Q8: Is Amazon river longer than Nile Sparql Endpoint: http://dbpedia.org/sparql Data: http://dbpedia.org Query: PREFIX prop: <http://dbpedia.org/property/> ASK { <http://dbpedia.org/resource/Amazon_River> prop:length ?amazon . <http://dbpedia.org/resource/Nile> prop:length ?nile . FILTER(?amazon > ?nile) . }