ABSTRACT
Many graph query languages rely on the composition operator to navigate graphs and select nodes of interests, even though evaluating compositions of relations can be costly. Often, this need for composition can be reduced by rewriting towards queries that use semi-joins instead. In this way, the cost of evaluating queries can be significantly reduced.
We study techniques to recognize and apply such rewritings. Concretely, we study the relationship between the expressive power of the relation algebras, that heavily rely on composition, and the semi-join algebras, that replace the composition operator in favor of the semi-join operators.
As our main result, we show that each fragment of the relation algebras where intersection and/or difference is only used on edges (and not on complex compositions) is expressively equivalent to a fragment of the semi-join algebras. This expressive equivalence holds for node queries that evaluate to sets of nodes. For practical relevance, we exhibit constructive steps for rewriting relation algebra queries to semi-join algebra queries, and prove that these steps lead to only a well-bounded increase in the number of steps needed to evaluate the rewritten queries.
In addition, on node-labeled graphs that are sibling-ordered trees, we establish new relationships among the expressive power of Regular XPath, Conditional XPath, FO-logic, and the semi-join algebra augmented with restricted fixpoint operators.
- Pablo Barceló. 2013. Querying Graph Databases. In Proceedings of the 32nd Symposium on Principles of Database Systems (PODS '13). ACM, 175--188. Google ScholarDigital Library
- Michael Benedikt, Wenfei Fan, and Gabriel Kuper. 2005. Structural properties of XPath fragments. Theoretical Computer Science 336, 1 (2005), 3--31. Google ScholarDigital Library
- Michael Benedikt and Christoph Koch. 2009. XPath Leashed. ACM Computing Surveys (CSUR) 41, 1 (2009), 3:1--3:54.Google Scholar
- Philip A. Bernstein and Dah-Ming W. Chiu. 1981. Using Semi-Joins to Solve Relational Queries. J. ACM 28, 1 (1981), 25--40. Google ScholarDigital Library
- James Clark and Steve DeRose. 1999. XML Path Language (XPath) Version 1.0. W3C Recommendation. W3C. http://www.w3.org/TR/1999/REC-xpath-19991116.Google Scholar
- Rance Cleaveland and Bernhard Steffen. 1993. A linear-time model-checking algorithm for the alternation-free modal mu-calculus. Formal Methods in System Design 2, 2 (1993), 121--147. Google ScholarDigital Library
- George H. L. Fletcher, Marc Gyssens, Dirk Leinders, Dimitri Surinx, Jan Van den Bussche, Dirk Van Gucht, Stijn Vansummeren, and Yuqing Wu. 2015. Relative expressive power of navigational querying on graphs. Information Sciences 298 (2015), 390--406. Google ScholarDigital Library
- George H. L. Fletcher, Marc Gyssens, Dirk Leinders, Jan Van den Bussche, Dirk Van Gucht, Stijn Vansummeren, and Yuqing Wu. 2015. The impact of transitive closure on the expressiveness of navigational query languages on unlabeled graphs. Annals of Mathematics and Artificial Intelligence 73, 1--2 (2015), 167--203.Google ScholarDigital Library
- Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom. 2008. Database Systems: The Complete Book (2 ed.). Prentice Hall Press, Upper Saddle River, NJ, USA.Google ScholarDigital Library
- Steven Givant. 2006. The Calculus of Relations as a Foundation for Mathematics. Journal of Automated Reasoning 37, 4 (2006), 277--322. Google ScholarDigital Library
- Martin Grohe. 1998. Finite Variable Logics in Descriptive Complexity Theory. The Bulletin of Symbolic Logic 4 (1998), 345--398. Google ScholarCross Ref
- Jelle Hellings, Marc Gyssens, Yuqing Wu, Dirk Van Gucht, Jan Van den Bussche, Stijn Vansummeren, and George H. L. Fletcher. 2015. Relative Expressive Power of Downward Fragments of Navigational Query Languages on Trees and Chains. In Proceedings of the 15th Symposium on Database Programming Languages (DBPL 2015). 59--68. Google ScholarDigital Library
- Aviel Klausner and Nathan Goodman. 1985. Multirelations: Semantice and Languages. In Proceedings of the 11th International Conference on Very Large Data Bases (VLDB '85). VLDB Endowment, 251--258.Google Scholar
- Dexter Kozen. 1997. Kleene Algebra with Tests. ACM Transactions on Programming Languages and Systems 19, 3 (1997), 427--443. Google ScholarDigital Library
- Dirk Leinders. 2008. The semijoin algebra. Ph.D. Dissertation. Hasselt University and transnational University of Limburg.Google Scholar
- Dirk Leinders, Maarten Marx, Jerzy Tyszkiewicz, and Jan Van den Bussche. 2005. The Semijoin Algebra and the Guarded Fragment. Journal of Logic, Language and Information 14, 3 (2005), 331--343. Google ScholarDigital Library
- Dirk Leinders, Jerzy Tyszkiewicz, and Jan Van den Bussche. 2004. On the expressive power of semijoin queries. Inform. Process. Lett. 91, 2 (2004), 93--98. Google ScholarDigital Library
- Dirk Leinders and Jan Van den Bussche. 2007. On the complexity of division and set joins in the relational algebra. J. Comput. System Sci. 73, 4 (2007), 538--549. Special Issue: Database Theory 2005.Google ScholarDigital Library
- Leonid Libkin, Wim Martens, and Domagoj Vrgoč. 2013. Querying Graph Databases with XPath. In Proceedings of the 16th International Conference on Database Theory (ICDT '13). ACM, New York, NY, USA, 129--140. Google ScholarDigital Library
- Maarten Marx. 2005. Conditional XPath. ACM Transactions on Database Systems 30, 4 (2005), 929--959. Google ScholarDigital Library
- Maarten Marx and Maarten de Rijke. 2005. Semantic Characterizations of Navigational XPath. SIGMOD Record 34, 2 (2005), 41--46. Google ScholarDigital Library
- Maarten Marx and Yde Venema. 1997. Multi-Dimensional Modal Logic. Springer Netherlands, Dordrecht. Google ScholarCross Ref
- Praveen Seshadri, Joseph M. Hellerstein, Hamid Pirahesh, T. Y. Cliff Leung, Raghu Ramakrishnan, Divesh Srivastava, Peter J. Stuckey, and S. Sudarshan. 1996. Cost-based Optimization for Magic: Algebra and Implementation. SIGMOD Rec. 25, 2 (1996), 435--446. Google ScholarDigital Library
- Dimitri Surinx, George H. L. Fletcher, Marc Gyssens, Dirk Leinders, Jan Van den Bussche, Dirk Van Gucht, Stijn Vansummeren, and Yuqing Wu. 2015. Relative expressive power of navigational querying on graphs using transitive closure. Logic Journal of the IGPL 23, 5 (2015), 759--788. Google ScholarCross Ref
- Alfred Tarski. 1941. On the Calculus of Relations. The Journal of Symbolic Logic 6, 3 (1941), 73--89. Google ScholarCross Ref
- Balder ten Cate. 2006. The Expressivity of XPath with Transitive Closure. In Proceedings of the Twenty-fifth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS '06). ACM, 328--337. Google ScholarDigital Library
- Balder ten Cate and Maarten Marx. 2007. Navigational XPath: Calculus and Algebra. SIGMOD Record 36, 2 (2007), 19--26. Google ScholarDigital Library
- Jeffrey D. Ullman. 1990. Principles of Database and Knowledge-Base Systems: Volume II: The New Technologies. W. H. Freeman & Co., New York, NY, USA.Google Scholar
- Moshe Y. Vardi. 1982. The Complexity of Relational Query Languages (Extended Abstract). In Proceedings of the Fourteenth Annual ACM Symposium on Theory of Computing (STOC '82). ACM, New York, NY, USA, 137--146. Google ScholarDigital Library
- Yuqing Wu, Dirk Van Gucht, Marc Gyssens, and Jan Paredaens. 2011. A Study of a Positive Fragment of Path Queries: Expressiveness, Normal Form and Minimization. Comput. J. 54, 7 (2011), 1091--1118. Google ScholarDigital Library
- Mihalis Yannakakis. 1981. Algorithms for Acyclic Database Schemes. In Proceedings of the Seventh International Conference on Very Large Data Bases - Volume 7 (VLDB '81). VLDB Endowment, 82--94.Google Scholar
Index Terms
- From relation algebra to semi-join algebra: an approach for graph query optimization
Recommendations
Combining Joint and Semi-Join Operations for Distributed Query Processing
The application of a combination of join and semi-join operations to minimize the amount of data transmission required for distributed query processing is discussed. Specifically, two important concepts that occur with the use of join operations as ...
The semijoin algebra
FoIKS'06: Proceedings of the 4th international conference on Foundations of Information and Knowledge SystemsWhen we replace, in the classical relational algebra, the join operator by the semijoin operator, we obtain what we call the semijoin algebra. We will show that, when only equi-joins are used, the semijoin algebra is equivalent with the guarded fragment ...
Multi-way spatial join selectivity for the ring join graph
Efficient spatial query processing is very important since the applications of the spatial DBMS (e.g. GIS, CAD/CAM, LBS) handle massive amount of data and consume much time. Many spatial queries contain the multi-way spatial join due to the fact that ...
Comments