they all have to be there in some fashion. All 3 aspects work together. So yeah I guess a dope drum beat and funky bassline = a jam..lol
Although, I still don't think melody begets the song. As in, the song is born of the melody. I think a song can have it's orgin in any of those 3 areas that I mentioned. But I do agree Melody is definitive in the overall song. Hell, depending on who you talk to ryhthm may be the definitive factor. I'm big on rythm myself. I'd take a nice "jam" over a week melody driven song any day. But I guess that's a poor example.
------------------------------------------------------------ subhaanakallahumma (Glory be to you, Oh Allah), wabihamdika (and I praise You). Ashhadu anla ilaha illa anta (I bear witness that none has the right to be worshipped except You). Astaghfiruka