Wednesday, July 23, 2008

Datawarehouse Concepts... What is Slowly Changing Dimensions?

Slowly Changing Dimensions (SCD)

Dimensions that change over time are called Slowly Changing Dimensions. For instance, a product price changes over time; People change their names for some reason; Country and State names may change over time. These are a few examples of Slowly Changing Dimensions since some changes are happening to them over a period of time.

Below i am explaining different types of SCD which i have learnt and have got definitions from net. To understand them with easy examples follow this link

SCD examples

Type 1 Dimension mapping.
It loads a slowly changing dimension table by inserting new dimensions and overwriting existing dimensions. Use this mapping when you do not want a history of previous dimension data.

Type 2 Dimension/Version Data mapping.
It loads a slowly changing dimension table by inserting new and changed dimensions using a version number and incremented primary key to track changes. Use this mapping when you want to keep a full history of dimension data and to track the progression of changes.

Type 2 Dimension/Flag Current mapping.
It loads a slowly changing dimension table by inserting new and changed dimensions using a flag to mark current dimension data and an incremented primary key to track changes. Use this mapping when you want to keep a full history of dimension data, tracking the progression of changes while flagging only the current dimension.

Type 2 Dimension/Effective Date Range mapping.
It loads a slowly changing dimension table by inserting new and changed dimensions using a date range to define current dimension data. Use this mapping when you want to keep a full history of dimension data, tracking changes with an exact effective date range.

Type 3 Dimension mapping.
It loads a slowly changing dimension table by inserting new dimensions and updating values in existing dimensions. Use this mapping when you want to keep the current and previous dimension values in your dimension table.

The Type 3 Dimension mapping filters source rows based on user-defined comparisons and inserts only those found to be new dimensions to the target. Rows containing changes to existing dimensions are updated in the target. When updating an existing dimension, the Informatica Server saves existing data in different columns of the same row and replaces the existing data with the updates.

To know more about datwarehousing concepts please check
http://www.learndatamodeling.com/

12 comments:

Praveen राठी said...

Alright, so how MCD team handles the customer dimension? Type 1?

We handle Associate dimension as per Type 2, with the help of our favorite CURRENT_REC_IND and start and end dates.

But I want to know the reason why is it called Slowly Changing Dimension.
Is there something like Fast Changing Dimension OR Rapidly Changing Dimension.

Debi said...

yes we have fast changing dimension. Fast changing is just opposite of what slowing changing dimension is.

A slowly changing dimension is a dimension where dimension attributes change slowly over time . For example, marital staus of an employee or change of name.

A fast changing dimension is a dimension where attributes change frequently. For example, customer dimension

Daz M said...

Similarly in research we are using EFFECTIVE_STATUS = 'A' / 'I' i.e. Type 2.

Que here:
When there is need to keep history (Type 2).

What i understand is, when we do Type 1 (update name), we miss history, so when I update name change today, for last year report if generated today will show the new name.

So in this case Type 2 should be used.

But if we are sure that last yr. report wont be generated ever, then we can use Type 1.

So it is Business requirement on which one can make a call!

Praveen राठी said...

Bhagwaan ke liye ye word verification hata do ... please.

This is really irritating.

Anonymous said...

Making money on the internet is easy in the hush-hush world of [URL=http://www.www.blackhatmoneymaker.com]blackhat affiliate[/URL], Don’t feel silly if you have no clue about blackhat marketing. Blackhat marketing uses alternative or misunderstood ways to build an income online.

Anonymous said...

… Unbelievable , but I just found software which can do all hard work promoting your debikar.blogspot.com website on complete autopilot - building backlinks and getting your website on top of Google and other search engines 1st pages, so your site finally can get laser targeted qualified traffic, and so you can get lot more visitors for your website.

YEP, that’s right, there’s this little known website which shows you how to get to the top 10 of Google and other search engines guaranteed.

I used it and in just 7 days… got floods of traffic to my site...

…Well check out the incredible results for yourself -
http://magic-traffic-software.com

I’m not trying to be rude here, but I believe when you find something that finally works you should share it…

…so that’s what I’m doing today, sharing it with you:

http://magic-traffic-software.com

Take care - your friend Jennifer

Anonymous said...

After getting more than 10000 visitors/day to my website I thought your debikar.blogspot.com website also need unstoppable flow of traffic...

Use this BRAND NEW software and get all the traffic for your website you will ever need ...

= = > > http://get-massive-autopilot-traffic.com

In testing phase it generated 867,981 visitors and $540,340.

Then another $86,299.13 in 90 days to be exact. That's $958.88 a
day!!

And all it took was 10 minutes to set up and run.

But how does it work??

You just configure the system, click the mouse button a few
times, activate the software, copy and paste a few links and
you're done!!

Click the link BELOW as you're about to witness a software that
could be a MAJOR turning point to your success.

= = > > http://get-massive-autopilot-traffic.com

Anonymous said...

[url=http://www.onlinecasinos.gd]online casino[/url], also known as virtual casinos or Internet casinos, are online versions of habitual ("go around and mortar") casinos. Online casinos own gamblers to uphold up and wager on casino games life the Internet.
Online casinos typically scrounge odds and payback percentages that are comparable to land-based casinos. Some online casinos exhort on higher payback percentages with a wit reproach automobile games, and some mutate known payout proportion audits on their websites. Assuming that the online casino is using an aptly programmed indefinitely epitomize up generator, rehearse games like blackjack preoccupy an established contain edge. The payout administer business of these games are established sooner than the rules of the game.
Infinite online casinos covenant out of the closet or holdings their software from companies like Microgaming, Realtime Gaming, Playtech, Overseas Dodging Technology and CryptoLogic Inc.

Anonymous said...

Εxсellent post. I used to be checking continuouѕly this blog
anԁ I'm impressed! Extremely useful information particularly the last part :) I handle such information much. I was looking for this particular info for a very long time. Thank you and good luck.

Take a look at my blog premature ejaculation pills

Anonymous said...

Wow, superb blog layout! How long have you been blogging for?

you make blogging look easy. The full glance of your web site is fantastic, as smartly as the content!


My web site; legal amphetamines

Anonymous said...

I couldn't refrain from commenting. Exceptionally well written!

my blog post; party pills cheap

Anonymous said...

My developeг is trying to persuаde me tо move to .
net fгοm PHP. I hаve alωays dіsliked the idea because of the
cοsts. But hе's tryiong none the less. I've been using WοrdPresѕ on seѵeral ωebsites fοr
abοut a year anԁ am anxіοus about switchіng to another рlatform.
I have heard fantastiс thіngs about blogengіne.
nеt. Iѕ there a wаy I can import аll my
wordрrеѕs pοstѕ іnto it?
Anу κind of hеlp ωould be greatly appгeсiated!


My web blοg ... Party Pills Cheap

Incredible India

DAFFY DEFINITIONS:-

WHO IS A POLITICIAN??

One who shakes your hand before elections and your confidence after.