  For a fixed integer $d$, we study here the locus of degree $d$ hypersurfaces
$X$ in $\mathbb{P}^{2n+1}$ such that $H^{2n}(X,\mathbb{Q}) \cap
H^{n,n}(X,\mathbb{C}) \not= \mathbb{Q}$. We call this locus \textit{the
Noether-Lefschetz locus}. Any irreducible component of this locus is locally a
Hodge locus. So, we see that the study of this locus is very closely related to
the variational Hodge conjecture. In this article we show that the Hodge locus
corresponding to the cohomology class of a complete intersection subscheme in
$\mathbb{P}^{2n+1}$ of codimension $n+1$ and degree less than $d$ satisfies the
variational Hodge conjecture. The interesting part is that we use techniques
from commutative algebra to prove this statement (after certain identifications
coming from Hodge theory). In the case $n=1$, we use similar methods to
characterize all non-reduced components of the Noether-Lefschetz locus of
codimension less than or equal to $3d$.
