TITLE: What are "arithmetic curves"?
QUESTION [6 upvotes]: Let $C$ be a separated irreducible reduced curve which is quasi-finite over $\mathrm{Spec}\: \mathbb Z$. Is it necessarily affine i.e. $\mathrm{Spec}\: \mathcal O$ where $\mathcal O$ is an order in a number field? What if we look at curves faithfully flat over $\mathrm{Spec}\: \mathbb Z$?
Crossposted from MSE: https://math.stackexchange.com/questions/3098577/what-are-arithmetic-curves

REPLY [2 votes]: The answer is yes.
Let $C$ be an integral separated quasi-finite $\mathbb{Z}$-scheme. Then, by Zariski's Main Theorem, there is an open immersion $C\subset D$ with $D$ an integral scheme, and a finite morphism $D\to \mathrm{Spec} \mathbb{Z}$. Since $D\to \mathrm{Spec} \mathbb{Z}$ is finite, there is a finitely generated subring $A\subset \overline{\mathbb{Q}}$ and an isomorphism $D\cong \mathrm{Spec} A$. 
It is well-known that open subsets of affine Dedekind schemes are affine.
Let $D'\to D$ be the normalization of $D$. The pull-back $C':=C\times_D D'$ is open in Spec $D'$, and hence affine. Since $C'$ is affine and $C'\to C$ is finite, it follows that $C$ is affine.