  An analytical chemical evolution model is constructed to investigate the
radial distribution of gas-phase and stellar metallicity for star-forming
galaxies. By means of the model, the gas-phase and stellar metallicity can be
obtained from the stellar-to-gas mass ratio. Both the gas inflow and outflow
processes play an important role in building the final gas-phase metallicity,
and there exists degeneracy effect between the gas inflow and outflow rates for
star-forming galaxies. On the other hand, stellar metallicity is more sensitive
to the gas outflow rate than to the gas inflow rate, and this helps to break
the parameter degeneracy for star-forming galaxies. We apply this analysis
method to the nearby disc galaxy M\,101 and adopting the classical $\chi^{2}$
methodology to explore the influence of model parameters on the resulted
metallicity. It can be found that the combination of gas-phase and stellar
metallicity is indeed more effective for constraining the gas inflow and
outflow rates. Our results also show that the model with relatively strong gas
outflows but weak gas inflow describes the evolution of M\,101 reasonably well.
