Ragtime is usually defined as a song that is in 2/4 time or 4/4 time people usually get it confused with 3/4 time however that is considered a ragtime waltz. Ragtime is used by taking the base line and using progressive harmonic chords that may be punch or silent while the melody is carried out through the Alto,Soprano lines as it uses syncopation which makes the song being played off beat and unexpected. It's related to jazz by the fact that Jazz itself rather replaced Ragtime due to the rising amount of bands that added a unique style to the ragtime with a 70+ BPM and usually included it in many records.
Okay but if I find some little kid saying something like "Aye, Aye, She broke my heart.. I’m just so done with my life. So I’m gonna go bang a b¡tch and leave her with the kid she gon' feel my painnnnnnn" I’m gonna die of laughter
I believe that is Erich Korngold.
Hope this helped