In this paper the Doppler shift formula is derived from Galileo transformation and lorentz transformation (the transverse Doppler shift formula included) and the difference between the Doppler effect in sound and the Doppler effect in light is discussed.