论文标题
查询:基于逻辑的图可帮助用户更快地了解复杂的SQL查询
QueryVis: Logic-based diagrams help users understand complicated SQL queries faster
论文作者
论文摘要
了解现有SQL查询的含义对于代码维护和重复使用至关重要。但是,即使对于专家用户或查询的原始创建者,SQL也很难阅读。我们猜想可以在\ emph {自动生成的视觉图表中捕获查询的逻辑意图,从而可以帮助用户比单独使用SQL文本更快,更准确地理解查询的含义。我们使用基于SQL的一阶逻辑基础的视觉图表沿该方向提出初始步骤,并可以捕获深嵌套查询的含义。我们的图基于逻辑中的图解推理系统的丰富历史,并是使用大量人类计算机互动的最佳实践设计的:它们是\ emph {minimal},因为没有视觉元素是多余的;它们是\ emph {Unmagbuil},因为没有两个具有不同语义的查询映射到相同的可视化;它们以自然的方式\ emph {扩展}以前现有的关系架构和连接性查询的视觉表示。一项涉及亚马逊机械土耳其人42位用户的实验评估表明,与单独阅读SQL相比,参与者只有2--3分钟的静态教程,参与者可以更快地解释查询。此外,我们有证据表明,我们的视觉图会导致参与者的错误少于SQL。我们认为,更常规接触SQL的图表表示会产生\ emph {基于模式的},因此更直观的使用和重复使用SQL。有关实验研究,评估刺激,原始数据和分析以及源代码的所有详细信息,请访问https://osf.io/mycr2
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 \emph{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 \emph{minimal} in that no visual element is superfluous; they are \emph{unambiguous} in that no two queries with different semantics map to the same visualization; and they \emph{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 \emph{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