title: What is fast DB design for this scenario?
body: <p>I have table <code>Product</code> has a many-to-many relation with table <code>unit</code>, but <code>product</code> must have at least one basic <code>unit</code> so there are two solutions:</p>
  
  <p><strong>Solution 1</strong>: </p>
  
  <p>Add <code>[UnitID]</code> in <code>product</code> table and then create new table <code>Product_Unit</code> for many-to-many relation </p>
  
  <ul>
  <li><code>Product: id, name, unitID, sell_price, Buy_price</code></li>
  <li><code>Unit: id, name</code></li>
  <li><code>Product_unit: productID, UnitID, sell_price, Buy_price</code></li>
  </ul>
  
  <p><strong>Solution 2</strong>: </p>
  
  <p>Create only table <code>Product_Unit</code> for many to many relation and add specific column to flag one record as basic record</p>
  
  <ul>
  <li><code>Product: id, name</code></li>
  <li><code>Unit: id, name</code></li>
  <li><code>Product_unit: productID, UnitID, sell_price, Buy_price, Essential_unit_Flag</code></li>
  </ul>