Skip to content
tezvyn:
Menu

Data warehouse vs data lake

Source: interviewEasyHow cards are made

Summary

distinguishing two storage paradigms.

Key points

warehouses store structured, schema-on-write data for BI; lakes store raw multi-format data with schema-on-read for exploration and ML.

What's really being asked

The interviewer wants a clear grasp of two complementary storage paradigms and when each fits, not a vague preference for one.

The full answer

A data warehouse stores structured, cleaned, and modeled data, typically relational tables, and enforces schema-on-write: data must conform to a defined schema before it is loaded. It is optimized for fast, repeatable SQL analytics and business intelligence dashboards, and it tends to be more expensive per terabyte because storage and compute are tuned for query performance. A data lake stores raw data of any kind, structured rows, semi-structured JSON or logs, and unstructured images or video, on cheap object storage. It uses schema-on-read: no structure is enforced at ingest, and you impose schema only when you query. This makes lakes ideal for exploratory analysis, data science, and machine learning where future questions are unknown.

Key differences

Structure: warehouse is structured and curated, lake holds everything raw. Schema: warehouse is schema-on-write, lake is schema-on-read. Use cases: warehouse for BI and reporting, lake for ML and ad-hoc exploration. Cost and governance: lakes are cheaper but risk becoming ungoverned data swamps without cataloging and quality controls.

The mistakes people make

Saying a lake is simply a cheaper warehouse, ignoring schema timing and governance. Claiming warehouses cannot handle large scale, or that lakes always replace warehouses; many architectures use both, often as a lakehouse.

What usually comes next

What is a lakehouse. What is a data swamp and how do you avoid it. When would you use both together.

A concrete example

A retailer loads cleaned daily sales into a Redshift warehouse for finance dashboards, while dumping raw clickstream, app logs, and product images into an S3 data lake that data scientists query with schema-on-read to train a recommendation model.

Interview question

Which statement correctly captures the schema difference between a data warehouse and a data lake?

  • a.A warehouse enforces schema-on-write; a lake applies schema-on-read at query timeCorrect
  • b.Both apply schema-on-write before any data is stored
  • c.Neither uses a schema; both store only unstructured data
  • d.A lake enforces schema-on-write; a warehouse applies schema-on-read
Why?

Warehouses require data to fit a schema at load (schema-on-write); lakes store raw data and impose structure only when read (schema-on-read). The other options reverse or deny these defining traits.

Just read this? Test yourself on what you have been reading.

Read the original → azure.microsoft.com

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles