Speaker: Daniel Vila-Suero The SPARQL Query Language Raúl García-Castro, Óscar Corcho, Daniel Vila-Suero Ontology Engineering Group Universidad.

Slides:



Advertisements
Similar presentations
SPARQL Query Language for RDF
Advertisements

Ontology languages Oscar Corcho
XML Data Management 8. XQuery Werner Nutt. Requirements for an XML Query Language David Maier, W3C XML Query Requirements: Closedness: output must be.
Querying on the Web: XQuery, RDQL, SparQL Semantic Web - Spring 2006 Computer Engineering Department Sharif University of Technology.
CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
XML: Extensible Markup Language
XML May 3 rd, XQuery Based on Quilt (which is based on XML-QL) Check out the W3C web site for the latest. XML Query data model –Ordered !
Method for developing the benchmark suites. October 10th © Raúl García-Castro Method for developing the benchmark suites Raúl García-Castro October.
RDF Schemata (with apologies to the W3C, the plural is not ‘schemas’) CSCI 7818 – Web Technologies 14 November 2001 Van Lepthien.
The Semantic Web – WEEK 4: RDF
SPARQL- A QUERY LANGUAGE FOR RDF( S ) Fred Freitas - CIn/UFPE - Brazil.
An Introduction to RDF(S) and a Quick Tour of OWL
XML, XML Schema, Xpath and XQuery Slides collated from various sources, many from Dan Suciu at Univ. of Washington.
1 RDF Tutorial. C. Abela RDF Tutorial2 What is RDF? RDF stands for Resource Description Framework It is used for describing resources on the web Makes.
Peer-to-Peer Networking for Distributed Learning Repositories: The Edutella Network Diplomarbeit von Boris Wolf.
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,
RDF Tutorial.
Semantic Web Introduction
© Copyright IBM Corporation 2014 Getting started with Rational Engineering Lifecycle Manager queries Andy Lapping – Technical sales and solutions Joanne.
 Copyright 2010 Digital Enterprise Research Institute. All rights reserved. Digital Enterprise Research Institute Transforming between RDF.
Jena Sparql 4/11/2017.
Information Systems & Semantic Web University of Koblenz ▪ Landau, Germany Semantic Web - Query Languages – Steffen Staab
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
SPARQL RDF Query.
SPARQL Nikhil Rajguru. W3C Standards SPARQL Query Language for RDF SPARQL 1.1 Update SPARQL 1.1 Protocol SPARQL 1.1 Graph Store HTTP Protocol SPARQL.
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.
SPARQL for Querying PML Data Jitin Arora. Overview SPARQL: Query Language for RDF Graphs W3C Recommendation since 15 January 2008 Outline: Basic Concepts.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.
Chapter 3A Semantic Web Primer 1 Chapter 3 Querying the Semantic Web Grigoris Antoniou Paul Groth Frank van Harmelen Rinke Hoekstra.
Logics for Data and Knowledge Representation SPARQL Protocol and RDF Query Language (SPARQL) Feroz Farazi.
More on SPARQL. Acknowledgements This presentation is based on the W3C Candidate Recommendation “SPARQL Query Language for RDF” (
1 Ontology Query and Reasoning Payam Barnaghi Institute for Communication Systems (ICS) Faculty of Engineering and Physical Sciences University of Surrey.
RDF (Resource Description Framework) Why?. XML XML is a metalanguage that allows users to define markup XML separates content and structure from formatting.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
Practical RDF Chapter 1. RDF: An Introduction
Introduction to SPARQL. Acknowledgements This presentation is based on the W3C Candidate Recommendation “SPARQL Query Language for RDF” from
SPARQL Semantic Web - Spring 2008 Computer Engineering Department Sharif University of Technology.
The Semantic Web Web Science Systems Development Spring 2015.
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
Ontology Query. What is an Ontology Ontologies resemble faceted taxonomies but use richer semantic relationships among terms and attributes, as well as.
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:
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!
Practical RDF Chapter 10. Querying RDF: RDF as Data Shelley Powers, O’Reilly SNU IDB Lab. Hyewon Lim.
Practical RDF Ch.10 Querying RDF: RDF as Data Taewhi Lee SNU OOPSLA Lab. Shelley Powers, O’Reilly August 27, 2004.
05/01/2016 SPARQL SPARQL Protocol and RDF Query Language S. Garlatti.
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
Chapter 3 Querying RDF stores with SPARQL
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 8: SPARQL (1.1) Aidan Hogan
An Effective SPARQL Support over Relational Database Jing Lu, Feng Cao, Li Ma, Yong Yu, Yue Pan SWDB-ODBIS 2007 SNU IDB Lab. Hyewon Lim July 30 th, 2009.
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 7: SPARQL (1.0) Aidan Hogan
CSE 6331 © Leonidas Fegaras XQuery 1 XQuery Leonidas Fegaras.
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 –
Linked Data & Semantic Web Technology The Semantic Web Part 4. Resource Description Framework (1) Dr. Myungjin Lee.
SPARQL Query Andy Seaborne. Apache Jena he.org/jena ● Open source - Apache License ● Apache Incubator (accepted November 2010) ●
Vincenzo Maltese, Fausto Giunchiglia University of Trento
CC La Web de Datos Primavera 2017 Lecture 7: SPARQL [i]
CC La Web de Datos Primavera 2016 Lecture 8: SPARQL (1.1)
CC La Web de Datos Primavera 2017 Lecture 8: SPARQL [ii]
Introduction to SPARQL
SPARQL SPARQL Protocol and RDF Query Language
Logics for Data and Knowledge Representation
CC La Web de Datos Primavera 2016 Lecture 7: SPARQL (1.0)
CC La Web de Datos Primavera 2018 Lecture 8: SPARQL [1.1]
XQuery Leonidas Fegaras.
Logics for Data and Knowledge Representation
Presentation transcript:

Speaker: Daniel Vila-Suero The SPARQL Query Language Raúl García-Castro, Óscar Corcho, Daniel Vila-Suero Ontology Engineering Group Universidad Politécnica de Madrid, Spain

© Raúl García Castro et al. Index Introduction Syntax Graph patterns Restricting values and solutions SPARQL query forms SPARQL 1.1 2

© Raúl García Castro et al. RDF(S) query languages Languages developed to allow accessing datasets expressed in RDF(S) (and in some cases OWL) Supported by the most important language APIs -Jena (HP labs) -Sesame (Aduna) -Boca (IBM) -... There are some differences wrt. languages like SQL, such as -Combination of different sources -Trust management -Open World Assumption Relational DB Application SQL queries RDF(S) OWL Application SPARQL, RQL, etc., queries 3

© Raúl García Castro et al. Query types Selection and extraction -“Select all the essays, together with their authors and their authors’ names” -“Select everything that is related to the book ‘Bellum Civille’” Reduction: we specify what it should not be returned -“Select everything except for the ontological information and the book translators” Restructuring: the original structure is changed in the final result -“Invert the relationship ‘author’ by ‘is author of’” Aggregation -“Return all the essays together with the mean number of authors per essay” Combination and inferences -“Combine the information of a book called ‘La guerra civil’ and whose author is Julius Caesar with the book whose identifier is ‘Bellum Civille’” -“Select all the essays, together with its authors and author names”, including also the instances of the subclasses of Essay -“Obtain the relationship ‘coauthor’ among persons who have written the same book” 4

© Raúl García Castro et al. RDF(S) query language families SquishQL Family -SquishQL -rdfDB Query Language -RDQL -BRQL -TriQL XPath, XSLT, XQuery -XQuery for RDF -XsRQL -TreeHugger and RDFTwig -RDFT, Nexus Query Language -RDFPath, Rpath and RXPath -Versa RQL Family -RQL -SeRQL -eRQL Controlled natural language -Metalog Other -Algae -iTQL -N3QL -PerlRDF Query Language -RDEVICE Deductive Language -RDFQBE -RDFQL -TRIPLE -WQL SPARQL W3C Recommendation 15 January 2008 Triple database Query structure Description graphs Query semantics XML repository Query syntax 5

© Raúl García Castro et al. SPARQL SPARQL Protocol and RDF Query Language Supported by: Jena, Sesame, IBM Boca, etc. Features -It supports most of the aforementioned queries -It supports datatype reasoning (datatypes can be requested instead of actual values) -The domain vocabulary and the knowledge representation vocabulary are treated differently by the query interpreters -It allows making queries over properties with multiple values, over multiple properties of a resource and over reifications -Queries can contain optional statements -Some implementations support aggregation queries Limitations -Neither set operations nor existential or universal quantifiers can be included in the queries -It does not support recursive queries 6

© Raúl García Castro et al. SPARQL Protocol SPARQL defines a communication protocol between clients and services Provides: -Abstract interface -HTTP and SOAP bindings Mainly intended for software developers 7 SPARQL Client SPARQL Service Request Result

© Raúl García Castro et al. SparqlQuery Interface Query request -One SPARQL query string -Zero or one RDF datasets Query result -SELECT and ASK: a SPARQL Results Document (XML-based) -DESCRIBE and CONSTRUCT: an RDF graph Fault messages: -malformed-query -query-request-refused 8 SPARQL Client SPARQL Service query-request query-result

© Raúl García Castro et al. SPARQL Endpoints Implement the SPARQL protocol Programmatic access using libraries: -ARC, RAP, Jena, Sesame, Javascript SPARQL, PySPARQL, etc. List of SPARQL Endpoints - Examples: 9

© Raúl García Castro et al. Example: Querying dbpedia People who were born in Berlin before

© Raúl García Castro et al. Example: Querying dbpedia 11

© Raúl García Castro et al. A simple SPARQL :. :book1 dc:title "SPARQL Tutorial". title "SPARQL Tutorial" SELECT ?title WHERE { ?title. } Data: Query: Query result: Graph pattern (or triple pattern): RDF triples where each of the subject, predicate and object may be a variable A graph pattern is matched against the RDF data Each way a pattern can be matched yields a solution The sequence of solutions is filtered by: Project, distinct, order, limit/offset One of the result forms is applied: SELECT, CONSTRUCT, DESCRIBE, ASK 12

© Raúl García Castro et al. RDF querying. Graph matching techniques RDF inference is based on graph matching techniques Basically, the RDF inference process consists of the following steps: -Transform an RDF query into a template graph that has to be matched against the RDF graph It contains constant and variable nodes, and constant and variable edges between nodes -Match against the RDF graph, taking into account constant nodes and edges -Provide a solution for variable nodes and edges 13

© Raúl García Castro et al. RDF querying. Examples (I) Sample RDF graph Query: “Tell me who are the persons who have Raúl as a colleague” -Result: data:Asun 14 person:hasColleague data:Raul data:Asun person:hasHomePage person:hasColleague data:Oscar “Óscar Corcho García” person:hasName person:hasColleague data:Raul ? ?

© Raúl García Castro et al. RDF querying. Examples (II) Query: “Tell me which are the relationships between Oscar and Asun” -Result: person:hasColleague Query: “Tell me the homepage of Oscar colleagues” -Result: “ 15 data:Asun ? data:Oscar person:hasHomePage ? ? person:hasColleague data:Oscar

© Raúl García Castro et al. Index Introduction Syntax Graph patterns Restricting values and solutions SPARQL query forms SPARQL

© Raúl García Castro et al. Syntax for IRIs and query variables Absolute IRIs Relative IRIs (BASE) Prefixed names (PREFIX) Variables (? or $) 17 BASE PREFIX book: book:book1 PREFIX : :book1 ?name $name

© Raúl García Castro et al. Syntax for literals Literals enclosed in quotes: "... " or '...' Literals with quotation marks: """... """ or '''... ''' Language tag Datatype (optional): ^^ Interpretation of untyped literals -Integer, Decimal, Double, and Boolean 18 LiteralInterpretation 1"1"^^xsd:integer 1.3"1.3"^^xsd:decimal 1.300"1.300"^^xsd:decimal 1.0e6"1.0e6"^^xsd:double true"true"^^xsd:boolean false"false"^^xsd:boolean

© Raúl García Castro et al. Syntax for blank nodes Label form ("_:abc”) -Cannot be used in two different basic graph patterns Abbreviated form "[]” -Used only once in the graph pattern 19 [ :p "v" ]. [] :p "v". _:b57 :p "v". [ :p "v" ] :q "w". _:b57 :p "v". _:b57 :q "w". :x :q [ :p "v" ]. :x :q _:b57. _:b57 :p "v".

© Raúl García Castro et al. Syntax for triple patterns Predicate-Object lists (";") Object lists (",") 20 ?x foaf:name ?name ; foaf:mbox ?mbox. ?x foaf:name ?name. ?x foaf:mbox ?mbox. ?x foaf:nick "Alice", "Alice_". ?x foaf:nick "Alice". ?x foaf:nick "Alice_".

© Raúl García Castro et al. RDF collections and rdf:type Collection: "(element1 element2...)" rdf:nil: "()" rdf:type: "a" 21 (1 ?x 3 4) :p "w". _:b0 rdf:first 1 ; rdf:rest _:b1. _:b1 rdf:first ?x ; rdf:rest _:b2. _:b2 rdf:first 3 ; rdf:rest _:b3. _:b3 rdf:first 4 ; rdf:rest rdf:nil. _:b0 :p "w". ?x a :Class1. ?x rdf:type :Class1.

© Raúl García Castro et al. Index Introduction Syntax Graph patterns Restricting values and solutions SPARQL query forms SPARQL

© Raúl García Castro et al. Graph patterns Basic Graph Patterns, where a set of triple patterns must match Group Graph Pattern, where a set of graph patterns must all match Optional Graph patterns, where additional patterns may extend the solution Alternative Graph Pattern, where two or more possible patterns are tried Patterns on Named Graphs, where patterns are matched against named graphs 23

© Raúl García Castro et foaf:. _:a foaf:name "Johnny Lee Outlaw". _:a foaf:mbox. _:b foaf:name "Peter Goodguy". _:b foaf:mbox. _:c foaf:mbox. PREFIX foaf: SELECT ?name ?mbox WHERE { ?x foaf:name ?name. ?x foaf:mbox ?mbox } namembox "Johnny Lee Outlaw" "Peter Goodguy" Multiple matches 24

© Raúl García Castro et xsd:. :x ns:p :y ns:p "42"^^xsd:integer. :z ns:p "abc"^^dt:specialDatatype. SELECT ?v WHERE { ?v ?p "cat" } v SELECT ?v WHERE { ?v ?p } v SELECT ?v WHERE { ?v ?p 42 } v SELECT ?v WHERE { ?v ?p "abc"^^ } v Matching RDF literals 25

© Raúl García Castro et al. Creating Values with Expressions (1.1) foaf:. _:a foaf:givenName "John". _:a foaf:surname "Doe". PREFIX foaf: SELECT ( CONCAT(?G, " ", ?S) AS ?name ) WHERE { ?P foaf:givenName ?G ; foaf:surname ?S } name ”John Doe" PREFIX foaf: SELECT ?name WHERE { ?P foaf:givenName ?G ; foaf:surname ?S BIND(CONCAT(?G, " ", ?S) AS ?name) }

© Raúl García Castro et al. Group graph pattern PREFIX foaf: SELECT ?name ?mbox WHERE { { ?x foaf:name ?name. } { ?x foaf:mbox ?mbox. } } SELECT ?x WHERE {} PREFIX foaf: SELECT ?name ?mbox WHERE { { ?x foaf:name ?name. } { ?x foaf:mbox ?mbox. FILTER regex(?name, "Smith")} } 27

© Raúl García Castro et al. Optional graph rdf:. _:a rdf:type foaf:Person. _:a foaf:name "Alice". _:a foaf:mbox. _:b rdf:type foaf:Person. _:b foaf:name "Bob". PREFIX foaf: SELECT ?name ?mbox WHERE { ?x foaf:name ?name. OPTIONAL { ?x foaf:mbox ?mbox } } namembox "Alice" "Alice" “Bob" 28

© Raúl García Castro et al. Multiple optional graph foaf:. _:a foaf:name "Alice". _:a foaf:homepage. _:b foaf:name "Bob". _:b foaf:mbox. PREFIX foaf: SELECT ?name ?mbox ?hpage WHERE { ?x foaf:name ?name. OPTIONAL { ?x foaf:mbox ?mbox }. OPTIONAL { ?x foaf:homepage ?hpage } } namemboxhpage "Alice" “Bob" 29

© Raúl García Castro et al. Alternative graph dc11:. _:a dc10:title "SPARQL Query Language Tutorial". _:a dc10:creator "Alice". _:b dc11:title "SPARQL Protocol Tutorial". _:b dc11:creator "Bob". _:c dc10:title "SPARQL". _:c dc11:title "SPARQL (updated)". PREFIX dc10: PREFIX dc11: SELECT ?title WHERE { { ?book dc10:title ?title } UNION { ?book dc11:title ?title } } title "SPARQL Protocol Tutorial" "SPARQL" "SPARQL (updated)" "SPARQL Query Language Tutorial" SELECT ?x ?y WHERE { { ?book dc10:title ?x } UNION { ?book dc11:title ?y } } SELECT ?title ?author WHERE { { ?book dc10:title ?title. ?book dc10:creator ?author } UNION { ?book dc11:title ?title. ?book dc11:creator ?author }} xy "SPARQL (updated)" "SPARQL Protocol Tutorial" "SPARQL" "SPARQL Query Language Tutorial" authortitle "Alice""SPARQL Protocol Tutorial" “Bob”"SPARQL Query Language Tutorial" 30

© Raúl García Castro et al. Patterns on named graphs # Named graph: rdfs:. _:a foaf:name "Alice". _:a foaf:mbox. _:a foaf:knows _:b. _:b foaf:name "Bob". _:b foaf:mbox. _:b foaf:nick "Bobby". _:b rdfs:seeAlso. rdf:type foaf:PersonalProfileDocument. # Named graph: rdfs:. _:z foaf:mbox. _:z rdfs:seeAlso. _:z foaf:nick "Robert". rdf:type foaf:PersonalProfileDocument. 31

© Raúl García Castro et al. Patterns on named graphs II PREFIX foaf: PREFIX data: SELECT ?nick FROM NAMED WHERE { GRAPH data:bobFoaf { ?x foaf:mbox. ?x foaf:nick ?nick } } nick "Robert" PREFIX foaf: SELECT ?src ?bobNick FROM NAMED WHERE { GRAPH ?src { ?x foaf:mbox. ?x foaf:nick ?bobNick } srcbobNick "Bobby" "Robert" 32

© Raúl García Castro et al. Index Introduction Syntax Graph patterns Restricting values and solutions SPARQL query forms SPARQL

© Raúl García Castro et al. Restricting ns:. :book1 dc:title "SPARQL Tutorial". :book1 ns:price 42. :book2 dc:title "The Semantic Web". :book2 ns:price 23. PREFIX dc: SELECT ?title WHERE { ?x dc:title ?title FILTER regex(?title, "^SPARQL") } title "SPARQL Tutorial" PREFIX dc: SELECT ?title WHERE { ?x dc:title ?title FILTER regex(?title, "web", "i" ) } title "The Semantic Web" PREFIX dc: PREFIX ns: SELECT ?title ?price WHERE { ?x ns:price ?price. FILTER (?price < 30.5) ?x dc:title ?title. } titleprice "The Semantic Web"23 34

© Raúl García Castro et al. Value tests Based on XQuery 1.0 and XPath 2.0 Function and Operators XSD boolean, string, integer, decimal, float, double, dateTime Notation, =, = and != for value comparison Apply to any type BOUND, isURI, isBLANK, isLITERAL REGEX, LANG, DATATYPE, STR (lexical form) Function call for casting and extensions functions 35

© Raúl García Castro et al. Solution sequences and modifiers Order modifier: put the solutions in order Projection modifier: choose certain variables Distinct modifier: ensure solutions in the sequence are unique Reduced modifier: permit elimination of some non-unique solutions Limit modifier: restrict the number of solutions Offset modifier: control where the solutions start from in the overall sequence of solutions SELECT ?name WHERE { ?x foaf:name ?name ; :empId ?emp } ORDER BY ?name DESC(?emp) SELECT ?name WHERE { ?x foaf:name ?name } SELECT DISTINCT ?name WHERE { ?x foaf:name ?name } SELECT REDUCED ?name WHERE { ?x foaf:name ?name } SELECT ?name WHERE { ?x foaf:name ?name } ORDER BY ?name LIMIT 5 OFFSET 10 SELECT ?name WHERE { ?x foaf:name ?name } LIMIT 20 36

© Raúl García Castro et al. Index Introduction Syntax Graph patterns Restricting values and solutions SPARQL query forms SPARQL

© Raúl García Castro et al. SPARQL query forms SELECT -Returns all, or a subset of, the variables bound in a query pattern match CONSTRUCT -Returns an RDF graph constructed by substituting variables in a set of triple templates ASK -Returns a boolean indicating whether a query pattern matches or not DESCRIBE -Returns an RDF graph that describes the resources found 38

© Raúl García Castro et al. SPARQL query forms: foaf:. _:a foaf:name "Alice". _:a foaf:knows _:b. _:a foaf:knows _:c. _:b foaf:name "Bob". _:c foaf:name "Clare". _:c foaf:nick "CT". PREFIX foaf: SELECT ?nameX ?nameY ?nickY WHERE { ?x foaf:knows ?y ; foaf:name ?nameX. ?y foaf:name ?nameY. OPTIONAL { ?y foaf:nick ?nickY } } nameXnameYnickY "Alice""Bob" "Alice""Clare""CT" 39

© Raúl García Castro et foaf:. _:a foaf:name "Alice". _:a foaf:mbox. PREFIX foaf: PREFIX vcard: CONSTRUCT { vcard:FN ?name } WHERE { ?x foaf:name ?name vcard:. vcard:FN "Alice". Query result: SPARQL query forms: CONSTRUCT 40

© Raúl García Castro et al. SPARQL query forms: foaf:. _:a foaf:name "Alice". _:a foaf:homepage. _:b foaf:name "Bob". _:b foaf:mbox. PREFIX foaf: ASK { ?x foaf:name "Alice" } yes Query result: 41

© Raúl García Castro et al. PREFIX ent: DESCRIBE ?x WHERE { ?x ent:employeeId "1234" owl: _:a exOrg:employeeId "1234" ; foaf:mbox_sha1sum "ABCD1234" ; vcard:N [ vcard:Family "Smith" ; vcard:Given "John" ]. foaf:mbox_sha1sum rdf:type owl:InverseFunctionalProperty. Query result: SPARQL query forms: DESCRIBE 42

© Raúl García Castro et al. Index Introduction Syntax Graph patterns Restricting values and solutions SPARQL query forms SPARQL

© Raúl García Castro et al. SPARQL 1.1 New features in Query language: -Aggregate functions: COUNT, SUM, MIN, MAX, AVG, GROUP_CONCAT, and SAMPLE. -Subqueries: Nest the results of a query within another query -Negation: Check the absence of triples in a graph -Expressions in SELECT: Introduce new variables in the SELECT clause -Property paths: Search graphs through structures that involve arbitrary-length paths -Assignment: BIND keyword and expressions in SELECT and GROUP_BY -Short form for CONSTRUCT -Expanded functions and operators: EXISTS, NOT EXISTS, SUBSTR, etc. 44

© Raúl García Castro et al. Other SPARQL 1.1 specifications Update -Language extension to express updates to an RDF graph/store Protocol -Changes related to the update operation Service description -Discover a SPARQL endpoint's capabilities and summary information of its data Graph Store HTTP Protocol -Update and fetch RDF graph content from a Graph Store over HTTP in the REST style Entailment Regimes -Define the semantics of SPARQL queries for some entailment frameworks: OWL flavors, RDFS, RIF Federation Extensions -Take a query and provide solutions based on information from many different sources Query Result JSON, CSV, TSV 45

© Raúl García Castro et al. Main References W3C SPARQL Working Group Prud’hommeaux E, Seaborne A (2008) SPARQL Query Language for RDF. W3C Recommendation 15 January Clark K G, Feigenbaum L, Torres E (2008) SPARQL Protocol for RDF. W3C Recommendation 15 January Harris S, Seaborne A (2013) SPARQL 1.1 Query Language. W3C Recommendation 21 March SPARQL validator: SPARQL implementations: SPARQL Endpoints SPARQL in Dbpedia 46

Speaker: Daniel Vila-Suero Thank you for your attention!