Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 DB Design....Tier Tables???

Author  Topic 

LonnieM
Starting Member

15 Posts

Posted - 2009-07-30 : 11:21:01
Hello All,

This must be an age old issue but I cannot find any information in any of my searches......

I am needing to design a db that will calculate the costs associated with varying products. Conceptually very simple except that most the products have multiple tiers based on the running total of the product you have previously ordered. In other words if I have order 10K or 20K or 30K (etc) of product X this year, I will recieve an associated % volume discount.

I am debating over storing all the tiers (and associated discounts) in one table and work the math through SQL or to have "Tier" tables (ie. Tier1, Teir2, etc...)

Any advice?

Thank you,

lmeinke

X002548
Not Just a Number

15586 Posts

Posted - 2009-07-30 : 12:32:38
Is this an OLAP or OLTP database?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

LonnieM
Starting Member

15 Posts

Posted - 2009-07-30 : 14:37:09
It's an OLAP db.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-07-30 : 15:31:01
when you say tier tables...do you mean dimensions?

If so, then yes, that's what they are for



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

LonnieM
Starting Member

15 Posts

Posted - 2009-07-31 : 16:45:00
No, I don't think I would call them dimensions. But, these tables would hold the volume threshold and then the corresponding % discount to enable the calcultions to happen.

I am grabbing sales data, summing it by part (qty_sold) then hitting these tables to determine the % of the standard price I'm entitled to based on these sales.

Hope this is clear?
Go to Top of Page
   

- Advertisement -