Data Warehouse
A Data Warehouse (DW or DWH), also known as an Enterprise Data Warehouse (EDW), is a central repository of integrated data from one or more disparate sources. Its primary purpose is to store current and historical data in a structured format optimized for querying, reporting, and Business Intelligence (BI) activities. Data warehouses separate analytical workloads from transactional (OLTP) workloads to avoid impacting operational systems.
Historical Context and Purpose
Data warehouses emerged in the late 1980s and 1990s to address the limitations of querying operational databases directly for complex analytical reporting:
- OLTP vs. OLAP: Operational Transaction Processing (OLTP) systems (like order entry, CRM) are optimized for fast, frequent, small transactions (inserts, updates, deletes). Online Analytical Processing (OLAP), needed for reporting, involves complex queries over large amounts of historical data, which would slow down OLTP systems.
- Data Integration: Operational systems often had different data formats, codes, and structures. Data warehouses aimed to integrate this data into a consistent, standardized model.
- Historical Data: Operational systems often only kept current data, while warehouses were designed to accumulate historical data for trend analysis.
- Query Performance: Warehouses use specialized data modeling techniques (like star schemas or snowflake schemas) and indexing optimized for analytical queries (OLAP) rather than transactions.
Key Characteristics
- Subject-Oriented: Data is organized around major subjects of the business (e.g., Customer, Product, Sales) rather than specific applications.
- Integrated: Data from various sources is cleaned, transformed, and standardized into a consistent format.
- Time-Variant: Data in the warehouse represents snapshots over time, allowing for historical analysis and trend reporting. Records often include timestamps or time periods.
- Non-Volatile: Data in the warehouse is typically loaded periodically (e.g., daily, weekly) and is not updated or deleted in real-time like in operational systems. It's primarily read-only for analysis.
- Structured Data Focus: Traditionally optimized for structured, relational data.
- Schema-on-Write: Data must conform to a predefined schema (often using dimensional modeling) before being loaded, usually via an ETL (Extract, Transform, Load) process.
- Optimized for Read/Query: Designed for complex analytical queries over large datasets, often using columnar storage, indexing, and aggregation strategies.
Architecture Components (Traditional)
- Data Sources: Operational databases, ERP systems, CRM systems, flat files, etc.
- ETL Layer: Tools and processes responsible for Extracting data from sources, Transforming it (cleaning, standardizing, integrating), and Loading it into the warehouse.
- Storage Layer: The relational database management system (RDBMS) storing the warehouse data, often using dimensional models (fact and dimension tables).
- Metadata Layer: Stores information about the data definitions, sources, transformations, and structure.
- Access Layer: Tools used by end-users for querying, reporting, and analysis (e.g., BI tools like Tableau, Power BI; SQL clients; OLAP tools).
Limitations and Evolution
Traditional data warehouses faced challenges that led to the rise of Data Lakes and Lakehouses:
- Cost: Licensing, hardware, and storage could be very expensive.
- Scalability: Scaling compute and storage together could be difficult and costly.
- Latency: The batch ETL process meant data was often hours or days old before being available for analysis.
- Limited Data Types: Handling semi-structured or unstructured data was often cumbersome or impossible.
- Rigidity: Schema changes could be complex and time-consuming (Schema-on-Write inflexibility).
Modern cloud data warehouses (e.g., Snowflake, BigQuery, Redshift) addressed some of these issues (especially scalability and cost) by leveraging cloud infrastructure and separating storage and compute, but the core focus remained on structured data loaded via batches.
Data Warehouses vs. Data Lakes vs. Lakehouses
- Data Warehouse: Structured, curated data; schema-on-write; optimized for BI; typically higher cost.
- Data Lake: Raw, diverse data; schema-on-read; flexible; lower storage cost; requires more governance; reliability challenges.
- Data Lakehouse: Combines lake's low-cost storage and flexibility with warehouse's reliability and structure using open table formats on the lake.
Data Warehouses and RisingWave
RisingWave, as a Streaming Database, operates differently from a traditional data warehouse but can interact with it in a larger architecture:
- Source: RisingWave could potentially ingest data from a data warehouse (e.g., via JDBC or CDC if the warehouse supports it), though this is less common than sourcing from operational databases or streams.
- Sink: RisingWave can sink processed, real-time results into a data warehouse using its Sink connectors (e.g., JDBC sink, or potentially sinking to cloud storage in a format ingestible by the warehouse). This allows enriching the warehouse with low-latency insights derived from streams.
- Complementary Role: RisingWave excels at processing data-in-motion and serving fresh results (low latency), while data warehouses excel at complex queries over large historical structured data (higher latency). They can complement each other, with RisingWave potentially handling the real-time "hot" data path and feeding aggregated results into the warehouse for long-term storage and historical BI.
- Alternative (Streaming Lakehouse): The Streaming Lakehouse architecture, often involving RisingWave and an open table format like Iceberg, aims to provide both real-time processing and historical analysis on a single platform, potentially reducing the need for a separate traditional data warehouse in some scenarios.
Related Glossary Terms
- Data Lake
- Data Lakehouse
- Streaming Lakehouse
- Streaming Database
- ETL/ELT (Concepts)
- Schema-on-Write (Concept)
- Schema-on-Read (Concept)
- Business Intelligence (BI) (Concept)
- OLAP / OLTP (Concepts)
- Open Table Format