QueryVis: Logic-based diagrams help users understand complicated SQL queries faster

04/23/2020
by   Aristotelis Leventidis, et al.
0

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

READ FULL TEXT

page 19

page 26

page 28

page 31

page 36

page 38

research
03/03/2022

PhD thesis: SQL Comprehension and Synthesis

Structured Query Language (SQL) remains the standard language used in Re...
research
07/25/2019

Applying Constraint Logic Programming to SQL Semantic Analysis

This paper proposes the use of Constraint Logic Programming (CLP) to mod...
research
08/20/2023

A Tutorial on Visual Representations of Relational Queries

Query formulation is increasingly performed by systems that need to gues...
research
05/12/2023

Interactive Text-to-SQL Generation via Editable Step-by-Step Explanations

Relational databases play an important role in this Big Data era. Howeve...
research
12/24/2020

Handling SQL Nulls with Two-Valued Logic

The design of SQL is based on a three-valued logic (3VL), rather than th...
research
03/09/2022

CUBES: A Parallel Synthesizer for SQL Using Examples

In recent years, more and more people see their work depend on data mani...
research
07/07/2018

Recommender system for learning SQL using hints

Today's software industry requires individuals who are proficient in as ...

Please sign up or login with your details

Forgot password? Click here to reset