Patent ID: 7373354

Claim:
A computer-implemented method of reducing redundancy within a data model in a database, wherein the data model is represented by at least one table, the method comprising: determining a number of distinct values of partial keys in a table, wherein each partial key represents at least one row in the table; reordering one or more columns of the table by cardinality of partial keys, wherein the cardinality of a partial key represents a number of distinct values of the partial key; determining whether pairs of partial keys are functionally dependent, each of the pairs comprising a first partial key and a second partial key; and eliminating one or more columns having functional dependencies from the table; wherein partial key K(i) comprises a partial key with an index i and a value Kri for a tuple t(r) in row with index r; wherein the number of distinct values of K(i) comprises cardinality |K(i)|; wherein determining whether pairs of partial keys are functionally dependent comprises defining function F from each partial key to every other partial key to its right in a reordered table for each row in table T and determining a functional dependency exists when the function F(Kri)=Krj is the same function for each tuple t(r) in the table for values of index i from 1 to (d−1) and for values of j from (i+1) to d; and wherein determining whether pairs of partial keys are functionally dependent for each i from 1 to (d−1) and i from (i+1) to d comprises: setting the flag fd to true, wherein a flag fd comprises Boolean values of true or false indicative of whether a value of the function F is defined; for each tuple t in T, determining whether F(Kri) is defined, wherein F(Kri) is set equal to Krj upon determining that F(Kri) is not defined; looping through the tuples t in T; and generating a report indicating that column i is functionally dependent on column j if flag fd is true after the looping through the tuples t in T.