There is a huge parallel between David and Jesus as there also are between Saul and Jesus, Moses and Jesus, Joseph and Jesus and others. David wrote many Psalms, and in some of them he speaks of himself as if he was the Messiah. The Jews understood this (see Acts 2:29), and when a prophecy obviously could not be true of David, they understood that he was speaking of the Messiah. At least once, David and his unnamed Son are mentioned in a verse that baffled the ancient scribes.
Luke 20:42 And David himself saith in the book of Psalms, The LORD said unto my Lord, Sit thou on my right hand,
43 Till I make thine enemies thy footstool.
44 David therefore calleth him Lord, how is he then his son?
The answer to the enigma is known to us, but it baffled the best minds of the ancient Jews. They had no idea that God would come incarnate, so they could not understand how one could be both Lord and the son of David. They also did not have the three-in-one concept of the Trinity even though there were hints of Christ and the Spirit being active in the OT record (I Cor 10:4, Gen 18:1-2, 17, Ps 51:11).
Another interesting type that I have run across, and I may have written of this before, is David going out to meet the army of the Philistines. He went out by himself with a sling and a stone and smote the gigantic champion of the Philistines and then cut off the giant’s head. When Jesus comes again, Isaiah and Micah say that He goes out alone before His army (Isa 63:3, Micah 2:12-13) armed only with the sword of His lips (Rev 19:21), and He seizes the Devil, the Goliath of evil, and casts Him into Gehenna hell (Rev 20:10), the second death. Then he cuts off the head of the Goliath when He takes the beast and the false prophet and throws them into Gehenna hell (Rev 19:20). Then He annihilates what’s left of the army (Rev 19:21) like Saul did the Amalekites, and afterwards, when He passes out the crowns to His elect, we see that He stands taller than the rest, like King Saul, as Ezra relates:
II Esdras 2:42 I, Ezra, saw on Mount Zion a great multitude, which I could not number, and they all were praising the Lord with songs.
 In their midst was a young man of great stature, taller than any of the others, and on the head of each of them he placed a crown, but he was more exalted than they. And I was held spellbound.
 Then I asked an angel, “Who are these, my lord?”
 He answered and said to me, “These are they who have put off mortal clothing and have put on the immortal, and they have confessed the name of God; now they are being crowned, and receive palms.”
 Then I said to the angel, “Who is that young man who places crowns on them and puts palms in their hands?”
 He answered and said to me, “He is the Son of God, whom they confessed in the world.”
There is also an interesting parallel in the relationship of Joseph as the prime minister of Pharaoh and Jesus as the under-King to the Sovereign Father (I Cor 15:28), but this post is probably already longer than anybody will read, so I will end here.