$\DeclareMathOperator{\Spec}{Spec}$ Given a ring $R$ the closed sets of the Zariski Topology on the Spectrum of $R$, $\Spec(R)$, is: $$ V(I)= \{P\in \Spec(R) \mid I \subset P\} \, . $$
Given an affine space $A^n$ the closed sets of the Zariski Topology of $A^n$ is: $$ V(I)= \{x \in A^n \mid f(x)=0, \forall f \in I \} $$
What is a concrete relationship between the two definitions if any? I.e., is there some $R$ so that we have a one to one correspondence between closed sets?