Elhanan, son of Jair
Elhanan son of Jair-Oregim the Bethlehemite ( "’Elḥānān ben-Ya‘rê ’Ōrəḡîm Bêṯhallaḥmî") appears in 2 Samuel 21:19, where he is credited with killing Goliath. As this contradicts the better-known story in 1 Samuel 17 in which it is the famous David who kills Goliath, the 4th century BC Book of Chronicles explains the second Goliath by saying (20:5) that Elhanan "slew Lahmi the brother of Goliath", possibly constructing the name Lahmi from the last portion of the word "Bethlehemite" (""beit-ha’lahmi"). The King James Bible translators modified 2 Samuel 21:18–19 to make it read as if Elhanan had slain Goliath's brother: "And there was again a battle in Gob with the Philistines, where Elhanan the son of Jaare–oregim, a Beth–lehemite, slew "the brother of" Goliath the Gittite, the staff of whose spear was like a weaver's beam", although the Hebrew text at this point makes no mention of the word "brother"; the medieval Jewish authors of the Targum Jonathan solved the problem by explaining Elhanan as an alternative name for David. However, this makes it difficult to explain why David is called "Elhanan" in verse 19 but consistently "David" in the verses that surround it (15, 16, 17, 21, 22). The most widely accepted explanation is that the storytellers have displaced the deed from the obscure Elhanan to the more famous character, David.
Goliath
The Books of Samuel, together with the books of Joshua, Judges and Kings, make up a unified history of Israel which biblical scholars call the Deuteronomistic history. The first edition of the history was probably written at the court of Judah's King Josiah (late 7th century BCE) and a revised second edition during the exile (6th century BCE), with further revisions in the post-exilic period. Traces of this can be seen in the contradictions and illogicalities of the Goliath story - to take a few examples, David turns from Saul's adult shield-bearer into a child herding sheep for his father, Saul finds it necessary to send for him when as the king's shield-bearer he should already be beside his royal master, and then has to ask who David is, which sits strangely with David's status at his court. The Goliath story is made up of base-narrative with numerous additions made probably after the exile: