Updating to the database