  We present a generic and fully-automatic method aimed at detecting absorption
lines in the spectra of astronomical objects. The algorithm estimates the
source continuum flux using a dimensionality reduction technique, nonnegative
matrix factorization, and then detects and identifies metal absorption lines.
We apply it to a sample of ~100,000 quasar spectra from the Sloan Digital Sky
Survey and compile a sample of ~40,000 Mg II & Fe II absorber systems, spanning
the redshift range 0.4< z < 2.3. The corresponding catalog is publicly
available. We study the statistical properties of these absorber systems and
find that the rest equivalent width distribution of strong Mg II absorbers
follows an exponential distribution at all redshifts, confirming previous
studies. Combining our results with recent near-infrared observations of Mg II
absorbers we introduce a new parametrization that fully describes the incidence
rate of these systems up to z~5. We find the redshift evolution of strong Mg II
absorbers to be remarkably similar to the cosmic star formation history over
0.4<z<5.5 (the entire redshift range covered by observations), suggesting a
physical link between these two quantities.
