ABSTRACT
It is known that unions of acyclic conjunctive queries (CQs) can be evaluated in linear time, as opposed to arbitrary CQs, for which the evaluation problem is NP-complete. It follows from techniques in the area of constraint-satisfaction problems that "semantically acyclic" unions of CQs -- i.e., unions of CQs that are equivalent to a union of acyclic ones -- can be evaluated in polynomial time, though testing membership in the class of semantically acyclic CQs is NP-complete.
We study here the fundamental notion of semantic acyclicity in the context of graph databases and unions of conjunctive regular path queries with inverse (UC2RPQs). It is known that unions of acyclic C2RPQs can be evaluated efficiently, but it is by no means obvious whether the same holds for the class of UC2RPQs that are semantically acyclic. We prove that checking whether a UC2RPQ is semantically acyclic is decidable in 2EXPSPACE, and that it is EXPSPACE-hard even in the absence of inverses. Furthermore, we show that evaluation of semantically acyclic UC2RPQs is fixed-parameter tractable. In addition, our tools yield a strong theory of approximations for UC2RPQs when no equivalent acyclic UC2RPQ exists.
- . Abiteboul, P. Buneman, D. Suciu. Data on the Web: From Relations to Semistructured Data and XML. Morgan Kauffman, 1999. Google Scholar
Digital Library
- R. Angles, C. Gutiérrez. Survey of graph database models. ACM Comput. Surv. 40(1): (2008). Google Scholar
Digital Library
- . Barceló, L. Libkin, A.W. Lin, P. Wood. Expressive languages for path queries over graph-structured data. ACM TODS 38(4), 2012. Google Scholar
Digital Library
- . Barceló, J. Perez, J. Reutter. Relativeexpressiveness of nested regular expressions. In AMW 2012, pages180--195.Google Scholar
- . Barceló, L. Libkin, M. Romero. Efficient approximations of conjunctive queries. In PODS 2012,pages 249--260. Google Scholar
Digital Library
- . Calvanese, G. de Giacomo, M. Lenzerini, M. Y. Vardi. Containment of conjunctive regular path queries with inverse. In KR'00, pages 176--185.Google Scholar
- . Calvanese, G. de Giacomo, M. Lenzerini, M. Y. Vardi. Rewriting of regular expressions and regular path queries. JCSS, 64(3):443--465, 2002.Google Scholar
Digital Library
- A. Chandra and P. Merlin. Optimal implementation of conjunctive queries in relationaldata bases. In STOC 1977, pages77--90. Google Scholar
Digital Library
- . Chen and V. Dalmau. Beyond hypertree width:Decomposition methods without decompositions. In CP 2005, pages 167--181.Google Scholar
- . P. Consens, A. O. Mendelzon. GraphLog: a visual formalismfor real life recursion. In PODS'90, pages 404--416. Google Scholar
Digital Library
- I. Cruz, A. Mendelzon, P. Wood. A graphical query language supportingrecursion. In SIGMOD'87, pages 323--330. Google Scholar
Digital Library
- . Dalmau, P. G. Kolaitis, M. Y. Vardi. Constraintsatisfaction, bounded treewidth, and finite-variable logics. In CP 2002, pages 310--326. Google Scholar
Digital Library
- . Fagin. Degrees of acyclicity for hypergraphs andrelational database schemes. JACM 30(3), pages 514--550, 1983. Google Scholar
Digital Library
- W. Fan, J. Li, S. Ma, N. Tang, Y. Wu. Graph pattern matching: from intractable to polynomialtime. PVLDB 3(1): 264--275 (2010). Google Scholar
Digital Library
- W. Fan, J. Li, S. Ma, N. Tang, Y. Wu. Adding regular expressions to graph reachability and patternqueries. In ICDE 2011, to appear. Google Scholar
Digital Library
- T. Feder, M. Y. Vardi. The computational structure of monotone monadicSNP and constraint satisfaction: A study through datalog and group theory. SIAM J. Comput. 28(1), pages 57--104, 1998. Google Scholar
Digital Library
- . Fletcher, M. Gyssens, D. Leinders, J. Van denBussche, D. Van Gucht, S. Vansummeren, Y. Wu. Relative expressivepower of navigational querying on graphs. In ICDT 2011, pages197--207. Google Scholar
Digital Library
- . Florescu, A. Levy, D. Suciu. Query containment for conjunctive queries with regularexpressions. In PODS'98, pages 139--148. Google Scholar
Digital Library
- . Gottlob, N. Leone, F. Scarcello. The complexity of acyclic conjunctive queries. J. ACM 48(3), 2001, pages 431--498. Google Scholar
Digital Library
- . Gottlob, N. Leone, F. Scarcello. Hypertree decompositions and tractable queries. J. Comput. Syst. Sci. 64(3), pages 579--627, 2002.Google Scholar
- G. Gottlob, N. Leone, and F. Scarcello. Hypertree decompositions and tractable queries. JCSS, 64 (2002), 579--627.Google Scholar
Digital Library
- . Grohe. The structure of tractable constraintsatisfaction problems. In MFCS 2006, pages 58--72. Google Scholar
Digital Library
- . Harel, D. Kozen, J. Tiuryn. Dynamic logic. MITPress, 2000. Google Scholar
Digital Library
- h. Kolaitis, M. Y. Vardi. Conjunctive query-containmentand constraint satisfaction. JCSS 61(2), pages 302--332, 2000. Google Scholar
Digital Library
- h. Kolaitis, M. Y. Vardi. A Logical Approach to Constraint Satisfaction. Complexity of Constraints, pages 125--155, 2008. Google Scholar
Digital Library
- . Libkin, W. Martens, D. Vrgoc. Querying graph databases with XPath. Accepted for publication, ICDT 2013. Google Scholar
Digital Library
- C. H. Papadimitriou and M. Yannakakis. The complexity of facets (and some facets of complexity). JCSS, 28 (1986), 244--259. Google Scholar
Digital Library
- h. Papadimitriou, M. Yannakakis.On the complexity of database queries. In PODS 1997, pages12--19. Google Scholar
Digital Library
- . Sagiv and M. Yannakakis. Equivalences among relationalexpressions with the union and difference operator. JACM 27(4),1980, pages 633--655. Google Scholar
Digital Library
- . Tarjan and M. Yannakakis. Simple linear-timealgorithms to test chordality of graphs, test selectivity ofhypergraphs and selectively reduce acyclic hypergraphs. SiamJ. of Comp., 13, 1984, pages 566--579. Google Scholar
Digital Library
- M. Yannakakis. Algorithms for acyclic database schemes. In VLDB, 1981, pages 82--94. Google Scholar
Digital Library
Index Terms
Semantic acyclicity on graph databases
Recommendations
Querying graph databases
PODS '13: Proceedings of the 32nd ACM SIGMOD-SIGACT-SIGAI symposium on Principles of database systemsGraph databases have gained renewed interest in the last years, due to its applications in areas such as the Semantic Web and Social Networks Analysis. We study the problem of querying graph databases, and, in particular, the expressiveness and ...
Semantic Acyclicity on Graph Databases
It is known that unions of acyclic conjunctive queries (CQs) can be evaluated in linear time, as opposed to arbitrary CQs, for which the evaluation problem is NP-complete. It follows from techniques in the area of constraint-satisfaction problems that ...
Semantic Acyclicity Under Constraints
PODS '16: Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database SystemsA conjunctive query (CQ) is semantically acyclic if it is equivalent to an acyclic one. Semantic acyclicity has been studied in the constraint-free case, and deciding whether a query enjoys this property is NP-complete. However, in case the database is ...






Comments