I read the values from one table in a database and put it in a collection. After I do some operations with the elements of this colection (change values, delete, add, ....) if I want to save the changes in the database. What is better:

-> Delete all the registers in the database's table and create new with the values of collection's elements.

-> Compare the values stored in database's table with the values of collection's elements and update/add/remove the table registers.

The first metod looks easyer and faster but is the best?

There are any other metods to do this?

Thanks to everybody.