We performed a compilation of more than 1000 published spectra of H ii regions in spiral galaxies . The oxygen and nitrogen abundances in each H ii region were recomputed in a homogeneous way , using the P–method . The radial distributions of oxygen and nitrogen abundances were derived . The correlations between oxygen abundance and macroscopic properties are examined . We found that the oxygen abundance in spiral galaxies correlates with its luminosity , rotation velocity , and morphological type : the correlation with the rotation velocity may be slightly tighter . There is a significant difference between the luminosity – metallicity relationship obtained here and that based on the oxygen abundances determined through the R _ { 23 } –calibrations . The oxygen abundance of NGC 5457 recently determined using direct measurements of T _ { e } ( Kennicutt , Bresolin & Garnett 2003 ) agrees with the luminosity – metallicity relationship derived in this paper , but is in conflict with the luminosity – metallicity relationship derived with the R _ { 23 } -based oxygen abundances . The obtained luminosity – metallicity relation for spiral galaxies is compared to that for irregular galaxies . Our sample of galaxies shows evidence that the slope of the O/H – M _ { B } relationship for spirals ( –0.079 \pm 0.018 ) is slightly more shallow than that for irregular galaxies ( –0.139 \pm 0.011 ) . The effective oxygen yields were estimated for spiral and irregular galaxies . The effective oxygen yield increases with increasing luminosity from M _ { B } \sim - 11 to M _ { B } \sim - 18 ( or with increasing rotation velocity from V _ { rot } \sim 10 km s ^ { -1 } to V _ { rot } \sim 100 km s ^ { -1 } ) and then remains approximately constant . Irregular galaxies from our sample have effective oxygen yields lowered by a factor of 3 at maximum , i.e . irregular galaxies usually keep at least 1/3 of the oxygen they manufactured during their evolution .