title: Structuring a Daily Sales Database
body: <p>I would like to build a very basic daily sales report. I'm am trying to decide how to structure the database to best accomplish this. Here is a use case for it:</p>
  
  <ul>
  <li>On Jan 5, 2011, Provider A makes $500 total off of its products</li>
  <li>On Jan 5 2011, Provider A makes $200 total off of its products</li>
  <li>On Jan 6, 2011, Provider B makes $450 total off of its products</li>
  <li>On Jan 6, Provider B makes $75 total off of its products</li>
  </ul>
  
  <p>The current structure I have is:</p>
  
  <p><code>PROVIDER table</code></p>
  
  <ul>
  <li>pk</li>
  <li>provider</li>
  </ul>
  
  <p><code>PRODUCT table</code></p>
  
  <ul>
  <li>provider (FK)</li>
  <li>product</li>
  <li>start_date (sales)</li>
  <li>end_date</li>
  </ul>
  
  <p>The <code>start_date</code> and <code>end_date</code> are when sales on the product may occur. It is only used for reference, and does not really affect anything else.</p>
  
  <p><code>SALES table</code></p>
  
  <ul>
  <li>product (FK)</li>
  <li>sales</li>
  <li><strong>How to store date</strong> ??</li>
  </ul>
  
  <p><code>sales</code> would be the daily proceed ($) for sales from that product.</p>
  
  <p>I'm not quite sure how to store the sales. Sales would only be calculated as a daily sum for each product. What would be the best way to structure the <code>SALES</code> table? Thank you.</p>