Skip to main content
Log in

Query Languages for Data Exchange: Beyond Unions of Conjunctive Queries

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abiteboul, S., Duschka, O.: Answering queries using materialized views. Gemo report 383

  2. Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Reading (1995)

    MATH  Google Scholar 

  3. 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)

  4. 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)

  5. Beeri, C., Vardi, M.Y.: A proof procedure for data dependencies. J. ACM 31(4), 718–741 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  6. Börger, E., Grädel, E., Gurevich, Y.: The Classical Decision Problem. Springer, Berlin (2001)

    MATH  Google Scholar 

  7. 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)

  8. 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)

  9. Fagin, R., Kolaitis, P.G., Miller, R.J., Popa, L.: Data exchange: semantics and query answering. Theor. Comput. Sci. 336(1), 89–124 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  10. Fagin, R., Kolaitis, P.G., Popa, L.: Data exchange: getting to the core. ACM Trans. Database Syst. 30(1), 174–210 (2005)

    Article  MathSciNet  Google Scholar 

  11. Gottlob, G., Papadimitriou, C.: On the complexity of single-rule datalog queries. Inf. Comput. 183(1), 104–122 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  12. Greenlaw, R., Hoover, H.J., Ruzzo, W.L.: Limits to Parallel Computation: P-Completeness Theory. Oxford University Press, London (1995)

    MATH  Google Scholar 

  13. 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)

  14. 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)

  15. Imielinski, T., Lipski, W.: Incomplete information in relational databases. J. ACM 31, 761–791 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  16. Lenzerini, M.: Data integration: A theoretical perspective. In: Proceedings of the 21st ACM Symposium on Principles of Database Systems (PODS), pp. 233–246 (2002)

  17. Libkin, L.: Elements of Finite Model Theory. Springer, Berlin (2004)

    MATH  Google Scholar 

  18. Libkin, L.: Data exchange and incomplete information. In: Proceedings of the 25th ACM Symposium on Principles of Database Systems (PODS), pp. 60–69 (2006)

  19. 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)

  20. Ma̧dry, A.: Data exchange: On the complexity of answering queries with inequalities. Inf. Process. Lett. 94(6), 253–257 (2005)

    Article  MathSciNet  Google Scholar 

  21. Papadimitriou, C.H.: Computational Complexity. Addison Wesley, Reading (1994)

    MATH  Google Scholar 

  22. 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)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marcelo Arenas.

Rights and permissions

Reprints 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

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-010-9259-6

Keywords