I know that if all prime ideals are maximal ideals (like in PID or Artin ring) then why is their krull dimension $0$? Let's say we have $p$ a prime ideal in Artin ring, then it is maximal so we have $(0)\subsetneq p$ where strict chain of prime ideals $(0)$ and $p$ (which is maximal therefore prime) would give krull dimension of $1$ not $0$ for Artin ring.
Also, for a PID that is not a field, the krull dimension is $1$. Again all nonzero prime ideals are maximal in PID therefore for $(0)\subsetneq p$, where chain of prime ideals $(0)$ and $p$ would give it dimension $1$ as expected.
So is the logic for both PID that's not a field and the Artin ring same for dimension? Then their dimensions should be $1$. I am slightly confused with the definition. Please explain.