Abstract
DataSynth is a declarative synthetic data generator designed to produce high-quality, performance-accurate database instances. By utilizing cardinality constraints instead of procedural scripts, DataSynth leverages linear programming and probabilistic graphical models to capture intricate data correlations and workload-specific skews, ensuring synthetic data mirrors the performance characteristics of real-world production environments.
Introduction
Testing database management systems (DBMS) and applications requires high-quality data that accurately reflects real-world complexity. However, privacy concerns often prevent the use of actual production data, and standard benchmarks like TPC-H frequently fail to capture the specific skews or correlations found in specialized workloads.
Traditionally, developers relied on procedural data generators—custom scripts that populate tables. This approach is difficult to maintain and often breaks when complex relationships between multiple columns (e.g., age, income, and location) need to be captured. DataSynth shifts this paradigm toward a declarative approach: users simply list the desired properties (constraints), and the system automatically determines how to populate the rows to satisfy them.
Methodology
The core innovation of DataSynth is its reliance on Cardinality Constraints. A constraint defines the expected number of rows for a specific predicate, such as "exactly 1,000 rows where customer age > 40."
To transform these constraints into a cohesive database, DataSynth employs several advanced techniques:
- Linear Programming (LP): The system treats constraints as a system of linear equations. It identifies relevant intervals for data values and uses an LP solver to determine the exact number of tuples required in each interval to satisfy all constraints simultaneously.
- Factorization: To avoid the exponential complexity of solving for many columns at once, DataSynth uses factorization techniques from probabilistic graphical models, allowing it to handle high-dimensional data efficiently.
- Reference Learning: The tool can analyze an existing database to learn its histograms and correlations, generating a "masked" version that preserves performance characteristics without exposing sensitive information.
Performance-Aware Data Generation
One of the most significant features of DataSynth is its ability to integrate with query plans. By specifying constraints based on intermediate results within a query plan, users can ensure that a specific query will run with the same performance profile on synthetic data as it does on real data. This guarantees that the query optimizer will make similar choices in both environments.
Declarative Simplicity and GUI
DataSynth simplifies the data generation process by moving the burden from the programmer to a mathematical solver. The tool provides a graphical interface where users can manage constraints directly. This allows for rapid iteration, as users can tweak distributions and immediately see how they affect the resulting data.
Key Results and Evaluation
The authors validated DataSynth using the TPC-H benchmark and various real-world scenarios. Key findings include:
- Efficiency: Despite the theoretical complexity of the problem, the tool's probabilistic approximation algorithms allow for the efficient generation of large-scale databases.
- Functionality: The system successfully handles complex schema properties, including primary/foreign keys, referential integrity, and multi-dimensional correlations.
- Interactive Feedback: The demo highlights a feature where users receive immediate feedback on how their constraints impact data distribution, facilitating a more intuitive design process.
Conclusion and Future Work
DataSynth represents a significant advancement in synthetic data generation by prioritizing declarative constraints over procedural code. While the tool is effective for data masking and performance testing, future work aims to integrate differential privacy to provide formal guarantees against re-identification. Additionally, the authors are developing utilities to automatically extract constraints from existing query plans, further reducing the manual effort required to set up performance-accurate testing environments.
Summary updated