The Succession Narrative, also called the Court History of David. It runs from Mephibosheth at David's table, through Bathsheba, Tamar and Absalom, to Adonijah's failed bid and Solomon's crowning (2 Samuel 9:1 to 1 Kings 2:12). Its purpose is to explain how Solomon became king after his father. It is a scholars' name for a stretch of text; no separate copy of it exists.
It reads like a novel. Long private conversations move the action, and even minor characters are sharply drawn, while the wrongs David does come back on him through what happens to his sons and daughters. It was once thought to be a document from Solomon's own court, written close to the events; many scholars now doubt that and put it later in the monarchy.
Learn the Bible.
Not just the stories, but the history, authorship, and scholarship behind it.