Hostname: page-component-77f85d65b8-5ngxj Total loading time: 0 Render date: 2026-03-30T00:43:26.595Z Has data issue: false hasContentIssue false

Querying Incomplete Data: Complexity and Tractability via Datalog and First-Order Rewritings

Published online by Cambridge University Press:  28 November 2023

AMÉLIE GHEERBRANT
Affiliation:
Université Paris Cité, CNRS, IRIF, F-75013, Paris, France (e-mail: amelie@irif.fr)
LEONID LIBKIN
Affiliation:
School of Informatics, University of Edinburgh, 10 Crichton Street, Edinburgh EH8 9AB, UK RelationalAI, Paris, France (e-mail: l@libk.in)
ALEXANDRA ROGOVA
Affiliation:
Université Paris Cite, CNRS, IRIF, F-75013, Paris, France Data Intelligence Institute of Paris (diiP), Inria, Paris, France (e-mail: rogova@irif.fr)
CRISTINA SIRANGELO
Affiliation:
Université Paris Cite, CNRS, IRIF, F-75013, Paris, France DI ENS, ENS, PSL University, CNRS, Inria, Paris, France (e-mail: cristina@irif.fr)
Rights & Permissions [Opens in a new window]

Abstract

To answer database queries over incomplete data, the gold standard is finding certain answers: those that are true regardless of how incomplete data is interpreted. Such answers can be found efficiently for conjunctive queries and their unions, even in the presence of constraints. With negation added, the problem becomes intractable however. We concentrate on the complexity of certain answers under constraints and on effficiently answering queries outside the usual classes of (unions) of conjunctive queries by means of rewriting as Datalog and first-order queries. We first notice that there are three different ways in which query answering can be cast as a decision problem. We complete the existing picture and provide precise complexity bounds on all versions of the decision problem, for certain and best answers. We then study a well-behaved class of queries that extends unions of conjunctive queries with a mild form of negation. We show that for them, certain answers can be expressed in Datalog with negation, even in the presence of functional dependencies, thus making them tractable in data complexity. We show that in general, Datalog cannot be replaced by first-order logic, but without constraints such a rewriting can be done in first order.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2023. Published by Cambridge University Press
Figure 0

Fig. 1. Summary of data complexity results for ${\mathsf{FO}}$ queries.1Abiteboul et al. (1991); 2Libkin (2018).