I have a database where a user can enter any number of interests. When they go to update it they can remove one of their former interests.
How should this be handled? Should an update delete all their former interests from the database and then insert their updated ones?
That’s what I usually do: Delete all the existing records and add the new ones. It’s the simplest thing to do if it’s a simple cross reference table. If there are id fields that are important you might have to do something else.