A formal development in the framework of the lattice theory for functional dependencies and minimal keys is presented. Beyond this theoretical study, a technique to prune the key finding problem, named scheme pruning transformation, is proposed in this work. This transformation is founded on theoretical results and has linear cost in the worst case. Moreover, this approach has provided a better size reduction than the usual techniques existing in the literature.