A Principled Solution to the Disjunction Problem of Diagrammatic Query Representations
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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
- On The Reasonable Effectiveness of Relational Diagrams: Explaining Relational Query Patterns and the Pattern Expressiveness of Relational Languages cites QueryVis: Logic-based Diagrams help Users Understand Complicated SQL Queries Faster
Builds 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
- SConE: Simplified Cone Embeddings with Symbolic Operators for Complex Logical QueriesChau D. M. Nguyen, Tim French, Wei Liu, Michael StewartACL Findings 2023 · 3 citations
- 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
- DAGE: DAG Query Answering via Relational Combinator with Logical ConstraintsYunjie He, Bo Xiong, Daniel Hernández, Yuqicheng Zhu et al.WWW 2025 · 4 citations
