ποΈ Data Architectures: Data Lakes, Mesh & Medallion
ποΈ Data Architectures
Think of how cities store water:
- A reservoir serves the whole city (EDW)
- A local tank serves one neighbourhood (Data Mart)
- A massive open lake stores everything unfiltered (Data Lake)
- A smart lake with pipes gives you both raw and clean water (Lakehouse)
- A mesh of decentralized water plants each managing their own area (Data Mesh)
Different architectures exist because different businesses have different needs β size, speed, cost, flexibility.
1οΈβ£ Enterprise Data Warehouse (EDW)
A single, centralized warehouse that serves the entire organization β all departments, all subjects, all data in one place.
All Sources β ETL β One Central EDW β All Departments query it
Characteristics:
- Organization-wide scope (not just one department)
- Single source of truth for the entire enterprise
- Governed, structured, historical data
- Typically built on: Snowflake, Teradata, IBM Db2, Oracle
Best for:
- Large enterprises needing consistent data across all departments
- Heavily regulated industries (Banking, Insurance, Healthcare)
EDW = DW at enterprise scale. Every department feeds into it and queries from it.
2οΈβ£ Data Marts
A department-scoped subset of the EDW (covered in Ch04).
EDW β [subset] β Sales Mart
β [subset] β Finance Mart
β [subset] β HR Mart
Data Marts are not a standalone architecture β they work on top of an EDW or DW. They give teams faster, focused access without querying the full warehouse.
3οΈβ£ Data Lake
A giant lake that accepts everything β clean water, muddy water, salt water. You store it all first, figure out what to do with it later.
A Data Lake stores raw, unprocessed data in its native format β structured, semi-structured, and unstructured β at massive scale.
| Feature | Data Lake |
|---|---|
| Data format | Raw (CSV, JSON, Parquet, images, logs, video) |
| Schema | Schema-on-read (define structure when you query) |
| Storage cost | Very cheap (cloud object storage: S3, ADLS, GCS) |
| Users | Data scientists, ML engineers |
| Processing | Spark, Hive, Presto |
Best for:
- Storing massive volumes of diverse data cheaply
- ML/AI workloads that need raw data
- When you don't know exactly what questions you'll ask yet
Without proper governance, a Data Lake becomes a Data Swamp β full of data nobody trusts or can find. Metadata and cataloguing are critical.
4οΈβ£ Lakehouse
A lakehouse is a lake with the plumbing of a warehouse β you get the storage flexibility of a lake with the ACID transactions and performance of a warehouse.
A Lakehouse combines the best of Data Lake and Data Warehouse into one architecture.
| Feature | Data Lake | Data Warehouse | Lakehouse |
|---|---|---|---|
| Stores raw data | β | β | β |
| ACID transactions | β | β | β |
| BI & SQL queries | Limited | β | β |
| ML workloads | β | β | β |
| Cost | Low | High | Medium |
| Schema enforcement | On read | On write | Both |
Technologies:
- Delta Lake (Databricks)
- Apache Iceberg
- Apache Hudi
Lakehouse is the modern default for most data teams β one platform for BI, ML, and streaming.
5οΈβ£ Data Mesh
Instead of one central water plant for the whole city, each neighbourhood runs its own water plant and is responsible for quality. They share using common standards.
Data Mesh is a decentralized architecture where data ownership is distributed to individual domain teams (e.g., Sales team owns Sales data, HR team owns HR data).
4 Core Principles:
- Domain ownership β each team owns, builds, and maintains their own data products
- Data as a product β each domain treats its data as a product with SLAs and documentation
- Self-serve platform β central team provides infrastructure; domains use it themselves
- Federated governance β global standards enforced, but each domain has autonomy
Sales Domain β owns β Sales Data Product
Finance Domain β owns β Finance Data Product
HR Domain β owns β HR Data Product
β shared via common standards
Consumers query across domains
Best for:
- Large organizations with many autonomous teams
- When a central data team becomes a bottleneck
Data Mesh requires strong organizational maturity β it fails when teams lack the skills or ownership culture to maintain their own data products.
6οΈβ£ Medallion Architecture (Bronze β Silver β Gold)
Like refining crude oil β raw oil (Bronze) β refined oil (Silver) β premium fuel ready to use (Gold).
Medallion Architecture is a layered data design pattern used inside Lakehouses (especially Databricks Delta Lake) that progressively refines data quality across 3 layers.
| Layer | Also Called | What It Contains | Quality |
|---|---|---|---|
| Bronze | Raw layer | Raw ingested data β exactly as received from sources | β Dirty |
| Silver | Cleaned layer | Deduplicated, validated, standardized data | β Clean |
| Gold | Business layer | Aggregated, modelled data ready for reporting & ML | β β Curated |
Source Data
β
π₯ Bronze β raw, as-is (JSON logs, CSV dumps, API responses)
β clean + deduplicate
π₯ Silver β validated, standardized, joined tables
β aggregate + model
π₯ Gold β business-ready fact/dimension tables, KPIs, dashboards
Real Example (E-commerce):
Bronze β Raw order events from Kafka (JSON, duplicates, nulls)
Silver β Cleaned orders table (deduped, currency standardized, nulls handled)
Gold β Daily_Sales_Summary table (SUM revenue by region/product β feeds Power BI)
Bronze = never delete (audit trail). Silver = analyst-ready. Gold = business-ready.
7οΈβ£ Virtual Data Warehouse
A Virtual Data Warehouse does not physically store data β instead it creates a virtual layer on top of existing source systems and presents them as if they were a warehouse.
Source DB 1 ββ
Source DB 2 ββ€β Virtual Layer (query federation) β Analyst queries
Source DB 3 ββ
Best for:
- Quick implementation with no ETL pipelines
- When data cannot be moved (regulatory, privacy reasons)
- Ad hoc analysis on existing systems
Virtual DWs have performance limitations β queries hit live source systems. Not suitable for heavy, complex analytics.
βοΈ DW vs EDW
| Attribute | Data Warehouse (DW) | Enterprise Data Warehouse (EDW) |
|---|---|---|
| Scope | Department or limited subject areas | Entire organization |
| Users | One or few teams | All departments |
| Data coverage | Partial | Complete enterprise-wide |
| Complexity | Lower | Higher |
| Governance | Moderate | Strict, enterprise-grade |
| Example | Sales DW for one region | Global DW for all of Infosys |
EDW is just a DW that has been scaled and governed to serve the whole enterprise. Every EDW is a DW β not every DW is an EDW.
πΊοΈ Architecture Comparison Summary
| Architecture | Data Type | Schema | Best For |
|---|---|---|---|
| EDW | Structured | Fixed | Enterprise-wide reporting |
| Data Mart | Structured | Fixed | Dept-level analytics |
| Data Lake | Any (raw) | On read | ML, raw storage, exploration |
| Lakehouse | Any | Both | Unified BI + ML platform |
| Data Mesh | Any | Domain-owned | Large orgs, decentralized teams |
| Medallion | Any (layered) | Layered | Progressive data refinement |
| Virtual DW | Structured | Virtual | Quick access, no movement |
π§ͺ Practice Drill
// Try answering these:
// Q1. What is the key difference between a Data Lake and a Data Warehouse in terms of schema?
// Q2. A startup stores raw clickstream logs, images, and CSV sales data all in one place cheaply for future ML use. Which architecture are they using?
// Q3. Name the 3 layers of Medallion Architecture and what each contains.
// Q4. A large bank has 20 departments all querying inconsistent data from their own databases. Which architecture solves this at scale?
// Q5. Why would a company choose a Virtual Data Warehouse? What is its main limitation?
// Q6. Match the architecture to its best use case:
// | Use Case | Architecture |
// |---|---|
// | Each domain team owns and serves its own data | ? |
// | Progressive data refinement: raw β clean β curated | ? |
// | One warehouse for the entire global enterprise | ? |
// | BI + ML on the same platform without data movement | ? |
π‘ Click for Solutions
A1.
- Data Lake β Schema-on-read (structure defined when queried, not when stored)
- Data Warehouse β Schema-on-write (structure enforced when data is loaded)
A2. Data Lake β stores raw, diverse data cheaply with no predefined schema
A3.
- π₯ Bronze β raw data exactly as received from sources (dirty, unprocessed)
- π₯ Silver β cleaned, deduplicated, standardized data (analyst-ready)
- π₯ Gold β aggregated, business-modelled data ready for dashboards and ML
A4. Enterprise Data Warehouse (EDW) β centralizes all departments into one governed, consistent source of truth
A5.
- Chosen when: data cannot be moved (compliance/privacy), or a quick no-ETL solution is needed
- Main limitation: queries hit live source systems β poor performance for heavy analytics
A6.
| Use Case | Architecture |
|---|---|
| Each domain team owns and serves its own data | Data Mesh |
| Progressive data refinement: raw β clean β curated | Medallion Architecture |
| One warehouse for the entire global enterprise | EDW |
| BI + ML on the same platform without data movement | Lakehouse |
β Previous Topic | Next Topic β Next Topic