A Formalism and Library for Database Visualization
Eugene Wu, Xiang Yu Tuang, Antonio Li, Vareesh Bainwala · 2025
Read A Formalism and Library for Database Visualization by Eugene Wu, Xiang Yu Tuang, Antonio Li, Vareesh Bainwala (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-08979.txt.
Introduction
Eugene Wu and co-authors build the first system for visualizing whole databases, not just single tables. Their twenty twenty-five paper notes that classic grammars like Vega-Lite and ggplot2 assume one table. Multi-table data makes those tools clunky and their rules unsound.
A database visualization maps database constraints, such as schemas and foreign keys, to visual forms. A design counts as faithful if the picture keeps those constraints true. This view shows that chart choices are really data modeling choices in disguise. A JavaScript library called dvl puts the idea to work. Case studies show it beating both special tools and grammar languages on their own ground.
Catalog record
| CREATOR | Eugene Wu, Xiang Yu Tuang, Antonio Li, Vareesh Bainwala |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 70 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-08979
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A Formalism and Library for Database Visualization Eugene Wu, Xiang Yu Tuang, Antonio Li, Vareesh Bainwala Abstract . Existing data visualization formalisms are restricted to single-table inputs, which makes existing visualization grammars like Vega-lite or ggplot2 tedious to use, have overly complex APIs, and unsound when visualization multi-table data. This paper presents the first visualization formalism to support databases as input—in other words, database visualization. A visualization specification is defined as a mapping from database constraints (e.g., schemas, types, foreign keys) to visual representations of those constraints, and we state that a visualization is faithful if it visually preserves the underlying database constraints. This formalism explains how visualization designs are the result of implicit data modeling decisions. We further develop a javascript library called dvl and use a series of case studies to show its expressiveness over specialized visualization systems and existing grammar-based languages. † † authors: . PVLDB Reference Format: PVLDB, 14(1): XXX-XXX, 2020. doi:XX.XX/XXX.XX † † This work is licensed under the Creative Commons BY-NC-ND 4.0 International License. Visit https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of this license. For any use beyond those covered by this license, obtain permission by emailing [email protected] . Copyright is held by the owner/author(s). Publication rights licensed to the VLDB Endowment. Proceedings of the VLDB Endowment, Vol. 14, No. 1 ISSN 2150-8097. doi:XX.XX/XXX.XX PVLDB Artifact Availability: The source code, data, and/or other artifacts have been made available at URL_TO_YOUR_ARTIFACTS . 1. Introduction Modern data analysis heavily relies on the ability to visualize and explore data. The majority of visualization libraries, dashboards, and systems are built on top of graphical grammars, which provide a versatile and compositional method to compose data visualizations. These grammars form the foundation of most data visualization systems including nViZn ( Wilkinson, 2001 ) , ggplot2 ( Wickham, 2010 ) , Tableau ( Stolte et al., 2002 ) , and vega-lite ( Satyanarayan et al., 2018 ) , and their structured nature simplifies the development of advanced features such as visualization recommendation ( Mackinlay, 1986 ; Mackinlay et al., 2007 ; Moritz et al., 2019 ) , visualization linters and consistency checks ( Mcnutt and Kindlmann, 2018 ; Qu and Hullman, 2017 ) , automated exploration ( Wongsuphasawat et al., 2015 ) , and meta-analysis of visualizations ( Chen and Liu, 2023 ; Mcnutt and Kindlmann, 2018 ; Mcnutt, 2022 ) . The theory that underlies graphical grammars is Bertin’s data-to-visual (or pixel) mapping: tuples map to marks (e.g., points), and data attributes map to the mark’s visual channels ( Bertin, 1983 ) . For instance, the points in Figure 1 (a) visualize a table N(id,age,sal) as a scatter plot V_{N} where each row is mapped to a point mark, and N.age and T.sal are respectively mapped to the x and y position channels (ignore the red edges). Wilkinson’s Grammar of Graphics ( Wilkinson, 2012 ) then extended this mapping with scales, mark types, facets, and other components to develop a Graphical Grammar that defines a design space of visual representations of a dataset. This grammar-based formulation has been greatly successful in practice and theory. However, Bertin’s theory and its derivative grammars are predicated on a strong assumption: that the input is a single-table. This assumption has been codified in prominent models such as the Information Visualization Reference Model ( Card et al., 1999 ) , which define a pipeline that first transforms data into a single table , applies visual mappings, and then transforms the resulting view. Yet most information does not conform to a single table and is relational in nature: ranging from hierarchical JSON documents, to complex RDF graphs, to large multi-table relational databases. This gap means that visualizing data that is modeled as multiple tables using existing graphical grammars is tedious and unsound. Further, these grammars only express a limited space of visualization designs and expose overly complex APIs. (L1) Tedious. Current graphical grammars are tedious because the expectation is that the user is expected to ”prepare” their data (extract, transform, filter, join) and load it into the visualization tool, where each has a different set of APIs and expects a different schema or format. There lacks a uniform abstraction that works with tables as they exist in the database. For example, ggnetwork requires the user to load their data into a custom network object type and call the appropriate functions to load the edges and node attributes; D3’s hierarchical algorithms expect a nested javascript object that represents the nodes and edges; Tableau expects users to join desired tables before they can be visualized, which can lead to semantic errors ( Hyde and Fremlin, 2024 ; Huang et al., 2023 ) . (L2) Unsound. The need to fit complex relational data into a single table also makes existing graphical grammars theoretically unsound because, as this paper will show, they cannot guarantee that the visualization faithfully reflects the data. In fact, faithfulness is primarily qualitatively defined in the visualization literature ( algebraicvis ; hullmanconsistency ) and this paper will formally define faithfullness and describe automatic ways to check faithfulness. For instance, Figure 1 connects the points in V_{N} based on the edges table E(id,s,t) . In existing approaches, the user first computes E^{\prime}=N\Join E\Join N , then maps E^{\prime} as links in V_{E^{\prime}} . However, the edges only appear to connect the points. If the user jitters the points or applies a force-directed layout algorithm, then the positions of the points and edges become inconsistent because the visualization is unable to maintain their logical relationship ( Figure 1 (b)). Our definition of faithfulness will show how this is a violation of referential integrity. (L3) Limited Expressiveness. The single-table assumption also greatly reduces the space of visual designs that graphical grammars can express and makes it impossible for existing formalisms to express seemingly common designs such as node-link diagrams, parallel coordinates, tree diagrams, nested visualizations, nor tree maps. This leads users that wish to visualize relational data to resort to custom libraries for different “data types”. For instance, a node-link visualization design that use e.g., a force-directed layout algorithm is not expressible in graphical grammars because it needs to reason about two tables. As a consequence, the user needs to do more “preparation”: run the layout to compute pixel coordinates of the nodes in a new table N^{\prime}=layout(N) , derive a new edges table E^{\prime\prime}=N^{\prime}\Join E\Join N^{\prime} , and draw the points and links. Unfortunately, this breaks the abstraction that the visualization maps data to pixels because N^{\prime} and E^{\prime\prime} are tables of pixel coordinates and not data , so the grammar is merely used for rendering because all of the layout logic was applied during preparation. (L4) Complex APIs. The limited expressiveness also increases the complexity of the visualization library due to the need to implement custom logic to support common functionality. For instance, most graphical grammars support small multiples by introducing a custom x- and y-facet visual channel. For instance, \{N\to point,year\to x,price\to y,qtr\to fx\} renders a scatterplot comparing price and year for each quarter, and lays the subplots along the x-axis. Internally, the library treats each quarter as a separate dataset with a single nominal attribute, draws a scatterplot where each quarter is rendered as a