Suggestion on database design for storing product with bulk purchase price

Posted 4 months ago by Crazylife

I am designing a database which able to store multiple price for each product. Is there any flaw for the design below?

Product
-----------
id_product  | name      | uom   | active    | ...
1           | product A | bag   | 1     |...

Product_bulk_price
----------------------------
id_price    | id_product    | min_qty   | max_qty   | unit_price
1       | 1         |10         | 29        | 10
2       | 1         | 30        | null| 8
....so on

My case want to store multiple price of the product. Each product will be given different price when hit the quantity as stated. If qty fall 10-29 then price = 10, else 30 or more price = 8.

I will do calculation based on user order quantity and sum it.

Is there any better solution or any suggestion? Am i on the right track?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.