Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article
Open access

Consistent Query Answering for Primary Keys on Rooted Tree Queries

Published: 14 May 2024 Publication History

Abstract

We study the data complexity of consistent query answering (CQA) on databases that may violate the primary key constraints. A repair is a maximal subset of the database satisfying the primary key constraints. For a Boolean query q, the problem fCERTAINTY(q) takes a database as input, and asks whether or not each repair satisfies q. The computational complexity of fCERTAINTY(q) has been established whenever q is a self-join-free Boolean conjunctive query, or a (not necessarily self-join-free) Boolean path query. In this paper, we take one more step towards a general classification for all Boolean conjunctive queries by considering the class of rooted tree queries. In particular, we show that for every rooted tree query q, fCERTAINTY(q) is in FO, NL-hard ∩ LPFL, or coNP-complete, and it is decidable (in polynomial time), given q, which of the three cases applies. We also extend our classification to larger classes of queries with simple primary keys. Our classification criteria rely on query homomorphisms and our polynomial-time fixpoint algorithm is based on a novel use of context-free grammar (CFG).

References

[1]
Marcelo Arenas, Pablo Barceló, and Mikaë l Monet. 2021. The Complexity of Counting Problems Over Incomplete Databases. ACM Trans. Comput. Log., Vol. 22, 4 (2021), 21:1--21:52.
[2]
Marcelo Arenas, Leopoldo E. Bertossi, and Jan Chomicki. 1999. Consistent Query Answers in Inconsistent Databases. In PODS. ACM Press, 68--79.
[3]
Pablo Barceló and Gaë lle Fontaine. 2015. On the Data Complexity of Consistent Query Answering over Graph Databases. In ICDT (LIPIcs, Vol. 31). Schloss Dagstuhl - Leibniz-Zentrum fü r Informatik, 380--397.
[4]
Pablo Barceló and Gaë lle Fontaine. 2017. On the data complexity of consistent query answering over graph databases. J. Comput. Syst. Sci., Vol. 88 (2017), 164--194.
[5]
Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. 2017. Answering Conjunctive Queries under Updates. In PODS. ACM, 303--318.
[6]
Leopoldo E. Bertossi. 2019. Database Repairs and Consistent Query Answering: Origins and Further Developments. In PODS. ACM, 48--58.
[7]
Andrei A. Bulatov. 2011. Complexity of conservative constraint satisfaction problems. ACM Trans. Comput. Log., Vol. 12, 4 (2011), 24:1--24:66.
[8]
Marco Calautti, Marco Console, and Andreas Pieris. 2019. Counting Database Repairs under Primary Keys Revisited. In PODS. ACM, 104--118.
[9]
Marco Calautti, Marco Console, and Andreas Pieris. 2021. Benchmarking Approximate Consistent Query Answering. In PODS. ACM, 233--246.
[10]
Marco Calautti, Leonid Libkin, and Andreas Pieris. 2018. An Operational Approach to Consistent Query Answering. In PODS. ACM, 239--251.
[11]
Marco Calautti, Ester Livshits, Andreas Pieris, and Markus Schneider. 2022a. Counting Database Repairs Entailing a Query: The Case of Functional Dependencies. In PODS. ACM, 403--412.
[12]
Marco Calautti, Ester Livshits, Andreas Pieris, and Markus Schneider. 2022b. Uniform Operational Consistent Query Answering. In PODS. ACM, 393--402.
[13]
Jan Chomicki and Jerzy Marcinkowski. 2005. Minimal-change integrity maintenance using tuple deletions. Inf. Comput., Vol. 197, 1--2 (2005), 90--121. https://doi.org/10.1016/j.ic.2004.04.007
[14]
Jan Chomicki, Jerzy Marcinkowski, and Slawomir Staworko. 2004. Hippo: A System for Computing Consistent Answers to a Class of SQL Queries. In EDBT (Lecture Notes in Computer Science, Vol. 2992). Springer, 841--844.
[15]
Akhil A. Dixit and Phokion G. Kolaitis. 2019. A SAT-Based System for Consistent Query Answering. In SAT (Lecture Notes in Computer Science, Vol. 11628). Springer, 117--135.
[16]
Akhil A. Dixit and Phokion G. Kolaitis. 2021. CAvSAT: Answering Aggregation Queries over Inconsistent Databases via SAT Solving. In SIGMOD Conference. ACM, 2701--2705.
[17]
Zhiwei Fan, Paraschos Koutris, Xiating Ouyang, and Jef Wijsen. 2023. LinCQA: Faster Consistent Query Answering with Linear Time Guarantees. Proc. ACM Manag. Data, Vol. 1, 1 (2023), 38:1--38:25.
[18]
Diego Figueira, Anantha Padmanabha, Luc Segoufin, and Cristina Sirangelo. 2023. A Simple Algorithm for Consistent Query Answering Under Primary Keys. In ICDT (LIPIcs, Vol. 255). Schloss Dagstuhl - Leibniz-Zentrum fü r Informatik, 24:1--24:18.
[19]
Gaë lle Fontaine. 2015. Why Is It Hard to Obtain a Dichotomy for Consistent Query Answering? ACM Trans. Comput. Log., Vol. 16, 1 (2015), 7:1--7:24.
[20]
Cibele Freire, Wolfgang Gatterbauer, Neil Immerman, and Alexandra Meliou. 2015. The Complexity of Resilience and Responsibility for Self-Join-Free Conjunctive Queries. Proc. VLDB Endow., Vol. 9, 3 (2015), 180--191.
[21]
Cibele Freire, Wolfgang Gatterbauer, Neil Immerman, and Alexandra Meliou. 2020. New Results for the Complexity of Resilience for Binary Conjunctive Queries with Self-Joins. In PODS. ACM, 271--284.
[22]
Ariel Fuxman and René e J. Miller. 2007. First-order query rewriting for inconsistent databases. J. Comput. Syst. Sci., Vol. 73, 4 (2007), 610--635.
[23]
Gianluigi Greco, Sergio Greco, and Ester Zumpano. 2003. A Logical Framework for Querying and Repairing Inconsistent Databases. IEEE Trans. Knowl. Data Eng., Vol. 15, 6 (2003), 1389--1408.
[24]
Miika Hannula and Jef Wijsen. 2022. A Dichotomy in Consistent Query Answering for Primary Keys and Unary Foreign Keys. In PODS. ACM, 437--449.
[25]
Lara A Kahale, Assem M Khamis, Batoul Diab, Yaping Chang, Luciane Cruz Lopes, Arnav Agarwal, Ling Li, Reem A Mustafa, Serge Koujanian, Reem Waziry, et al. 2020. Meta-Analyses Proved Inconsistent in How Missing Data Were Handled Across Their Included Primary Trials: A Methodological Survey. Clinical Epidemiology, Vol. 12 (2020), 527--535.
[26]
Yannis Katsis, Alin Deutsch, Yannis Papakonstantinou, and Vasilis Vassalos. 2010. Inconsistency resolution in online databases. In ICDE. IEEE Computer Society, 1205--1208.
[27]
Aziz Amezian El Khalfioui, Jonathan Joertz, Dorian Labeeuw, Gaë tan Staquet, and Jef Wijsen. 2020. Optimization of Answer Set Programs for Consistent Query Answering by Means of First-Order Rewriting. In CIKM. ACM, 25--34.
[28]
Aziz Amezian El Khalfioui and Jef Wijsen. 2023. Consistent Query Answering for Primary Keys and Conjunctive Queries with Counting. In ICDT (LIPIcs, Vol. 255). Schloss Dagstuhl - Leibniz-Zentrum fü r Informatik, 23:1--23:19.
[29]
Benny Kimelfeld, Ester Livshits, and Liat Peterfreund. 2020. Counting and enumerating preferred database repairs. Theor. Comput. Sci., Vol. 837 (2020), 115--157.
[30]
Phokion G. Kolaitis and Enela Pema. 2012. A dichotomy in the complexity of consistent query answering for queries with two atoms. Inf. Process. Lett., Vol. 112, 3 (2012), 77--85.
[31]
Phokion G. Kolaitis, Enela Pema, and Wang-Chiew Tan. 2013. Efficient Querying of Inconsistent Databases with Binary Integer Programming. Proc. VLDB Endow., Vol. 6, 6 (2013), 397--408.
[32]
Paraschos Koutris, Xiating Ouyang, and Jef Wijsen. 2021. Consistent Query Answering for Primary Keys on Path Queries. In PODS. ACM, 215--232.
[33]
Paraschos Koutris, Xiating Ouyang, and Jef Wijsen. 2023. Consistent Query Answering for Primary Keys on Rooted Tree Queries. CoRR, Vol. abs/2310.19642 (2023). https://doi.org/10.48550/ARXIV.2310.19642 showeprint[arXiv]2310.19642
[34]
Paraschos Koutris and Dan Suciu. 2014. A Dichotomy on the Complexity of Consistent Query Answering for Atoms with Simple Keys. In ICDT. OpenProceedings.org, 165--176.
[35]
Paraschos Koutris and Jef Wijsen. 2015. The Data Complexity of Consistent Query Answering for Self-Join-Free Conjunctive Queries Under Primary Key Constraints. In PODS. ACM, 17--29.
[36]
Paraschos Koutris and Jef Wijsen. 2017. Consistent Query Answering for Self-Join-Free Conjunctive Queries Under Primary Key Constraints. ACM Trans. Database Syst., Vol. 42, 2 (2017), 9:1--9:45.
[37]
Paraschos Koutris and Jef Wijsen. 2018. Consistent Query Answering for Primary Keys and Conjunctive Queries with Negated Atoms. In PODS. ACM, 209--224.
[38]
Paraschos Koutris and Jef Wijsen. 2019. Consistent Query Answering for Primary Keys in Logspace. In ICDT (LIPIcs, Vol. 127). Schloss Dagstuhl - Leibniz-Zentrum fü r Informatik, 23:1--23:19.
[39]
Paraschos Koutris and Jef Wijsen. 2020. First-Order Rewritability in Consistent Query Answering with Respect to Multiple Keys. In PODS. ACM, 113--129.
[40]
Paraschos Koutris and Jef Wijsen. 2021. Consistent Query Answering for Primary Keys in Datalog. Theory Comput. Syst., Vol. 65, 1 (2021), 122--178.
[41]
Leonid Libkin. 2004. Elements of Finite Model Theory. Springer.
[42]
Andrei Lopatenko and Leopoldo E. Bertossi. 2007. Complexity of Consistent Query Answering in Databases Under Cardinality-Based and Incremental Repair Semantics. In ICDT, Vol. 4353. Springer, 179--193.
[43]
Carsten Lutz and Frank Wolter. 2015. On the Relationship between Consistent Query Answering and Constraint Satisfaction Problems. In ICDT (LIPIcs, Vol. 31). Schloss Dagstuhl - Leibniz-Zentrum fü r Informatik, 363--379.
[44]
Marco Manna, Francesco Ricca, and Giorgio Terracina. 2015. Taming primary key violations to query large inconsistent data via ASP. Theory Pract. Log. Program., Vol. 15, 4--5 (2015), 696--710.
[45]
Mó nica Caniupá n Marileo and Leopoldo E. Bertossi. 2010. The consistency extractor system: Answer set programs for consistent query answering in databases. Data Knowl. Eng., Vol. 69, 6 (2010), 545--572.
[46]
Dany Maslowski and Jef Wijsen. 2013. A dichotomy in the complexity of counting database repairs. J. Comput. Syst. Sci., Vol. 79, 6 (2013), 958--983.
[47]
Dany Maslowski and Jef Wijsen. 2014. Counting Database Repairs that Satisfy Conjunctive Queries with Self-Joins. In ICDT. OpenProceedings.org, 155--164.
[48]
Anantha Padmanabha, Luc Segoufin, and Cristina Sirangelo. 2023. A dichotomy in the complexity of consistent query answering for two atom queries with self-join. CoRR, Vol. abs/2309.12059 (2023). https://doi.org/10.48550/ARXIV.2309.12059 showeprint[arXiv]2309.12059
[49]
M. Andrea Rodr'i guez, Leopoldo E. Bertossi, and Mó nica Caniupá n Marileo. 2013. Consistent query answering under spatial semantic constraints. Inf. Syst., Vol. 38, 2 (2013), 244--263.
[50]
Slawek Staworko, Jan Chomicki, and Jerzy Marcinkowski. 2012. Prioritized repairing and consistent query answering in relational databases. Ann. Math. Artif. Intell., Vol. 64, 2--3 (2012), 209--246.
[51]
Balder ten Cate, Gaë lle Fontaine, and Phokion G. Kolaitis. 2012. On the data complexity of consistent query answering. In 15th International Conference on Database Theory, ICDT '12, Berlin, Germany, March 26--29, 2012, Alin Deutsch (Ed.). ACM, 22--33. https://doi.org/10.1145/2274576.2274580
[52]
Jef Wijsen. 2005. Database repairing using updates. ACM Trans. Database Syst., Vol. 30, 3 (2005), 722--768.
[53]
Jef Wijsen. 2010. On the first-order expressibility of computing certain answers to conjunctive queries over uncertain databases. In PODS. ACM, 179--190.
[54]
Jef Wijsen. 2019a. Corrigendum to "Counting Database Repairs that Satisfy Conjunctive Queries with Self-Joins". CoRR, Vol. abs/1903.12469 (2019).
[55]
Jef Wijsen. 2019b. Foundations of Query Answering on Inconsistent Databases. SIGMOD Rec., Vol. 48, 3 (2019), 6--16.
[56]
Dmitriy Zhuk. 2020. A Proof of the CSP Dichotomy Conjecture. J. ACM, Vol. 67, 5 (2020), 30:1--30:78. https://doi.org/10.1145/3402029

Cited By

View all
  • (2024)Computing Range Consistent Answers to Aggregation Queries via RewritingProceedings of the ACM on Management of Data10.1145/36958362:5(1-19)Online publication date: 7-Nov-2024

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Management of Data
Proceedings of the ACM on Management of Data  Volume 2, Issue 2
PODS
May 2024
852 pages
EISSN:2836-6573
DOI:10.1145/3665155
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 May 2024
Published in PACMMOD Volume 2, Issue 2

Author Tags

  1. complexity classification
  2. consistent query answering
  3. context-free gramma
  4. homomorphism

Qualifiers

  • Research-article

Funding Sources

  • Anthony C. Klug NCR Fellowshi
  • National Science Foundation

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)122
  • Downloads (Last 6 weeks)21
Reflects downloads up to 12 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Computing Range Consistent Answers to Aggregation Queries via RewritingProceedings of the ACM on Management of Data10.1145/36958362:5(1-19)Online publication date: 7-Nov-2024

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media