Webthe main image that david uses is god shepherding his people.
Shepherding was very familiar to david as that was his profession before becoming king.
Webin psalm 23:5, king david says to the lord, “you prepare a table before me in the presence of my enemies,” portraying his close relationship to god as an honored.