David serves as a primary type of the Messiah in the Psalms, where his life and experiences prefigure those of Jesus Christ. Events in David's life, like enduring trials in Psalm 69 or expressing hope of resurrection in Psalm 16, find greater fulfillment in Christ's suffering and victory over death. In royal and Messianic psalms, such as Psalm 2, David as a Davidic king points to Christ's divine authority and kingship. As a shepherd and king, David mirrors Christ, the Good Shepherd, reflecting care for their flocks. Through these parallels, David's roles and circumstances in the Psalms prophetically connect to Christ's humanity, ministry, sacrifice, and sovereign rulership. Also see sermons and articles about David as Type of Messiah.
Psalm 89:19-28 Then You spoke in a vision to Your holy one, And said: “I have given help to one who is mighty; I have exalted one chosen from the people. I have found My servant David; With My holy oil I have anointed him, With whom My hand shall be established; Also My arm shall strengthen him. The enemy shall not outwit him, Nor the son of wickedness afflict him. I will beat down his foes before his face, And plague those who hate him. 'But My faithfulness and My mercy shall be with him, And in My name his horn shall be exalted. Also I will set his hand over the sea, And his right hand over the rivers. He shall cry to Me, 'You are my Father, My God, and the rock of my salvation.' Also I will make him My firstborn, The highest of the kings of the earth. My mercy I will keep for him forever, And My covenant shall stand firm with him.