When $f,g$ are polynomial functions on $\mathbb Q$ with $g\ne 0$ we cannot define $f(x)/g(x)$ when $g(x)=0.$ This causes difficulties with defining "rational functions on $\mathbb Q$". For example there do not exist polynomials $f,g$ such that $g(0)\ne 0$ and such that $f(x)/g(x)=1/x$ whenever $x\ne 0.$ The domain of a rational function on $\mathbb Q$ may have to be a proper subset of $\mathbb Q.$
Let $R$ be the set of ordered pairs $(f,g)$ of polynomial functions on $\mathbb Q$ with $g\ne 0.$ Think of $(f,g)$ as representing a function $f(x)/g(x).$
For $r_1=(f_1,g_1)$ and $r_2=(f_2,g_2)$ in $R,$ define $$r_1\sim r_2 \iff \forall x \in \mathbb Q\;(f_1(x)g_2(x)=f_2(x)g_1(x)).$$ Then $\sim$ is an equivalence relation. Observe that $\{x:g_1(x)=0\lor g_2(x)=0\}$ is finite, and that $$(f_1,g_1)\sim (f_2,g_2) \iff \forall x\; (g_1(x)\ne 0 \ne g_2(x)\implies f_1(x)/g_1(x)=f_2(x)/g_2(x)).$$
Let $\mathbb F=R_{/\sim}$ be the set of $\sim$-equivalence classes. For $C_1,C_2\in R_{/\sim}$ define $C_1+C_2$ to be the $\sim$-equivalence class of $(f_1g_2+f_2g_1,g_1g_2)$ where $(f_1,g_1), (f_2,g_2)$ are any members of, respectively, $C_1,C_2.$
Similarly define $C_1C_2$ as the $\sim$-equivalence class of $(f_1f_2,g_1g_2).$
You may verify that $\mathbb F$ satisfies all the requirements of a field. The additive identity $0_{\mathbb F}$ is the equivalence class of $(0,1).$ The multiplicative identity $1_{\mathbb F}$ is the equivalence class of $(1,1).$
Define a relation $<_F$ on $\mathbb F$ by $ C_1n\;(\;(g_1(x)g_2(x)\ne 0) \land (f_1(x)/g_1(x)>f_2(x)/g_2(x)\;)).$$ You can verify that $<_F$ satifies all of the requirements for a linear order.
Also that for $C_1,C_2,C_3 \in \mathbb F$ we have $$C_1<_FC_2\implies C_1+C_3<_FC_2+C_3$$ $$\text { and }\quad (C_1<_FC_2\land 0_{\mathbb F}<_FC_3)\implies C_1C_3<_FC_2C_3.$$ So $\mathbb F$ is an ordered field.
For rational polynomials $f,g$ with $g\ne 0,$ the function $f/g$ with domain $\{x\in \mathbb Q:g(x)\ne 0\}$ can be mapped to the $\sim$-equivalence class of $(f,g).$
We can identify each $k\in \mathbb Q$ with the $\sim$-class of $(k,1).$
The above construction is analogous to defining $\mathbb Q$ from $\mathbb Z$ as equivalence classes of pairs $(x,y)$ of integers with $y\ne 0$,.... with $(x,y)$ being equivalent to $(x',y')$ iff $xy'=x'y.$