Q:

handling a dual function form

I have a a form on my site that handles employee details.
If there are no associated values in the DB then the form function as a create details form.
If there are associated values in the DB then the form is populated with those values and the form functions as a update/edit form.
Assuming the form is functioning in it's update/edit mode.
Is the best manner to handle the update to delete all the existing values then create new ones?
I am fairly sure it will not matter that the unique ids are being constantly changed.

A:

I think that is better that you update the values because it's better to preserve the id->employee relation.

