  We introduce the notion of relation type of an affine algebra and prove that
it is well defined by using the Jacobi-Zariski exact sequence of
Andr\'e-Quillen homology. In particular, the relation type is an invariant of
an affine algebraic variety. Also as a consequence of the invariance, we show
that in order to calculate the relation type of an ideal in a polynomial ring
one can reduce the problem to trinomial ideals. When the relation type is at
least two, the extreme equidimensional components play no role. This leads to
the non existence of affine algebras of embedding dimension three and relation
type two.
