Here, we are taking an example to describe how the dimension table is distinguishing from the fact table.
Suppose a company sells its products to its customer. Every sale is a fact which occurs within the company, and the fact table is used to record these facts. Each fact table stores the primary key that joins fact table with the dimension table and measures/ facts.
Example: Fact Units
Cust_ID |
Prod_ID |
Time_ID |
No. of units sold |
101 |
24 |
1 |
25 |
102 |
25 |
2 |
15 |
103 |
26 |
3 |
30 |
A dimension table which store attributes or dimensions describe the objects in a fact table. It is a set of companion tables to a fact table.
Cust_ID |
Cust_Name |
Gender |
101 |
Sana |
F |
102 |
Jass |
M |