Data Warehouse vs Data Mart


I have been asked many times the difference between a data mart and a data warehouse. I have often heard the terms used interchangeably. But let's face it, we can't all be right all the time. So, below is my break down of data warehouses and data marts.

Data Warehouse

A data warehouse is simply a database.  The exact kind of database technology you use for business applications can be used for a data warehouse; you can use Oracle or SQL Server.  But stop before going to tell your boss all of your databases are data warehouses.  The difference between your application database and your data warehouse is how the schema is designed and the source of the data.  A data warehouse is specifically designed to make reporting easier and to ensure reporting does not place an undue burden on the transactional source system. Data warehouses can include data from many sources all brought together for convenience.  Note: A data warehouse is not a data graveyard for old data you no longer care about. Historical data in a warehouse is there for analysis, not because no one knew where else to put it.

So, if that is a data warehouse then what is a data mart?  Is it a different type of database technology?

Data Mart

A data mart is simply a database designed for ease of reporting.  Like a data warehouse, a data mart can be implemented using the database technology of your choice.  It is also not a place to put data when you are ready to put it out to pasture. The prescribed schema for a data mart is a star schema consisting of a central fact table with keys for dimensions. The dimension tables are your slicers. If you want to see anything "by" then it is a slicer.  For example, if you want to see revenue by quarter by region by product line then quarter, region, and product line are your slicers and are probably one or more dimension tables. Arranged properly, the table structure resembles a hub and spoke layout very loosely resembling a star.


The Difference

The major difference between a data mart and a data warehouse is the scope of the data.  A data warehouse will contain the combined and aggregated data from many subject areas in one place while a data mart is subject specific.  For example, a data mart may only contain data necessary for reporting on Finance or Human Resources.  Other differences are subject to the specific implementations.

There are data architectures in which a collection of data marts can be used to create a data warehouse.  But, a collection of data warehouses is...a collection of data warehouses.


Popular posts from this blog

Power BI Report Server: "An Error Has Occurred" or Power BI Report Server: "My Power BI Report is Coming up Blank" or Power BI Report Server: "401 and 403” Errors From Nowhere

SQL SERVER 2017: STRING_AGG

Dynamic Label Positions With SSRS