skip to main content
10.1145/3318464.3380586acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Maintaining Acyclic Foreign-Key Joins under Updates

Published: 31 May 2020 Publication History

Abstract

A large number of analytical queries (e.g., all the 22 queries in the TPC-H benchmark) are based on acyclic foreign-key joins. In this paper, we study the problem of incrementally maintaining the query results of these joins under updates, i.e., insertion and deletion of tuples to any of the relations. Prior work has shown that this problem is inherently hard, requiring at least Ω(|db|1/2 -ε) time per update, where |db| is the size of the database, and ε > 0 can be any small constant. However, this negative result holds only on adversarially constructed update sequences; on the other hand, most real-world update sequences are "nice", nowhere near these worst-case scenarios. We introduce a measure λ, which we call the enclosureness of the update sequence, to more precisely characterize its intrinsic difficulty. We present an algorithm to maintain the query results of any acyclic foreign-key join in O(λ) time amortized, on any update sequence whose enclosureness is λ. This is complemented with a lower bound of Ω(λ1-ε), showing that our algorithm is essentially optimal with respect to λ. Next, using this algorithm as the core component, we show how all the 22 queries in the TPC-H benchmark can be supported in ~O(łambda) time. Finally, based on the algorithms developed, we built a continuous query processing system on top of Flink, and experimental results show that our system outperforms previous ones significantly.

Supplementary Material

MP4 File (3318464.3380586.mp4)
Presentation Video

References

[1]
Swarup Acharya, Phillip B Gibbons, Viswanath Poosala, and Sridhar Ramaswamy. 1999. Join synopses for approximate query answering. In Proc. ACM SIGMOD International Conference on Management of Data.
[2]
Foto N. Afrati and Jeffrey D. Ullman. 2011. Optimizing Multiway Joins in a Map-Reduce Environment. IEEE Transactions on Knowledge and Data Engineering, Vol. 23, 9 (2011), 1282--1298.
[3]
Yanif Ahmad, Oliver Kennedy, Christoph Koch, and Milos Nikolic. 2012. DBToaster: Higher-order delta processing for dynamic, frequently fresh views. Proceedings of the VLDB Endowment, Vol. 5, 10 (2012), 968--979.
[4]
Guillaume Bagan, Arnaud Durand, and Etienne Grandjean. 2007. On acyclic conjunctive queries and constant delay enumeration. In International Workshop on Computer Science Logic. Springer, 208--222.
[5]
Paul Beame, Paraschos Koutris, and Dan Suciu. 2013. Communication Steps for Parallel Query Processing. In Proc. ACM Symposium on Principles of Database Systems.
[6]
Catriel Beeri, Ronald Fagin, David Maier, and Mihalis Yannakakis. 1983. On the Desirability of Acyclic Database Schemes. J. ACM, Vol. 30, 3 (1983), 479--513.
[7]
Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. 2017. Answering Conjunctive Queries under Updates. In Proc. ACM Symposium on Principles of Database Systems.
[8]
Paris Carbone, Asterios Katsifodimos, Stephan Ewen, Volker Markl, Seif Haridi, and Kostas Tzoumas. 2015. Apache Flink: Stream and Batch Processing in a Single Engine. IEEE Data Engineering Bulletin, Vol. 38, 4 (2015), 28--38.
[9]
Badrish Chandramouli, Jonathan Goldstein, Mike Barnett, Robert DeLine, Danyel Fisher, John C Platt, James F Terwilliger, and John Wernsing. 2014. Trill: A high-performance incremental query processor for diverse analytics. Proceedings of the VLDB Endowment, Vol. 8, 4 (2014), 401--412.
[10]
Rada Chirkova and Jun Yang. 2012. Materialized views. Foundations and Trends® in Databases, Vol. 4, 4 (2012), 295--405.
[11]
T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. 2009. Introduction to Algorithms 3rd ed.). The MIT Press.
[12]
Ashish Gupta, Inderpal Singh Mumick, and Venkatramanan Siva Subrahmanian. 1993. Maintaining views incrementally. ACM SIGMOD Record, Vol. 22, 2, 157--166.
[13]
Muhammad Idris, Martin Ugarte, and Stijn Vansummeren. 2017. The Dynamic Yannakakis Algorithm: Compact and Efficient Query Processing Under Updates. In Proc. ACM SIGMOD International Conference on Management of Data.
[14]
Ahmet Kara, Hung Q Ngo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. 2019 a. Counting Triangles under Updates in Worst-Case Optimal Time. In Proc. International Conference on Database Theory.
[15]
Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. 2019 b. Trade-offs in Static and Dynamic Evaluation of Hierarchical Queries. arXiv preprint arXiv:1907.01988 (2019).
[16]
Christoph Koch. 2010. Incremental query evaluation in a ring of databases. In Proc. ACM SIGMOD International Conference on Management of Data. ACM, 87--98.
[17]
Milos Nikolic, Mohammad Dashti, and Christoph Koch. 2016. How to win a hot dog eating contest: Distributed incremental view maintenance with batch updates. In Proc. ACM SIGMOD International Conference on Management of Data. ACM, 511--526.
[18]
Milos Nikolic and Dan Olteanu. 2018. Incremental view maintenance with triple lock factorization benefits. In Proc. ACM SIGMOD International Conference on Management of Data. ACM, 365--380.
[19]
Kenneth A Ross, Divesh Srivastava, and S Sudarshan. 1996. Materialized view maintenance and integrity constraint checking: Trading space for time. In ACM SIGMOD Record, Vol. 25. ACM, 447--458.
[20]
Abraham Silberschatz, Henry F Korth, Shashank Sudarshan, et almbox. 1997. Database system concepts. Vol. 4. McGraw-Hill New York.
[21]
Mihalis Yannakakis. 1981. Algorithms for acyclic database schemes. In Proc. International Conference on Very Large Data Bases. 82--94.
[22]
Ke Yi, Hai Yu, Jun Yang, Gangqiang Xia, and Yuguo Chen. 2003. Efficient Maintenance of Materialized Top-k Views. In Proc. IEEE International Conference on Data Engineering.

Cited By

View all
  • (2024)Insert-Only versus Insert-Delete in Dynamic Query EvaluationProceedings of the ACM on Management of Data10.1145/36958372:5(1-26)Online publication date: 7-Nov-2024
  • (2024)Reservoir Sampling over JoinsProceedings of the ACM on Management of Data10.1145/36549212:3(1-26)Online publication date: 30-May-2024
  • (2023)DBSP: Automatic Incremental View Maintenance for Rich Query LanguagesProceedings of the VLDB Endowment10.14778/3587136.358713716:7(1601-1614)Online publication date: 1-Mar-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SIGMOD '20: Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data
June 2020
2925 pages
ISBN:9781450367356
DOI:10.1145/3318464
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

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 May 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. acyclic joins
  2. incremental view maintenance
  3. query evaluation under updates
  4. sliding windows

Qualifiers

  • Research-article

Funding Sources

  • HKRGC

Conference

SIGMOD/PODS '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 785 of 4,003 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)23
  • Downloads (Last 6 weeks)1
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Insert-Only versus Insert-Delete in Dynamic Query EvaluationProceedings of the ACM on Management of Data10.1145/36958372:5(1-26)Online publication date: 7-Nov-2024
  • (2024)Reservoir Sampling over JoinsProceedings of the ACM on Management of Data10.1145/36549212:3(1-26)Online publication date: 30-May-2024
  • (2023)DBSP: Automatic Incremental View Maintenance for Rich Query LanguagesProceedings of the VLDB Endowment10.14778/3587136.358713716:7(1601-1614)Online publication date: 1-Mar-2023
  • (2023)Change Propagation Without JoinsProceedings of the VLDB Endowment10.14778/3579075.357908016:5(1046-1058)Online publication date: 1-Jan-2023
  • (2023)Foreign Keys Open the Door for Faster Incremental View MaintenanceProceedings of the ACM on Management of Data10.1145/35887201:1(1-25)Online publication date: 30-May-2023
  • (2022)Efficient Incrementialization of Correlated Nested Aggregate Queries using Relative Partial Aggregate Indexes (RPAI)Proceedings of the 2022 International Conference on Management of Data10.1145/3514221.3517889(136-149)Online publication date: 10-Jun-2022
  • (2021)CquirrelProceedings of the VLDB Endowment10.14778/3476311.347631514:12(2667-2670)Online publication date: 28-Oct-2021

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media