  The chemical evolution of galaxies on a cosmological timescale is still a
matter of debate despite the increasing number of available data provided by
spectroscopic surveys of star-forming galaxies at different redshifts. The
fundamental relations involving metallicity, such as the mass-metallicity
relation (MZR) or the fundamental-metallicity relation, give controversial
results about the reality of evolution of the chemical content of galaxies at a
given stellar mass. In this work we shed some light on this issue using the
completeness reached by the 20k bright sample of the zCOSMOS survey and using
for the first time the nitrogen-to-oxygen ratio (N/O) as a tracer of the gas
phase chemical evolution of galaxies that is independent of the star formation
rate. Emission-line galaxies both in the SDSS and 20k zCOSMOS bright survey
were used to study the evolution from the local Universe of the $MZR up to a
redshift of 1.32 and the relation between stellar mass and nitrogen-to-oxygen
ratio (MNOR) up to a redshift of 0.42 using the N2S2 parameter. All the
physical properties derived from stellar continuum and gas emission-lines,
including stellar mass, star formation rates, metallicity and N/O, were
calculated in a self-consistent way over the full redshift range. We confirm
the trend to find lower metallicities in galaxies of a given stellar mass in a
younger Universe. This trend is even observed when taking possible selection
effects into account that are due to the observed larger median star formation
rates for galaxies at higher redshifts. We also find a significant evolution of
the MNOR up to z = 0.4. Taking the slope of the O/H vs. N/O relation into
account for the secondary-nitrogen production regime, the observed evolution of
the MNOR is consistent with the trends found for both the MZR and its
equivalent relation using new expressions to reduce its dependence on SFR.
