Open cover of a basic open set Consider the following setting: 
Let $X=Spec(R)$ for R an PID together with a presheaf on the Category of basic open sets of the form $D(f)$ assigning to each such set the localization $R_f$ and inclusions $D(f) \subset D(g)$ leading to ringhomomorphism $A_g \rightarrow A_f$. The statement is then that this presheaf is in fact a sheaf.
It's not hard to show that any open set $U \subset X$ is already a basic open subset $D(f)$ so the given presheaf is in fact a presheaf on X. But I'm having some trouble showing the sheaf properties. In order to do so one has to consider an arbitrary open cover $U = \cup_{i \in I} U_i$ of U. But what can I deduce having an open cover of a basic open set?
Is one of the $U_i$ already equal to $U = D(f)$? Besides the special structure here gives an unique decomposition of f into irreducibles (and a unit) $f = u a_1 \ldots a_n$ such that $D(f)$ ist given as the intersection of the $D(a_i)$. My next question is if at least one of the sets $U_i$ has anything to do with one of the sets $D(a_j)$. 
 A: No, it's not true that one $U_i$ is already equal to $U$: consider the open covering $D(6)\cup D(10)$ of $D(2)$ inside $\operatorname{Spec} \Bbb Z$.
There is something that makes this go faster, though: as the (nonzero) localization of a PID is again a PID, you only need to run your argument once. If you can show that given $X$ the spectrum of a PID $R$ covered by some list of $U_i=\operatorname{Spec} R_i$, with intersections $U_i\cap U_j = \operatorname{Spec} R_{ij}$ then $R$ is the equalizer of $\prod_i R_i \rightrightarrows \prod_{i,j} R_{ij}$, you'll be done. Can you do this? Details under the spoiler text, so you can give it your own effort first:

 It's enough to show this for two open subsets $D(a)$ and $D(b)$ where $a,b$ together generate the unit ideal. Suppose we have $(f/a^n,g/b^m)\in R_a\times R_b$ so that $f/a^n=g/b^m$ in $R_{ab}$ and they are written in lowest terms, ie $a$ does not divide $f$ nor does $b$ divide $g$. Clearing denominators, we see that $b^mf=a^ng$. But by uniqueness of factoriztion, the LHS must be in the prime ideal $a$. As $b^m\notin (a)$, then $f\in (a)$ which contradicts the assertion that $n$ was minimal. So $n=m=0$ and $f=g$, so this equalizer is exactly $R$.

(line break)

 Why is it enough to do prove this just once? Pick two members of your cover, $D(a)$ and $D(b)$. Then by running the above argument, we get that things patch together correctly on $D((a,b))$, and we can keep running this argument to get that things patch together on $D((a,b,c))$, etc, so as your cover contains a finite collection of open subsets $D(a_i)$ so that $(a_1,\cdots,a_m)=(1)$, we eventually finish.

