DBSP: Automatic Incremental View Maintenance for Rich Query Languages
Mihai Budiu, Tej Chajed, Frank McSherry, Leonid Ryzhyk, Val Tannen
Abstract
Incremental view maintenance (IVM) has long been a central problem in database theory. Many solutions have been proposed for restricted classes of database languages, such as the relational algebra, or Datalog. These techniques do not naturally generalize to richer languages. In this paper we give a general, heuristic-free solution to this problem in 3 steps: (1) we describe a simple but expressive language called DBSP for describing computations over data streams; (2) we give a new mathematical definition of IVM and a general algorithm for solving IVM for arbitrary DBSP programs, and (3) we show how to model many rich database query languages using DBSP (including the full relational algebra, queries over sets and multisets, arbitrarily nested relations, aggregation, flatmap (unnest), monotonic and non-monotonic recursion, streaming aggregation, and arbitrary compositions of all of these). SQL and Datalog can both be implemented in DBSP. As a consequence, we obtain efficient incremental view maintenance algorithms for queries written in all these languages.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3b7f3b53-4746-4417-8fba-baf0941753c4Cited by top-tier papers9
- Flo: A Semantic Foundation for Progressive Stream ProcessingShadaj Laddad, Alvin Cheung, Joseph M. Hellerstein, Mae MilanoPOPL 2025 · 3 citations
- Datalog with First-Class FactsThomas Gilray, Arash Sahebolamri, Yihao Sun, Sowmith Kunapaneni et al.VLDB 2025 · 3 citations
- Optimizing Datalog for the GPUYihao Sun, Ahmedur Rahman Shovon, Thomas Gilray, Sidharth Kumar et al.ASPLOS 2025 · 3 citations
- POSEIDON: A Consolidated Virtual Network Controller that Manages Millions of Tenants via Config TreeBiao Lyu, Enge Song, Tian Pan, Jianyuan Lu et al.NSDI 2024 · 2 citations
- Stateful Differential Operators for Incremental ComputingRunqing Xu, Sebastian ErdwegPOPL 2026 · 1 citation
Builds on1
Related papers
- Programmable View Update Strategies on RelationsVan-Dang Tran, Hiroyuki Kato, Zhenjiang HuVLDB 2020 · 16 citations
- StreamQL: a query language for processing streaming time seriesLingkun Kong, Konstantinos MamourasOOPSLA 2020 · 8 citations
- Thrifty Query Execution via IncrementabilityDixin Tang, Zechao Shang, Aaron J. Elmore, Sanjay Krishnan et al.SIGMOD 2020 · 9 citations
- Translating canonical SQL to imperative code in CoqVéronique Benzaken, Evelyne Contejean, Mohammed Houssem Hachmaoui, Chantal Keller et al.OOPSLA 2022 · 3 citations
- Interactive Debugging of Datalog ProgramsAndré Pacak, Sebastian ErdwegOOPSLA 2023 · 4 citations
