Slowly Changing Dimensions (SCD) are used in data warehousing to manage and track changes to dimension data over time. Here are the three main types of SCDs with simple examples:
SCD Type 1
Purpose: Overwrites old data with new data. It doesn't keep any history of changes. Example:
Imagine you have a customer table.
A customer's address changes from "123 Old St" to "456 New St".
In SCD Type 1, you simply update the address to "456 New St" and lose the previous address.
SCD Type 2
Purpose: Maintains full historical data by adding new records when changes occur. Example:
Using the same customer table.
When the address changes, instead of updating the existing record, a new record is added.
Each record will have a version number or effective dates to indicate the time period it was active.
Customer ID | Name | Address | Version | Effective Date |
---|---|---|---|---|
1 | John Doe | 123 Old St | 1 | 2020-01-01 |
1 | John Doe | 456 New St | 2 | 2022-01-01 |
SCD Type 3
Purpose: Tracks changes using additional columns to store historical data for certain attributes. Example:
When the customer's address changes, instead of creating a new record, a new column is added to store the previous address.
Customer ID | Name | Current Address | Previous Address |
---|---|---|---|
1 | John Doe | 456 New St | 123 Old St |

These methods help manage the evolution of dimensional data over time, allowing for accurate historical reporting and analysis
Related Hashtags:
#datastage #DataStage #Datastage #SQL #sql #dwh #DWH #Dwh
#datawarehouse #datawarehousing #unix #ibmds #ibmdatastage
#BMDatastage #IBMDataStage #interviewquestions #interviewtips
#interview #interviewprep #interviewskills #interviewpreparation
#jobinterview #interviews #interviewready #interviewing #jobsearch
#jobseekers #careeradvice #resumetips #jobinterviewtips #career
#interviewadvice #jobs #interviewcoaching #job #careerdevelopment
#interviewoutfit #careertips #interviewcoach #jobsearching #interviewer
#careercoach #recruitment #resume #hiring
#blog #blogger #fashion #love #instagram
#instagood #photography #lifestyle #travel #blogging #blogpost
#bloggerstyle #follow #style #like #food #bloggers #fashionblogger
#music #art #photooftheday #beauty #bloggerlife #life #influencer
#k #instadaily #instablog #foodblogger #vlog
#jobinterviews #motivation #jobsearchtips #jobvacancy
#jobinterviewquestions #jobseeker #resumewriting #jobhunt
#resumewriter #resumehelp #coding #careergoals #jobhunting
#knowledge #goals #facts #interviewhelp #jobsinindia #jobseeking
#interviewseason #recruiting #quotes #questions #instafacts #factsdaily
#unknownfacts #dailyfacts #hiringnow #factoflife #allfacts
No comments:
Post a Comment