Abstract
The class of unions of conjunctive queries (UCQ) has been shown to be particularly well-behaved for data exchange; its certain answers can be computed in polynomial time (in terms of data complexity). However, this is not the only class with this property; the certain answers to any Datalog program can also can be computed in polynomial time. The problem is that both UCQ and Datalog do not allow negated atoms, as adding an unrestricted form of negation to these languages yields to intractability.
In this paper, we propose a language called Datalog C(≠) that extends Datalog with a restricted form of negation, and study some of its fundamental properties. In particular, we show that the certain answers to a Datalog C(≠) program can be computed in polynomial time (in terms of data complexity), and that every union of conjunctive queries with at most one inequality or negated relational atom per disjunct, can be efficiently rewritten as a Datalog C(≠) program in the context of data exchange. Furthermore, we show that this is also the case for a syntactic restriction of the class of unions of conjunctive queries with at most two inequalities per disjunct. This syntactic restriction is given by two conditions that are optimal, in the sense that computing certain answers becomes intractable if one removes any of them. Finally, we provide a thorough analysis of the combined complexity of computing certain answers to Datalog C(≠) programs and other related query languages. In particular, we show that this problem is Exptime-complete for Datalog C(≠), even if one restricts to conjunctive queries with single inequalities, which is a fragment of Datalog C(≠) by the result mentioned above. Furthermore, we show that the combined complexity is coNexptime-complete for the case of conjunctive queries with k inequalities, for every k≥2.
Similar content being viewed by others
References
Abiteboul, S., Duschka, O.: Answering queries using materialized views. Gemo report 383
Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Reading (1995)
Afrati, F.N., Li, C., Pavlaki, V.: Data exchange in the presence of arithmetic comparisons. In: Proceedings of the 11th International Conference on Extending Database Technology (EDBT), pp. 487–498 (2008)
Arenas, M., Barceló, P., Fagin, R., Libkin, L.: Locally consistent transformations and query answering in data exchange. In: Proceedings of the 23rd ACM Symposium on Principles of Database Systems (PODS), pp. 229–240 (2004)
Beeri, C., Vardi, M.Y.: A proof procedure for data dependencies. J. ACM 31(4), 718–741 (1984)
Börger, E., Grädel, E., Gurevich, Y.: The Classical Decision Problem. Springer, Berlin (2001)
Deutsch, A., Nash, A., Remmel, J.B.: The chase revisited. In: Proceedings of the 27th ACM Symposium on Principles of Database Systems (PODS), pp. 149–158 (2008)
Fagin, R., Kolaitis, P., Popa, L., Tan, W.C.: Composing schema mappings: Second-order dependencies to the rescue. In: Proceedings of the 23rd ACM Symposium on Principles of Database Systems (PODS), pp. 83–94 (2004)
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. ACM Trans. Database Syst. 30(1), 174–210 (2005)
Gottlob, G., Papadimitriou, C.: On the complexity of single-rule datalog queries. Inf. Comput. 183(1), 104–122 (2003)
Greenlaw, R., Hoover, H.J., Ruzzo, W.L.: Limits to Parallel Computation: P-Completeness Theory. Oxford University Press, London (1995)
Kolaitis, P.: Schema mappings, data exchange, and metadata management. In: Proceedings of the 24th ACM Symposium on Principles of Database Systems (PODS), pp. 61–75 (2005)
Kolaitis, P., Panttaja, J., Tan, W.-C.: The complexity of data exchange. In: Proceedings of the 25th ACM Symposium on Principles of Database Systems (PODS), pp. 30–39 (2006)
Imielinski, T., Lipski, W.: Incomplete information in relational databases. J. ACM 31, 761–791 (1984)
Lenzerini, M.: Data integration: A theoretical perspective. In: Proceedings of the 21st ACM Symposium on Principles of Database Systems (PODS), pp. 233–246 (2002)
Libkin, L.: Elements of Finite Model Theory. Springer, Berlin (2004)
Libkin, L.: Data exchange and incomplete information. In: Proceedings of the 25th ACM Symposium on Principles of Database Systems (PODS), pp. 60–69 (2006)
Libkin, L., Sirangelo, C.: Data exchange and schema mappings in open and closed worlds. In: Proceedings of the 27th ACM Symposium on Principles of Database Systems (PODS), pp. 139–148 (2008)
Ma̧dry, A.: Data exchange: On the complexity of answering queries with inequalities. Inf. Process. Lett. 94(6), 253–257 (2005)
Papadimitriou, C.H.: Computational Complexity. Addison Wesley, Reading (1994)
Vardi, M.Y.: The complexity of relational query languages. In: Proceedings of the 14th ACM Symposium on Theory of Computing (STOC), pp. 137–146 (1982)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Arenas, M., Barceló, P. & Reutter, J. Query Languages for Data Exchange: Beyond Unions of Conjunctive Queries. Theory Comput Syst 49, 489–564 (2011). https://doi.org/10.1007/s00224-010-9259-6
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-010-9259-6