  Utilizing the observational data of 55,318 star-forming galaxies (SFGs)
selected from the catalog of MPA-JHU emission-line measurements for the SDSS
DR8, we investigate the galaxy downsizing effect of their O and N enrichments,
and the nitrogen production mechanism in them. We show the redshift evolution
of O and N abundances and specific star formation rates for different galaxy
mass ranges, demonstrating the galaxy downsizing effect caused by less massive
progenitors of less massive galaxies. The O and N abundances do not remain
constant for different galaxy mass ranges, and the enrichment (and hence star
formation) decreases with increasing galaxy stellar mass. We find evidence of
the O enrichment for galaxies with stellar masses $M_{*}>10^{11.0} $ (in units
of $M_{\odot}$), i.e. $\Delta({\log}({\rm O/H})) \sim 0.10$ and
$\Delta({\log}({\rm N/H})) \sim 0.28$ from redshift 0.023 to 0.30. Based on the
evolutionary schematic model of N/O ratios in Coziol et al., who proposed the
scheme that the production of nitrogen is the consequence of a sequence of
bursts in SFGs, we conclude that the nitrogen production is dominated by the
intermediate-mass stars, which dominate the secondary synthesis in SFGs.
However, for galaxies with $M_{*}>10^{10.35} $ we find evidence of enhanced N/O
abundance ratios, which are significantly above the secondary synthesis line.
This suggests that outflows of massive stars, which deplete oxygen efficiently,
are more important in massive galaxies. Finally we find an excellent linear
relation between $M_{*}$ and log(N/O), indicating that the N/O abundance ratio
is a good indicator of the stellar mass in a SFG and may be used as a standard
candle for studying cosmology, if confirmed with further studies.
