title: Need advice in designing tables in SQL-Server
body: <p>I have a quote that contains items (store in table QuoteItem):<br>
  QuoteItemId, QuoteId, ItemId, Quantity etc.</p>
  
  <p>Now, I need to be able to create a group of chosen items in the quote and apply a discount on it.
  Well that's simple, I create two more tables:<br>
  Group: GroupId, DiscountPercentage<br>
  GroupQuoteItem: GroupId, QuoteItemId  </p>
  
  <p>Let's say I have 30 items in a quote.
  I made a group that contains items 1-20 from the quote and I applied a discount on it.
  Now I need to have another group that contains items 10-30, the problem is about those inner 10 items, I need to control whether the discount should apply on the items after the other discount or it should be on the items' base price.<br>
  For instance, I am gonna talk about item no. 15 in the quote: QuoteItem.Cost = 100
  I applied 1st discount of 10% = 90.<br>
  Now I want to apply the second discount, I need to be able to control if the discount should be on the 100 or should be on the 90.<br>
  Same is when I have multiple discount groups and when I wanna apply a complex architecture of discounts.  </p>
  
  <p>Any assistance will be really appreciated.</p>