Determining the sections of a sheaf on any open via a sheaf on basic open sets This question is largely a follow on from my earlier question
here. I'm not sure my understanding of the situation was good enough at that point to really frame the question properly to get the information I needed. Suppose we are working with an affine scheme, $X = \text{spec}A$. I am completely comfortable with the sections of the structure sheaf $\mathcal{O}_{X}(D(f))$ over the distinguished basic open sets (they are just elements of the localization $A_{f}$). What I am confused about is using that property to induce the sheaf structure on $\textit{all}$ the open sets. I think the best way is to break my question into a few parts. 
1) I want to use the gluing property for sheaves. To do that, I need a sheaf on each of the distinguished open sets. Say we have a distinguished open set $D(f)$. This has a cover by the intersections of $D(f)$ with all the other $D(g_{i})$ (and by quasicompactness this can be a finite cover, say with $p$ elements). Then,
$$ D(f) = D(fg_{1}) \cup D(fg_{2}) \cup \cdots \cup D(fg_{p}).  $$ 
Is it true that the localizations are given by,
$$A_{fg_{i}} = \left\lbrace \frac{a}{f^{m}g_{i}^{n}}: a \in A \, \, n, m \in \mathbb{N} \right\rbrace ?$$
Surely if that is true, then the cocycle condition for gluing sheaves is satisfied in this case?
2) Say $U \subset X$ is an open set. By quasicompactness, we again have a finite cover by dinstinguished open sets
$$ U = D(f_{1}) \cup D(f_{2}) \cdots \cup D(f_{m}). $$
Is there some $\textit{explicit}$ description of the ring $\mathcal{O}_{X}(U)$? Is it true that every element of $\mathcal{O}_{X}(D(f_{i}))$ is realized as a restriction of an element of $\mathcal{O}_{X}(U)$?
3) My intuition tells me that if $V \subset U$, then the ring of regular functions $\mathcal{O}_{X}(V)$ should be in some sense "bigger" than the ring of regular functions $\mathcal{O}_{X}(U)$, since being regular on a subset is surely a weaker statement. Is there any usefulness to this intuition? More specifically to me previous question, are the $\mathcal{O}_{X}(D(f_{i}))$ some kind of "extension" in a ring theoretic sense of $\mathcal{O}_{X}(U)$?
I apologize if this question is rather vague and/or long winded, I just feel like I am not understanding it well enough to word my exact problem concisely. I would appreciate any answers or advice, and if someone can somehow read between the lines and see what it is I'm missing regarding defining sheaves from local data that would be massively appreciated.
Thanks
 A: I'm not sure this is "explicit," but I think it partially answers (2).  The distinguished open sets $D(f)$ form a basis $\mathcal{B}$ for the topology on $\operatorname{Spec}(A)$.  We then define $\mathcal{O}_X(U)$ as the inverse limit
$$
\mathcal{O}_X(U) = \varprojlim_{B \subseteq U\\ B \in \mathcal{B}}\mathcal{O}_X(B).
$$
The reason this makes sense is the following.  Recall that any open set $U$ is a union of basic open sets: $U = \bigcup_\lambda B_\lambda$, with $B_\lambda \in \mathcal{B}$. Since a union is a type of direct limit, then
\begin{align*}
\mathcal{O}_X(U) &= \mathcal{O}_X\left(\bigcup_\lambda B_\lambda\right) = \mathcal{O}_X\left(\varinjlim_\lambda B_\lambda\right) = \varprojlim_\lambda\mathcal{O}_X\left(B_\lambda\right)
\end{align*}
where the direct limit has become an inverse limit because $\mathcal{O}_X$ is contravariant.  In addition, the universal property of inverse limits gives defines the restriction maps.  For more on this, see Prop. I-12 of The Geometry of Schemes by Eisenbud and Harris or section 3.2 of EGA I.
