  We revisit the one-dimensional attractive Hubbard model by using the
Bethe-ansatz based density-functional theory and density-matrix renormalization
method. The ground-state properties of this model are discussed in details for
different fillings and different confining conditions in weak-to-intermediate
coupling regime. We investigate the ground-state energy, energy gap, and
pair-binding energy and compare them with those calculated from the canonical
Bardeen-Cooper-Schrieffer approximation. We find that the Bethe-ansatz based
density-functional theory is computationally easy and yields an accurate
description of the ground-state properties for weak-to-intermediate interaction
strength, different fillings, and confinements. In order to characterize the
quantum phase transition in the presence of a harmonic confinement, we
calculate the thermodynamic stiffness, the density-functional fidelity, and
fidelity susceptibility, respectively. It is shown that with the increase of
the number of particles or attractive interaction strength, the system can be
driven from the Luther-Emery-type phase to the composite phase of
Luther-Emery-like in the wings and insulating-like in the center.
