Demonstration of a Multiresolution Schema Mapping System

Zhongjun Jin, Christopher Baik, Michael J. Cafarella, H. V. Jagadish, Yuze Lou

Abstract

Prism is a schema mapping system that enables users to define desired data through multiresolution constraints, ranging from precise values to fuzzy metadata. By integrating a flexible constraint language with a Bayesian-optimized search algorithm, Prism efficiently synthesizes SQL queries, bridging the gap between complex source databases and target schemas without requiring expert-level domain knowledge.

Introduction

Schema mapping—the process of writing queries to transform data from a source database into a specific target format—is a complex task that typically requires deep expertise in both source and target structures. While "sample-driven" mapping has been proposed to simplify this by guessing queries from output examples, it faces two major hurdles. First, users often lack exact values for every column (the high-resolution issue). Second, users cannot easily leverage general meta-knowledge, such as data types or value ranges (the low-expressivity issue).

System Architecture and Methods

Prism addresses these challenges by supporting constraints at various "resolutions":

  • High Resolution: Precise data values (traditional samples).
  • Medium Resolution: Incomplete samples or approximate values (e.g., value ranges or logical OR conditions).
  • Low Resolution: Column-level metadata (e.g., data types like decimal or column name hints).
The PRISM architecture, illustrating the flow from user constraints to query discovery and validation.

To manage the massive search space created by these fuzzy constraints, Prism employs a two-step technical approach. It first performs Candidate Discovery to identify matching columns and tables while searching for valid join paths. It then uses Bayesian-Optimized Validation to prune the search space. Instead of testing every candidate query, Prism breaks them into smaller "filters" and uses Bayesian models to estimate failure probabilities, checking the most likely-to-fail filters first to save computational resources.

Explainability and Visualization

A core insight of the Prism system is that explainability is vital for non-experts. Presenting a raw SQL statement with multiple joins can be overwhelming. To mitigate this, Prism includes a visualization component that represents synthesized SQL as a query graph, where relations are depicted as squares and attributes as ellipses. This makes the "black box" of query synthesis transparent and understandable.

Visualization of a synthesized SQL query as a graph, showing table relations and attribute constraints.

Evaluation and Key Results

The system was evaluated using three primary relational datasets: Mondial (geography), IMDB (movies), and NBA (basketball statistics). Key findings include:

  • Efficiency: The Bayesian approach reduced filter validations by an average of 30%, and up to 70% in specific cases.
  • Robustness: Loosening constraints to include ranges rather than exact values did not significantly impact execution time or the discovery of valid queries.
  • User Effort: By allowing for marginal knowledge (e.g., knowing a value is between 0 and 100), Prism significantly reduces the knowledge burden on the user.

Conclusion and Future Work

Prism demonstrates that multiresolution mapping is computationally feasible and highly effective. Current limitations include a focus on Project-Join (PJ) queries. Future developments aim to support more complex SQL features like GROUP BY aggregations, expand the variety of metadata constraints to include user-defined functions, and improve the scalability of Bayesian models across multiple relations.

Summary updated

BibTeX
@inproceedings{jin2019demonstration,
  author = {Zhongjun Jin and Christopher Baik and Michael J. Cafarella and H. V. Jagadish and Yuze Lou},
  title = {{Demonstration of a Multiresolution Schema Mapping System}},
  booktitle = {CIDR},
  year = {2019},
  url = {https://openreview.net/forum?id=K3nHi850_dX},
}
Figure