The set of differences of square rationals

If I understood you correctly, $D=\mathbb Q$ since $$ \left(\frac{a b + 1}{2 b}\right)^2 - \left(\frac{a b - 1}{2 b}\right)^2 = \frac{a}{b} $$


We have $4m = (m+1)^2-(m-1)^2$ for all $m \in \mathbb Z$. Therefore, $$ \frac{a}{b} = \frac{4ab}{4b^2} = \frac{(ab+1)^2-(ab-1)^2}{(2b)^2} = \left(\frac{a b + 1}{2 b}\right)^2 - \left(\frac{a b - 1}{2 b}\right)^2 $$ When $ab=\pm 1$, one of the terms is zero. In this case, $\frac{a}{b}=\pm1$ and we can use $$ 1 = \left(\frac{5}{3}\right)^2 - \left(\frac{4}{3}\right)^2, \quad -1 = \left(\frac{4}{3}\right)^2 - \left(\frac{5}{3}\right)^2 $$ Thus, all rationals are the difference of two nonzero rational squares.


The non degenerate quadratic form $X^2-Y^2$ obviously represents $0$ in $\mathbf Q$, i.e. the equation $x^2-y^2=0$ admits solutions $(x,y)\neq (0,0)$. But a non degenerate quadratic form $q(X)= \sum a_{ij}X_iX_j$ in $n$ variables with rational coefficients which represents $0$ represents all rationals. Indeed, $q(tX+Y)= t^2Q(X)+tb(X,Y)+f(Y)$, where $b(X,Y)$ is the bilinear form associated to the quadratic form $q(X)$. If $q(x)=0$ for a certain $x\neq (0,...,0)$, the non degeneracy of $q$ implies the existence of $y\in {\mathbf Q}^n$ s.t. $b(x,y)\neq 0$, so that $q(tx+y)$ is a non constant linear function of $t$ which takes all values in $\mathbf Q$ when $t$ runs through $\mathbf Q$. Note that the main property remains valid over any field of characteristic $\neq 0$.