Second-harmonic generation in metal and semiconductor low-dimensional structures