Data Warehousing
  • Data Warehousing
  • Readme
  • Fundamentals
    • Terms to Know
    • Jobs
    • Skills needed for DW developer
    • Application Tiers
    • Operational Database
    • What is a Data Warehouse
      • Typical Data Architecture
      • Problem Statement
      • Features of Data Warehouse
      • Need for Data Warehouse
      • Current State of the Art
    • Activities of Data Science
    • Types of Data
    • Data Storage Systems
    • Data Warehouse 1980 - Current
    • Data Warehouse vs Data Mart
    • Data Warehouse Architecture
      • Top-Down Approach
      • Bottom-Up Approach
    • Data Warehouse Characteristic
      • Subject Oriented
      • Integrated
      • Time Variant
      • Non Volatile
    • Tools
    • Cloud vs On-Premise
    • Steps to design a Data Warehouse
      • Gather Requirements
      • Environment
      • Data Modeling
      • Choosing ETL / ELT Solution
      • Online Analytic Processing
      • Front End
      • Query Optimization
    • Dataset Examples
    • Thoughts on some data
  • RDBMS
    • Data Model
      • Entity Relationship Model
      • Attributes
      • Keys
      • Transaction
      • ACID
    • Online vs Batch
    • DSL vs GPL
    • Connect to Elvis
    • SQL Concepts
      • Basic Select - 1
      • Basic Select - 2
      • UNION Operators
      • Wild Cards & Distinct
      • Group By & Having
      • Sub Queries
      • Derived Tables
      • Views
    • Practice using SQLBolt
  • Cloud
    • Overview
    • Types of Cloud Services
    • Challenges of Cloud Computing
    • AWS
      • AWS Global Infrastructure
      • EC2
      • S3
      • IAM
    • Terraform
  • Spark - Databricks
    • Storage Formats
    • File Formats
    • Medallion Architecture
    • Delta
  • Data Warehousing Concepts
    • Dimensional Modelling
      • Star Schema
      • Galaxy Schema
      • Snowflake Schema
      • Starflake Schema
      • Star vs Snowflake
      • GRAIN
      • Multi-Fact Star Schema
      • Vertabelo Tool
    • Dimension - Fact
    • Sample Excercise
    • Keys
      • Why Surrogate Keys are Important
    • More Examples
    • Master Data Management
    • Steps of Dimensional Modeling
    • Types of Dimensions
      • Date Dimension Table
      • Degenerate Dimension
      • Junk Dimension
      • Static Dimension
      • Conformed Dimensions
      • Slowly Changing Dimensions
        • SCD - Type 0
        • SCD - Type 1
        • SCD - Type 2
        • SCD - Type 3
        • SCD - Type 4
        • SCD - Type 6
        • SCD - Type 5 - Fun Fact
      • Role Playing Dimension
      • Conformed vs Role Playing
      • Shrunken Dimension
      • Swappable Dimension
      • Step Dimension
    • Types of Facts
      • Factless Fact Table
      • Transaction Fact
      • Periodic Fact
      • Accumulating Snapshot Fact Table
      • Transaction vs Periodic vs Accumulating
      • Additive, Semi-Additive, Non-Additive
      • Periodic Snapshot vs Additive
      • Conformed Fact
    • Sample Data Architecture Diagram
    • Data Pipeline Models
    • New DW Concepts
Powered by GitBook
On this page
  1. Data Warehousing Concepts
  2. Types of Dimensions
  3. Slowly Changing Dimensions

SCD - Type 1

Type 1 - Overwrite: In this approach, when changes occur, the existing values are overwritten with the new values. No historical data is preserved.

Before the change, the Product dimension table looks like this:

Product_ID
Product_Name
Category
Price

1

Smartphone

Electronics

800

After the change, the Product dimension table will look like this:

Product_ID
Product_Name
Category
Price

1

Smartphone

Mobile Devices

800

With a Type 1 SCD approach, the table now reflects the updated category for the "Smartphone" product. However, there is no record of the product's previous category, "Electronics," in the table.

Use Cases:

  1. When historical data is not essential for analysis, and only the current values are needed.

  2. For dimensions where tracking historical changes is not required for the business, such as minor corrections or updates to attributes.

  3. In cases where the data warehouse is required to support reporting and analysis on the current state of the business, and not historical trends.

Advantages:

  1. Simplicity: SCD Type 1 is relatively simple to implement, as it only requires overwriting existing records when changes occur.

  2. Space Efficiency: Since there is no need to store historical data or multiple versions of records, the dimension tables will be smaller and require less storage space.

  3. Performance: As there are no additional rows or columns for historical data, the querying and processing of the data warehouse will generally be faster.

Disadvantages:

  1. Lack of Historical Data: SCD Type 1 does not store any historical data, which means it cannot support reporting and analysis that requires tracking changes over time. This can be a significant limitation for businesses that need to analyze trends, understand the impact of changes, or perform other historical analyses.

  2. Loss of Previous Data: Since the dimension table only contains the most recent values, any changes that have occurred over time overwrite the previous values. This may lead to a loss of potentially valuable historical information.

  3. Inability to Track Changes: With SCD Type 1, it is impossible to determine when or why changes occurred, as there is no record of any changes in the dimension data. This can make it challenging to understand the reasons for changes or identify any potential issues or patterns.

PreviousSCD - Type 0NextSCD - Type 2

Last updated 2 years ago