title: Preventing online shop without products while importing data
body: <p>On my website several vendors can import their articles.</p>
  
  <p>I want to give them the option to cleanup their articles (e.g. remove articles not in importfile).</p>
  
  <p>The first thing I thought of is to just first delete all the articles of the vendor before import, however this might bring up a situation that a customer is visiting the site and don't see any products (of the specific vendor).</p>
  
  <p>So after some more thinking I've came up with two other solutions:</p>
  
  <ol>
  <li>import the products and remember what products were imported / updated (if they already existed) and delete the products of the vendor which weren't in the import afterwards</li>
  <li>import the products in another temp table, remove the current products of the vendor and then copy the products in the temp table to the 'real' table.</li>
  </ol>
  
  <p>However there might be some issues with both options.</p>
  
  <ol>
  <li>is let's say remembering all imported / updated products really a good idea since sometimes it can be > 1 million products?</li>
  <li>will it be possible to delete the current products and copy the products from the temp table to the real table be so fast that there is only a tiny chance that a visiting customer won't see any products?</li>
  </ol>
  
  <p>Perhaps there are any more issues with the options I figured out.</p>
  
  <p>Or perhaps there are some other options to do this?</p>
  
  <p>PS</p>
  
  <p>'Locking' the site / locking out customers while importing is not an option.</p>