skip to main content
10.1145/3122831.3122833acmotherconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article
Public Access

From relation algebra to semi-join algebra: an approach for graph query optimization

Published:01 September 2017Publication History

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.

References

  1. Pablo Barceló. 2013. Querying Graph Databases. In Proceedings of the 32nd Symposium on Principles of Database Systems (PODS '13). ACM, 175--188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Michael Benedikt, Wenfei Fan, and Gabriel Kuper. 2005. Structural properties of XPath fragments. Theoretical Computer Science 336, 1 (2005), 3--31. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Michael Benedikt and Christoph Koch. 2009. XPath Leashed. ACM Computing Surveys (CSUR) 41, 1 (2009), 3:1--3:54.Google ScholarGoogle Scholar
  4. Philip A. Bernstein and Dah-Ming W. Chiu. 1981. Using Semi-Joins to Solve Relational Queries. J. ACM 28, 1 (1981), 25--40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle Scholar
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. Steven Givant. 2006. The Calculus of Relations as a Foundation for Mathematics. Journal of Automated Reasoning 37, 4 (2006), 277--322. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Martin Grohe. 1998. Finite Variable Logics in Descriptive Complexity Theory. The Bulletin of Symbolic Logic 4 (1998), 345--398. Google ScholarGoogle ScholarCross RefCross Ref
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle Scholar
  14. Dexter Kozen. 1997. Kleene Algebra with Tests. ACM Transactions on Programming Languages and Systems 19, 3 (1997), 427--443. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dirk Leinders. 2008. The semijoin algebra. Ph.D. Dissertation. Hasselt University and transnational University of Limburg.Google ScholarGoogle Scholar
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. Maarten Marx. 2005. Conditional XPath. ACM Transactions on Database Systems 30, 4 (2005), 929--959. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Maarten Marx and Maarten de Rijke. 2005. Semantic Characterizations of Navigational XPath. SIGMOD Record 34, 2 (2005), 41--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Maarten Marx and Yde Venema. 1997. Multi-Dimensional Modal Logic. Springer Netherlands, Dordrecht. Google ScholarGoogle ScholarCross RefCross Ref
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarCross RefCross Ref
  25. Alfred Tarski. 1941. On the Calculus of Relations. The Journal of Symbolic Logic 6, 3 (1941), 73--89. Google ScholarGoogle ScholarCross RefCross Ref
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. Balder ten Cate and Maarten Marx. 2007. Navigational XPath: Calculus and Algebra. SIGMOD Record 36, 2 (2007), 19--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle Scholar
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle Scholar

Index Terms

  1. From relation algebra to semi-join algebra: an approach for graph query optimization

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Other conferences
            DBPL '17: Proceedings of The 16th International Symposium on Database Programming Languages
            September 2017
            99 pages
            ISBN:9781450353540
            DOI:10.1145/3122831

            Copyright © 2017 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 September 2017

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            DBPL '17 Paper Acceptance Rate10of15submissions,67%Overall Acceptance Rate10of15submissions,67%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader