title: Edit product selling location using mysql
body: <p>I'm building a e-Commerce platform (PHP + MySQL) and I want to add a attribute (feature) to products, the ability to specify (enable/disable) the selling status for specific city.</p>
  
  <p>Here are simplified tables:</p>
  
  <p><strong>cities</strong></p>
  
  <pre><code>id  name  
  ==========
  1  Roma
  2  Berlin 
  3  Paris
  4  London
  </code></pre>
  
  <p><strong>products</strong></p>
  
  <pre><code>id  name   cities
  ==================
  1  TV      1,2,4
  2  Phone   1,3,4
  3  Book    1,2,3,4
  4  Guitar  3
  </code></pre>
  
  <p>In this simple example is easy to query (using FIND_IN_SET or LIKE) to check the availability of product for specific city.
  This is OK for 4 city in this example or even 100 cities but will be practical for a large number of cities and for very large number of products?</p>
  
  <p>For better "performance" or better <strong>database design</strong> should I add another table to table to JOIN in query (<code>productid</code>, <code>cityid</code>, <code>status</code>) ? </p>
  
  <p><strong>availability</strong></p>
  
  <pre><code>id  productid  cityid  status
  =============================
  1  1           1       1
  2  1           2       1
  3  1           4       1
  4  2           1       1
  5  2           3       1
  6  2           4       1
  7  3           1       1
  8  3           2       1
  9  3           3       1
  10 3           4       1
  11 4           3       1
  </code></pre>