The 2nd king of Israel, his son King Solomon(Shlomo) built the First Temple.
According to The Ari (Rabbi Yitzchak Luria (1534-72), the Nefesh part of the soul of King David (David HaMelech) was a very high one (Sha'ar HaGilgulim hakdamah 7). Because of the sin of Adam it went down to the depths of the klippot (the powers of evil) and God had to play "tricks" with the klippot in order to take such a Nefesh out of there (Sha'ar HaGilgulim hakdamah 38). His father Yishai was a reincarnation of Nachson Ben Aminadav (the first person who jumped into the Red Sea).
Adam who was supposed to live a 1000 years, gave up 70 years of his life for King David, and therefore he lived only 930 years.
King David earned his place as one of the 7 Merkavot (Chariots). He is our Merkavah for the Sefirah of Malchut (kingdom). His book Tehillim (Psalms) is a testimony to his awesome wisdom.
David Hamelech requested of G-d to inform him when the day of his departure from this world would be. G-d refused to tell him. King David pleaded with him. Perhaps, he negotiated, G-d could at least let him know what day of the week it would be? So G-d eventually gave in. He told David that his decease would occur on a Shabbat. From then on, David Hamelech would consistently spend every Shabbat engrossed in Torah study, for he knew that the angel of death cannot descend upon an individual whilst studying Torah. Then, every Motzei Shabbat (Saturday night, after the sun has gone down and it is no longer considered Shabbat anymore), he would celebrate the fact that he was still alive after yet another Shabbat. Since then, Jews celebrate along with David Hamelech with candles, food and music every Motzei Shabbat. This mitzvah is referred to as Melave Malka. The term Melave Malka literally means "Escorting the Queen", i.e. Shabbat.
When David turned thirteen, he said, "Hashem said to me, 'You are my son, I have begotten you this day' " (Psalms 2:7) (Zohar 2:33a).
David was Israel's shepherd, as it is written, "You shall shepherd My people Israel" (II Samuel 5:2). And who was David's shepherd? The Holy One, Blessed is He (Bereishit Rabbah 59:5).
There were seven shepherds of the Jewish nation (Micah 5:4), David is in the center, with Adam, Shem, and Methuselach to his right, and Abraham, Isaac, and Jacob to his left (Succah 52b).
Whom do we have who was greater than King David? (Zohar III:240a).
Two good leaders stood by Israel, Moses and David (Yoma 86b).
The most praiseworthy King was David. The most praiseworthy prophet was Moses. What ever Moses did, David did. Moses took Israel out of Egypt, David took Israel out of the subjugation of the kingdoms which menaced Israel at that time, also an allusion to Messiah son of David, who will deliver Israel from persecution and exile, Moses waged war, and David waged war, Moses was King of Israel and Judah, and David was King of Israel and Judah, Moses split the sea for Israel, and David split the rivers for Israel (i.e., the kingdom of Aram Naharaim - "Aram between the two rivers"), Moses erected an altar, and David erected an altar, Moses sacrificed, and David sacrificed, Moses gave Israel the Five Books of Torah, and David gave Israel the five books which constitute Psalms (Shocher Tov 1:2).
The staff that was in Moses' hand was also in David's hand, as it is written, He took his staff in his hand (I Samuel 17:40), and it was in the hand of every king until the Holy Temple was destroyed (Yelamdeinu Chukat, ed. Greenhut, Likutim 4).
Moses was the teacher, David, the disciple (Shocher Tov 14:6).
When David ate his own meal, he would eat until nine hours into the day, sleep until the middle watch, the beginning of the fifth hour of the night, and then rise and study Torah. When he ate a royal repast, he would eat until evening, sleep until midnight, and then rise and study Torah (Yalkut Shimoni, Tehillim 877).
David was the fourth support of the Heavenly Chariot (Zohar 1:248b).
David caused the Holy One, Blessed is He, to show rejoicing. Even when he was grieved, as soon as he stood before the Holy One, Blessed is He, he became cheerful again in order to make the King Happy (Zohar 2:107a).
The Holy One, Blessed is He, gave David a hint, which he noted, as it is written, "Your servant smote both the lion and the bear (I Samuel 17:36). "What distinction do I have that I have slain wild beasts?", thought David. "But perhaps something is destined to happen to Israel, and they are destined to be saved by me" (Mechilta Beshalach 5:2).
David smote four lions and three bears on the same day (Midrash Shmuel, ed. Buber 20:5).
David would take a copper bow and bend it. It was easier to bend a copper bow than to bend David's arm (Shocher Tov 18:27).
He would shoot one arrow, which would slay 800 men at once, and he would sigh that he had not slain another 200 (Moed Katan 16b).
David's voice was sweet (Shir HaShirim Rabbah 4:4).
Every righteous King who arose was linked to David, every wicked King who arose was linked to Jeroboam son of Nebat (Midrash HaGadol, Bamidbar 27:1).
He who sees David in a dream may expect to attain piety (Berachot 57b).
Whoever saw David would remember the Torah he had learned (Bereishit Rabbah 2:1).
The evil inclination wielded no power over David (Bava Batra 17a). David could not stand the evil inclination, and he killed it in his heart (i.e., he forced it to comply with the will of his Creator) (Yerushalmi Berachot 9:5).
David called the evil inclination tamei (unclean) (Succah 52a).
If you study David, you will find in him no sin other than the one with Uriah (Shabbat 56a).
David came before the Divine Presence, stretched himself out full length on the ground, and said, "My Father in Heaven, the Torah that I have studied before You is Yours (for the Torah is Yours), and the acts of kindness that I have done before You and Yours (for all the wealth is Yours). Yet in reward for the little bit of Torah I have learned before You, You gave me possession of This World, the Messianic era, and the World to Come" (Tanna d'Bei Eliyahu Rabbah 18).
Said David, "I know that worms (i.e., decomposition) will have no power over my body" (Shocher Tov 119:5).
David slept the short sleep of a horse, the equivalent of sixty breaths (Succah 26b).
In the future, the Holy One, Blessed is He, will make a feast for the righteous, After the meal He will ask the forefathers of Israel to take the cup and lead the Grace after Meals, but each in turn will refuse, insisting he is unsuited. Finally, G-d will turn to David and say, "Take the cup and lead the blessings." (David) will reply, "I will lead the blessings, and it is fitting for me to do so." Thus it is written, "I will lift up the cup of salvation and call upon the Name of Hashem" (Psalms 116:13) (Pesachim 119b).
King David, of blessed memory, said, "I feared God in joy and rejoiced in fear, but my love of God exceeded both" (Tanna d'Bei Eliyahu Rabbah 3).
Said David before the Holy One, Blessed is He, "Although I was king, I made you King over me" (Shocher Tov 16:2).
May the merit of David HaMelech protect us all, Amen.