Вы находитесь на странице: 1из 6

Fact Table:

1. A Fact table consists of the measurements, metrics or facts of a business process. It is


located at the centre of a star schema or a snowflake schema surrounded by dimension
tables.
2. A fact table typically has two types of columns:
- Those that contain facts and
- Those that are a foreign key to dimension tables.
- The primary key of a fact table is usually a composite key that is made up of all of its
foreign keys.
3. Fact tables contain the content of the data warehouse and store different types of
measures like additive, non- additive, and semi additive measures.
4. Fact tables provide the (usually) additive values that act as independent variables by
which dimensional attributes are analyzed. Fact tables are often defined by their grain.
The grain of a fact table represents the most atomic level by which the facts may be
defined.
For ex: The grain of a SALES fact table might be stated as "Sales volume by Day by
Product by Store". Each record in this fact table is therefore uniquely defined by a day,
product and store.
5. Other dimensions might be members of this fact table (such as location/region) but these
add nothing to the uniqueness of the fact records. These "affiliate dimensions" allow for
additional slices of the independent facts but generally provide insights at a higher level
of aggregation (a region contains many stores).
6. All foreign keys between fact and dimension tables should be surrogate keys, not reused
keys from operational data.
7. Measure types:
a. Additive - Measures that can be added across any dimension.
b. Non Additive - Measures that cannot be added across any dimension.
c. Semi Additive - Measures that can be added across some dimensions.
8. A fact table might contain either detail level facts or facts that have been aggregated (fact
tables that contain aggregated facts are often instead called summary tables).
9. In the real world, it is possible to have a fact table that contains no measures or facts.
These tables are called "factless fact tables", or "junction tables".
The "Factless fact tables" can for example be used for modelling many-to-many
relationships or capture events.
10. Types of Fact tables:
There are four fundamental measurement events, which characterize all fact tables. [2]
Transactional
A transactional table is the most basic and fundamental. The grain associated with a
transactional fact table is usually specified as "one row per line in a transaction", e.g.,
every line on a receipt. Typically a transactional fact table holds data of the most detailed
level, causing it to have a great number of dimensions associated with it.

Periodic snapshots
The periodic snapshot, as the name implies, takes a "picture of the moment", where the
moment could be any defined period of time, e.g. a performance summary of a salesman
over the previous month. A periodic snapshot table is dependent on the transactional
table, as it needs the detailed data held in the transactional fact table in order to deliver
the chosen performance output.
Accumulating snapshots
This type of fact table is used to show the activity of a process that has a well-defined
beginning and end, e.g., the processing of an order. An order moves through specific
steps until it is fully processed. As steps towards fulfilling the order are completed, the
associated row in the fact table is updated. An accumulating snapshot table often has
multiple date columns, each representing a milestone in the process. Therefore, it's
important to have an entry in the associated date dimension that represents an unknown
date, as many of the milestone dates are unknown at the time of the creation of the row.
Temporal snapshots
By applying Temporal Database theory and modelling techniques the Temporal Snapshot
Fact Table [3] allows to have the equivalent of daily snapshots without really having daily
snapshots. It introduces the concept of Time Intervals into a fact table, allowing to save a
lot of space, optimizing performances while allowing the end user to have the logical
equivalent of the "picture of the moment" he is interested in.
DIMENSION TABLE:
A dimension is a structure that categorizes facts and measures in order to enable users
to answer business questions. Commonly used dimensions are people, products, place
and time.
In a data warehouse, dimensions provide structured labeling information to otherwise
unordered numeric measures. The dimension is a data set composed of individual, nonoverlapping data elements. The primary functions of dimensions are threefold: to provide
filtering, grouping and labelling.
These functions are often described as "slice and dice". Slicing refers to filtering data.
Dicing refers to grouping data.

Facts
A fact is a value or measurement, which represents a fact about the managed entity or system.
Facts as reported by the reporting entity are said to be at raw level. Facts at raw level are further
aggregated to higher levels in various dimensions to extract more service or business-relevant
information out of it. These are called aggregates or summaries or aggregated facts.

MEASURE:

In a data warehouse, a measure is a property on which calculations (e.g., sum, count,


average, minimum, maximum) can be made.
For example if retail store sold a specific product, the quantity and prices of each item
sold could be added or averaged to find the total number of items sold and total or
average price of the goods sold.

Вам также может понравиться