Abstract
Evaluation of conjunctive queries (CQs) is NP-complete, but becomes tractable for syntactically defined fragments. One of the oldest and most studied such fragments is the class of acyclic CQs. Here we look at the problem of semantic acyclicity, i.e., given a CQ q, is there an acyclic CQ \(q'\) that is equivalent to it? This notion is important in CQ evaluation, as semantically acyclic CQs can be evaluated in polynomial time. The notion of semantic acyclicity itself is decidable, with the same complexity as the usual static analysis tasks for CQs, i.e., NP-complete.
Unfortunately, semantic acyclic is not general enough for practical purposes, as only CQs whose core is acyclic belong to this class. In this tutorial we present two approaches that have been developed to make the notion more flexible and take better advantage of the ideas that underlie it. These are computing approximations and making use of semantic information in the form of constraints. For approximations, we look at the case when q is not semantically acyclic and explain how to find and evaluate those acyclic CQs \(q'\) that are as “close” as possible to q in terms of containment. As for constraints, they enrich semantic acyclicity since they can be applied on a CQ q to produce an acyclic reformulation of it. We present results that establish the boundary of decidability for semantic acyclicity under usual database constraints such as tuple and equality-generating dependencies, and show their applicability in query evaluation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Boston (1995)
Baget, J.-F., Mugnier, M.-L., Rudolph, S., Thomazo, M.: Walking the complexity lines for generalized guarded existential rules. In: IJCAI, pp. 712–717 (2011)
Barceló, P., Gottlob, G., Pieris, A.: Semantic acyclicity under constraints. In: PODS (2016)
Barceló, P., Libkin, L., Romero, M.: Efficient approximations of conjunctive queries. SIAM J. Comput. 43(3), 1085–1130 (2014)
Barceló, P., Romero, M., Vardi, M.Y.: Semantic acyclicity on graph databases. In: PODS, pp. 237–248 (2013)
Calì, A., Gottlob, G., Kifer, M.: Taming the infinite chase: query answering under expressive relational constraints. J. Artif. Intell. Res. 48, 115–174 (2013)
Calì, A., Gottlob, G., Pieris, A.: Towards more expressive ontology languages: the query answering problem. Artif. Intell. 193, 87–128 (2012)
Calvanese, D., De Giacomo, G., Lenzerini, M.: Conjunctive query containment and answering under description logic constraints. ACM Trans. Comput. Log. 9(3), 22.1–22.31 (2008)
Chandra, A.K., Merlin, P.M.: newblock Optimal implementation of conjunctive queries in relational data bases. In: STOC, pp. 77–90 (1977)
Chen, H., Dalmau, V.: Beyond hypertree width: Decomposition methods without decompositions. In: CP, pp. 167–181 (2005)
Dalmau, V., Kolaitis, P.G., Vardi, M.Y.: Constraint satisfaction, bounded treewidth, and finite-variable logics. In: CP, pp. 310–326 (2002)
Fagin, R., Kolaitis, P.G., Miller, R.J., Popa, L.: Data exchange: semantics and query answering. Theor. Comput. Sci. 336(1), 89–124 (2005)
Figueira, D.: Semantically acyclic conjunctive queries under functional dependencies. In: LICS (2016)
Gottlob, G., Greco, G., Marnette, B.: HyperConsistency width for constraint satisfaction: algorithms and complexity results. In: Lipshteyn, M., Levit, V.E., McConnell, R.M. (eds.) Graph Theory, Computational Intelligence and Thought. LNCS, vol. 5420, pp. 87–99. Springer, Heidelberg (2009)
Hell, P., Nešetřil, J.: Graphs and Homomorphisms. Oxford University Press, Oxford (2004)
Johnson, D.S., Klug, A.C.: Testing containment of conjunctive queries under functional and inclusion dependencies. J. Comput. Syst. Sci. 28(1), 167–189 (1984)
Krötzsch, M., Rudolph, S.: Extending decidable existential rules by joining acyclicity and guardedness. In: IJCAI, pp. 963–968 (2011)
Papadimitriou, C.H., Yannakakis, M.: On the complexity of database queries. J. Comput. Syst. Sci. 58(3), 407–427 (1999)
Yannakakis, M.: Algorithms for acyclic database schemes. In: VLDB, pp. 82–94 (1981)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Barceló, P. (2016). Semantic Acyclicity for Conjunctive Queries: Approximations and Constraints. In: Väänänen, J., Hirvonen, Å., de Queiroz, R. (eds) Logic, Language, Information, and Computation. WoLLIC 2016. Lecture Notes in Computer Science(), vol 9803. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-52921-8_7
Download citation
DOI: https://doi.org/10.1007/978-3-662-52921-8_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-52920-1
Online ISBN: 978-3-662-52921-8
eBook Packages: Computer ScienceComputer Science (R0)