A fact
table is a table that stores quantitative
data (numeric values) about a business activity. It answers the question “how
much” and generally it contains numerous rows, having values such quantity or
sales.
If we
want to know the “who, what, where and when” of the business activity, understanding
the context and background of fact table data, we could find it in a dimension
table. A dimension table stores descriptive,
qualitative data (text values) and usually it has fewer rows when comparing
with the fact table.
While a
fact table summarizes, a dimension table is useful to group and filter data.
For example, a fact table “Sales” should have the following columns: Order ID,
Product ID, Customer ID, Date and Sales Amount. In this data model, we could
have two-dimension tables, one “Product” – with columns like Product ID, Product
Name, Category and Supplier - and another “Customer”- with columns like
Customer ID, Customer Name and Region.
Comentários
Enviar um comentário