functional dependeny of a table attributes

Hi guys,

I need a method to check all the functional dependency in a given table .

for an example:

r1r2

25

25

310

410

532

here r2 depends on r1 because when r1 is 2, r2 is always 5 ,but r1 does not depended on r2 because when r2 is 10,r1 have two different values,which is 3 and 4

i guess i need to find the similar numbers and if they relate to same numbers in other rows, then functional dependencies exist.

can someone give me a hint (hopefully some source code) to get all dependencies of a table (columns, rows).

should return a string like r2->r1 ( or A->(B,C) ) ect..

thank you for your help !

[692 byte] By [Servant@AKa] at [2007-10-2 7:25:49]
# 1
Build a map of each putative function, and check for repeated non-equal keys.Pete
pm_kirkhama at 2007-7-16 21:03:13 > top of Java-index,Other Topics,Algorithms...
# 2
Continued here: http://forum.java.sun.com/thread.jspa?threadID=690845
prometheuzza at 2007-7-16 21:03:13 > top of Java-index,Other Topics,Algorithms...