Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General DB Topics / DB Theory / January 2008

Tip: Looking for answers? Try searching our database.

Variable prices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
graeme - 11 Jan 2008 09:36 GMT
Hi
I am trying to find out how you deal with variable prices, so when I query
[annual unit sales] * [price] I don't get [annual unit sales] * [current
price]. Is there a rule of thumb for this type of issue?

graeme
David Cressey - 11 Jan 2008 12:30 GMT
> Hi
> I am trying to find out how you deal with variable prices, so when I query
> [annual unit sales] * [price] I don't get [annual unit sales] * [current
> price]. Is there a rule of thumb for this type of issue?
>
> graeme

I don't have any rule of thumb for you,  but I do know how to keep
individual sales in a data mart or data warehouse.

The trick is to tie each item sold to the price charged for that item, on
that sale.  This can even take into account discounts for coupons or thing
like that.  The way you can have time varying prices for the same item is to
have multiple entries  in the PRODUCT dimension for the same product.  The
entries have a start date and stop date.  The entries in the SALES facts are
tied to the PRODUCT entry with the correct price.

At this point,  you can, if desired, materialize the extended price as
[extended price] = [units sold] * [current price]  way down at the lowest
level of granularity.  Then,  when you want the annual sales dollars for
that product,  it's just a matter of finding and adding.

Warning:  if you have no intention of creating a data mart,  don't let this
argument persuade you otherwise.  There is a large cost to building such a
thing,  and it needs to be justified by a large benefit.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.