# Data warehouse

> A database built for analysis: years of history, from many sources, in one place.

- Level: Intermediate
- Topics: Data
- URL: https://tidbit.legios.com.ar/data-warehouse/
- In Spanish: [Data warehouse](https://tidbit.legios.com.ar/es/data-warehouse/)

A **data warehouse** is a database designed to answer business questions, not to run an app. The app's own database is busy recording each sale as it happens; the warehouse receives copies of that data, plus data from the CRM, the payments provider and the ad platforms, and keeps years of history in one place, cleaned and organized so the pieces fit together.

The difference shows in the questions. An app asks 'what is in Ana's cart right now?', touching one row. An analyst asks 'how did sales per region change month by month over the last three years?', reading hundreds of millions of rows. Warehouses store data **column by column** and spread the work across many machines, so that second kind of question takes seconds. Amazon Redshift, Snowflake and Google BigQuery are well-known ones, and you talk to all of them in SQL.

Data usually arrives through ETL pipelines that run every night or every few minutes, and the tables are modeled around the business: **facts** (each sale) surrounded by **dimensions** (customer, product, date). Dashboards, monthly reports and forecasts are built on top. The warehouse becomes the single source of truth: when two teams disagree about a number, it is where they go to settle it.

## An analogy

A company's central archive. Each department keeps its working papers at its own desk (the app databases); every night copies are filed in the archive, labeled the same way, so anyone can pull five years of records and compare them side by side.

## Keep in mind

- Built for analysis over a long history, not for the app's moment-to-moment work.
- Stores data by columns and spreads each query over many machines.
- Fed by ETL pipelines from many sources, and queried with SQL.
- Amazon Redshift, Snowflake and Google BigQuery are common examples.

## Go deeper

- [What is a data warehouse? (AWS)](https://aws.amazon.com/what-is/data-warehouse/)
- [Data warehouse on Wikipedia](https://en.wikipedia.org/wiki/Data_warehouse)

## Related terms

- [Database](https://tidbit.legios.com.ar/database/): An organized store of data that programs can search and update safely.
- [Regions and Availability Zones](https://tidbit.legios.com.ar/regions-and-availability-zones/): Where AWS physically lives: cities worldwide, each split into separate data centers.
- [Amazon Redshift](https://tidbit.legios.com.ar/amazon-redshift/): AWS's data warehouse: SQL over huge tables, built for analysis rather than apps.
- [Google](https://tidbit.legios.com.ar/google/): The search company that gives most products away and makes its money on ads.
- [SQL](https://tidbit.legios.com.ar/sql/): The language you use to ask a database questions.
- [ETL](https://tidbit.legios.com.ar/etl/): Copy data out of its sources, clean it up, load it where it can be analyzed.
