Mary was a follower who was healed from demon possession. He helped with other women to care for Jesus and his followers during their ministry
The perspective of “history” that Dan Brown is trying to pass off is quite different than typical Biblical accepted history. In the cannon Bible, there’s nothing that gives any notion of a marriage for Jesus. If he had been married, it would be noted by all of his disciples and early church builders, but it is not.