About normalization of scheme I have the following definition for normalization of scheme: Let $X$ a integral scheme and $L\supseteq K(X)$ an algebraic extension. So $\pi:X'\to X$ is a normalization of $X$ in $L$ if $X'$ is normal, $K(X')=L$, $\pi$ is integral and $\pi$ extend the canonical map $\mathrm{Spec}(L)\to X$.
My first problem is to prove the uniqueness. My idea was to get it with a universal property: $\pi:X'\to X$ is the normalisation of $X$ in $L$ iff for all $Y$ normal with $K(Y)=L$, $Y\to X$ integral there a unique $Y\to X'$ so that the diagram we think is commutative. Is it that? I'm not sure because I can't verify it because of my second problem. If my approach via univeral property were false, how get the uniqueness?
My second problem was the affine case. I suspect that if $X$ is affine with $X=\mathrm{Spec}(A)$ we have $X'=\mathrm{Spec}(A')$ with $A'$ the integral closure of $A$ in $L$. Whatever the definition (of normality in $L$) that I take I have to check the integrity of $f:X'\to X$ that is: for all $U\subseteq X$ open we have $f^{-1}(U)$ affine and $\mathcal{O}_{X'}(f^{-1}(U))$ integral over $\mathcal{O}_X(U)$. My problem is to check the first part: why for all $U\subseteq X$ open we have $f^{-1}(U)$ affine?
 A: Claim: If $X$ is a scheme with global sections $f_1,\ldots,f_n$ which generate $\mathscr{O}_X(X)$ and such that each $X_{f_i}$ is affine, then $X$ is affine.
Proof: First of all, $X$ is quasi-compact since it can be covered by finitely many affine opens. Next, since $X_{f_i}$ is affine, for any $g\in\mathscr{O}_(X)$, $X_g\cap X_{f_i}=X_{gf_i}$ is a standard open in $X_{f_i}$ (the standard open associated to the image of $g$ in $\mathscr{O}_X(X_{f_i})$). In particular, $X_{gf_i}$ is affine. Applying this with $g=f_j$, we get that $X_{f_ifj}=X_{f_i}\cap X_{f_j}$ is affine for all $i,j$, so $X$ is quasi-separated. For any qcqs scheme $X$, the natural map $\mathscr{O}_X(X)_f\rightarrow\mathscr{O}_X(X_f)$ is an isomorphism for all $f\in\mathscr{O}_X(X)$. The pullback of the natural morphism $X\rightarrow\mathrm{Spec}(\mathscr{O}_X(X))$ along the open subscheme $D(f_i)$ is a morphism $X_{f_i}\rightarrow D(f_i)$. (If $f:S\rightarrow S^\prime$ is a morphism of schemes and $V\subseteq S^\prime$ is an open subscheme, then the pullback of $f$ along $U$ is by definition the induced morphism $f^{-1}(V)\rightarrow V$, which can be identified with the base change of $f$ along $V\hookrightarrow S^\prime$, thus the term ``pullback.") We have $D(f_i)=\mathrm{Spec}(\mathscr{O}_X(X)_{f_i})$, and this is canonically identified with $\mathrm{Spec}(\mathscr{O}_X(X_{f_i}))$ by what I've said above. The morphism $X_{f_i}\rightarrow D(f_i)$ can then be identified with the natural morphism $X_{f_i}\rightarrow\mathrm{Spec}(\mathscr{O}_X(X_{f_i}))$, which is an isomorphism by assumption (this is what it means for $X_{f_i}$ to be affine). Thus $X_{f_i}\rightarrow D(f_i)$ is an isomorphism. The condition that $(f_1,\ldots,f_n)=\mathscr{O}_X(X)$ is equivalent to $\mathrm{Spec}(\mathscr{O}_X(X))=\bigcup_{i=1}^n D(f_i)$. So we have a morphism $X\rightarrow\mathrm{Spec}(\mathscr{O}_X(X))$ and an open cover of the target such that the pullback along each open in the cover is an isomorphism. It follows that the morphism is itself an isomorphism, so $X$ is affine.
This is the key fact that is needed to prove that affineness of a morphism is affine local on the target in the sense I described in the comments to the question. If you would like more details, see the exercises to the second section in the second chapter of Harthshorne. Also this is almost certainly proved in great detail in the Stacks Project, probably in the chapter on morphisms (wherever affine morphisms are treated).
