A Principled Solution to the Disjunction Problem of Diagrammatic Query Representations
Wolfgang Gatterbauer
TL;DR
This work tackles the long-standing disjunction problem in diagrammatic query representations by introducing RepresentationB, a principled, pattern-complete diagrammatic formalism for well-formed Tuple Relational Calculus (TRC) queries. It first replaces join and selection predicates with built-in anchors and uses DeMorgan-based transformation to manage nested disjunctions, then substitutes anchors with existing visual formalisms to recover TRC safety. A key innovation is the DeMorgan-fuse box, a visual shortcut for disjunction that preserves nesting and semantics while enabling safety checks directly in the diagram. The approach unifies and generalizes prior diagrammatic strategies (edge-based, box-based, DeMorgan-based) and proves pattern-completeness for TRC, achieving 100% textbook benchmark coverage and exponential size advantages over Relational Diagrams. Practically, RepresentationB enables principled, scalable, and verifiable visual representations of complex queries without changing the underlying relational signatures.
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.
