What are different types of dimensions in DataWarehouse?

What is Dimension in Datawarehouse?

Anything which measure facts like time,length,status,ID,date,place,codes,flags with its description,audit and other attributes is stored in table is called as dimension. It contains the description of the buisness, without dimensions it is very difficult to measure the facts. Dimension is the attribute of facts.

Types of dimension in Datawarehouse?


Conformed Dimension:

The dimensions which carries same measurable value,no matter in which fact table it is used and joined.
For Example, time column will carry same meaning and attributable value in “Employee wages Table” and “Sales table”.

Junk Dimension:
It is nothing but the collection of ‘N’ number of codes and flags, which are together being stored in one Dimension Structure as unique dimension build from combination of two or more dimensions.
For Example, If Table A contains two flags with employee Status-Permanent and Temporary as ‘F’ and ‘T’ and Table B with Pay unit contains-Monthly and weekly as ‘M’ and ‘W’ code then we can have Table C as Dimension Structure having four flags with the combinations of codes from the two Tables A and B as ‘FM’,’FW’,’TW’,’TM’. In this case Table C is the Junk Dimension, having combination of dimensions.

Degenerated Dimension:

The dimensions which doesn’t exist as an individual dimension values but are derived from the existing facts tables.
For Example, Gender Code in Employee Information fact table.

Role-Playing Dimension:

The dimension which play different character in the same database,having multipurpose implementations like dimension date can be used as “Date of hire”, “Date of termination” and “Date of purchase”.

Thanks
Nisha Sahu

Types of Dimensions in Data warehouse

Types of Dimensions in Data warehouse

What is Dimension?

Dimension table contains the data about the business. The primary keys of the dimension tables are used in Fact tables with Foreign key relationship. And the remaining columns in the dimension is normal data which is the information about the Objects related to the business.

Eg: Product,Customer,Orders,Company,Date etc.

Below are the different types of Dimensions:

1) Slowly Changing Dimensions (SCD) : Dimensions that change very slowly overtime rather than according to regular schedule.

Below are some popular approaches of SCDs:

Type 0: This is Passive method. The records which were inserted will not change any time.

Type 1: This method overwrites the old record with new values without tracking any historical data.

SCDtype1 SCDtype1_2

Type 2: This methods tracks the historical data by using version number or by using startdate, enddate columns.The drawback is the table will grow vertically. And it requires more space.

SCD2

Type 3: This method will also track the historical data by inserting the column with new value. It preserves limited history.

SCD3

Type 4: This method uses a separate table for storing all the historical data and main table will hold the current_data. And both will pointed with the same surrogate key.

SCD4

Type 6: This is called hybrid method which uses all type 1+ type 2 + type 3. It uses flag values and effective date to differ between old and new records.

2) Rapidly Changing Dimensions: The Dimension which contains rapidly changing attributes. If we maintain any historical data for these type of tables. We will definitely get an issue related to memory and performance.  The solution is to maintain mini dimension tables for historical data  like type 4 Dimension in SCD. The main table should contain the current values and mini dimensions can contains historical data.

3) Junk Dimensions: In the data warehouse design we will come across a situation to use flag values. We can use one single table for this so that in Fact table no need to have multiple columns to store the Primary key values of these flag tables.

Eg:Junk

As per above, if we consider Gender_Marital_Status we can use only 1 single column in Fact table.

4) Inferred Dimensions: The Dimension which is important to create a fact table but it is not yet ready, then we can assign some dummy details for one ID and we can use that ID in fact table. After getting the details then we can update the details in the dimension.

5) Conformed Dimensions: Dimensions which are connected with multiple fact tables are know as conformed Dimension.

Eg: Customer Dimension and Product Dimension are required in Shipment Fact,Sales fact and Service Request Fact

6) Degenerate Dimensions: A degenerate table does not have its own dimension table. It is derived from a fact table. The column (dimension) which is a part of fact table but does not map to any dimension.

Eg: Invoice_Number column in Fact table

Degenerated

7) Role Playing Dimensions: The same dimension which can be used for multiple purpose

Eg: Date Dimension can be used as Date of Sale, Date of Hire etc.

8) Shrunken Dimensions: A shrunken dimension is a subset of another dimension. For example, the Orders fact table may include a foreign key for Product, but the Target fact table may include a foreign key only for ProductCategory, which is in the Product table, but much less granular. Creating a smaller dimension table, with ProductCategory as its primary key, is one way of dealing with this situation of heterogeneous grain. If the Product dimension is snowflaked, there is probably already a separate table for ProductCategory, which can serve as the Shrunken Dimension

9) Static Dimensions: Static dimensions are not extracted from the original data source, but are created within the context of the data warehouse. A static dimension can be loaded manually — for example with Status codes — or it can be generated by a procedure, such as a Date or Time dimension.

Thank You

Lalitha