5. A circle $\odot O_{1}$ with radius $r$ is contained within a circle $\odot O$ with radius $R$. It is known that there exists a quadrilateral $A B C D$ that is externally tangent to $\odot O_{1}$ and inscribed in $\odot O$. Then the minimum value of $\frac{R}{r}$ is ( ).
(A) $\frac{\sqrt{2}}{2}$
(B) $\frac{\sqrt{3}}{2}$
(C) $\frac{\sqrt{6}}{2}$
(D) $\sqrt{2}$
5.D.

Let the area of quadrilateral $ABCD$ be $S$, the semi-perimeter be $p$, $AB=a$, $BC=b$, $CD=c$, $DA=d$, and the areas of $\triangle ABC$, $\triangle BCD$, $\triangle CDA$, and $\triangle DAB$ be $S_1$, $S_2$, $S_3$, and $S_4$ respectively.
Since quadrilateral $ABCD$ has both an incircle and a circumcircle, then $a+c=b+d$.
Thus, $p=\frac{1}{2}(a+b+c+d)=a+c=b+d$, and $S=pr$,
$S=\sqrt{(p-a)(p-b)(p-c)(p-d)}=\sqrt{abcd}$.
Furthermore, $S_1=\frac{1}{2}ab\sin B=\frac{abAC}{4R}$, similarly, $S_2=\frac{bcBD}{4R}$, $S_3=\frac{cdAC}{4R}$, $S_4=\frac{adBD}{4R}$.
Therefore, $S_1 S_2 S_3 S_4=\frac{(abcdAC \cdot BD)^2}{(4R)^4}$.
According to Ptolemy's theorem,
$$
\begin{array}{l}
\frac{(ac+bd)^2}{(4R)^4}=\frac{(AC \cdot BD)^2}{(4R)^4} \\
=\frac{1}{16} \sin A \cdot \sin B \cdot \sin C \cdot \sin D \leqslant \frac{1}{16}.
\end{array}
$$

Thus, $(2R)^4 \geqslant (ac+bd)^2$
$\geqslant 4abcd=4S^2=4p^2r^2$.
Also, $S^2=abcd \leqslant \left(\frac{a+b+c+d}{4}\right)^4=\left(\frac{p}{2}\right)^4$ $\Rightarrow p^2r^2 \leqslant \frac{p^4}{16} \Rightarrow p^2 \geqslant 16r^2$.
From equations (1) and (2), we get $R^4 \geqslant 4r^4$, so, $\frac{R}{r} \geqslant \sqrt{2}$.
Equality holds if and only if $R=\sqrt{2}r$. In this case, quadrilateral $ABCD$ is a square.