  We define a compressed zero-divisor graph $\varTheta(K)$ of a finite
commutative unital ring $K$, where the compression is performed by means of the
associatedness relation. We prove that this is the best possible compression
which induces a functor $\varTheta$, and that this functor preserves categorial
products (in both directions). We use the structure of $\varTheta(K)$ to
characterize important classes of finite commutative unital rings, such as
local rings and principal ideal rings.
