I am building an e-commerce system for a client, and currently trying to structure the database schema with regard to product pricing.
My problem is this:
Each product may have many different prices. These may be one of the following types:
1. Single flat-rate price
2. Quantity-dependent "bracketed" price (e.g. 1-3, 5-10, 10+)
3. Sale Price
The first price is straightforward, just one price per product.
The second price is a bit more complicated, as there are lower bounds and possibly upper bounds (1-3 has an upper bound of 3, but 10+ has no upper bound). The single price above could be classed as 1+.
The sale price is a bit more involved as - it could be specified as an absolute discount or as a percentage. Furthermore, however it is specified, the sale price needs to be applied to all prices for the product.
Does anyone have any best-practice advice for structuring the database? Currently there is a products table with the usual info in (ID, Name, Description etc.) and I assume I will need a second Product Price table to allow for multiple prices per product.
AW