I am trying to update multiple records in database but I don't understand how these two functions works.