A Formalism and Library for Database Visualization
Eugene Wu, Xiang Yu Tuang, Antonio Li, Vareesh Bainwala
TL;DR
This work defines database visualization as a constraint-driven mapping from relational database schemas and constraints to visual representations, ensuring faithfulness by preserving keys and foreign-key relations in the visuals. It extends traditional single-table graphical grammars with foreign attributes and explicit/implicit representations of foreign-key constraints, enabling faithful multi-table visualizations. The authors implement a JavaScript library, dvl, that compiles constraint-based specifications into SQL task graphs and renders layouts, supporting single-table and multi-table workflows, including spatial nesting and shared-scales designs. They further demonstrate the approach with case studies, ER diagrams, and space-filling layouts via HiVE, arguing that many classic visual designs (e.g., node-link, parallel coordinates, facets) naturally emerge from relational modeling decisions. The work lays a foundational theory for a broader space of database visualizations and outlines future directions for scalability, extended constraints, and interactive analysis.
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.
