  The recent discovery of superconductivity in Sr-doped NdNiO$_2$ films grown
on SrTiO$_3$ started a novel field within unconventional superconductivity. To
understand the similarities and differences between nickelate and cuprate
layers on the same SrTiO$_3$ substrate, here based on the density functional
theory we have systematically investigated the structural, electronic, and
magnetic properties of NdNiO$_2$/SrTiO$_3$ and CaCuO$_2$/SrTiO$_3$ systems. Our
results revealed a strong lattice reconstruction in the case of
NdNiO$_2$/SrTiO$_3$, resulting in a polar film, with the surface and
interfacial NiO$_2$ layers presenting opposite displacements. However, for
CaCuO$_2$/SrTiO$_3$, the distortions of those same two CuO$_2$ layers were in
the same direction. In addition, we found this distortion to be approximately
independent of the studied range of film thickness for both the nickelate and
cuprates films. Furthermore, we also observed a two-dimensional electron gas at
the interface between NdNiO$_2$ and SrTiO$_3$, caused by the polar
discontinuity, in agreement with recent literature. For NdNiO$_2$/SrTiO$_3$ the
two-dimensional electron gas extends over several layers, while for
CaCuO$_2$/SrTiO$_3$ this electronic rearrangement is very localized at the
interface between CaCuO$_2$ and SrTiO$_3$. The electronic reconstruction found
at the interface involves a strong occupation of the Ti $3d_{xy}$ state. In
both cases, there is a significant electronic charge transfer from the surface
Ni or Cu layers to the Ti interface layer. The interfacial Ni and Cu layer is
hole and electron doped, respectively. By introducing magnetism and electronic
correlation, we observed that the $d_{3z^2-r^2}$ orbital of Ni becomes
itinerant while the same orbital for Cu remains doubly occupied, establishing a
clear two- vs one-orbital active framework for the description of these
systems.
