database Star schema model - ghdrako/doc_snipets GitHub Wiki

obraz When loading data into the fact table, the first step is to load data into dimension tables, followed by loading into the fact table. Ralph Kimball introduced the concept of slowly changing dimensions (SCD), which manages the changes to the dimension. There are five types of slowly changing dimensions:

  • Type 1: In this type, the old data is overwritten.
  • Type 2: In this type, both the new and old records are kept.
  • Type 3: In this type, a new column is added to the row.
  • Type 4: In this type, a new table is created to capture new records using a database trigger or snapshot mechanism.
  • Type 5: This type includes both type 1 and type 2, where the old record is overwritten along with tracking historical data by creating new tables.