Multiset semantics in SPARQL, Relational Algebra and Datalog
Databases
2026-05-04 v1 Logic in Computer Science
Abstract
The paper analyzes and characterizes the algebraic and logical structure of the multiset semantics for SPARQL patterns involving AND, UNION, FILTER, EXCEPT, and SELECT. To do this, we align SPARQL with two well-established query languages: Datalog and Relational Algebra. Specifically, we study (i) a version of non-recursive Datalog with safe negation extended to support multisets, and (ii) a multiset relational algebra comprising projection, selection, natural join, arithmetic union, and except. We prove that these three formalisms are expressively equivalent under multiset semantics.
Cite
@article{arxiv.2605.00417,
title = {Multiset semantics in SPARQL, Relational Algebra and Datalog},
author = {Renzo Angles and Claudio Gutierrez and Daniel Hernández},
journal= {arXiv preprint arXiv:2605.00417},
year = {2026}
}
Comments
59 pages. Author's preprint; published in Semantic Web (SAGE), 2026, doi:10.1177/22104968261439426