Even if in dimension 2, complex structure is equivalent to algebraic structure for surfacs, but when studying deformation theory or moduli theory for surface, they are different, for example, the concept of the family of Riemann surface and the family of complex smooth algebraic curve are different, but it seems that we can study the deformation theory (or moduli question) for Riemann surface in the language of algebraic geometry (or just consider it is an algebraic geometry object), I don't know if it is true or it is my misunderstanding. So my question is if the deformation theory for Riemann surface is the same as the deformation theory for smooth complex algebraic curve? Thank you for any answer for this question which confuses me a long time!