2. An a priori method of identifying dependencies and discovering correlations between column pairs from one or more relational databases and applying said discoveries in query optimization; said method comprising: a. selecting column pairs from said relational databases; b. collecting a random sample of value pairs from said selected column pairs to produce a reduced table S; c. identifying functionally dependent column pairs in said selected column pairs by detecting soft functional dependencies between value pairs in said collected random sample of value pairs, said soft functional dependency between a first column C 1 and a second column C 2 defined as |C 1 | S /|C 1 ,C 2 | S ≈1, said |C 1 | S denoting number of distinct values in column C 1 of reduced table S, said |C 1 ,C 2 | S denoting number of distinct values in a concatenation of columns C 1 and C 2 of reduced table S; d. preparing a set of value pairs using system catalog statistics for said relational databases; said set comprised of value pairs in said collected sample for which soft functional dependencies are not detected; e. identifying correlated column pairs in said selected column pairs by testing for correlations between value pairs in said prepared set of value pairs using a chi-squared test; and f. outputting to a query optimizer implemented as computer readable program code stored in computer storage of a computer, said functionally dependent column pairs and said correlated column pairs, said query optimizer utilizing said functionally dependent column pairs and said correlated column pairs in query optimization.
10. The a priori method of claim 2 , wherein said step of preparing a set of value pairs is based on: a. obtaining frequently-occurring value pairs from said system catalog statistics; b. if said obtained frequently-occurring value pairs account for a proportion of said collected random sample of value pairs such that a statistical distribution of said collected random sample of value pairs is skewed, filtering infrequently occurring value pairs in said collected random sample of value pairs, else, bucketizing said collected random sample of value pairs by hashing into equal size subset buckets; and c. creating a number of disjoint categories equal to a number of either of: said subset buckets or said frequently-occurring value pairs; said categories computed for said chi-squared test; and d. building a contingency table for said chi-squared test; said contingency table comprising values from said selected column pairs.