Reconstructing a function from its zero set I was reading "The Princeton Companion to Mathematics" when I came across the following

In general, as long as $R \neq 0$, we get that if $f$ is a polynomial that has exactly the same complex roots as $x^2-y^2-R$ then $f(x,y)=c (x^2-y^2-R)^m$ for some $m$ and $c \neq 0$.

This made me search for an analogue in larger families of functions, such as those analytic in some domain $D \subseteq \mathbb{C}^n$:

Suppose $f,g:D \subseteq \mathbb{C}^n \to \mathbb{C}$ are analytic, with the same zero set $Z \subseteq D$. What can be said about the relationships (if any) between $f$ and $g$?

For example, I can see how the constant "$c$" from the polynomial discussion can be replaced with any exponential function $\exp \circ h$ with $h:D \to \mathbb{C}$ analytic. However, I don't think that 
$$f(\mathbf{x})=\mathrm{e}^{h(\mathbf{x})} g(\mathbf{x})^m, \quad m=1,2,3,\dots ,$$
is the right answer. Suppose that $D$ is the unit ball, and $g(\mathbf{x})=x_1$. The function
$$f(\mathbf{x}):=\sin(g(\mathbf{x})) $$
has the same zero set when restricted to $D$, namely $Z=\{\mathbf{x} \in D:x_1=0\}$.
I think that the case where the domain of analyticity is $\mathbb{C}^n$ is nice, because such cases don't appear to occur.
In summary, I'm looking for a generalization of the consequences of two functions sharing the zero set, in families of functions such as those analytic in some domain, or more particularly, in the entire complex $n$-dimensional space.
Thank you!
 A: It's not quite true that such a simple relationship must hold - consider $(z-1)^2(z-2)$ versus $(z-1)(z-2)^2$. Neither function can be expressed as some power of the other multiplied by a unit (ie the ideal generated by one function does not contain the other). Instead, what is true, is that functions with the same zero sets belong to the same radical ideal.
Definition: given an ideal $I\subset R$, the radical of $I$, denoted $\sqrt{I}$, is the ideal defined by $x\in \sqrt{I}$ if and only if $x^n\in I$ for some positive integer $n$.
The theorem that makes all this tick is Hilbert's Nullstellensatz, which says there is an inclusion-reversing bijection between zero loci of ideals and radical ideals. (It says more, but this is a good first statement and directly applicable here.)
For your example of $x$ versus $\sin(x)$, you can use a power series expansion of $\sin(x)$ on the disc to see that $\sin(x)=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots=x(1-\frac{x^2}{3!}+\frac{x^4}{5!}-\cdots)$, and $(1-\frac{x^2}{3!}+\frac{x^4}{5!}-\cdots)$ is nonzero on the unit disc, and is thus a unit in the ring of analytic functions on the unit disc. So it's no surprise that $x$ and $\sin x$ belong to the same radical ideal - they in fact belong to the same ideal.
