Discovering Multi-Table Functional Dependencies Without Full Join Computation

Ugo Comignani, Laure Berti-Équille, Noël NovelliarXiv 2020

Abstract

Functional dependency (FD) discovery across multiple tables is traditionally a computationally expensive "join-then-mine" process. This paper introduces JEDI (Join dEpendency DIscovery), a framework designed to find exact multi-table FDs without full join computation. By utilizing logical inference, "upstaged" approximate dependencies, and selective sampling, JEDI achieves significant performance gains—up to an order of magnitude faster than state-of-the-art methods—while significantly reducing memory consumption and computational overhead.

Introduction

Functional dependencies (FDs) are fundamental to database design, data cleaning, and query optimization. While efficient algorithms exist for single-table FD discovery, real-world data is typically normalized across multiple tables. The standard approach to finding FDs in these scenarios is to compute the full join and then mine for dependencies. However, this "join-then-mine" strategy suffers from exponential search space growth, high computational costs for materializing massive joins, and issues with dangling tuples that can obscure or create spurious dependencies.

JEDI addresses these challenges by asking if multi-table FDs can be discovered without ever materializing the full join. By treating the join operation as a filter, JEDI leverages metadata from individual tables to reconstruct the metadata of the joined result.

Example of FD discovery across PATIENT and ADMISSION tables illustrating how single-table FDs and AFDs contribute to join FDs.

Methodology

The JEDI framework employs a three-stage "frugal" workflow to discover FDs across tables:

  1. Upstaged AFDs (Algorithm 1): JEDI identifies Approximate FDs (AFDs) in single tables that become exact FDs in the join result. This occurs when the specific rows violating the rule in the source table are "dangling tuples" that do not find a match in the join operation.
  2. Logical Inference (Algorithm 2): Using transitivity (e.g., if $A \rightarrow \text{JoinKey}$ in Table L and $\text{JoinKey} \rightarrow B$ in Table R, then $A \rightarrow B$ in the join), JEDI infers a large portion of join FDs with zero join computation.
  3. Selective Mining and Sampling (Algorithms 3 & 4): For dependencies that cannot be inferred, JEDI uses two strategies:
  4. JEDI_SM (Selective Mining): Uses vertical partitioning to focus only on plausible attribute combinations, pruning the search space based on single-table knowledge.
  5. JEDI_SB (Sampling-Based): Performs "micro-joins" on horizontal data slices to quickly identify violations. If a rule holds on a representative sample, it is treated as a strong candidate for a join FD.
The JEDI framework workflow, showing the progression from single-table analysis to join FD discovery.

Evaluation and Results

JEDI was evaluated using real-world (MIMIC-III, PTE, PTC) and synthetic (TPC-H) datasets. The results demonstrate substantial improvements over traditional methods:

  • Speed: JEDI_SM outperformed traditional methods like HyFD and TANE by an order of magnitude on datasets with low join coverage (where many rows do not match).
  • Efficiency: Approximately 75% of exact join FDs were discovered via logical inference alone, which accounted for only half of the total execution time.
  • Precision: The sampling variant (JEDI_SB) achieved a precision of 1.0 on complex MIMIC-III joins while processing only 63% of the input data on average.
  • Resource Usage: JEDI maintained a lower memory footprint by avoiding the materialization of large intermediate join results.

Conclusion

JEDI demonstrates that metadata from individual tables contains sufficient signal to reconstruct the functional dependencies of a join result efficiently. By leveraging the "dangling tuple advantage," JEDI provides a scalable alternative to traditional brute-force mining. While the framework is currently sensitive to table join ordering and relies on heuristics for sampling, it represents a significant step toward efficient metadata discovery in multi-table environments.

Summary updated

BibTeX
@misc{comignani2020discovering,
  author = {Ugo Comignani and Laure Berti-Équille and Noël Novelli},
  title = {{Discovering Multi-Table Functional Dependencies Without Full Join Computation}},
  year = {2020},
  eprint = {2012.06237},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.06237},
}
Figure