TITLE: Tensor product of a number field $K$ and the $p$-adic integers
QUESTION [13 upvotes]: In the paper A database of local fields, J. Jones and D. Roberts  introduced an isomorphism $K \otimes \mathbb{Q}_p \cong \prod\limits_{i=1}^g K_{p,i}$, where $K$ is some finite dimensional extension of $\mathbb{Q}$ and $\{K_{p,i} \}$ is some collection of finite dimensional extensions of $\mathbb{Q}_p$.  
The isomorphism is not mentioned again, and it is not clear why this is even an isomorphism of modules (over what ring?), algebras (over what ring?), abelian groups etc.  
$K \otimes \mathbb{Q}_p$ is called an "associated $p$-adic algebra," perhaps suggesting that this tensor product may be interpreted not as a module over $\mathbb{Q}$ but as an algebra over $\mathbb{Q}_p$.  But this doesn't make sense, since $K$ doesn't contain $\mathbb{Q}_p$ as a subfield.
I wanted to ask whether anyone can shed some light on this isomorphism-what it is an isomorphism of, how the isomorphism is given, how the fields $K_{p,i}$ are chosen etc., as well as the significance of these notions.  From the introduction in the paper it only reads "for investigating some problems about number fields, it suffices to know just basic invariants of the $K_{p,i}$, such as ramification index and residual degree."
Any explanation of the above, or link to a reference in which the details are given, would be greatly appreciated.

REPLY [12 votes]: Others will have fuller, more accurate, and more efficient explanations than mine, but let me give it a try.
Let $\mathscr O$ be the ring of algebraic integers of $K$. Then $p\mathscr O=\prod_i\mathfrak p_i^{e_i}$, where $\mathfrak p_1,\ldots,\mathfrak p_g$ are the prime ideals of $\mathscr O$ dividing $p$. The $\mathfrak p_i$-adic completion of $K$ is a field $K_{p,i}$ that’s of degree $n_i$ over $\mathbb Q_p$, and we have $n_i=e_if_i$ where $e_i$ is as above and $f_i$ is the residue-class field degree at $p_i$, and furthermore $\sum_in_i=[K\colon\mathbb Q]$.
Then the map $K\to\bigoplus_iK_{p,i}$ by sending an element to the $g$-tuple of all its images in the various completions extends to $K\otimes\mathbb Q_p$. All the remaining details and verifications are left to the reader.