A Principled Solution to the Disjunction Problem of Diagrammatic Query Representations
Wolfgang Gatterbauer
Abstract
Finding unambiguous diagrammatic representations for first-order logical formulas and relational queries with arbitrarily nested disjunctions has been a surprisingly long-standing unsolved problem. We refer to this problem as the disjunction problem (of diagrammatic query representations).
This work solves the disjunction problem. Our solution unifies, generalizes, and overcomes the shortcomings of prior approaches for disjunctions. It extends the recently proposed Relational Diagrams and is identical for disjunction-free queries. However, it can preserve the relational patterns and the safety for all well-formed Tuple Relational Calculus (TRC) queries, even with arbitrary disjunctions. Additionally, its size is proportional to the original TRC query and can thus be exponentially more succinct than Relational Diagrams.
1 FOL is basically the same as Relational Calculus and thus equivalent in expressiveness to relationally complete languages. 2 Safety is a syntactic criterion that guarantees that the query is domain-independent and thus always returns finitely many answers [71]. See Section 3.2 for details. "Same pattern" is a semantic notion and means (slightly simplified) that the representation uses the set of relation variables. See Section 2.2 for details.
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 da5ab69a-de43-4bfd-a25e-b01111e46799Builds on3
- QueryVis: Logic-based Diagrams help Users Understand Complicated SQL Queries FasterAristotelis Leventidis, Jiahui Zhang, Cody Dunne, Wolfgang Gatterbauer et al.SIGMOD 2020 · 36 citations
- On The Reasonable Effectiveness of Relational Diagrams: Explaining Relational Query Patterns and the Pattern Expressiveness of Relational LanguagesWolfgang Gatterbauer, Cody DunneSIGMOD 2024 · 6 citations
- Diagrammatic Algebra of First Order LogicFilippo Bonchi, Alessandro Di Giorgio, Nathan Haydon, Pawel SobocinskiLICS 2024 · 5 citations
Related papers
- Understanding Queries by Conditional InstancesAmir Gilad, Zhengjie Miao, Sudeepa Roy, Jun YangSIGMOD 2022 · 9 citations
- Polygon: Symbolic Reasoning for SQL using Conflict-Driven Under-Approximation SearchPinhan Zhao, Yuepeng Wang, Xinyu WangPLDI 2025
- Proving Query Equivalence Using Linear Integer ArithmeticHaoran Ding, Zhaoguo Wang, Yicun Yang, Dexin Zhang et al.SIGMOD 2024 · 20 citations
- Proving hypersafety compositionallyEmanuele D'Osualdo, Azadeh Farzan, Derek DreyerOOPSLA 2022 · 16 citations
- Towards Universal Languages for Tractable Ontology Mediated Query AnsweringHeng Zhang, Yan Zhang, Jia-Huai You, Zhiyong Feng et al.AAAI 2020 · 2 citations
