Dimensional modeling (DM) is the name of a set of techniques and concepts
used in data warehouse design. Dimensional modeling always uses the
concepts of facts (measures), and dimensions (context).
Facts: Facts
are typically (but not always) numeric values that can be aggregated, and
dimensions are groups of hierarchies and descriptors that define the facts.
Types of Facts:
There are three types of facts:
• Additive:
Additive facts are facts that can be summed up through all of the dimensions in the fact table.
Additive facts are facts that can be summed up through all of the dimensions in the fact table.
• Semi-Additive:
Semi-additive facts are facts that can be summed up for some of the dimensions in the fact table,
but not the others.
• Non-Additive:
Non-additive facts are facts that cannot be summed up for any of the dimensions present in the fact table.
Semi-additive facts are facts that can be summed up for some of the dimensions in the fact table,
but not the others.
• Non-Additive:
Non-additive facts are facts that cannot be summed up for any of the dimensions present in the fact table.
Types of Fact Tables
There are two types of fact tables:
• Cumulative:
This type of fact table describes what has happened over a period of time. For example,
this fact table may describe the total sales by product by store by day. The facts for this type of fact tables are mostly additive facts. The first example presented here is a cumulative fact table.
this fact table may describe the total sales by product by store by day. The facts for this type of fact tables are mostly additive facts. The first example presented here is a cumulative fact table.
• Snapshot:
This type of fact table describes the state of things in a particular instance of time, and usually includes more semi-additive and non-additive facts. The second example presented here is a snapshot fact table.
- Dimension:
A dimension is a data element that categorizes each item in a data set into non-overlapping regions. A data warehouse dimension provides the means to "slice and dice" data in a data warehouse. Dimensions provide structured labeling information to otherwise unordered numeric measure
Types of Dimension:
Conformed dimension:
In data warehousing, a conformed dimension is
a dimension that has the same meaning to every fact with which
it relates. Conformed dimensions allow facts and measures to be categorized and
described in the same way across multiple facts and/or data marts, ensuring consistent reporting across the
enterprise.
A conformed dimension can exist as a single
dimension table that relates to multiple fact tables within the same data warehouse, or as identical dimension tables in separate
data marts.
Junk dimension:
A Junk Dimension is a dimension table
consisting of attributes that do not belong in the fact table or in any of the
existing dimension tables .The junk dimension should contain a single row
representing the blanks as a surrogate key that will be used in the fact table
for every row returned with a blank comment field.
The designer is faced with the challenge of
where to put attributes that do not belong in the other dimensions, Solution
is to create a new dimension for each of the remaining attributes, but due to
their nature, it could be necessary to create a vast number of new dimensions
resulting in a fact table with a very large number of foreign keys.
Degenerate dimension:
A dimension key, such as a transaction
number, invoice number, ticket number, or bill-of-lading number, that has no
attributes and hence does not join to an actual dimension table. Degenerate
dimensions are very common when the grain of a fact table represents a single
transaction item or line item because the degenerate dimension represents the
unique identifier of the parent. Degenerate dimensions often play an integral
role in the fact table's primary key.
Dimensional modeling structure:
The dimensional model is built on a star-like
schema, with dimensions surrounding the fact table. To build the schema, the
following design model is used:
1.
Choose the business process
2.
Declare the Grain
3.
Identify the dimensions
4.
Identify the Fact
Benefits of dimensional modeling:
Benefits of the dimensional modeling are
following:
1.
Understandability
2.
Query performance
3.
Extensibility
No comments:
Post a Comment