The relation between been the quotient ring of a prime ideal and its localization 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"?
 A: 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...
A: The difference between the two notions you describe is sort of like the difference between, in ordinary real-valued calculus, "the value of $f$ at $P$" and "the Taylor series of $f$ at $P$"; while the latter is a value of some sort at $P$, it contains enough information to reconstruct $f$ in an entire open neighborhood of $P$. (I'm assuming $f$ is analytic in the analogy)
EDIT: for your new question, the answer is yes. Let $f \in A$. For the open set
$$ U = D(f) = \{ \mathfrak{p} \mid f \notin \mathfrak{p} \} = \{ \mathfrak{p} \mid f(\mathfrak{p}) \neq 0 \} $$
you have $\mathcal{O}(U) \cong A[1/f]$. In fact, the open subscheme of $\mathop{\text{Spec}} A$ defined by $U$ is isomorphic to $\mathop{\text{Spec}} A[1/f] $.
A: At least, there is an injective map $\mathrm R / \mathfrak{p} \to \mathrm{R}_{\mathfrak p}/\mathfrak p \mathrm{R}_{\mathfrak p}$.
