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.
Books of Samuel
David commits adultery with Bathsheba, who becomes pregnant. When her husband, Uriah the Hittite returns from battle, David encourages him to go home and see his wife but Uriah declines in case David might need him. David thus deliberately sends Uriah on a suicide mission; and for this, Yahweh sends disasters against his house. Nathan tells David that the sword shall never depart from his house. For the remainder of his reign there are problems. Amnon (one of David's sons) rapes his half-sister Tamar (one of David's daughters). Absalom (another son of David) kills Amnon, rebels against his father, and David flees from Jerusalem. Absalom is killed following the Battle of the Wood of Ephraim, David is restored as king, and he returns to his palace. Finally only two contenders for the succession remain, Adonijah, son of David and Haggith, and Solomon, son of David and Bathsheba.