# The Multiset Semantics of SPARQL Patterns

@inproceedings{Angles2016TheMS, title={The Multiset Semantics of SPARQL Patterns}, author={Renzo Angles and Claudio Guti{\'e}rrez}, booktitle={SEMWEB}, year={2016} }

The paper determines the algebraic and logic structure of the multiset semantics of the core patterns of SPARQL. We prove that the fragment formed by AND, UNION, OPTIONAL, FILTER, MINUS and SELECT corresponds precisely to both, the intuitive multiset relational algebra (projection, selection, natural join, arithmetic union and except), and the multiset non-recursive Datalog with safe negation.

## 28 Citations

### The Problem of Correlation and Substitution in SPARQL - Extended Version

- Computer ScienceArXiv
- 2018

This paper presents a formal framework to study why different implementations of SPARQL behave differently when evaluating queries with correlated variables based on Datalog, and shows that at the core of this problem lies the historically troubling notion of logical substitution.

### Soundness and Completeness of SPARQL Query Containment Solver SpeCS

- Computer ScienceArXiv
- 2022

It is proved that the procedure used for reducing the query containment problem into a formal logical framework is both sound and complete for conjunctive queries, and also for some important cases of non-conjunctive queries containing operator union, operator optional, and subqueries.

### Datalog: Bag Semantics via Set Semantics

- Computer ScienceICDT
- 2019

This work presents a translation of Datalog under bag semantics into a well-behaved extension ofDatalog (the so-called warded Datalogs+-) under set semantics, which allows to handle the bag semantics of Dinalog by powerful, existing query engines for the required extension of Daloog.

### 1 Derivation-Tree Bag ( DTB ) Semantics for Datalog and Datalog

- Computer Science
- 2019

This work presents a translation of Datalog under bag semantics into a well-behaved extension ofDatalog, the so-called warded Datalogs±, under set semantics, to give a set semantics to duplicates in Datalogy± itself.

### Semantics and canonicalisation of SPARQL 1.1

- Computer ScienceSemantic Web
- 2022

A canonicalisation procedure based on mapping a SPARQL query to an RDF graph, applying algebraic rewritings, removing redundancy, and then using canonical labelling techniques to produce a canonical form that is sound but incomplete in the case of the full SParQL 1.1 query language.

### Querying knowledge graphs with extended property paths

- Computer ScienceSemantic Web
- 2019

It is shown that SPARQL with EPPs is expressive enough to capture the main RDFS reasoning functionalities and how a query can be rewritten into another query enhanced with reasoning capabilities, and it is proved that the language of EPP is more expressive than that of PPs.

### Efficiently Pinpointing SPARQL Query Containments

- Computer ScienceICWE
- 2018

This work presents an approach for solving the query containment problem for SPARQL queries – the W3C standard query language for RDF datasets and decides whether a sub graph isomorphism exists between the normalized algebra expressions of two queries.

### Canonicalisation of Monotone SPARQL Queries

- Computer ScienceSEMWEB
- 2018

This paper proposes an algorithm that performs syntactic canonicalisation of SPARQL queries such that the answers for the canonicalised query will not change versus the original, and shows the algorithm to be practical for real-world queries taken from SParQL endpoint logs, and demonstrates that it detects more equivalent queries than when compared with purely syntactic methods.

### The Bag Semantics of Ontology-Based Data Access

- Computer ScienceIJCAI
- 2017

This work proposes a bag semantics for OBDA, where duplicate tuples in the views defined by the mappings are retained, as is the case in standard databases, and shows that bag semantics makes conjunctive query answering in OBDA CONP-hard in data complexity.

### The Bag Semantics of Ontology-Based Data

- Computer Science
- 2017

This work proposes a bag semantics for OBDA, where duplicate tuples in the views defined by the mappings are retained, as is the case in standard databases, and shows that bag semantics makes conjunctive query answering in OBDA CONP-hard in data complexity.

## References

SHOWING 1-10 OF 31 REFERENCES

### The Expressive Power of SPARQL

- Computer ScienceSEMWEB
- 2008

The main result is that SPARQL and non-recursive safe Datalog with negation have equivalent expressive power, and hence, by classical results, SParQL is equivalent from an expressiveness point of view to Relational Algebra.

### Negation in SPARQL

- Computer ScienceAMW
- 2016

A core SParQL algebra is identified which could be used instead of the W3C SPARQL algebra and the negation operators are analyzed in terms of their compliance with elementary axioms of set theory.

### On Expressibility of Non-Monotone Operators in SPARQL

- Computer ScienceKR
- 2016

This work addresses the problem of expressibility of the full ternary OPTIONAL via the simplified binary version and shows that it is possible, but only with an exponential blowup in the size of the query (under common complexity-theoretic assumptions).

### Semantics and complexity of SPARQL

- Computer ScienceTODS
- 2009

This article identifies a large class of SPARQL patterns, defined by imposing a simple and natural syntactic restriction, where the query evaluation problem can be solved more efficiently and shows that the evaluation problem is coNP-complete for well-designed patterns.

### A SPARQL Semantics Based on Datalog

- Computer ScienceKI
- 2007

This paper proposes a formal semantics for SPARQL based on datalog and proposes two useful extensions to SParQL, namely binding of variables to results of filter expressions and views on RDF graphs as datasets for queries.

### Semantics and Expressive Power of Subqueries and Aggregates in SPARQL 1.1

- Computer ScienceWWW
- 2016

An in-depth formal analysis of the semantics and expressive power of these new constructs as defined in the SPARQL 1.1 specification are provided, and hence lay the necessary foundations for the development of robust, scalable and extensible query engines supporting complex numerical and analytics tasks.

### Foundations of SPARQL query optimization

- Computer ScienceICDT '10
- 2010

While studied in the context of a theoretically motivated set semantics, almost all results carry over to the official, bag-based semantics and therefore are of immediate practical relevance.

### Algebraic Properties of Bag Data Types

- Computer ScienceVLDB
- 1991

Previous work is extended to provide a formal basis for query optimization and for defining the appropriate semantics for bag operations in data models supporting ba.gs.

### On the Semantics of SPARQL

- Computer ScienceSemantic Web Information Management
- 2009

This chapter gives a detailed description of the semantics of this language, a query language called SPARQL, including all the features in the specification by the W3C such as blank nodes in graph patterns and bag semantics for solutions.

### An extended relational algebra with control over duplicate elimination

- Mathematics, Computer SciencePODS
- 1982

This paper extends the relational model to include multiset relations, i.e., relations with duplicate tuples, and demonstrates that the extended algebra and DAPLEX have essentially the same expressiveness relative to conjunctive expressions.