Dataset Relationship Management

Zack Ives, Yi Zhang, Soonbo Han, Nan ZhengCIDR 2019

Abstract

Modern data science has undergone a "sea change," shifting focus from individual record management to the complex relationships between entire datasets. This paper introduces Dataset Relationship Management Systems (DRMS), exemplified by the prototype JuNEAU. JuNEAU integrates directly with Jupyter notebooks to automatically track provenance, "lift" procedural Python code into relational logic, and facilitate the discovery, reuse, and reward of data curation efforts. By bridging the gap between ad-hoc scripting and formal data management, the system provides a framework for managing data lakes and distributed filesystems where discovery and trust are paramount.

Introduction: The Gap in Data Science Workflows

While the database community has spent decades perfecting SQL queries and transaction management, modern data work has largely moved to "data lakes" and distributed filesystems. In these environments, the primary challenges are not record-level updates but rather discovery, integration, and trust. Data scientists often struggle to reuse existing work because they lack context on dataset curation (provenance), version relationships, and code reliability.

Currently, transitioning from a one-off script to a production-ready pipeline is a manual, error-prone process. Furthermore, formal metrics to reward data curation are lacking, as academic citations typically focus on papers rather than the data products themselves. JuNEAU (JUpyter Notebook with Enhanced Access and Understanding) addresses these gaps by treating the computational notebook as the primary interface for data management.

JuNEAU captures dataflow and provenance transparently within the Jupyter notebook environment.

Methodology: The JuNEAU Architecture

JuNEAU operates as a middleware system designed around the "Five Rs" framework: Reuse, Reveal, Revise, Retarget, and Reward. The system employs a hybrid backend using Python for the frontend, Java for the backend, Neo4J for graph-based relationships, and PostgreSQL for relational metadata.

Procedural "Lifting"

A core technical innovation is the ability to analyze Python/Pandas code within notebook cells and "lift" it into a declarative Directed Acyclic Graph (DAG) of relational algebra operators, such as filters, joins, and projections. This allows the system to interpret the intent of the code without requiring the user to write SQL.

The process of 'lifting' procedural Pandas code into a declarative DAG of relational algebra operators.

Fine-Grained Provenance

By tracking dataflow between statements and across cell boundaries, JuNEAU captures record-to-record provenance. This technical approach helps identify exactly which input rows contributed to a specific output, enabling researchers to understand the lineage of their data products.

Key Insights and Ideas

  • Notebooks as the "New Shell": Rather than forcing scientists into a traditional database UI, the DRMS lives inside JupyterLab, capturing information transparently as the scientist works.
  • Search-by-Example: JuNEAU explores "table relatedness" to find datasets with similar schemas, overlapping values, or similar provenance, moving beyond simple keyword searches.
  • Code as Data: By converting code into relational expressions, the system can perform "regression testing" on data, automatically detecting if a new version of a cleaning script produces different results for specific records.
  • Schema Auto-complete: The system can suggest common attributes or structures based on how others have handled similar data, assisting users who may not be experts in schema design.

Key Results

The system was evaluated using real-world experiences from the Penn Database Group, including multimodal datasets from IEEG.org and various ETL benchmarks. Key findings include:

  1. Efficiency: The PROVision module can trace the provenance of specific output results in seconds, even when re-running the entire workflow would take hours.
  2. Semantic Extraction: A significant portion of Pandas code can be successfully mapped to relational algebra, enabling cross-platform "retargeting" (e.g., running local code on Apache Spark).
  3. Discovery: Provenance similarity proved to be a powerful signal for finding related datasets that keyword-based search engines would typically miss.

Limitations and Future Work

Despite its successes, JuNEAU faces challenges with "opaque" code, such as complex iterative loops or recursive functions that do not map cleanly to relational algebra. These remain "black boxes" in the current DAG. Additionally, while "lifting" code is possible, automatically optimizing it for different environments (like moving from a laptop to a cloud cluster) without performance loss remains a significant hurdle.

Future work will focus on balancing factors like data freshness and trust in search rankings, as well as addressing the broader social challenge of shifting scientific citation culture to value data curation.

Summary updated

BibTeX
@inproceedings{ives2019dataset,
  author = {Zack Ives and Yi Zhang and Soonbo Han and Nan Zheng},
  title = {{Dataset Relationship Management}},
  booktitle = {CIDR},
  year = {2019},
}
Figure