+----------------------------+ | Sales_Fact | +----------------------------+ | Customer_ID (FK) | +------------------------+ | Product_ID (FK) |---->| Customer_Dimension | | Time_ID (FK) | |------------------------| | Quantity_Sold (Measure) | | Customer_ID (PK) | | Sales_Amount (Measure) | | Customer_Name | +----------------------------+ +------------------------+ | v +----------------------------+ | Time_Dimension | +----------------------------+ | Time_ID (PK) | | Year | | Month | +----------------------------+
Aspect | Relational Model | Multi-dimensional Model |
---|---|---|
Primary Purpose | Operational processing (OLTP) | Analytical processing (OLAP) |
Data Structure | Normalized tables | Denormalized, star or snowflake schema |
Optimization | For data insertion and updates | For complex queries and aggregations |
Query Complexity | Simple, predefined queries | Complex, ad-hoc queries |
Data Redundancy | Minimized | Accepted for performance |
Time Dimension | Usually represents current state | Historical data is a key aspect |
Data Volume | Typically smaller | Usually much larger |
A retail store chain tracks its sales data to analyze business performance. The store collects the following information for each sale:
Task:
Aspect | Data Staging Area | Integration Layer |
---|---|---|
Purpose | Temporary workspace for extracting and transforming raw data | Consolidates and integrates data for unified, consistent datasets |
Functions | Extraction, cleansing, transformation, loading | Data harmonization, applying business logic, consolidation |
Nature | Temporary data storage | Permanent, integrated data storage |
Processing Stage | Early stage of ETL process (before transformation is complete) | Post-transformation, ready for querying or further loading |
Persistence | Short-term; data is usually discarded after loading | Long-term; integrated data is stored for querying |
SELECT
{ [Measures].[Store Sales] } ON COLUMNS,
{ [Date].[2002], [Date].[2003] } ON ROWS
FROM Sales
WHERE ( [Store].[USA].[CA] )