Here is a long list of 歌 for the dynasties: https://baike.baidu.com/item/%E4%B8%AD%E5%9B%BD%E5%8E%86%E5%8F%B2%E6%9C%9D%E4%BB%A3%E6%AD%8C/3763554 (Found thanks to the first one pointed out by @Betty in her answer.)
Everything can be put into rhymes to help people memorize. Maybe not poems or songs, just 顺口溜 (doggerel or jingle).
There is a meme phrase "满嘴顺口溜，你想考研啊". People preparing for postgraduate entrance exams need to memorize a lot of stuff so they make a lot of 顺口溜.
There could also be several variations for the same knowledge. When I was in middle ...