  Using effective temperature and metallicity derived from SDSS spectra for
~60,000 F and G type main sequence stars (0.2<g-r<0.6), we develop polynomial
models for estimating these parameters from the SDSS u-g and g-r colors. We
apply this method to SDSS photometric data for about 2 million F/G stars and
measure the unbiased metallicity distribution for a complete volume-limited
sample of stars at distances between 500 pc and 8 kpc. The metallicity
distribution can be exquisitely modeled using two components with a spatially
varying number ratio, that correspond to disk and halo. The two components also
possess the kinematics expected for disk and halo stars. The metallicity of the
halo component is spatially invariant, while the median disk metallicity
smoothly decreases with distance from the Galactic plane from -0.6 at 500 pc to
-0.8 beyond several kpc. The absence of a correlation between metallicity and
kinematics for disk stars is in a conflict with the traditional decomposition
in terms of thin and thick disks. We detect coherent substructures in the
kinematics--metallicity space, such as the Monoceros stream, which rotates
faster than the LSR, and has a median metallicity of [Fe/H]=-0.96, with an rms
scatter of only ~0.15 dex. We extrapolate our results to the performance
expected from the Large Synoptic Survey Telescope (LSST) and estimate that the
LSST will obtain metallicity measurements accurate to 0.2 dex or better, with
proper motion measurements accurate to ~0.2 mas/yr, for about 200 million F/G
dwarf stars within a distance limit of ~100 kpc (g<23.5). [abridged]
