Update the data in the database