I was reading through Atiyah-MacDonald and they mention that if a ring $A$ is a Noetherian domain of dimension 1 has the property that every primary ideal is equal to the product of a prime ideal (i.e. if A is a Dedekind domain), then every ideal in A can be written uniquely as the product of powers of prime ideals.
My question concerns the uniqueness of these primary decompositions - one need to check that if $\frak p$ and $\frak q$ are prime ideals in $A$ and ${\frak p}^n = {\frak q}^m$ then $\frak p = \frak q$ and $n=m$.
I see why $\frak p = \frak q$ but it is unclear to me why $n=m$. Is this a general property of powers of prime ideals in (commutative) rings?