  We give a general description of the structure of a discrete double groupoid
(with an extra, quite natural, filling condition) in terms of groupoid
factorizations and groupoid 2-cocycles with coefficients in abelian group
bundles. Our description goes as follows: To any double groupoid, we associate
an abelian group bundle and a second double groupoid, its frame. The frame
satisfies that every box is determined by its edges, and thus is called a
`slim' double groupoid. In a first step, we prove that every double groupoid is
obtained as an extension of its associated abelian group bundle by its frame.
In a second, independent, step we prove that every slim double groupoid with
filling condition is completely determined by a factorization of a certain
canonically defined `diagonal' groupoid.
