QueryVis: Logic-based diagrams help users understand complicated SQL queries faster
Not on the map. Why?
Abstract (arXiv)
Understanding the meaning of existing SQL queries is critical for code maintenance and reuse. Yet SQL can be hard to read, even for expert users or the original creator of a query. We conjecture that it is possible to capture the logical intent of queries in automatically-generated visual diagrams that can help users understand the meaning of queries faster and more accurately than SQL text alone. We present initial steps in that direction with visual diagrams that are based on the first-order logic foundation of SQL and can capture the meaning of deeply nested queries. Our diagrams build upon a rich history of diagrammatic reasoning systems in logic and were designed using a large body of human-computer interaction best practices: they are minimal in that no visual element is superfluous; they are unambiguous in that no two queries with different semantics map to the same visualization; and they extend previously existing visual representations of relational schemata and conjunctive queries in a natural way. An experimental evaluation involving 42 users on Amazon Mechanical Turk shows that with only a 2--3 minute static tutorial, participants could interpret queries meaningfully faster with our diagrams than when reading SQL alone. Moreover, we have evidence that our visual diagrams result in participants making fewer errors than with SQL. We believe that more regular exposure to diagrammatic representations of SQL can give rise to a pattern-based and thus more intuitive use and re-use of SQL. All details on the experimental study, the evaluation stimuli, raw data, and analyses, and source code are available at https://osf.io/mycr2
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). First posted on arXiv 23 Apr 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 1; 2024: 2; 2025: 0; 2026: 1.
4 papers.
- 2023XNLI: Explaining and Diagnosing NLI-based Visual Data Analysiscited by 18
- 2024SQLucid: Grounding Natural Language Database Queries with Interactive Explanationscited by 10
- 2024The Role of Accuracy and Validation Effectiveness in Conversational Business Analyticscited by 0
- 2026ERUnderstand: Evaluating Vision-Language Models on Structured ER Diagramscited by 0
- 2026ERUnderstand: Evaluating Vision-Language Models on Structured ER Diagrams27 Jul 2026
- 2024The Role of Accuracy and Validation Effectiveness in Conversational Business Analytics18 Nov 2024
- 2024SQLucid: Grounding Natural Language Database Queries with Interactive Explanations10 Sep 2024
- 2023XNLI: Explaining and Diagnosing NLI-based Visual Data Analysis25 Jan 2023