CCD vby Strömgren photometry of a statistically complete sample of red giants and stars in the main sequence turn-off region in \omega Centauri has been used to analyse the apparently complex star formation history of this cluster . From the location of stars in the ( b - y ) ,m _ { 1 } diagram metallicities have been determined . These have been used to estimate ages of different sub-populations in the color-magnitude diagram and to investigate their spatial distributions . We can confirm several earlier findings . The dominating metal-poor population around -1.7 dex is the oldest population found . More metal-rich stars between [ Fe/H ] = -1.5 and -1.0 dex tend to be 1-3 Gyr younger . These stars are more concentrated towards the cluster center than the metal-poor ones . The most-metal rich stars around -0.7 dex might be up to 6 Gyr younger than the oldest population . They are asymmetrically distributed around the center with an excess of stars towards the South . We argue that the Strömgren metallicity in terms of element abundances has another meaning than in other globular clusters . From a comparison with spectroscopic element abundances , we find the best correlation with the sum C+N . The high Strömgren metallicities , if interpreted by strong CN-bands , result from progressively higher N and perhaps C abundances in comparison to iron . The large scatter of Strömgren abundances may come from a variety of evolutionary effects , including C-depletion and N-enrichment . We see an enrichment already among the metal-poor population , which is difficult to explain by self-enrichment alone . An attractive speculation ( done before ) is that \omega Cen was the nucleus of a dwarf galaxy . We propose a scenario in which \omega Cen experienced mass inflow over a long period of time , until the gas content of its host galaxy was so low that star formation in \omega Cen stopped , or alternatively the gas was stripped off during its infall in the Milky Way potential . This mass inflow could have occurred in a clumpy and discontinuous manner , explaining the second peak of metallicities , the abundance pattern , and the asymmetric spatial distribution of the most metal-rich population . Moreover , it explains the kinematic differences found between metal-poor and metal-rich stars .