Let $f : Y \to X$ be an affine morphism of schemes (say of finite type over a field $k$). I read in some notes that $Y$ can be written as $Y \cong E \times_{E'} X$ where $u : E \to E'$ is a morphism of vector bundles over $X$, and $X \to E'$ is the zero section. My question is, why is this true.
I know that $Y$ can be written as the relative spectrum of $f_* O_Y$, but I don't see how I would write it in the form above.
In the absolute case, when $X = Spec(k)$, then the claim is basically that affine $k$-schemes $Y$ can be written as $\mathbb{A}^n \times_{\mathbb{A}^{mn}} 0$, in other words as the zero locus of $m$ polynomials in $\mathbb{A}^n$. That seems true, I believe this is essentially the definition of affine variety in non-scheme theoretic language.