Data Mining

Back to Data Mining

Module 1: Data Warehousing and Business Analysis

  1. Q1a. A Data Warehouse is generally built using which schema for decision support? (i) Hierarchical Schema (ii) Star or Snowflake Schema (iii) Relational Schema (iv) Network Schema20252m

    Module 1: Data Warehousing and Business Analysis

    A Data Warehouse is generally built using which schema for decision support?

    (i) Hierarchical Schema
    (ii) Star or Snowflake Schema
    (iii) Relational Schema
    (iv) Network Schema

    View this question on its own page →
    Worked Solution

    Answer: (ii) Star or Snowflake Schema

    Data warehouses are optimized for read-heavy analytical queries, not transactional integrity, so they use dimensional modeling instead of normalized relational schemas.

    • Star Schema: one central fact table (measures/metrics) connected directly to several dimension tables (denormalized, descriptive attributes).
    • Snowflake Schema: same idea, but dimension tables are further normalized into sub-dimensions.
            Dim_Time        Dim_Product
                 \              /
                  \            /
                   FACT_TABLE
                  /            \
                 /              \
            Dim_Customer     Dim_Store
    

    Both schemas are purpose-built for OLAP-style slicing, dicing, and aggregation — which is why (ii) is correct over normalized relational schema (iii), which is used in OLTP systems.

  2. Q1b. Which of the following is NOT a component of a data warehouse? (i) Data Extraction Tools (ii) Metadata Repository (iii) Word Processing Tools (iv) Data Cleaning Tools20252m

    Module 1: Data Warehousing and Business Analysis

    Which of the following is NOT a component of a data warehouse?

    (i) Data Extraction Tools
    (ii) Metadata Repository
    (iii) Word Processing Tools
    (iv) Data Cleaning Tools

    View this question on its own page →
    Worked Solution

    Answer: (iii) Word Processing Tools

    The standard components of a data warehouse are all built around moving, cleaning, storing, and describing data:

    Component Role
    Data Extraction Tools Pull data from source/operational systems
    Data Cleaning Tools Fix inconsistencies, remove noise/duplicates
    Data Transformation Tools Convert data into the warehouse's target format
    Load/Refresh Tools Populate the warehouse and keep it updated
    Metadata Repository Stores "data about data" — schemas, mappings, lineage
    OLAP Servers Support multidimensional query/analysis

    Word Processing Tools are general office-productivity software (like MS Word) — they have no functional role in the ETL/warehouse pipeline, making (iii) the odd one out.

  3. Q1i. Describe the OLAP operation slice and dice.20212m

    Module 1: Data Warehousing and Business Analysis

    Describe the OLAP operation slice and dice.

    View this question on its own page →
    Worked Solution

    Slice and Dice (OLAP Operations)

    Think of a data cube as a 3D box of numbers indexed along multiple dimensions (e.g., Time, Product, Region).

    Slice

    Selects one specific value on one dimension, "cutting" a single 2D layer out of the cube.

            Product
           /|  /|  /|
          / | / | / |
         /__|/__|/__|
        |   |   |   |     <- Slice at Time = "2024"
    Time|___|___|___|
        |   |   |   |
        |___|___|___|
            Region
    

    Example: "Sales for Time = 2024" → gives a 2D Product × Region table.

    Dice

    Selects a sub-cube by picking a range/subset of values on two or more dimensions simultaneously.

    Full cube ──dice──▶  smaller cube
    (Time × Product × Region)   (Time∈{2023,2024} × Product∈{A,B} × Region=West)
    

    Example: "Sales where Time ∈ {2023, 2024} AND Product ∈ {A, B} AND Region = West."

    Key Difference

    Operation Dimensions restricted Result
    Slice 1 dimension fixed to a single value One lower-dimension "layer" of the cube
    Dice 2+ dimensions restricted to ranges/subsets A smaller sub-cube (same dimensionality)

    Both are used for interactive, ad-hoc drill-down analysis in OLAP tools without needing to re-query the source data.

  4. Q2a. Compare and contrast data warehouse system and operational database system.20207m

    Module 1: Data Warehousing and Business Analysis

    Compare and contrast data warehouse system and operational database system.

    View this question on its own page →
    Worked Solution

    Data Warehouse vs Operational Database (OLTP)

    Feature Operational DB (OLTP) Data Warehouse (OLAP)
    Purpose Day-to-day transaction processing Analysis, decision support
    Users Clerks, DBAs, front-line staff Managers, analysts, executives
    Data content Current, detailed data Historical, summarized, consolidated data
    Data model Normalized (E-R model), application-oriented Denormalized — star/snowflake schema, subject-oriented
    Access pattern Short, atomic transactions (read/write/update) Complex queries, mostly read-only, large scans
    Operations Insert, update, delete (many small txns) Aggregate, drill-down, roll-up (few large queries)
    Design goal High concurrency, fast single-record access Fast aggregation over large volumes
    Data volume per query Small Large
    Time orientation Reflects current value Reflects data over time (historical snapshots)
    Redundancy Minimized (normalization) Encouraged (denormalization for query speed)
    Backup/recovery Critical, transaction-consistent Less frequent, can be reloaded from source

    Conceptual Diagram

     OLTP Systems                     Data Warehouse
     ┌───────────┐   ETL (Extract,   ┌────────────────┐
     │ Sales DB  │──Transform,Load──▶│                │
     ├───────────┤                   │  Subject-      │
     │ HR DB     │──────────────────▶│  oriented,     │──▶ OLAP / Reports
     ├───────────┤                   │  integrated,   │
     │ Inventory │──────────────────▶│  time-variant, │
     │ DB        │                   │  non-volatile  │
     └───────────┘                   └────────────────┘
       (many small,                    (one large,
       normalized DBs)                  denormalized store)
    

    In short: OLTP is built for doing the business (fast writes, current data), a Data Warehouse is built for understanding the business (fast reads, historical/aggregated data). Bill Inmon defines the DW as subject-oriented, integrated, time-variant, and non-volatile — all properties an OLTP system deliberately does not have.

  5. Q2a. Define a Data Warehouse. Discuss the architecture of a Data Warehouse with a neat diagram.20257m

    Module 1: Data Warehousing and Business Analysis

    Define a Data Warehouse. Discuss the architecture of a Data Warehouse with a neat diagram.

    View this question on its own page →
    Worked Solution

    Data Warehouse — Definition & Architecture

    Definition

    A Data Warehouse is a subject-oriented, integrated, time-variant, and non-volatile collection of data organized to support management decision-making (Bill Inmon's definition). It consolidates data from multiple heterogeneous operational sources into one consistent store optimized for analysis rather than transactions.

    Architecture Diagram

    ┌───────────────┐   ┌───────────────┐   ┌───────────────┐
    │  Source: RDBMS│   │ Source: Files │   │ Source: ERP   │
    └───────┬───────┘   └───────┬───────┘   └───────┬───────┘
            │                   │                   │
            └────────┬──────────┴──────────┬────────┘
                      ▼                     
            ┌─────────────────────┐
            │   ETL / Data Staging │  Extract, clean, transform,
            │        Area          │  integrate, load
            └──────────┬───────────┘
                        ▼
            ┌─────────────────────┐
            │   Metadata           │◀── describes structure,
            │   Repository          │    source mappings, lineage
            └──────────┬───────────┘
                        ▼
            ┌─────────────────────┐
            │   Data Warehouse      │  (central repository —
            │   (Fact + Dimension   │   star/snowflake schema)
            │    tables)             │
            └──────────┬───────────┘
                        ▼
         ┌──────────────┼──────────────┐
         ▼              ▼              ▼
    ┌─────────┐   ┌───────────┐  ┌───────────┐
    │ Data     │   │  OLAP      │  │  Reporting/│
    │ Marts    │   │  Server    │  │  Mining   │
    │ (dept-   │   │ (ROLAP/    │  │  Tools    │
    │ specific)│   │  MOLAP)    │  │           │
    └─────────┘   └───────────┘  └───────────┘
                        │
                        ▼
                 End Users / Analysts
    

    Key Layers

    1. Source layer – operational systems (RDBMS, flat files, ERP, external feeds).
    2. ETL/Staging layer – extraction, cleaning, transformation, integration, and loading of data.
    3. Metadata repository – records schema definitions, source-to-target mappings, and data lineage.
    4. Warehouse storage layer – central repository modeled as fact tables (measures) linked to dimension tables (context), often broken into smaller data marts for individual departments.
    5. OLAP/access layer – ROLAP, MOLAP, or HOLAP servers that let users slice, dice, drill down, and roll up.
    6. Front-end tools – reporting, dashboards, ad-hoc query tools, and data mining applications used by decision-makers.

    This layered design keeps the warehouse decoupled from source systems (so analytics never slows down production databases) while giving analysts a single, consistent, historical view of the business.

  6. Q2b. What is OLAP? Explain the main components of a Data Warehouse system.20257m

    Module 1: Data Warehousing and Business Analysis

    What is OLAP? Explain the main components of a Data Warehouse system.

    View this question on its own page →
    Worked Solution

    What is OLAP?

    OLAP (Online Analytical Processing) is a category of software technology that enables analysts to interactively examine multidimensional data from multiple perspectives — slicing, dicing, drilling down, rolling up, and pivoting — to support fast, complex analytical queries over large historical datasets (as opposed to OLTP, which handles fast simple transactions).

    Main Components of a Data Warehouse System

     ┌────────────┐    ┌───────────────┐    ┌────────────────┐    ┌──────────┐
     │  Source    │───▶│  Extraction/  │───▶│   Data          │───▶│  OLAP /  │
     │  Systems   │    │  Transform/   │    │   Warehouse     │    │  Query   │
     │            │    │  Load (ETL)   │    │   Storage       │    │  Tools   │
     └────────────┘    └───────────────┘    └────────────────┘    └──────────┘
                                │                     │
                                ▼                     ▼
                        ┌───────────────┐    ┌────────────────┐
                        │   Metadata     │    │   Data Marts    │
                        │   Repository   │    │  (subject-wise) │
                        └───────────────┘    └────────────────┘
    
    1. Source/Operational Systems — OLTP databases, external feeds, legacy files that supply raw data.
    2. Extraction, Transformation, Loading (ETL) tools — pull data out of sources, clean/standardize it, and load it into the warehouse.
    3. Metadata Repository — stores "data about data": schema definitions, source mappings, transformation rules, and refresh schedules.
    4. Data Warehouse (central repository) — the integrated, subject-oriented store, typically organized as fact and dimension tables.
    5. Data Marts — smaller, department/subject-specific subsets of the warehouse (e.g., Sales mart, HR mart) for faster, focused access.
    6. OLAP Servers — ROLAP (relational), MOLAP (multidimensional), or HOLAP (hybrid) engines that serve multidimensional queries.
    7. Front-End Analysis/Reporting Tools — dashboards, query tools, data mining tools used by business analysts and decision-makers to consume the data.

    Together, these components move data from scattered operational systems into a single, query-optimized structure, and then expose it through OLAP for fast, flexible analysis.

  7. Q3a. What is data warehouse backend process? Explain briefly.20207m

    Module 1: Data Warehousing and Business Analysis

    What is data warehouse backend process? Explain briefly.

    View this question on its own page →
    Worked Solution

    Data Warehouse Backend Process

    The backend process is the pipeline that moves data from scattered operational sources into the clean, integrated warehouse. It runs "behind the scenes," invisible to end users, and is commonly called ETL (Extract–Transform–Load).

     Operational      ┌─────────┐      ┌───────────┐      ┌────────┐      ┌───────────┐
     Source Systems ─▶│ Extract  │─────▶│ Clean/     │─────▶│Transform│─────▶│  Load      │──▶ Data
     (RDBMS, files,   │          │      │ Scrub      │      │        │      │  (+Refresh)│    Warehouse
      ERP, legacy)     └─────────┘      └───────────┘      └────────┘      └───────────┘
    

    Steps

    1. Extraction — Data is pulled from multiple heterogeneous source systems (databases, flat files, ERP/CRM, external feeds).
    2. Cleaning (Scrubbing) — Detects and corrects errors, inconsistencies, missing values, and duplicate records to improve data quality.
    3. Transformation — Converts data into the warehouse's standard format: normalizing units, renaming fields, applying business rules, aggregating, and generating derived/summary values.
    4. Integration — Merges data from different sources into a unified, subject-oriented schema, resolving naming and structural conflicts (schema/semantic integration).
    5. Loading — Writes the cleaned, transformed, integrated data into the warehouse's fact and dimension tables, often in bulk/batch mode.
    6. Refreshing — Periodically propagates updates from the source systems into the warehouse (full refresh or incremental refresh) to keep it current.

    Why it matters

    The backend process is what actually enforces the warehouse's defining properties — integrated (step 4), non-volatile (loaded once, not transaction-updated), and time-variant (refresh keeps historical snapshots) — turning raw, messy operational data into a trustworthy analytical resource.

  8. Q3b. Explain different OLAP operations.20207m

    Module 1: Data Warehousing and Business Analysis

    Explain different OLAP operations.

    View this question on its own page →
    Worked Solution

    OLAP Operations

    OLAP tools let users navigate a multidimensional data cube through five core operations:

    1. Roll-up (Drill-up)

    Aggregates data by climbing up a concept hierarchy or reducing dimensions.

    Day → Month → Quarter → Year        (climbing the Time hierarchy)
    

    Example: Sales by City → Sales by State → Sales by Country.

    2. Drill-down

    The reverse of roll-up — moves down the hierarchy to reveal finer detail.

    Year → Quarter → Month → Day
    

    Example: Yearly sales → Quarterly sales → Monthly sales.

    3. Slice

    Selects a single value on one dimension, producing a lower-dimensional sub-cube.

    Cube(Time, Product, Region) --Time="2024"--> Table(Product, Region)
    

    4. Dice

    Selects a sub-cube by specifying ranges/values on two or more dimensions.

    Dice: Time∈{2023,2024}, Region="West" → smaller cube
    

    5. Pivot (Rotate)

    Rotates the data axes to provide an alternate presentation — e.g., swapping rows and columns in a cross-tab.

    Before:                 After pivot:
            Q1  Q2  Q3            Prod A  Prod B
    Prod A  10  20  15    ──▶  Q1   10      12
    Prod B  12  18  22          Q2   20      18
                                 Q3   15      22
    

    Summary Table

    Operation Effect Dimensionality change
    Roll-up Aggregate, coarsen granularity Decreases (or stays, fewer dims)
    Drill-down Disaggregate, finer granularity Increases
    Slice Fix one dimension's value Decreases by 1
    Dice Restrict 2+ dimensions Same dims, smaller sub-cube
    Pivot Re-orient axes for viewing Unchanged

    These operations give analysts an interactive way to explore a cube from summary to detail and back, without re-running queries against the raw source data.

  9. Q4a. A university plans to build a data warehouse that would help them in analyzing the performance of the students in various courses in different academic sessions. They want to analyze if there is any relation between the average grade of a course and the number of students attending it. They would also like to know if there were some courses offered but did not have any students registered for them. Relative performance among boys and girls and average grades of students from various States and cities of the country for each course must be analyzed and also overall CGPA. Design a star schema for such a data warehouse clearly identifying the fact table(s) and dimension table(s), their primary key(s) and foreign key(s). Your schema should at least be able to satisfy the above-mentioned analysis requirements. You may consider other suitable attributes for the dimension table(s).202110m

    Module 1: Data Warehousing and Business Analysis

    A university plans to build a data warehouse that would help them in analyzing the performance of the students in various courses in different academic sessions. They want to analyze if there is any relation between the average grade of a course and the number of students attending it. They would also like to know if there were some courses offered but did not have any students registered for them. Relative performance among boys and girls and average grades of students from various States and cities of the country for each course must be analyzed and also overall CGPA.

    Design a star schema for such a data warehouse clearly identifying the fact table(s) and dimension table(s), their primary key(s) and foreign key(s). Your schema should at least be able to satisfy the above-mentioned analysis requirements. You may consider other suitable attributes for the dimension table(s).

    View this question on its own page →
    Worked Solution

    Star Schema Design — University Performance Data Warehouse

    Requirements Analysis

    We need to analyze: grade-vs-enrollment relation, courses with zero registrations, gender-wise performance, state/city-wise average grade per course, and overall CGPA. This means our grain (finest fact-table row) should be one student's performance in one course, in one academic session.

    Fact Table

    FACT_PERFORMANCE

    Column Type Key
    student_key FK → DIM_STUDENT PK (composite)
    course_key FK → DIM_COURSE PK (composite)
    session_key FK → DIM_SESSION PK (composite)
    grade_point Measure
    sgpa Measure
    is_registered Measure (flag, 1/0)

    Using a is_registered flag (or simply having a row exist) lets us detect courses offered but with zero enrolled students via a LEFT JOIN from DIM_COURSE × DIM_SESSION against the fact table.

    Dimension Tables

    DIM_STUDENT
    | student_key (PK) | student_id | name | gender | state | city | cgpa |

    DIM_COURSE
    | course_key (PK) | course_id | course_name | department | credits |

    DIM_SESSION
    | session_key (PK) | academic_year | semester_type (Odd/Even) |

    Schema Diagram

                      DIM_STUDENT
                     (student_key PK)
                      gender, state, city, cgpa
                            │
                            │FK
                            ▼
    DIM_COURSE ──FK──▶ FACT_PERFORMANCE ◀──FK── DIM_SESSION
    (course_key PK)     (student_key,        (session_key PK)
    course_name,         course_key,          academic_year,
    department           session_key,         semester_type
                          grade_point,
                          sgpa,
                          is_registered)
    

    How it satisfies the requirements

    • Grade vs enrollment relation → aggregate AVG(grade_point) and COUNT(student_key) grouped by course_key.
    • Courses with no studentsDIM_COURSE LEFT JOIN FACT_PERFORMANCE, filter WHERE fact IS NULL.
    • Gender-wise performance → join DIM_STUDENT.gender, group by course & gender.
    • State/city-wise average grade → join DIM_STUDENT.state/city, group by course.
    • Overall CGPA → stored directly in DIM_STUDENT.cgpa (or derived as AVG(sgpa) across sessions per student).

    This is a classic star schema: one fact table with numeric measures (grade_point, sgpa) surrounded by denormalized dimension tables, which keeps analytical queries fast (few joins, simple filters).

  10. Q4b. Write an SQL query that runs on the schema designed in Q4a and returns the average SGPA of boys from the State of Karnataka for each Autumn (odd) semester during the years 2005–2009.20214m

    Module 1: Data Warehousing and Business Analysis

    Write an SQL query that runs on the schema designed in Q4a and returns the average SGPA of boys from the State of Karnataka for each Autumn (odd) semester during the years 2005–2009.

    View this question on its own page →
    Worked Solution

    SQL Query — Avg SGPA of Boys from Karnataka, Odd Semesters (2005–2009)

    Using the star schema from Q4a (FACT_PERFORMANCE, DIM_STUDENT, DIM_SESSION):

    SELECT
        ds.academic_year,
        AVG(fp.sgpa) AS avg_sgpa
    FROM
        FACT_PERFORMANCE fp
        JOIN DIM_STUDENT  st ON fp.student_key  = st.student_key
        JOIN DIM_SESSION  ds ON fp.session_key  = ds.session_key
    WHERE
        st.gender = 'M'
        AND st.state = 'Karnataka'
        AND ds.semester_type = 'Odd'
        AND ds.academic_year BETWEEN 2005 AND 2009
    GROUP BY
        ds.academic_year
    ORDER BY
        ds.academic_year;
    

    How it maps to the requirement

    • st.gender = 'M' → restricts to boys.
    • st.state = 'Karnataka' → restricts to the given state.
    • ds.semester_type = 'Odd' → restricts to Autumn semesters only.
    • ds.academic_year BETWEEN 2005 AND 2009 → restricts the year range.
    • GROUP BY ds.academic_year → produces one average SGPA row per year, as required ("for each Autumn semester during 2005–2009").
    • The joins connect the fact table's measures (sgpa) to the descriptive attributes (gender, state, academic_year) stored in the dimension tables — this is exactly why a star schema keeps such analytical queries simple (only two joins, no deep nesting).
  11. Q8. What are the differences between the three main types of data warehouse usage — information processing, analytical processing and data mining? Discuss the motivation behind OLAP mining (OLAM).202214m

    Module 1: Data Warehousing and Business Analysis

    What are the differences between the three main types of data warehouse usage — information processing, analytical processing and data mining? Discuss the motivation behind OLAP mining (OLAM).

    View this question on its own page →
    Worked Solution

    Data Warehouse Usage Types & Motivation for OLAM

    Three Types of Data Warehouse Usage

    Aspect Information Processing Analytical Processing Data Mining
    Goal Query, basic statistics, reporting Multidimensional analysis (OLAP) Discover hidden patterns/knowledge
    Operations Simple queries, cross-tabs, charts Roll-up, drill-down, slice, dice, pivot Classification, clustering, association, prediction
    User interaction Passive — user asks, system reports Interactive — user explores the cube Can be automatic — system discovers patterns
    Output Reports, summary tables Multidimensional views Rules, models, clusters, predictions
    Example "Total sales last quarter" "Sales by Region × Product × Time, drilled to month" "Which customers are likely to churn?"
    • Information processing = basic querying/reporting — answers known questions.
    • Analytical processing (OLAP) = interactive multidimensional exploration — user still drives the analysis by choosing what to slice/dice.
    • Data mining = automated discovery — finds patterns the user didn't know to ask about (association rules, clusters, classifiers, outliers).

    Motivation for OLAP Mining (OLAM)

    OLAM (On-Line Analytical Mining) integrates OLAP with data mining, applying mining techniques directly on multidimensional data cubes rather than flat/raw data. Motivations:

    1. High quality of data in warehouses — DW data is already cleaned, integrated, and consistent, so mining results are more reliable than mining raw operational data directly.
    2. Available information processing infrastructure — ETL, metadata, indexing, and OLAP engines built for the warehouse can be reused for mining, avoiding duplicate infrastructure.
    3. OLAP-based exploratory data analysis — users can interactively drill/roll/slice/dice to first narrow down interesting regions of data, then apply mining algorithms only where needed — much more efficient than mining the whole raw dataset blindly.
    4. On-line selection of mining functions — integrating mining with OLAP navigation lets users flexibly switch between different mining tasks (classification, association, clustering) at different cube cells/granularities during the same interactive session.
            Data Warehouse (Cube)
                   │
         ┌─────────┼─────────┐
         ▼         ▼         ▼
       OLAP     OLAM       Mining
     (explore) (integrated) (patterns)
         └─────────┴─────────┘
            Combined interactive,
            multi-level analysis
    

    In short: OLAM lets analysts interactively navigate to the right subset of data using OLAP, then mine that subset for deeper patterns — combining the strengths of both technologies instead of treating them as separate tools.

  12. Q8a. Define Data Warehouse and list its key features. What is the difference between OLTP and OLAP systems?20257m

    Module 1: Data Warehousing and Business Analysis

    Define Data Warehouse and list its key features. What is the difference between OLTP and OLAP systems?

    View this question on its own page →
    Worked Solution

    Data Warehouse — Definition, Key Features & OLTP vs OLAP

    Definition

    A Data Warehouse is a subject-oriented, integrated, time-variant, and non-volatile collection of data used to support management's decision-making process (Bill Inmon).

    Key Features

    1. Subject-oriented — organized around major business subjects (Sales, Customer, Product), not individual applications.
    2. Integrated — data pulled from multiple heterogeneous sources is made consistent (naming conventions, units, encoding).
    3. Time-variant — stores historical data with a time dimension; every record is time-stamped, enabling trend analysis.
    4. Non-volatile — once loaded, data is not updated/deleted by users; it's read-only for analysis, refreshed only via scheduled batch loads.
    5. Summarized/denormalized — data is often pre-aggregated and stored in star/snowflake schemas for fast querying.

    OLTP vs OLAP

    Feature OLTP OLAP
    Purpose Run day-to-day operations Support analysis & decisions
    Data Current, detailed Historical, summarized
    Schema Normalized (E-R) Denormalized (star/snowflake)
    Query type Simple, short transactions Complex, multidimensional queries
    Operations Insert/Update/Delete Roll-up, drill-down, slice, dice
    Response time Milliseconds Seconds to minutes (large scans)
    Users Large number of clerks/staff Fewer analysts/executives
    Design goal Concurrency, integrity Query throughput, aggregation speed
         OLTP                              OLAP
    ┌───────────┐  periodic ETL       ┌───────────────┐
    │ Live       │ ───────────────▶  │  Data          │
    │ Transaction│                     │  Warehouse     │──▶ Analysis/Reports
    │ System     │                     │  (subject-     │
    └───────────┘                     │  oriented)     │
                                        └───────────────┘
    

    In short: OLTP powers the business (fast writes, current state), while OLAP powers understanding the business (fast reads, historical trends) — the data warehouse exists specifically to bridge them without letting analytical load slow down live transactions.

  13. Q8b. Differentiate among OLAP, MOLAP and HOLAP.20217m

    Module 1: Data Warehousing and Business Analysis

    Differentiate among OLAP, MOLAP and HOLAP.

    View this question on its own page →
    Worked Solution

    OLAP vs MOLAP vs HOLAP

    These are three server architectures for implementing OLAP, differing in where and how the multidimensional data is physically stored.

    ROLAP (Relational OLAP)

    • Stores data in standard relational tables (star/snowflake schema).
    • Multidimensional operations are translated into SQL at query time.
    • Pros: scales to very large data volumes, reuses existing RDBMS technology.
    • Cons: slower query performance (SQL translation overhead), limited by SQL's multidimensional expressiveness.

    MOLAP (Multidimensional OLAP)

    • Stores data in a proprietary multidimensional array/cube structure (pre-computed).
    • Pros: very fast query response (data pre-aggregated), rich analytical functions.
    • Cons: cube-build time can be long, storage can explode for high-cardinality/sparse dimensions ("data explosion"), limited scalability for very large datasets.

    HOLAP (Hybrid OLAP)

    • Combines both: detailed data stays in relational tables (ROLAP), while summary/aggregated data is stored in MOLAP cubes.
    • Pros: balances MOLAP's speed for aggregates with ROLAP's scalability for detailed data.
    • Cons: more complex architecture to build and maintain.

    Comparison Table

    Aspect ROLAP MOLAP HOLAP
    Storage Relational tables Multidimensional array/cube Mixed (relational + cube)
    Query speed Slower (SQL translation) Fastest (pre-computed) Balanced
    Scalability Very high (large data) Limited (cube size) High
    Storage overhead Low High (sparse data explosion) Moderate
    Best for Very large, detailed datasets Fast, smaller/aggregated cubes Mix of both needs
    ROLAP:  [Relational DB] ──SQL──▶ query engine ──▶ result
    MOLAP:  [Precomputed Cube] ──direct lookup──▶ result   (fast!)
    HOLAP:  [Detail: Relational] + [Summary: Cube] ──▶ result (best of both)
    

    In short: ROLAP trades speed for scalability, MOLAP trades scalability for speed, and HOLAP tries to get both by splitting detail vs summary data across the two storage models.

  14. Q9a. With neat diagram, explain the architecture of data warehouse. Explain the terms ROLAP, MOLAP and HOLAP.20207m

    Module 1: Data Warehousing and Business Analysis

    With neat diagram, explain the architecture of data warehouse. Explain the terms ROLAP, MOLAP and HOLAP.

    View this question on its own page →
    Worked Solution

    Data Warehouse Architecture (with diagram) + ROLAP, MOLAP, HOLAP

    Architecture Diagram

    ┌───────────┐ ┌───────────┐ ┌───────────┐
    │ Source DB1│ │ Source DB2│ │ Ext. Files│
    └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
          └──────────────┼──────────────┘
                          ▼
                ┌───────────────────┐
                │   ETL: Extract,     │
                │   Clean, Transform, │
                │   Load               │
                └──────────┬──────────┘
                            ▼
                ┌───────────────────┐
                │  Data Warehouse     │◀──▶ Metadata Repository
                │ (fact + dimension   │
                │  tables)            │
                └──────────┬──────────┘
                            │
            ┌───────────────┼───────────────┐
            ▼                ▼                ▼
      ┌───────────┐   ┌────────────┐   ┌────────────┐
      │ Data Marts │   │ OLAP Server │   │  Mining    │
      │ (dept-wise)│   │(ROLAP/MOLAP/│   │  Engine    │
      │            │   │  HOLAP)     │   │            │
      └───────────┘   └────────────┘   └────────────┘
                            │
                            ▼
                  Front-end Tools (Query,
                  Reporting, Dashboards)
    

    Layers

    1. Source systems — operational databases, files, external feeds.
    2. ETL layer — extracts, cleans, transforms, and loads data into the warehouse.
    3. Metadata repository — describes schema, source mappings, and lineage.
    4. Central warehouse — stores integrated, subject-oriented, time-variant data as fact/dimension tables.
    5. Data marts / OLAP servers / mining engine — provide focused or multidimensional access.
    6. Front-end tools — dashboards, reports, ad-hoc query tools for end users.

    ROLAP, MOLAP, HOLAP (OLAP server types)

    Type Storage Speed Scalability
    ROLAP (Relational OLAP) Star/snowflake tables in an RDBMS; multidimensional queries translated to SQL Slower (query-time computation) Very high — handles huge data volumes
    MOLAP (Multidimensional OLAP) Pre-computed proprietary cube (array structure) Fastest (pre-aggregated lookups) Limited — cube can explode in size for sparse/high-cardinality data
    HOLAP (Hybrid OLAP) Detail data in relational tables, summary data in cubes Balanced High — combines both strengths

    In short: the architecture moves data from many raw sources through ETL into one integrated warehouse, which is then served up via an OLAP layer — and ROLAP/MOLAP/HOLAP are simply three different engineering trade-offs (storage vs speed vs scale) for implementing that OLAP layer.

  15. Q9b. What are the differences between the three main types of data warehouse usage—information processing, analytical processing and data mining? Discuss the motivation behind OLAP mining (OLAM).20207m

    Module 1: Data Warehousing and Business Analysis

    What are the differences between the three main types of data warehouse usage—information processing, analytical processing and data mining? Discuss the motivation behind OLAP mining (OLAM).

    View this question on its own page →
    Worked Solution

    Data Warehouse Usage Types & Motivation for OLAM

    (Same underlying question as the 2022 paper — see below for the full breakdown.)

    Three Types of Data Warehouse Usage

    Aspect Information Processing Analytical Processing Data Mining
    Goal Query, basic statistics, reporting Multidimensional analysis (OLAP) Discover hidden patterns/knowledge
    Operations Simple queries, cross-tabs, charts Roll-up, drill-down, slice, dice, pivot Classification, clustering, association, prediction
    User interaction Passive — user asks, system reports Interactive — user explores the cube Can be automatic — system discovers patterns
    Output Reports, summary tables Multidimensional views Rules, models, clusters, predictions
    Example "Total sales last quarter" "Sales by Region × Product × Time, drilled to month" "Which customers are likely to churn?"
    • Information processing answers known questions with simple queries/reports.
    • Analytical processing (OLAP) lets users interactively explore a multidimensional cube.
    • Data mining automatically discovers patterns the user didn't know to ask about.

    Motivation for OLAP Mining (OLAM)

    OLAM integrates OLAP with data mining, applying mining directly on multidimensional cubes instead of raw flat data:

    1. High-quality warehouse data — already cleaned/integrated, giving more reliable mining results than mining raw operational data.
    2. Reusable infrastructure — ETL, metadata, and OLAP engines built for the warehouse serve mining too, avoiding duplicated effort.
    3. OLAP-based exploratory analysis — analysts drill/roll/slice/dice to narrow down interesting regions before mining, far more efficient than mining an entire raw dataset.
    4. Flexible, on-line mining function selection — users can switch between classification, association, clustering, etc. at different cube cells/granularities within the same interactive session.
            Data Warehouse (Cube)
                   │
         ┌─────────┼─────────┐
         ▼         ▼         ▼
       OLAP     OLAM       Mining
     (explore) (integrated) (patterns)
         └─────────┴─────────┘
    

    In short: OLAM combines OLAP's interactive navigation with mining's automatic pattern discovery, letting analysts first zoom into the relevant cube region, then mine it for deeper insight.