They were all David’s sons. Their sister was named Tamar. David also had other sons by his slave women.
David moved from Hebron to Jerusalem. In Jerusalem, he got more slave women and wives. So David had more children who were born in Jerusalem.
Solomon’s son was Rehoboam. Rehoboam’s son was Abijah. Abijah’s son was Asa. Asa’s son was Jehoshaphat.
The Lord has given me many sons. And from all those sons, he chose Solomon to be the new king of Israel. But really, Israel is the Lord’s kingdom.