2 Samuel. 21:19 (NRSV)
Then there was another battle with the Philistines at Gob; and Elhanan son of Jaare-oregim, the Bethlehemite, killed Goliath the Gittite, the shaft of whose spear was like a weaver’s beam.
From this verse we get the name Goliath and his great weapon.
2 Samuel 21:20-21 (NRSV)
There was again war at Gath, where there was a man of great size, who had six fingers on each hand, and six toes on each foot, twenty-four in number; he too was descended from the giants.When he taunted Israel, Jonathan son of David’s brother Shimei, killed him.
From this we get the idea that there was a giant (literally, descended from the Rapha) who defied or taunted Israel.
Joel Baden in The Historical David says it is by combining these two fights that the 1 Samuel 17 narrative got constructed. This is probably true in spite of the tinkering with the text that allows the NET Bible, for instance, to harmonize verse 19 with 1 Chronicles 20:5. It is surely Chronicles that does the harmonizing by saying that it was Goliath’s brother that Elhanan killed. (On the theory that the Deuteronomic History was composed in the Persian Period this would make less sense. Why would there be this kind of disagreement between two recent texts? But if the 1 Samuel account was the long-established tradition, it is understandable that 1 Chronicles would harmonize.)
Baden says that not only the David-and-Goliath battle but the battles reported in 2 Samuel 21 are “obviously legendary”. So there would be no point in looking for a historical Goliath.
I am not so sure.
According to 1 Samuel 21:9, David, at a later date, took possession of the sword of Goliath. If there actually was a sword of Goliath, then Goliath must have been real. Notice that the story in 1 Samuel 17:51 includes a sword among Goliath’s weapons, although earlier the chapter had spoken of armor and the “spear like a weaver’s beam” from 2 Samuel 21:19, but no sword.
The priests of Nob kept Goliath’s sword as an artifact and David came into possession of it. Maybe Elhanan of Bethlehem was a warrior associated with David and was the actual killer of Goliath. However, if David as king had the sword of Goliath it would not have been too big a step to assume that he was the one who had killed the giant.
2 Samuel 21:19 says Goliath could use a heavy spear but says nothing about him being descended from the legendary giants. He is called a Gittite, which means he was probably a Philistine. There must have been something special about his sword for it to be saved among the treasures of a community of priests. Maybe it was big, like the spear. Or, maybe it had some sacred significance.
I also have a couple of observations based on archeology. First, judging from the very low ceilings of 12th and 11th century houses in the highland villages, the Israelites were typically small people. So a lot of other people might have looked like giants to them. See Numbers 13:33.
Yosef Garfinkel’s excavation at Khirbet Qeiyafa uncovered an ancient fortress in the Eloh Valley opposite Gath, the place where the David-and-Goliath battle is supposed to have happened. The fortress could be as old as 1050 BCE. Of course, this is not evidence for the literal accuracy of the story in 1 Samuel 17, but it does give some realism to the situation envisioned there. See here.
Back to Baden–he does not find the idea that David served as a musician for Saul improbable. Court musician was a position well-known in royal courts of that time. And, if David was a musician it provides and explanation for the tradition that attached him to the Psalms.
However, the Hebrew construction “a Psalm of David” does not mean that he wrote that Psalm. It might mean the Psalm was in a particular style thought to have originated with David. Sometimes it probably means “regarding David”, meaning that the words fit an experience in David’s life. It may mean that David was thought to have compiled some of the Psalms.
So Baden’s position seems to be that the historical David was indeed a musician, probably a lyre player. But this reality has expanded in the traditions about David until finally the name of David became shorthand for speaking of all the psalms.
It is hard to know more about David’s early years. He probably did come from Bethlehem and he probably did enter the military under Saul. But so many of the stories have other motives. It is not easy to sort out the spin from the reality.