  We define marked sets and bases over a quasi-stable ideal $\mathfrak j$ in a
polynomial ring on a Noetherian $K$-algebra, with $K$ a field of any
characteristic. The involved polynomials may be non-homogeneous, but their
degree is bounded from above by the maximum among the degrees of the terms in
the Pommaret basis of $\mathfrak j$ and a given integer $m$. Due to the
combinatorial properties of quasi-stable ideals, these bases behave well with
respect to homogenization, similarly to Macaulay bases. We prove that the
family of marked bases over a given quasi-stable ideal has an affine scheme
structure, is flat and, for large enough $m$, is an open subset of a Hilbert
scheme. Our main results lead to algorithms that explicitly construct such a
family. We compare our method with similar ones and give some complexity
results.
