Skip to main content
HomeBlogData Engineering

Data Lakes vs. Data Warehouses

Understand the differences between the two most popular options for storing big data.
Jan 2020  · 4 min read

When it comes to storing big data, the two most popular options are data lakes and data warehouses. Data warehouses are used for analyzing archived structured data, while data lakes are used to store big data of all structures.

In this post, we’ll unpack the differences between the two. The below table breaks down their differences into five categories.

  Data Lake Data Warehouse
Type of data Unstructured and structured data from various company data sources Historical data that has been structured to fit a relational database schema
Purpose Cost-effective big data storage Analytics for business decisions
Users Data scientists and engineers Data analysts and business analysts
Tasks Storing data and big data analytics, like deep learning and real-time analytics Typically read-only queries for aggregating and summarizing data
Size Stores all data that might be used—can take up petabytes! Only stores data relevant to analysis

Type of data

Cleaning data is a key data skill because data naturally comes in messy and imperfect forms. Raw data that hasn’t been cleaned is called unstructured data—which comprises most of the data in the world, like photos, chat logs, and PDF files. Unstructured data that has been cleaned to fit a schema, organized into tables and defined by data types and relationships, is called structured data. This is the fundamental difference between lakes and warehouses.

Data lakes store data from a wide variety of sources like IoT devices, real-time social media streams, user data, and web application transactions. Sometimes this data is structured, but often, it’s quite messy because data is being ingested straight from the data source. Data warehouses, on the other hand, contain historical data that have been cleaned to fit a relational schema.

Purpose

Data lakes are used for cost-effective storage of large amounts of data from many sources. Allowing data of any structure reduces cost because data is more flexible and scalable as the data doesn’t need to fit a specific schema. However, structured data is easier to analyze because it’s cleaner and has a uniform schema to query from. By restricting data to a schema, data warehouses are very efficient for analyzing historical data for specific data decisions.

You may notice that data lakes and data warehouses complement each other in a data workflow. Ingested company data will be stored immediately into a data lake. If a specific business question comes up, a portion of the data deemed relevant is extracted from the lake, cleaned, and exported into a data warehouse.

Users

Data lakes and data warehouses are useful for different users. Data analysts and business analysts often work within data warehouses containing explicitly pertinent data that has been processed for their work. Data warehouses require a lower level of programming and data science knowledge to use.

Data lakes are set up and maintained by data engineers who integrate them into data pipelines. Data scientists work more closely with data lakes as they contain data of a wider and more current scope.

Tasks

Data engineers use data lakes to store incoming data. However, data lakes aren’t only limited to storage. Remember, unstructured data is more flexible and scalable, which is oftentimes better for big data analytics. Big data analytics can be run on data lakes using services such as Apache Spark and Hadoop. This is especially true for deep learning, which requires scalability in the increasing amount of training data.

Data warehouses are typically set to read-only for analyst users, who are primarily reading and aggregating data for insights. Since data is already clean and archival, there is usually no need to insert or update data.

Size

It should be no surprise that data lakes are much bigger in size because they retain all data that might be relevant to a company. Data lakes are often petabytes in size—that's 1,000 terabytes! Data warehouses are much more selective on what data is stored.

Conclusion

When you’re deciding between a data lake or data warehouse, go through these categories and see which best fits your use case. If you’re interested in a deeper dive into their differences or learning how to design data warehouses, check out our Database Design course!

Don’t forget that sometimes you need a combination of both storage solutions. This is especially true when building data pipelines. You can see this in action in our Introduction to Data Engineering and Building Data Engineering Pipelines in Python courses.

Topics
Related

podcast

The Venture Mindset with Ilya Strebulaev, Economist Professor at Stanford Graduate School of Business

Richie and Ilya explore the venture mindset, the importance of embracing unknowns, how VCs deal with unpredictability, how our education affects our decision-making ability, venture mindset principles and much more. 
Richie Cotton's photo

Richie Cotton

59 min

cheat sheet

LaTeX Cheat Sheet

Learn everything you need to know about LaTeX in this convenient cheat sheet!
Richie Cotton's photo

Richie Cotton

tutorial

Airflow vs Prefect: Deciding Which is Right For Your Data Workflow

A comparison between two data orchestration tools and how they may be utilized to improve data workflow management.
Tim Lu's photo

Tim Lu

8 min

tutorial

Building an ETL Pipeline with Airflow

Master the basics of extracting, transforming, and loading data with Apache Airflow.
Jake Roach's photo

Jake Roach

15 min

tutorial

Complete Databricks Dolly Tutorial for Building Applications

Learn to use the advanced capabilities of Databricks Dolly LLM to build applications.
Laiba Siddiqui's photo

Laiba Siddiqui

tutorial

GitHub Actions and MakeFile: A Hands-on Introduction

Learn to automate the generation of data reports using Makefile and GitHub Actions.
Abid Ali Awan's photo

Abid Ali Awan

16 min

See MoreSee More