The second book of Samuel tells the story of King David of Israel, who establishes Jerusalem as Israel's capital city (2 Sam 5:7). David begins well because he prays and is humble, but later sins and has an affair with a married lady called Bathsheba, who then gave birth to Solomon. As a result of this affair, David's children go mad, including a brother who rapes his sister as well as murder among the siblings, which leads to the end of David as king. This ends 2 Samuel. The next book in the Bible is 1 Kings, which begins with Solomon as King, who builds the Temple in Jerusalem, which God had earlier forbidden David from doing as a result of his sin.