title: Database design for handling individual and recurring charges
body: <p>We have a billing system where we process individual charges as well as recurring charges (subscriptions).</p>
  
  <p>There are two SQL tables:</p>
  
  <pre><code>StandardCharges
  RecurringCharges
  </code></pre>
  
  <p>StandardCharges table holds individual items purchased by customers during the month.</p>
  
  <p>RecurringCharges table holds recurring items with a charge by date. When the time comes our system automatically creates a recur request which adds a row to the StandardCharges table and increases the charge by date to next month in RecurringCharges table.</p>
  
  <p>At the end of each month we get the total values for each customer from StandardCharges table and create an invoice.</p>
  
  <p>Is there a kind of design pattern or another way of doing this? Is this the right database design? Ideally I would like to hold all charges in one <code>Charges</code> table and manage recurring charges from there as well?</p>
  
  <p>Thanks</p>