Abstract
We consider the view-based query determinacy problem over graph databases for queries defined as unions of path queries. These queries select pairs of nodes in a graph that are connected through a path whose length falls in a given set. A view specification is a set of such queries. We say that a view specification V determines a query Q if, for all databases D, the answers to V on D contain enough information to answer Q. Our main result states that, given a view V, there exists an explicit bound that depends on V such that we can decide the determinacy problem for all queries that ask for a path longer than this bound, and provide first-order rewritings for the queries that are determined. We call this notion asymptotic determinacy. As a corollary, we can also compute the set of almost all path queries that are determined by V.
Similar content being viewed by others
Notes
Please note that this definition differs slightly from the definition in [4] in that we did not require in [4] that G had both negative and positive cycles in order to proceed to Step 2. This minor difference does not actually change any of the proofs, as Lemma 6 did not make use of this part of the construction, and Lemma 9 already assumes that the graph contains cycles of both signs. It does however make the size analysis at the end of Section 4.1 (which was not featured in [4]) easier.
If a i = d−1 for some i, then the property of the lemma is falsified by the subsequence a i obtained with j = i.
arbitrarily, when there are more than one possibility.
References
Abiteboul, S., Duschka, O.M.: Complexity of answering queries using materialized views. In: ACM Symposium on Principles of Database Systems (PODS), pp 254–263 (1998)
Afrati, F.N.: Determinacy and query rewriting for conjunctive queries and views. Theor. Comput. Sci. 412(11), 1005–1021 (2011)
Calvanese, D., Giacomo, G.D., Lenzerini, M., Vardi, M.Y.: Lossless regular views. In: ACM Symposium on Principles of Database Systems (PODS), pp 247–258. ACM (2002)
Francis, N.: Asymptotic determinacy of path queries using union-of-paths views. In: 18Th International Conference on Database Theory (ICDT 2015) (2015)
Francis, N., Segoufin, L., Sirangelo, C.: Datalog rewritings of regular path queries using views. Logic. Methods Comput. Sci. 11(4) (2015)
Gogacz, T., Marcinkowski, J.: The hunt for a red spider: conjunctive query determinacy is undecidable. In: Proceedings of the 2015 30Th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pp 281–292. IEEE Computer Society (2015)
Gogacz, T., Marcinkowski, J.: Red spider meets a rainworm: Conjunctive query finite determinacy is undecidable. arXiv preprint arXiv:http://arxiv.org/abs/1512.01681 to appear in PODS 2016 (2015)
Levy, A.Y., Mendelzon, A.O., Sagiv, Y., Srivastava, D.: Answering Queries Using Views. In: ACM Symposium on Principles of Database Systems (PODS), pp 95–104 (1995)
Majewski, B.S., Havas, G.: The complexity of greatest common divisor computations. In: Algorithmic Number Theory, pp 184–193. Springer (1994)
Nash, A., Segoufin, L., Vianu, V.: Views and queries: Determinacy and rewriting. ACM Trans. Database Syst. 35(3) (2010)
Acknowledgments
I gratefully thank Luc Segoufin and Cristina Sirangelo for carefully proofreading this paper and providing many invaluable comments and advices. I also thank the anonymous reviewers for their painstaking and helpful reviews.
Author information
Authors and Affiliations
Corresponding author
Additional information
Part of this work was done while the author was supported by EPSRC grant EP/M025268/1.
Rights and permissions
About this article
Cite this article
Francis, N. Asymptotic Determinacy of Path Queries Using Union-of-Paths Views. Theory Comput Syst 61, 156–190 (2017). https://doi.org/10.1007/s00224-016-9697-x
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-016-9697-x