Gas inflow and outflow are the most important processes, which determine the structural and chemical evolution of a disk galaxy like the Milky Way. In order to get new insights into these baryonic processes in Milky Way like galaxies (MWLGs), we consider the data of distant star-forming galaxies and investigate the evolution of the radial density profile of their stellar components and the associated total amount of gaseous inflow and outflow. For this purpose, we analyze the redshift evolution of their stellar mass distribution, combined with the scaling relations between the mass of baryonic components, star formation rate and chemical abundance for both high- and low-z star-forming galaxies. As a result, we find the new relations between star formation rate and inflow/outflow rate as deduced from these distant galaxies, which will provide fundamental information for understanding the structural and chemical evolution of MWLGs.