We present abundances of Fe, Na, and O for 1409 red giant stars in 15 galactic globular clusters (GCs), derived from the homogeneous analysis of high-resolution FLAMES/GIRAFFE spectra. Combining the present data with results from our FLAMES/UVES spectra and from previous studies within the project, we obtained a total sample of 1958 stars in 19 clusters, the largest and most homogeneous database of this kind to date. The programme clusters cover a range in metallicity from [Fe/H] = −2.4 dex to [Fe/H] = −0.4 dex, with a wide variety of global parameters (morphology of the horizontal branch, mass, concentration, etc.). For all clusters we find the Na-O anticorrelation, the classical signature of the operation of proton-capture reactions in H-burning at high temperature in a previous generation of more massive stars that are now extinct. Using quantitative criteria (from the morphology and extension of the Na-O anticorrelation), we can define three different components of the stellar population in GCs. We separate a primordial component (P) of first-generation stars, and two components of second-generation stars, that we name intermediate (I) and extreme (E) populations from their different chemical composition. The P component is present in all clusters, and its fraction is almost constant at about one third. The I component represents the bulk of the cluster population. On the other hand, E component is not present in all clusters, and it is more conspicuous in some (but not in all) of the most massive clusters. We discuss the fractions and spatial distributions of these components in our sample and in two additional clusters (M 3 = NGC 5272 and M 13 = NGC6205) with large sets of stars analysed in the literature. We also find that the slope of the anti-correlation (defined by the minimum O and maximum Na abundances) changes from cluster-to-cluster, a change that is represented well by a bilinear relation on cluster metallicity and luminosity. This second dependence suggests a correlation between average mass of polluters and cluster mass.