Computing Join Queries with Functional Dependencies
Abstract
Recently, Gottlob, Lee, Valiant, and Valiant (GLVV) presented an output size bound for join queries with functional dependencies (FD), based on a linear program on polymatroids. GLVV bound strictly generalizes the bound of Atserias, Grohe and Marx (AGM) for queries with no FD, in which case there are known algorithms running within AGM bound and thus are worstcase optimal. A main result of this paper is an algorithm for computing join queries with FDs, running within GLVV bound up to a polylog factor. In particular, our algorithm is worstcase optimal for any query where the GLVV bound is tight. As an unexpected byproduct, our algorithm manages to solve a harder problem, where (some) input relations may have prescribed maximum degree bounds, of which both functional dependencies and cardinality bounds are special cases. We extend Gottlob et al. framework by replacing all variable subsets with the lattice of closed sets (under the given FDs). This gives us new insights into the structure of the worstcase bound and worstcase instances. While it is still open whether GLVV bound is tight in general, we show that it is tight on distributive lattices and some other simple lattices. Distributive lattices capture a strict superset of queries with no FD and with simple FDs. We also present two simpler algorithms which are also worstcase optimal on distributive lattices within a single$\log$ factor, but they do not match GLVV bound on a general lattice. Our algorithms are designed based on a novel principle: we turn a proof of a polymatroidbased output size bound into an algorithm.
 Publication:

arXiv eprints
 Pub Date:
 March 2016
 DOI:
 10.48550/arXiv.1604.00111
 arXiv:
 arXiv:1604.00111
 Bibcode:
 2016arXiv160400111A
 Keywords:

 Computer Science  Databases;
 Computer Science  Data Structures and Algorithms;
 Computer Science  Information Theory