What was the relationship between Judah and David?
David descended from Judah through Perez, the son of Judah and Tamar. The Book of Ruth traces that line down to David. Genesis 38:29; Ruth 4:18-22
What the Bible says
Matthew 1:3
And Judas begot Phares and Zara of Thamar. And Phares begot Esron. And Esron begot Aram.
Ruth 4:22
Obed begot Isai, Isai begot David.
Douay-Rheims Bible (Challoner revision), public domain.