Let $A$ be a ring and $\mathfrak{p} \subset R$ be a prime ideal. Set $A_\mathfrak{p}=R[U^{-1}]$, where $U= A-\mathfrak{p}$. What is the relation between $A/\mathfrak{p}$ and $A_\mathfrak{p}$?
My motivation for this question comes from the definition of affine scheme
This is from the Notes of Gathmann
Remark 5.1.3. Any element $f \in A$ can be considered to be a “function” on $Spec(A)$ in the following sense: for $\mathfrak{p} \in Spec(A)$, denote by $f(\mathfrak{p})$ the image of f under the composite map $A → A/\mathfrak{p} → k(\mathfrak{p})$.
Now the structure sheaf of an affine scheme is defined as follows
For an open set $U \subset Spec(A)$, we define $O(U)$ to be set of functions $s:U \rightarrow \coprod A_\mathfrak{p}$ such that $s(\mathfrak{p}) \in A_\mathfrak{p} $ and require that for each $\mathfrak{p} \in U$ there is a neighbourhood $V$ of $\mathfrak{p}$, contained in $U$ and elements $a,f \in A$ such that for each $q \in V$ and $s(q)=a/f$.
Now my question is can $S(q)$ be interpreted as $a(q)/f(q)$ using the Remark 5.1.3? Does this even make sense? Any ring $A$ as a ring of functions on the prime spectrum $Spec(A)$. Can this interpretation be expanded to the localizations the ring $A$? Can they be thought of as rings of some sort of "rational functions"?
I can't see any direct, straightforward general relation. For example, take
$$R=\Bbb Z\;\;,\;\;\mathfrak p:=2\Bbb Z\;\;,\;\;\Bbb Z_\mathfrak{p}:=\left\{\frac{a}{b}\in\Bbb Q\;;\;b\notin\mathfrak p\right\}\;\;,\;\;R/\mathfrak p=\Bbb Z/2\Bbb Z$$
The localization gives us an infinite subring of the rationals, whereas the quotient ring is the smallest possible (non-zero) field...