David knew God's attributes as expressed by His names, and thus, he conducted his life accordingly. He called upon the name of God. By faith, he trusted God to intervene in the affairs of men. He knew what God would do—that is, what He could be trusted to do—by the way that God expressed Himself through His name.
Put this into a simple illustration. You do things like this virtually every day with other human beings. If your car breaks down, do you take it to the dentist? No, you take it to the person who has the name (reputation) of "auto mechanic." You call upon that person when your automobile is in need of repair. When your teeth need fixed, you do not go to a bank teller but to the person who has the name, title, and reputation of being able to take care of your teeth.
It is this same principle that is at work with God. By His names, He illustrates what He is skilled at doing—and not only skilled at doing, but what He will do. Sometimes the name will even describe the parameters of His blessing or the conditions that are imposed on receiving the fulfillment of it.
So that is what David is doing here in his prayers. He is calling upon God as God had revealed Himself by His names. He was confident—just as you are confident in taking your automobile to the person who has the reputation of having the skill to be able to fix it. You would call upon that mechanic. We need to do what David did with God. That is why we need to know the names of God. God is skilled and willing to help. It is through His names that He reveals what He is willing to do.