NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Mimir: Bringing CTables into Practice

Arindam Nandi, Ying Yang, Oliver Kennedy, Boris Glavic, Ronny Fehling, Zhen Hua Liu, Dieter GawlickarXiv 2016

Abstract

The present state of the art in analytics requires high upfront investment of human effort and computational resources to curate datasets, even before the first query is posed. So-called pay-as-you-go data curation techniques allow these high costs to be spread out, first by enabling queries over uncertain and incomplete data, and then by assessing the quality of the query results. We describe the design of a system, called Mimir, around a recently introduced class of probabilistic pay-as-you-go data cleaning operators called Lenses. Mimir wraps around any deterministic database engine using JDBC, extending it with support for probabilistic query processing. Queries processed through Mimir produce uncertainty-annotated result cursors that allow client applications to quickly assess result quality and provenance. We also present a GUI that provides analysts with an interactive tool for exploring the uncertainty exposed by the system. Finally, we present optimizations that make Lenses scalable, and validate this claim through experimental evidence.

Introduction

In traditional data analytics, data must be meticulously cleaned, integrated, and curated before an analyst can run their first query. This upfront cost is often disproportionate to the exploratory nature of early-stage analysis. "Pay-as-you-go" (or on-demand) data curation systems attempt to solve this by applying quick, best-effort cleaning heuristics and letting analysts query the data immediately.

However, tracking the uncertainty introduced by these automated heuristics is computationally difficult. The state-of-the-art approach uses Conditional Tables (C-Tables) to represent uncertain data, but evaluating queries over C-Tables naively forces the database to abandon efficient join operations in favor of massive, slow cross-products. Mimir addresses the challenge of making C-Table query evaluation scalable on standard, deterministic relational database engines without losing the ability to explain why a specific data point is uncertain.

System Architecture and Lenses

Mimir is designed as a shim layer that sits on top of standard relational databases (such as SQLite or commercial DBMSs) via JDBC. The core of Mimir's functionality lies in Lenses, which are unary operators that apply a data curation heuristic—such as missing value interpolation or schema matching—and output a Virtual C-Table (VC-Table). VC-Tables use symbolic variables to represent uncertain values and track their provenance throughout the query lifecycle.

The Mimir system architecture, illustrating the shim layer between the user and the backend database.

As shown in the architecture, Mimir intercepts user queries and uses a Rewrite Engine to transform them into a format the backend database can execute efficiently. The Annotated Cursor then manages the results, ensuring that uncertainty metadata is preserved and presented to the user.

Scaling Probabilistic Queries

To make querying VC-Tables fast, Mimir employs three primary optimization strategies that push computation down into the backend database:

  1. Partitioning: Mimir splits the query into deterministic and non-deterministic fragments. Since most data is usually clean, the backend database can use standard indexes and fast joins for the bulk of the data, leaving only the uncertain fraction for complex probabilistic evaluation.
  2. Inlining: Mimir pre-materializes "best-guess" values for uncertain variables directly into the database. It replaces variable terms in the query with nested SQL lookups. To maintain provenance, Mimir tracks unique identifiers (ROWIDs) through the query execution.
  3. Hybrid: This approach combines the two, partitioning the query first and then inlining the non-deterministic partitions.

Interactive Uncertainty Exploration

A key feature of Mimir is its ability to surface uncertainty to the end-user. The system includes a GUI that highlights uncertain rows and cells in red. This visual feedback allows analysts to immediately identify which parts of their results are based on heuristics rather than concrete data.

The Mimir GUI highlighting uncertain data points and providing human-readable explanations for automated curation decisions.

Users can interact with these highlighted cells to view statistical metrics, such as confidence intervals and variance, as well as human-readable explanations of the assumptions made by the underlying Lenses. This transparency is critical for building trust in pay-as-you-go curation systems.

Experimental Evaluation

The authors evaluated Mimir using the TPC-H benchmark at scaling factors of 0.1 (100 MB) and 1 (1 GB). By simulating incomplete data through the random replacement of foreign key references with NULLs, the team tested Mimir's ability to repair domain constraints on the fly.

Key results include:

  • Efficiency: Mimir introduces virtually zero overhead for simple single-table scans compared to deterministic queries.
  • Join Performance: While partitioning accelerates simple joins, Inlining proved essential for complex joins (e.g., 6-way foreign-key lookups), allowing the backend database to utilize efficient Hash-joins.
  • Optimality: The Hybrid approach generally yielded the best performance across a variety of query types.

Conclusion and Future Work

Mimir demonstrates that probabilistic data curation can be integrated into existing database workflows with minimal performance penalties. By treating uncertainty as the exception rather than the rule, Mimir allows analysts to begin their work immediately while maintaining a clear understanding of data quality. Future work includes adding support for SQL aggregation functions over uncertain data and developing a cost-based optimizer to further refine query execution plans.

Summary updated

BibTeX
@misc{nandi2016mimir,
  author = {Arindam Nandi and Ying Yang and Oliver Kennedy and Boris Glavic and Ronny Fehling and Zhen Hua Liu and Dieter Gawlick},
  title = {{Mimir: Bringing CTables into Practice}},
  year = {2016},
  eprint = {1601.00073},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1601.00073},
}
Figure