title: Database schema for orders that can contain customizable product (RDMS)
body: <p>I come from frontend background, so I apologize if this db question seems dumb.</p>
  
  <p>Say I have a database that handles orders of car and car accessories. If <code>Car</code> is non-customizable, then everything is easy-peasy. For every order, we simply need to associate the <code>OrderId</code> with the <code>Car</code>'s <code>ProductId</code>. But a <code>Car</code> is a <code>Product</code> that can contain one or more <code>Product</code> like navigation, seat heater, etc. And users can also purchase those accessories <code>Product</code> separately.</p>
  
  <p>How should we handle this best? Should every <code>Product</code> a user orders be given a unique <code>ProductOrderId</code> in the order table and if that <code>Product</code> can contain another <code>Product</code>, then we put it in a table that associates <code>ProductOrderId</code> with <code>ProductId</code>?</p>
  
  <p>If we do this, would the db grow out of control? Seems a little inefficient to me. I have a feeling there is a better way.</p>