title: Update tag-mapping table in MySQL
body: <p>I have a MySQL tag-mapping table with structure from the following post - <a href="https://stackoverflow.com/questions/20856/how-do-you-recommend-implementing-tags-or-tagging">Recommended SQL database design for tags or tagging</a></p>
  
  <p>I have two columns - TagID and ItemID. I want to make an update on some item (change it's tags). For example I had item with ID=1 with tagID's 1,2,3. But on update user want's only tags with ID's 3,4,5. Obviously I have to remove the "1" and "2", keep the "3" and add "4" and "5".</p>
  
  <p>What's the simplest way/most elegant to do it (use INSERT INGORE'S, ON DUPLICATE UPDATE or some other "features" of MySQL)?</p>
  
  <p>Delete all and insert all "new" tags back or go through them all and delete/insert separately? It will be min 1, max 5 tags. Or it really doesn't matter for such a small number of tags/operations?</p>