Added method for updating the records in Database