Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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 2017 Publication 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.
[2]
Michael Benedikt, Wenfei Fan, and Gabriel Kuper. 2005. Structural properties of XPath fragments. Theoretical Computer Science 336, 1 (2005), 3--31.
[3]
Michael Benedikt and Christoph Koch. 2009. XPath Leashed. ACM Computing Surveys (CSUR) 41, 1 (2009), 3:1--3:54.
[4]
Philip A. Bernstein and Dah-Ming W. Chiu. 1981. Using Semi-Joins to Solve Relational Queries. J. ACM 28, 1 (1981), 25--40.
[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.
[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.
[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.
[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.
[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.
[10]
Steven Givant. 2006. The Calculus of Relations as a Foundation for Mathematics. Journal of Automated Reasoning 37, 4 (2006), 277--322.
[11]
Martin Grohe. 1998. Finite Variable Logics in Descriptive Complexity Theory. The Bulletin of Symbolic Logic 4 (1998), 345--398.
[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.
[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.
[14]
Dexter Kozen. 1997. Kleene Algebra with Tests. ACM Transactions on Programming Languages and Systems 19, 3 (1997), 427--443.
[15]
Dirk Leinders. 2008. The semijoin algebra. Ph.D. Dissertation. Hasselt University and transnational University of Limburg.
[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.
[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.
[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.
[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.
[20]
Maarten Marx. 2005. Conditional XPath. ACM Transactions on Database Systems 30, 4 (2005), 929--959.
[21]
Maarten Marx and Maarten de Rijke. 2005. Semantic Characterizations of Navigational XPath. SIGMOD Record 34, 2 (2005), 41--46.
[22]
Maarten Marx and Yde Venema. 1997. Multi-Dimensional Modal Logic. Springer Netherlands, Dordrecht.
[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.
[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.
[25]
Alfred Tarski. 1941. On the Calculus of Relations. The Journal of Symbolic Logic 6, 3 (1941), 73--89.
[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.
[27]
Balder ten Cate and Maarten Marx. 2007. Navigational XPath: Calculus and Algebra. SIGMOD Record 36, 2 (2007), 19--26.
[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.
[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.
[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.
[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.

Cited By

View all
  • (2022)The power of Tarski's relation algebra on treesJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2022.100748(100748)Online publication date: Jan-2022
  • (2022)Optimizing Multiset Relational Algebra Queries Using Weak-Equivalent Rewrite RulesFoundations of Information and Knowledge Systems10.1007/978-3-031-11321-5_11(187-205)Online publication date: 10-Jul-2022
  • (2020)From Relation Algebra to Semi-join Algebra: An Approach to Graph Query OptimizationThe Computer Journal10.1093/comjnl/bxaa031Online publication date: 9-May-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

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
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]

Sponsors

  • SAP
  • ORACLE: ORACLE

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 September 2017

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article

Funding Sources

Conference

DBPL 2017
Sponsor:
  • ORACLE

Acceptance Rates

DBPL '17 Paper Acceptance Rate 10 of 15 submissions, 67%;
Overall Acceptance Rate 10 of 15 submissions, 67%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)67
  • Downloads (Last 6 weeks)15
Reflects downloads up to 03 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2022)The power of Tarski's relation algebra on treesJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2022.100748(100748)Online publication date: Jan-2022
  • (2022)Optimizing Multiset Relational Algebra Queries Using Weak-Equivalent Rewrite RulesFoundations of Information and Knowledge Systems10.1007/978-3-031-11321-5_11(187-205)Online publication date: 10-Jul-2022
  • (2020)From Relation Algebra to Semi-join Algebra: An Approach to Graph Query OptimizationThe Computer Journal10.1093/comjnl/bxaa031Online publication date: 9-May-2020
  • (2018)The Power of Tarski’s Relation Algebra on TreesFoundations of Information and Knowledge Systems10.1007/978-3-319-90050-6_14(244-264)Online publication date: 18-Apr-2018

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media