Data Warehousing & Data Mining

Chapter 1
Foundations of Data Warehousing and Data Mining

Post Graduate Program in Data science
Data Warehousing & Data Mining   •   Post Graduate

Foundations of Data Warehousing and Data Mining

Introduction

Modern organisations generate data through transaction-processing systems, websites, mobile applications, sensors, enterprise software, social platforms and external information providers. The strategic value of this data does not arise merely from its volume. Value emerges when data is integrated, governed, analysed and translated into decisions.

Data warehousing and data mining address two complementary problems. Data warehousing creates a reliable, historical and decision-oriented environment for reporting and analysis. Data mining applies computational and statistical methods to discover patterns, relationships and predictive signals in data. Together, they support business intelligence (BI), managerial control, strategic planning and evidence-based decision-making.

A useful distinction is that operational systems answer questions about current business activity, whereas analytical systems help explain performance, identify trends and evaluate possible actions. This distinction is foundational because a system designed to process thousands of daily orders is not automatically suitable for analysing ten years of customer behaviour.

Learning Objectives

After studying this chapter, students should be able to:

  1. Distinguish operational processing from analytical processing.
  2. Explain the characteristics and architecture of a data warehouse.
  3. Describe business intelligence and the knowledge-discovery process.
  4. Use essential data-mining terminology accurately.
  5. Relate warehousing and mining to managerial decision support.
  6. Evaluate governance, quality, ethical and implementation issues.

1. Operational and Analytical Information Systems

1.1 Operational systems

An operational system supports the routine activities of an organisation. Examples include order entry, banking transactions, payroll, inventory updates, reservations and hospital registration. These systems are commonly called online transaction-processing (OLTP) systems.

OLTP systems are designed for:

  • frequent insertion, modification and deletion of individual records;
  • rapid response to short, predictable transactions;
  • strong consistency and integrity;
  • concurrent access by many users; and
  • enforcement of business rules at the point of transaction.

A sales transaction, for example, may update an order, reduce inventory, calculate tax, record payment and generate a receipt. The transaction should either complete correctly or be rolled back. This property is part of transactional reliability and is commonly discussed through the ACID principles: atomicity, consistency, isolation and durability.

Operational databases are often normalised to reduce redundancy and update anomalies. Normalisation is appropriate when the principal objective is accurate and efficient transaction maintenance. However, complex analytical queries across many normalised tables can be slow and may interfere with operational workloads.

1.2 Analytical systems

An analytical system supports investigation, comparison, modelling and decision-making. Online analytical processing (OLAP) systems are designed for queries such as:

  • How did regional profitability change over the last eight quarters?
  • Which customer segments have the highest retention rate?
  • What is the relationship between promotional spending and demand?
  • Which products are frequently purchased together?

Analytical workloads usually involve large scans, aggregations, historical comparisons and joins across multiple business areas. Users may not know the exact query in advance. Consequently, analytical systems prioritise flexible exploration and query performance rather than rapid processing of individual transactions.

DimensionOLTPOLAP and analytical systems
Primary purposeRun the businessUnderstand and improve the business
Data orientationCurrent, detailed transactionsHistorical, integrated and often summarised data
Typical operationInsert or update a small number of recordsRead and aggregate many records
UsersClerks, applications and operational staffManagers, analysts, executives and data scientists
Schema tendencyHighly normalisedDimensional or analytically optimised
Query patternPredictable and repetitiveExploratory and variable
Success criterionTransaction accuracy and response timeInsight, query performance and decision usefulness

The distinction is conceptual rather than absolute. A modern organisation may use operational databases, data warehouses, data lakes, lakehouses and real-time analytical platforms together. The central design question is the workload that each platform is expected to support.

2. Data Warehousing

2.1 Definition and purpose

A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data that supports management decision-making. These four classic characteristics are associated with the influential data-warehouse definition developed by W. H. Inmon.

Subject-oriented means that data is organised around major analytical subjects such as customers, products, suppliers, claims or sales, rather than around the applications that produced it.

Integrated means that data from different sources is reconciled. Names, codes, currencies, calendars, units of measurement and definitions must be made sufficiently consistent for meaningful comparison.

Time-variant means that the warehouse preserves a historical dimension. A transaction system may show a customer’s current address, while a warehouse may preserve the address associated with transactions at earlier dates.

Non-volatile means that warehouse data is relatively stable after loading. It is primarily read and analysed rather than continually updated through individual business transactions. Corrections and controlled refreshes still occur; non-volatility does not mean that data can never change.

A fifth practical characteristic is that warehouse data is often granular. Grain specifies what one record represents, such as one product sold in one invoice line or one account balance at the end of one day. Declaring grain is essential because measures and interpretations depend on it.

2.2 The warehouse as an analytical foundation

A warehouse provides a governed environment between source systems and decision tools. Its functions include:

  1. extracting data from internal and external sources;
  2. cleansing and standardising data;
  3. integrating entities and business definitions;
  4. preserving historical states;
  5. enabling efficient analytical queries;
  6. supplying dashboards, reports, OLAP tools and mining workflows; and
  7. recording metadata, lineage and quality information.
Data warehouse architecture from sources through integration to analytics Source systemsOLTP, files, APIs ETL / ELTExtract, transform, load Data warehouseIntegrated historyMetadata and governance BIReports, models Data qualityRules, validation, audit Data marts / OLAPDepartmental analysis
Data warehouse architecture from sources through integration to analytics
Figure: Data warehouse architecture from sources through integration to analytics

Figure: A simplified flow from source systems to governed analytical use.

2.3 Warehouse architecture

A conventional architecture contains source systems, a staging area, an integration layer, warehouse storage and presentation tools. In extract-transform-load (ETL), data is extracted, transformed and then loaded. In extract-load-transform (ELT), raw or lightly processed data is loaded into a scalable target platform and transformed there. The choice depends on data volume, platform capabilities, governance requirements and latency expectations.

A data mart is a subject-specific or departmental analytical store, such as a finance or marketing mart. Data marts can improve usability and performance, but isolated marts may create conflicting definitions. Enterprise definitions and shared dimensions help reduce this problem.

A data lake generally stores large volumes of raw or semi-structured data in its native form. A lakehouse seeks to combine the flexibility and scale of a lake with the management, reliability and analytical capabilities associated with a warehouse. These labels describe architectural tendencies rather than universally fixed products.

2.4 Dimensional modelling

Dimensional modelling presents data in terms that business users can understand. A fact table stores measurable events, such as sales quantity, revenue or cost. Dimension tables provide descriptive context, such as date, product, store, customer and salesperson.

A star schema has one central fact table linked directly to denormalised dimensions. A snowflake schema further normalises dimensions. Star schemas are often easier for reporting, whereas snowflake schemas can reduce some redundancy and represent hierarchies more explicitly.

The first design decision is the grain. For example, if the grain is “one row per product per invoice line,” then quantity and line amount are additive across invoices, subject to the correct grouping. A measure is additive if it can be summed across all relevant dimensions, semi-additive if it can be summed across some dimensions but not others, and non-additive if summing is not meaningful. Account balance is commonly semi-additive: it may be summed across accounts but not across time without careful interpretation.

3. Business Intelligence and Decision Support

Business intelligence is the coordinated use of data, technologies, analytical methods, processes and people to support better organisational decisions. It includes data integration, reporting, dashboards, OLAP, performance management, descriptive analytics and, increasingly, predictive and prescriptive capabilities.

A useful analytical progression is:

  • Descriptive: What happened?
  • Diagnostic: Why did it happen?
  • Predictive: What is likely to happen?
  • Prescriptive: What action could produce a preferred outcome?

These categories are related but not identical. A predictive model does not automatically explain causality, and a prescriptive recommendation depends on constraints, objectives and organisational authority.

Decision support may be strategic, tactical or operational. Strategic decisions concern long-term direction and resource allocation. Tactical decisions concern policies and departmental performance. Operational decisions concern immediate actions such as replenishment or fraud review. Data warehouses often support all three, but the required data latency and level of detail differ.

A key managerial principle is that a dashboard is not the same as a decision. A dashboard presents indicators; managers must interpret them in context, assess uncertainty and consider consequences. Poorly defined metrics can create false confidence. For example, revenue growth may coexist with declining margin, increasing returns or deteriorating customer satisfaction.

4. Knowledge Discovery and Data Mining

4.1 Knowledge discovery in databases

Knowledge discovery in databases (KDD) is the broader process of identifying valid, novel, useful and understandable patterns in data. Data mining is one stage within KDD, not a synonym for the entire process.

A practical KDD workflow includes:

  1. Problem definition: clarify the decision, population, outcome and constraints.
  2. Data selection: identify relevant records, variables and time periods.
  3. Data cleaning: address missing values, duplicates, errors and inconsistent codes.
  4. Data integration: combine sources while preserving meaning and lineage.
  5. Transformation: create suitable representations, such as standardised variables or aggregated features.
  6. Data mining: apply statistical, machine-learning or pattern-discovery methods.
  7. Evaluation: test whether patterns are valid, useful, stable and ethically acceptable.
  8. Presentation and deployment: communicate findings and embed appropriate actions.

The workflow is iterative. Discovery of a data-quality problem may require returning to selection or integration. A model that performs well technically may still be rejected if it is unactionable, unfair or too costly to operate.

4.2 Data-mining terminology

A dataset is a collection of observations or records. An instance, case or observation is one unit in the dataset. A feature, attribute or variable describes an instance. A target, response or label is the outcome to be predicted in supervised learning.

A population is the full set of units of interest; a sample is a subset used for analysis. Training data is used to fit a model, validation data to tune choices, and test data to estimate performance on unseen cases. Data leakage occurs when information unavailable at prediction time enters the training process, producing unrealistically optimistic results.

Supervised learning uses labelled outcomes. Classification predicts categories, such as whether a claim is fraudulent. Regression predicts a numerical value, such as expected demand. Unsupervised learning works without a specified target. Clustering groups similar cases, while association analysis identifies items or events that co-occur.

A model is a representation learned from data. A parameter is estimated during fitting; a hyperparameter is set before or around fitting, such as the number of clusters. Feature engineering constructs useful input variables from available data. Overfitting occurs when a model captures noise or peculiarities of training data and performs poorly on new data. Underfitting occurs when the model is too simple to capture relevant structure.

4.3 Common data-mining tasks

Classification assigns observations to predefined categories. Evaluation may use accuracy, precision, recall, specificity or an area under a receiver operating characteristic curve. The appropriate metric depends on the costs of errors and class prevalence.

Regression estimates a continuous outcome. Common measures include mean absolute error and root mean squared error. For observed values yᵢ and predictions ŷᵢ over n cases, mean absolute error is:

MAE = (1/n) ∑ᵢ₌₁ⁿ |yᵢ − ŷᵢ|

Here, n is the number of evaluated cases, yᵢ is the observed value and ŷᵢ is the prediction. The measure has the same units as the target and treats all absolute errors linearly. It is appropriate when equal absolute deviations are meaningful and large errors do not require extra weighting.

Clustering groups cases according to a similarity measure. The result depends on representation, scaling, distance definition and the selected algorithm. A cluster is not automatically a naturally existing social or economic category; it is an analytical construction that must be interpreted and validated.

Association-rule mining discovers co-occurrence patterns such as products purchased together. For an itemset X, support is:

support(X) = count(transactions containing X) / count(all transactions)

For an antecedent X and consequent Y, confidence is:

confidence(X → Y) = support(X ∪ Y) / support(X)

Lift is:

lift(X → Y) = confidence(X → Y) / support(Y)

Support is a proportion between 0 and 1. Confidence estimates the conditional proportion of transactions containing Y among those containing X. Lift compares that conditional proportion with the overall prevalence of Y. A lift above 1 indicates positive association relative to independence, but none of these measures establishes causality.

5. From Data to Knowledge: Quality, Meaning and Governance

Data quality is multidimensional. Important dimensions include accuracy, completeness, consistency, timeliness, validity, uniqueness and accessibility. Quality is fitness for a defined purpose, not an abstract property independent of use.

Metadata describes data. Technical metadata may identify tables, columns, formats and lineage. Business metadata defines terms such as “active customer” or “net sales.” Operational metadata records load times, failures and processing status. Without metadata, a technically sophisticated warehouse can remain unusable or produce conflicting interpretations.

Governance establishes decision rights, policies, standards and accountability. It includes data ownership, stewardship, access controls, retention, privacy, quality monitoring and change management. Master data management seeks consistent treatment of important entities such as customers, products and locations.

Ethical and regulatory issues are inseparable from analytical systems. Organisations should apply purpose limitation, data minimisation, appropriate consent or lawful basis, access control, retention limits and security safeguards. Sensitive attributes may create discrimination risks even when they are not explicitly used, because proxy variables can reproduce protected characteristics. Explainability, human review, contestability and documentation are particularly important when analytics affect credit, employment, insurance, healthcare or public services.

6. Illustrative Case: Retail Customer Retention

Background

Consider a fictional national retailer, Northstar Retail, operating stores and an online channel. Its transaction platform records purchases, while a customer-service system records complaints and a loyalty system records offers. Executives believe that customer retention is declining but cannot agree on the definition of an active customer or the relevant reporting period.

Problem

Reports from different departments produce different retention rates. Marketing uses loyalty accounts, finance uses invoices and customer service uses contact records. Data is duplicated, customer identifiers do not always match and historical addresses are overwritten.

Analysis

The organisation defines the analytical grain as “one customer-period record for each customer and calendar month.” It establishes a common customer key, a date dimension and a documented definition of retention: a customer is retained in month t if the customer makes a qualifying purchase in month t and again in the following 90-day observation window. This definition is a business policy, not a universal statistical truth.

Source data is profiled for missing identifiers, duplicate accounts, invalid dates and inconsistent product codes. A warehouse integrates sales, loyalty, service and promotion data. A customer fact table stores purchases and service events, while dimensions describe customer segment, product, channel and date.

Analysts then construct features available before the prediction date: recency of purchase, purchase frequency, monetary value, number of service contacts, discount dependence and channel diversity. They separate training and test periods chronologically to reduce leakage. A classification model estimates the probability of non-retention, but managers review calibration, subgroup performance and the operational cost of contacting customers.

Approach and outcome

The company does not automatically offer discounts to every high-risk customer. Instead, it creates treatment groups: service recovery, relevant product communication and no intervention. A controlled evaluation compares retention and profit across groups. The warehouse supplies consistent measures; mining identifies risk patterns; experimentation tests whether an intervention actually helps.

The initial outcome is not simply a more accurate model. Northstar obtains a shared retention definition, traceable data lineage, faster reporting and a controlled intervention process. It also discovers that some apparent churn is caused by duplicate customer accounts rather than genuine inactivity.

Learning points

  1. Business definitions must precede metric comparison.
  2. Integration and identity resolution can be more valuable than a complex algorithm.
  3. Historical data must reflect what was known at the time of decision.
  4. Prediction does not prove that an intervention will cause improvement.
  5. Governance, fairness and evaluation continue after deployment.

7. Contemporary Developments and Best Practices

Cloud warehouses provide elastic storage and computing, while columnar formats and massively parallel processing support large analytical workloads. Streaming architectures reduce latency for applications such as fraud monitoring and operational intelligence. Semantic layers and metrics stores seek to provide consistent definitions across dashboards and analytical tools.

Generative AI can assist with natural-language querying, documentation and analyst productivity, but it does not remove the need for governed data, access controls, validation and human accountability. An AI-generated query may use the wrong metric or expose sensitive information. Retrieval systems should preserve source references and permissions, and models should be evaluated for hallucination, bias and inappropriate inference.

Effective implementation practices include:

  • begin with a clearly defined decision and measurable business outcome;
  • declare fact-table grain before selecting measures;
  • maintain shared definitions and business metadata;
  • profile and monitor data quality continuously;
  • preserve lineage and reproducible transformations;
  • separate development, validation and test information;
  • evaluate models against business costs, not accuracy alone;
  • design privacy and security controls from the beginning;
  • monitor drift, fairness and performance after deployment; and
  • treat change management and user adoption as technical requirements.

Challenges and Limitations

Warehousing projects can fail because of unclear ownership, weak source data, uncontrolled scope, incompatible identifiers, excessive latency expectations or insufficient user involvement. A central warehouse can become a bottleneck if governance is interpreted as slow approval rather than accountable enablement.

Data mining can produce spurious correlations, unstable clusters, biased predictions and models that are difficult to explain. Historical patterns may encode past discrimination. A statistically significant relationship may have little practical value, and a highly accurate model may be unusable if the required data is unavailable at decision time. Models also decay as markets, policies, customers and technologies change.

Consequently, analytical maturity requires more than tools. It requires disciplined problem formulation, data literacy, governance, statistical reasoning, ethical judgement and an organisational capacity to act on evidence.

Chapter Summary

Operational systems process current transactions accurately and consistently, while analytical systems integrate historical data to support investigation and decision-making. A data warehouse is subject-oriented, integrated, time-variant and relatively non-volatile; its usefulness also depends on declared grain, metadata, quality and governance. Dimensional models organise measurable facts and descriptive dimensions for accessible analysis.

Business intelligence combines data, technologies, processes and people to support descriptive, diagnostic, predictive and prescriptive decisions. Knowledge discovery is an iterative process involving problem definition, selection, preparation, mining, evaluation and deployment. Data mining includes classification, regression, clustering and association analysis, but discovered patterns require validation and do not automatically establish causality.

The managerial value of warehousing and mining depends on shared definitions, reliable integration, ethical use, appropriate performance measures and effective organisational action. Contemporary platforms, cloud technologies and AI expand capability but do not replace governance, human judgement or accountability.

Key Terms

Data warehouse: An integrated, historical and decision-oriented repository for analytical use.

OLTP: Online transaction processing designed for routine operational transactions.

OLAP: Online analytical processing designed for multidimensional investigation and aggregation.

ETL: Extract, transform and load data into a target analytical environment.

ELT: Extract and load data before transforming it within the target platform.

Data mart: A subject-specific or departmental analytical store.

Fact table: A table containing measurable business events or processes.

Dimension table: A table containing descriptive context for facts.

Grain: The precise meaning represented by one fact-table row.

Metadata: Data describing the structure, meaning, lineage or operation of data.

Business intelligence: Organisational use of data and analytics to support decisions.

KDD: Knowledge discovery in databases, the broader process of finding useful patterns.

Data mining: Computational discovery of patterns or predictive relationships in data.

Classification: Prediction of a categorical outcome.

Regression: Prediction of a numerical outcome.

Clustering: Grouping observations according to similarity.

Association rule: A conditional co-occurrence relationship among items or events.

Overfitting: Learning noise or peculiarities that reduce performance on new data.

Data leakage: Use of information unavailable at prediction time during model development.

Data governance: Policies, responsibilities and controls for managing data.

Review Questions

Short Answer Questions

  1. What are the principal differences between OLTP and OLAP systems?
  2. Explain the four classic characteristics of a data warehouse.
  3. Why must the grain of a fact table be declared explicitly?
  4. Distinguish data mining from knowledge discovery in databases.
  5. What is the difference between a parameter and a hyperparameter?

Long Answer Questions

  1. Explain how a data warehouse supports managerial decision-making from source acquisition through BI delivery.
  2. Compare star and snowflake schemas, including their respective advantages and limitations.
  3. Describe the stages of a KDD workflow and explain why the process is iterative.
  4. Discuss how data quality, metadata and governance affect the value of analytical systems.
  5. Explain why a highly accurate predictive model may still be unsuitable for organisational deployment.

Analytical / Application Questions

  1. A bank wants to analyse ten years of customer balances, transactions and branch performance without slowing its transaction platform. Propose an architecture and justify the roles of operational systems, staging, warehouse storage and BI tools.
  2. A retailer finds that a product-association rule has confidence of 0.40, while the consequent product appears in 0.10 of all transactions. Calculate and interpret its lift. State why the result does not prove that buying the antecedent causes buying the consequent.
  3. Design a governance and evaluation plan for a customer-churn model. Identify the target definition, time-based data split, quality checks, fairness concerns, deployment controls and post-deployment monitoring requirements.

Multiple Choice Questions with Answers

Question 1

Which characteristic means that a data warehouse preserves historical states for analysis?

A. Subject-oriented

B. Time-variant

C. Non-volatile

D. Normalised

Correct Answer: B. Time-variant

Question 2

Which workload is most characteristic of an OLTP system?

A. Updating inventory after an individual sale

B. Comparing ten years of regional margins

C. Clustering customers by behaviour

D. Calculating quarterly product trends

Correct Answer: A. Updating inventory after an individual sale

Question 3

In a dimensional model, what does the grain specify?

A. The database storage engine

B. The security role of a user

C. What one fact-table row represents

D. The number of dimensions in a cube

Correct Answer: C. What one fact-table row represents

Question 4

Which activity belongs to data mining rather than only data integration?

A. Standardising date formats

B. Matching duplicate customer identifiers

C. Discovering customer segments through clustering

D. Loading records into a staging area

Correct Answer: C. Discovering customer segments through clustering

Question 5

What is the main purpose of a test dataset?

A. To estimate performance on unseen data

B. To define business terminology

C. To replace data cleaning

D. To guarantee causal conclusions

Correct Answer: A. To estimate performance on unseen data

Question 6

A model that performs very well on training data but poorly on new data most directly exhibits:

A. Underfitting

B. Overfitting

C. Integration

D. Normalisation

Correct Answer: B. Overfitting

Question 7

If confidence(X → Y) is 0.40 and support(Y) is 0.10, what is the lift?

A. 0.04

B. 0.25

C. 4.0

D. 40.0

Correct Answer: C. 4.0

Question 8

Which statement about association rules is correct?

A. A lift above 1 proves that X causes Y

B. Confidence is always equal to support(Y)

C. Lift compares conditional occurrence with the overall prevalence of Y

D. Support can exceed 100 percent

Correct Answer: C. Lift compares conditional occurrence with the overall prevalence of Y

Question 9

Which example is a predictive rather than descriptive question?

A. What were sales last quarter?

B. Why did returns increase?

C. Which customers are likely to churn next month?

D. How many stores are open today?

Correct Answer: C. Which customers are likely to churn next month?

Question 10

Why is data leakage dangerous in predictive modelling?

A. It makes the warehouse non-volatile

B. It introduces information unavailable at decision time and inflates apparent performance

C. It guarantees underfitting

D. It removes all missing values

Correct Answer: B. It introduces information unavailable at decision time and inflates apparent performance

Data Warehousing & Data Mining
Chapter 1 of 15