  The aim of this paper is to establish a duality between the category of
discrete groupoids and the category of geometrically transitive commutative
Hopf algebroids in the sense of P. Deligne and A. Brugui\`eres. In one
direction we have the usual contravariant functor which assigns to each Hopf
algebroid its characters groupoid (the fiber groupoid at the ground field). In
the other direction we construct the contravariant functor which associated to
each discrete groupoid its Hopf algebroid of representative functions. This
duality extends the well known duality between discrete groups and commutative
Hopf algebras, and also sheds light on a new approach to Tannaka-Krein duality
for compact topological groupoids. Our results are supported by several
illustrative examples including topological ones.
