quiz image

Slowly Changing Dimension Types Quiz

BestPerformingSphinx avatar
BestPerformingSphinx
·
·
Download

Start Quiz

Study Flashcards

12 Questions

When a salesperson relocates region, what is the recommended approach to handle the change in the dimension table?

Create a new version of the salesperson with the new region and appropriate start/end dates

Which type of Slowly Changing Dimension (SCD) supports storing two versions of a dimension member as separate columns?

Type 3 SCD

In a Type 6 Slowly Changing Dimension (SCD), how are the current and historical values of a dimension member stored?

The current value is stored in a separate column, and historical values are stored in separate rows

What is the purpose of including start and end date values in a Slowly Changing Dimension (SCD) table?

To define the time validity of a dimension member's value

When the source data does not store versions of dimension members, what is required to detect and store changes in a Slowly Changing Dimension (SCD) table?

An intermediate system, such as a data warehouse, to detect and store changes

In a Type 2 Slowly Changing Dimension (SCD), how are related facts associated with the correct dimension key value?

By using a time-based lookup to retrieve the dimension key value relevant to the fact date

What is the primary purpose of a Type 1 Slowly Changing Dimension (SCD)?

To overwrite dimension records with the latest values from the source system

In a Type 2 SCD, which of the following is typically used to uniquely identify a version of a dimension member?

A surrogate key generated in the data warehouse

Which of the following columns are typically included in a Type 2 SCD to track the validity period of a dimension member version?

StartDate and EndDate

In the given example of Adventure Works assigning salespeople to sales regions, which SCD type would be most appropriate to track changes in sales region assignments?

Type 2 SCD

If a dimension table supports a combination of Type 1 and Type 2 SCDs, what would be a potential scenario?

Some columns are overwritten with the latest values (Type 1), while other columns maintain a historical record of changes (Type 2)

Based on the given information, which statement is correct about the use of a Type 3 SCD?

The text does not provide enough information to determine the purpose of a Type 3 SCD

Study Notes

Slowly Changing Dimension (SCD) Types

  • When a salesperson relocates to a new region, a new version of the salesperson is created to preserve historical facts associated with the former region.
  • The dimension table must store versions of salespeople and their associated regions, along with start and end date values to define time validity.
  • Current versions may have an empty end date (or 12/31/9999), indicating that the row is the current version.
  • The table must define a surrogate key because the business key (employee ID) won't be unique.

Type 1 SCD

  • Always reflects the latest values, overwriting dimension table data when changes in source data are detected.
  • Common for columns storing supplementary values, like customer email addresses or phone numbers.
  • Updates the customer row with new values when a change is detected, as if the customer always had this contact information.

Type 2 SCD

  • Supports versioning of dimension members, often requiring a data warehouse load process to detect and manage changes.
  • Uses a surrogate key to provide a unique reference to a version of the dimension member.
  • Includes columns defining date range validity (e.g., StartDate and EndDate) and possibly a flag column (e.g., IsCurrent) to filter by current dimension members.

Type 3 SCD

  • Supports storing two versions of a dimension member as separate columns.
  • Tracks one key instance of history, using additional columns rather than storing additional rows.
  • Often used in combination with Type 1 or Type 2 members.

Type 6 SCD

  • Combines Type 1, 2, and 3, storing the current value in all versions of an entity.
  • Allows for easy reporting on current or historical values.
  • Example: splitting the Region column into CurrentRegion and HistoricalRegion, where CurrentRegion shows the latest value and HistoricalRegion shows the region valid between StartDate and EndDate.

Test your knowledge on different types of Slowly Changing Dimension (SCD) types, including Type 1, Type 2, Type 3, and Type 6. Understand how each SCD type handles changes in source data and updates dimension tables.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser