I am learning and practicing some database designing and case study on Selling Services on Internet. In my requirement, user can buy a post service and add more extra option if they need. In fact, post are divided into a few type, for example, 7days, 14days and 30days post. Because of this, I create table ProductCategory and table Product.
Product Category table:
And I also add two more table for payment and payment detail:
Payment Detail table:
I think above design may work but I am not sure if this is good or not as I still need to learn more about it. But, problem isn't stop here, the problem is that I am thinking of allow user to buy a service in form of package which will be cheaper in price. For example, user may buy a 7days post for 1$ + extra option for 1$ but if they buy a package for 5$ then they can get 5 post that displays for 14days with 5 extra option. And that package will be expired in 7days so user must use it or it will be expired.
I have add another BigPackage table as following design:
- ProductID1(must have product category name = package)
- ProductID2(must not have product category name = package)
Doing so I saw lot of flaw and the difficulty to get available package and calculate the price they have spend. So now if anyone has any idea please kindly light my way and I do appreciate your help.