Fact vs Dimension Tables

 In the world of data analysis, you might come across fact and dimension tables. But what do they actually mean?

Fact Tables

Fact tables are tables about events. For e.g., in an ecommerce setting, each sales is an event. So, the fact table will be a table about sales events containing information such as  product id, order date, shipping date, price, seller id, etc. 

Dimension Tables

Dimension tables contain information about the data inside fact table and are related to the fact table via keys. For e.g., the product table which contains information about all products is a dimension table which is related to the sales table via some key (product id).

It is important to realize this difference for understanding further concepts like schemas in data modelling process. From a data modelling point of view, star schema is one of the most popular schemas and fact table occupies the centre of the star schema and its tips are occupied by the various dimension tables.
So next time you see a star schema, you should know where the fact table is and where the dimension tables are.

Popular posts from this blog

ML technical definition : Learning in AI defined

Batch Gradient Descent vs Stochastic Gradient Descent (SGD) vs Mini-Batch Gradient Descent

ML vs. DL : What exactly is deep learning?