  The oxygen and nitrogen abundance evolutions with redshift of emission-line
galaxies in the Sloan Digital Sky Survey are considered for four intervals of
galaxy stellar masses, ranging from 10^11.3 M_sun to 10^10.2 M_sun. We have
measured their line fluxes and derived the O and N abundances using recent
calibrations. The evolution of O and N abundances with redshift clearly shows
the galaxy downsizing effect, where enrichment (and hence star formation)
ceases in high-mass galaxies at earlier times and shifts to lower-mass galaxies
at later epochs. The origin of the scatter in the N/H - O/H diagram has been
examined. The most massive galaxies, where O and N enrichment and star
formation has already stopped, occupy a narrow band in the N/H -- O/H diagram,
defining an upper envelope. The less massive galaxies which are still
undergoing star formation at the current epoch are shifted downwards, towards
lower N/H values in the N/H - O/H diagram. This downward shift is caused by the
time delay between N and O enrichment. This time delay together with the
different star formation histories in galaxies is responsible for the large
scatter in the N/H -- O/H diagram.
