Abstract
The framework of database repairs is a principled approach to managing inconsistency in databases. In particular, the consistent answers of a query on an inconsistent database provide sound semantics and the guarantee that the values obtained are those returned by the query on every repair of the given inconsistent database. In this paper, we carry out a systematic investigation of the data complexity of the consistent answers of conjunctive queries for set-based repairs and with respect to classes of constraints that, in recent years, have been extensively studied in the context of data exchange and data integration. Our results, which range from polynomial-time computability to undecidability, complement or improve on earlier work, and provide a fairly comprehensive picture of the data complexity of consistent query answering. We also address the problem of finding a “representative” or “useful” repair of an inconsistent database. To this effect, we introduce the notion of a universal repair, as well as relaxations of it, and then apply it to the investigation of the data complexity of consistent query answering.
Similar content being viewed by others
Notes
Proposition 7.1 in [33] asserts the existence of a set of tgds Σ and an instance I, such that I has no 1-universal superset-repair w.r.t. Σ. Unfortunately, there was a mistake in the proof of this proposition. Proposition 3.8 clarifies the situation (note that, by Proposition 2.7, for sets of tgds Σ, every instance has a superset-repair).
For inclusion dependencies, this fact was pointed out in [14].
References
Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley (1995)
Afrati, F.N., Kolaitis, P.G.: Repair checking in inconsistent databases: Algorithms and complexity. In: ICDT, pp. 31–41 (2009)
Arenas, M., Bertossi, L.E.: On the decidability of consistent query answering. In: AMW (2010)
Arenas, M., Bertossi, L.E., Chomicki, J.: Consistent query answers in inconsistent databases. In: PODS, pp. 68–79 (1999)
Bárány, V., Gottlob, G., Otto, M.: Querying the guarded fragment. In: Proc. of LICS, pp. 1–10 (2010)
Benedikt, M., Fan, W., Geerts, F.: XPath satisfiability in the presence of dtds. J. ACM 55(2), (2008)
Bertossi, L.E.: Consistent query answering in databases. SIGMOD Rec 35(2), 68–76 (2006)
Börger, E., Grädel, E., Gurevich, Y.: The Classical Decision Problem. Perspectives in Mathematical Logic. Springer (1997)
Bravo, L., Bertossi, L.E.: Consistent query answering under inclusion dependencies. In: CASCON, pp. 202–216 (2004)
Calì, A., Gottlob, G., Kifer, M.: Taming the infinite chase: Query answering under expressive relational constraints. In: Brewka, G., Lang, J. (eds.) KR, pp. 70–80. AAAI Press (2008)
Calì, A., Lembo, D., Rosati, R.: On the decidability and complexity of query answering over inconsistent and incomplete databases. In: PODS, pp. 260–271 (2003)
ten Cate, B., Kolaitis, P.G.: Structural characterizations of schema-mapping languages. Commun. ACM 53(1), 101–110 (2010)
Chomicki, J.: Consistent query answering: Five easy pieces. In: ICDT, pp. 1–17 (2007)
Chomicki, J., Marcinkowski, J.: Minimal-change integrity maintenance using tuple deletions. Inf. Comput. 197(1–2), 90–121 (2005)
Deutsch, A., Tannen, V.: Reformulation of XML queries and constraints. In: ICDT, pp. 225–241 (2003)
Fagin, R.: Horn clauses and database dependencies. J. ACM 29(4), 952–985 (1982)
Fagin, R., Kolaitis, P.G., Miller, R.J., Popa, L.: Data exchange: Semantics and query answering. Theor. Comput. Sci. 336(1), 89–124 (2005)
Fagin, R., Kolaitis, P. G., Popa, L.: Data exchange: Getting to the core. TODS 30(1), 174–210 (2005)
Fontaine, G.: Why is it hard to obtain a dichotomy for consistent query answering? In: LICS. To appear (2013)
Fuxman, A., Kolaitis, P.G., Miller, R.J., Chiew Tan, W.: Peer data exchange. ACM Trans. Database Syst. 31(4), 1454–1498 (2006)
Fuxman, A., Miller, R.J.: First-order query rewriting for inconsistent databases. J. Comput. Syst. Sci. 73(4), 610–635 (2007)
Garey, M.R., Johnson, D.S.: Computers and Intractability; A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., New York (1990)
Gottlob, G., Nash, A.: Efficient core computation in data exchange. J. ACM 55(2), 1–49 (2008)
Grahne, G., Onet, A.: Data correspondence, exchange and repair. In: ICDT, pp. 219–230 (2010)
Hell, P., Nešetřil, J.: The core of a graph. Discret. Math 109, 117–126 (1992)
Hernich, A.: Foundations of Query Answering in Relational Data Exchange. PhD thesis, Goethe-Universität Frankfurt am Main (2010)
Hernich, A., Schweikardt, N.: CWA-solutions for data exchange settings with target dependencies. In: PODS, pp. 113–122 (2007)
Kolaitis, P.G., Panttaja, J., Tan, W.-C.: The complexity of data exchange. In: Proceedings of PODS’06, pp. 30–39 (2006)
Kolaitis, P.G., Pema, E.: A dichotomy in the complexity of consistent query answering for queries with two atoms. Inf. Process. Lett. 112(3), 77–85 (2012)
Papadimitriou, C.M.: Computational Complexity. Addison-Wesley, Reading (1994)
Rosati, R.: On the finite controllability of conjunctive query answering in databases under open-world assumption. J. Comput. Syst. Sci. 77(3), 572–594 (2011)
Staworko, S., Chomicki, J.: Consistent query answers in the presence of universal constraints. Inf. Syst 35(1), 1–22 (2010)
ten Cate, B., Fontaine, G., Kolaitis, P.G.: On the data complexity of consistent query answering. In: Proceedings of the 15th International Conference on Database Theory, ICDT ’12, pp 22–33. ACM, New York (2012)
Vardi, M.Y.: The complexity of relational query languages (extended abstract). In: Proceedings of the ACM Symposium on Theory of Computing (STOC), pp. 137–146 (1982)
Wijsen, J.: Database repairing using updates. ACM Trans. Database Syst. 30, 722–768 (2005)
Wijsen, J.: On the first-order expressibility of computing certain answers to conjunctive queries over uncertain databases. In: PODS, pp. 179–190 (2010)
Wijsen, J.: A remark on the complexity of consistent conjunctive query answering under primary key violations. Inf. Process. Lett. 110(21), 950–955 (2010)
Acknowledgments
We thank the anonymous reviewers for their comments and pointers to the literature. This research was partially supported by NSF grants IIS-0905276 and IIS-1217869. Fontaine was visiting UC Santa Cruz while this research was carried out.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
ten Cate, B., Fontaine, G. & Kolaitis, P.G. On the Data Complexity of Consistent Query Answering. Theory Comput Syst 57, 843–891 (2015). https://doi.org/10.1007/s00224-014-9586-0
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-014-9586-0