I think it's easy to see the parallel between a shepherd and the caregiver. The shepherd takes full care of the sheep. They lead the sheep to places to eat and places where they can have fresh, clean water. (Psalm 23 comes to mind.) The job of the shepherd is simply to care for the sheep in his charge. David was a shepherd, which is one reason he understood the heart of God so well. But David was also a king - even though everyone else continued seeing him only as a shepherd boy.