Consistent Query Answering for Primary Keys on Path Queries (2309.15270v1)
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 consistent subset of the database. For a Boolean query $q$, the problem $\mathsf{CERTAINTY}(q)$ takes a database as input, and asks whether or not each repair satisfies $q$. It is known that for any self-join-free Boolean conjunctive query $q$, $\mathsf{CERTAINTY}(q)$ is in $\mathbf{FO}$, $\mathbf{LSPACE}$-complete, or $\mathbf{coNP}$-complete. In particular, $\mathsf{CERTAINTY}(q)$ is in $\mathbf{FO}$ for any self-join-free Boolean path query $q$. In this paper, we show that if self-joins are allowed, the complexity of $\mathsf{CERTAINTY}(q)$ for Boolean path queries $q$ exhibits a tetrachotomy between $\mathbf{FO}$, $\mathbf{NL}$-complete, $\mathbf{PTIME}$-complete, and $\mathbf{coNP}$-complete. Moreover, it is decidable, in polynomial time in the size of the query~$q$, which of the four cases applies.
- Consistent answers of conjunctive queries on graphs. CoRR, abs/1503.00650, 2015.
- Optimization of answer set programs for consistent query answering by means of first-order rewriting. In CIKM, pages 25–34. ACM, 2020.
- Consistent query answers in inconsistent databases. In PODS, pages 68–79. ACM Press, 1999.
- Answering conjunctive queries under updates. In PODS, pages 303–318. ACM, 2017.
- L. E. Bertossi. Database repairs and consistent query answering: Origins and further developments. In PODS, pages 48–58. ACM, 2019.
- A. A. Bulatov. Complexity of conservative constraint satisfaction problems. ACM Trans. Comput. Log., 12(4):24:1–24:66, 2011.
- Counting database repairs entailing a query: The case of functional dependencies. In PODS, pages 403–412. ACM, 2022.
- J. Chomicki and J. Marcinkowski. Minimal-change integrity maintenance using tuple deletions. Inf. Comput., 197(1-2):90–121, 2005.
- Hippo: A system for computing consistent answers to a class of SQL queries. In EDBT, volume 2992 of Lecture Notes in Computer Science, pages 841–844. Springer, 2004.
- A sat-based system for consistent query answering. In SAT, volume 11628 of Lecture Notes in Computer Science, pages 117–135. Springer, 2019.
- Consistent answers of aggregation queries via SAT. In ICDE, pages 924–937. IEEE, 2022.
- LinCQA: Faster consistent query answering with linear time guarantees. Proc. ACM Manag. Data, 1(1):38:1–38:25, 2023.
- A simple algorithm for consistent query answering under primary keys. In ICDT, volume 255 of LIPIcs, pages 24:1–24:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023.
- G. Fontaine. Why is it hard to obtain a dichotomy for consistent query answering? ACM Trans. Comput. Log., 16(1):7:1–7:24, 2015.
- The complexity of resilience and responsibility for self-join-free conjunctive queries. Proc. VLDB Endow., 9(3):180–191, 2015.
- New results for the complexity of resilience for binary conjunctive queries with self-joins. In PODS, pages 271–284. ACM, 2020.
- A. Fuxman and R. J. Miller. First-order query rewriting for inconsistent databases. J. Comput. Syst. Sci., 73(4):610–635, 2007.
- L. M. Goldschlager. The monotone and planar circuit value problems are log space complete for P. SIGACT News, 9(2):25–29, July 1977.
- A logical framework for querying and repairing inconsistent databases. IEEE Trans. Knowl. Data Eng., 15(6):1389–1408, 2003.
- M. Hannula and J. Wijsen. A dichotomy in consistent query answering for primary keys and unary foreign keys. In PODS, pages 437–449. ACM, 2022.
- Meta-analyses proved inconsistent in how missing data were handled across their included primary trials: A methodological survey. Clinical Epidemiology, 12:527–535, 2020.
- Inconsistency resolution in online databases. In ICDE, pages 1205–1208. IEEE Computer Society, 2010.
- P. G. Kolaitis and E. Pema. A dichotomy in the complexity of consistent query answering for queries with two atoms. Inf. Process. Lett., 112(3):77–85, 2012.
- Efficient querying of inconsistent databases with binary integer programming. Proc. VLDB Endow., 6(6):397–408, 2013.
- Consistent query answering for primary keys on path queries. In PODS, pages 215–232. ACM, 2021.
- P. Koutris and D. Suciu. A dichotomy on the complexity of consistent query answering for atoms with simple keys. In ICDT, pages 165–176. OpenProceedings.org, 2014.
- P. Koutris and J. Wijsen. The data complexity of consistent query answering for self-join-free conjunctive queries under primary key constraints. In PODS, pages 17–29. ACM, 2015.
- P. Koutris and J. Wijsen. Consistent query answering for self-join-free conjunctive queries under primary key constraints. ACM Trans. Database Syst., 42(2):9:1–9:45, 2017.
- P. Koutris and J. Wijsen. Consistent query answering for primary keys and conjunctive queries with negated atoms. In PODS, pages 209–224. ACM, 2018.
- P. Koutris and J. Wijsen. Consistent query answering for primary keys in logspace. In ICDT, volume 127 of LIPIcs, pages 23:1–23:19. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019.
- P. Koutris and J. Wijsen. First-order rewritability in consistent query answering with respect to multiple keys. In PODS, pages 113–129. ACM, 2020.
- P. Koutris and J. Wijsen. Consistent query answering for primary keys in datalog. Theory Comput. Syst., 65(1):122–178, 2021.
- L. Libkin. Elements of Finite Model Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2004.
- C. Lutz and F. Wolter. On the relationship between consistent query answering and constraint satisfaction problems. In ICDT, volume 31 of LIPIcs, pages 363–379. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2015.
- Taming primary key violations to query large inconsistent data via ASP. Theory Pract. Log. Program., 15(4-5):696–710, 2015.
- The consistency extractor system: Answer set programs for consistent query answering in databases. Data Knowl. Eng., 69(6):545–572, 2010.
- D. Maslowski and J. Wijsen. A dichotomy in the complexity of counting database repairs. J. Comput. Syst. Sci., 79(6):958–983, 2013.
- D. Maslowski and J. Wijsen. Counting database repairs that satisfy conjunctive queries with self-joins. In ICDT, pages 155–164. OpenProceedings.org, 2014.
- J. Wijsen. On the first-order expressibility of computing certain answers to conjunctive queries over uncertain databases. In PODS, pages 179–190. ACM, 2010.
- J. Wijsen. Certain conjunctive query answering in first-order logic. ACM Trans. Database Syst., 37(2):9:1–9:35, 2012.
- J. Wijsen. Foundations of query answering on inconsistent databases. SIGMOD Rec., 48(3):6–16, 2019.