Query Interpretation is the problem of reading and understanding existing SQL queries. It is often as hard as Query Composition, i.e. creating a new query. Hence today, data analysts who iteratively analyse and explore large data sets with SQL do not build upon previously issued queries; they rather build their queries from scratch. We envision a new and more effective user-query interaction which is facilitated by new tools that help users quickly understand the intent of existing SQL queries. Users can thus browse through sets of past queries, understand their patterns, and leverage those query templates to compose new ones.

QueryViz
QueryViz is such a novel visualization tool that reduces the time needed to read and understand existing SQL queries. It thus enables effective query-reuse, a principal component in the vision of a Collaborative Query Management System (CQMS). Our visual formalism provides a minimal, yet expressive visual vocabulary that intuitively encode the "meaning" of a SQL query. It is inspired by the First-Order logic representation of SQL and combines succinctness features of both tuple and domain relational calculus.

We target two principal audiences: (i) users who often issue the same or similar queries and who need to quickly browse through a repository of existing queries; and (ii) novices that try to familiarize themselves with the logic behind alternative patterns of SQL queries. QueryViz uses as input only two strings: the database schema and the SQL query. It can thus serve as light-weight add-on to existing database systems.
Online Demonstration
Feel free to play with Online QueryViz, our current online demo which allows you to quickly visualize your queries (see the SQL grammar that QueryViz currently supports). You can also try an example Usage Scenario: Given a natural language description of a query, choose its translation into SQL query among a set of similar queries either with or without having QueryViz as your friend.
Publications
- Databases will visualize Queries too
Wolfgang Gatterbauer
PVLDB 4(12): 1498-1501, Aug 2011. (VLDB Challenges and Visions track)
[Paper], [Narrated Presentation (70MB)], [Presentation (19min)]
- QueryViz: Helping Users Understand SQL Queries and their Patterns
Jonathan Danaparamita, Wolfgang Gatterbauer
EDBT 2011, pp. 558-561. (System Demonstration)
[Demo paper], [bib]
People & Affiliations
| (Grad student @ University of Michigan) | |
| (Assistant Professor @ CMU) |
Funding
This project is motivated by the Collaborative Query Management (CQMS) project and was supported in part by NSF grant IIS-0915054 (the BeliefDB project). Any opinions, findings, and conclusions or recommendations expressed in this project are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.




