Query formulation is increasingly performed by systems that need to guess a user’s intent (e.g. via spoken word interfaces). But how can a user know that the computational agent is returning answers to the “right” query? More generally, given that relational queries can become pretty complicated, how can we help users understand existing relational queries, whether human-generated or automatically generated? Now seems the right moment to revisit a topic that predates the birth of the relational model: developing visual metaphors of relational queries.


While visual methods for composing queries have been studied extensively in the database literature under the topic of Visual Query Languages (VQLs), the challenges for supporting the reverse functionality of automatically creating a visual representation of an existing query (“Query Visualization”) are different from the problem of composing a new query.


This lecture-style tutorial surveys the key visual metaphors developed for visual representations of relational expressions. We will survey the history and state-of-the art of relationally-complete diagrammatic representations of relational queries, discuss the key visual metaphors developed in over a century of investigating diagrammatic languages, and organize the landscape by mapping their used visual alphabets to the syntax and semantics of Relational Algebra (RA) and Relational Calculus (RC).

Slides (PDF, 306 pages, 35 MB)

Tutorial first page.png Visual Representations of Relational Queries (VLDB 2023 tutorial)

Newer and extended version (2024)

This tutorial has been considerably extended in a later ICDE 2024 tutorial.


This work has been supported in part by the National Science Foundation (NSF) under award numbers IIS-1762268 and IIS-1956096, and conducted in part while the author was visiting the Simons Institute for the Theory of Computing. 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 Funding Agencies.

National Science Foundation Simons Institute for the Theory of Computing


A Tutorial on Visual Representations of Relational Queries

To cite this tutorial, please use following bibtex entry:

  author = {Wolfgang Gatterbauer},
  title = {A Tutorial on Visual Representations of Relational Queries},
  journal = {PVLDB},
  volume = {16},
  number = {12}
  pages = {3890-3893},
  year = {2023},
  doi = {10.14778/3611540.3611578},
  url = {https://northeastern-datalab.github.io/visual-query-representation-tutorial/}