Ruth to  Song of Songs

A genealogy connects generations.

Genealogy

13Boaz took Ruth and she became his wife, and when he went into her the Master gave her conception and she bore a son. 14The women said to Naomi, Blessed be the Master who has not left you this day without a kinsman that his name may be famous in Israel. 15He will be to you a comforter of your soul and a nourisher to your city, for your daughter-in-law who loves you and is better to you than 7 sons has borne him. Ruth 4:13-1516Naomi took the child and laid him in her embrace and became nurse to him. 17The women who were her neighbors said, A son has been born to Naomi, and they called his name Obed; he is the father of Jesse, the father of David. Ruth 4:16-17 (Ruth 4:13-17 BRB)
FJ 1The Song of Songs A Revelation 2:20 A Revelation 18:22 of Solomon, son of David, king of Israel, which is the Song of Songs and called in Hebrew, Song of Songs. Song Of Songs 1:1 (Song Of Songs 1:1 BRB)

Ruth ends with a short genealogy that ends with David. Solomon is the son of David and the operative son in terms of the throne, so he's normally the next name in genealogies dealing with David. By virtue of the presence of Solomon's name right in the first sentence of Song of Solomon, the genealogy at the end of Ruth continues one more generation and the books of Ruth and Song of Solomon connect.

There are broader themes between the books as well. In particular, wedding a foreign woman.

Foreign Wives

Ruth is from Moab and not native to Israel and the covenant, but leaves her people, culture, and whatever beliefs or religion she had, and travels to Bethlehem with her widowed mother-in-law Naomi and submits wholly to the covenant and god of Israel.

15Her mother-in-law said to her, Your sister-in-law has gone back to her people and to her kinsmen, also return after your sister-in-law. Ruth 1:1516Ruth said to her, Far be it from me to return from following after you and to leave you, for where you go I will go and where you live I will live; your people will be my people and your god my god; 17where you die I will die and there I will be buried; may the Master do to me and also more if even death can separate me from you. I Isaiah 25:1 18When Naomi saw that she was determined to go with her she ceased urging her to go back. Ruth 1:16-18 (Ruth 1:15-18 BRB)

Ruth was not looking for a husband per say, but met Boaz and they married. Boaz was impressed with her character and did not mind that she was a foreigner. Then, through their union, the family eventually rises to fame through their great grandson King David.

This family history may have smoothed the path somehow for David's son Solomon to marry foreign women despite questions about the wisdom and legality of this.

The woman in Song of Solomon, which I believe to be from pharaoh's family, is a foreigner in any case because she is a "princess."

10Who is she that looks forth like the morning, fair as the moon, clear as the sun, and reverenced as a princess? Song Of Songs 6:10 (Song Of Songs 6:10 BRB)

And...

FJ 1How beautiful are your feet in sandals, prince's daughter. The form of your thighs is like cut precious stones, the work of the hands of a skilled workman. Song Of Songs 7:1-9 (Song Of Songs 7:1 BRB)

It's also clear in First Kings that Solomon married many princesses from the nations around Israel.

1King Solomon loved many foreign women, 1|6 and the daughter of pharaoh, 2|6 and Ammonite women, 3|6 and Moabite women, 4|6 and Adamite women, 5|6 and Sidonian women, 6|6 and Hethite women, A Jude 1:12 2from the peoples which the Master had said to the children of Israel, You will not mix with them nor will they mix with you lest they turn away your heart after their gods. Q Joshua 23:7-8 1 Kings 11:1-2Solomon clung to these in love. 3He had 700 wives of free women, and 300 concubines, and his wives turned away his heart. A Romans 1:24 4It came to pass when Solomon was old that his wives turned away his heart after other gods and his heart was not perfect with the Master his god as was the heart of David his father, 1 Kings 11:2-5 (1 Kings 11:1-4 BRB)

While Ruth and Song of Solomon share the theme of marrying a foreign woman, there's a clear contrast between them. Ruth comes into Israel and it's ways, it's covenant and it's god, but there's no story of any foreign wife of Solomon submitting like that. Rather these foreign wives are said to have swayed Solomon from the covenant. So the bride described in Song of Solomon is not a good model. She is not like Ruth.