-1

I am creating a subscription site where the actual products being ordered can change on a month-to-month basis. I'm looking for an efficient way to handle the products associated with the current order and retain the products that were delivered with previous months.

Brief schema below:

orders

id
customer_id
subscription_id
shipping_...
billing_...

order_products

id
order_id
product_id
quantity
price
total

order_invoices

id
order_id
date_shipped

order_invoice_products

id
order_invoice_id
product_id

subscriptions

id

Thanks for the help..

malpaso
  • 177
  • 1
  • 8
  • http://WhatHaveYouTried.com/ ? It's not really a good idea to ask SO to design your application and your schema for you. – O. Jones Oct 26 '12 at 12:37
  • It's just a question about best practice, if you don't want to help then don't :) There are plenty of similar questions on SO. – malpaso Oct 26 '12 at 22:40

1 Answers1

0

You have to record the dates (months) of the orders. Add a field for this to the order table.

Terje D.
  • 6,250
  • 1
  • 22
  • 30
  • I do have that as in (created, modified) however that will mean I would need multiple order rows when the original order is a recurring one. Perhaps 2 more tables such as 'order_invoices' and 'order_invoice_products'? – malpaso Oct 28 '12 at 23:50