Unit 4 of 4 · BCA Sem 4

Unit 4: Data warehousing and mining

Database Management Systems-II notes · PTU syllabus (UGCC2523)

3 min read4 topics8 exam questions
On this page
  1. Unit summary
  2. Data warehousing and OLAP
  3. Data mining and preprocessing
  4. Association rules and Apriori
  5. Classification and decision trees
  6. Key terms
  7. Quick revision
  8. Important questions

Unit summary

Organisations analyse historical data to make decisions. A data warehouse stores integrated historical data for analysis, and data mining discovers patterns in it. This unit covers data warehousing, OLAP, types of data mining, preprocessing, attribute-oriented induction, association rules with Apriori, and classification with decision trees.

After this unit you can

  • Explain data warehousing and OLAP operations
  • Describe data preprocessing and attribute-oriented induction
  • Find frequent itemsets and association rules with Apriori
  • Build a decision tree using attribute selection measures

PTU syllabus topics

  • Introduction to data warehousing
  • OLAP
  • data mining types
  • data pre-processing
  • attribute-oriented induction
  • association rule mining
  • frequent itemset mining
  • the Apriori algorithm
  • classification process
  • decision tree induction
  • attribute selection measures
ProcessApriori algorithm
  1. 1Count items

    Find frequent 1-itemsets above min support

  2. 2Join

    Combine frequent itemsets into larger candidates

  3. 3Prune

    Drop candidates with an infrequent subset

  4. 4Repeat

    Until no new frequent itemsets

  5. 5Generate rules

    Keep rules above min confidence

1

Topic 1

Data warehousing and OLAP

A data warehouse (Inmon) is a subject-oriented, integrated, time-variant and non-volatile collection of data supporting management decisions.

ClassificationOLAP operations on a data cube
OLAP
  • Roll-up

    Summarise: city → state

  • Drill-down

    More detail: year → month

  • Slice

    Fix one dimension: sales in 2026

  • Dice

    Select a sub-cube

  • Pivot

    Rotate the view

2

Topic 2

Data mining and preprocessing

Data mining (knowledge discovery in databases, KDD) finds hidden, useful patterns in large data. Types: association, classification, clustering, prediction, outlier detection. Preprocessing prepares data: cleaning (missing values, noise), integration (combining sources), transformation (normalisation, aggregation) and reduction (fewer attributes or records). Attribute-oriented induction summarises data by generalising attribute values up a concept hierarchy (city → state → country) to produce concise descriptions.

3

Topic 3

Association rules and Apriori

An association rule X ⇒ Y means customers who buy X tend to buy Y (market basket analysis).

Key formulasRule measures
  • Support

    Transactions containing X and Y / total transactions

  • Confidence

    Support(X ∪ Y) / Support(X)

  • Lift

    Confidence / Support(Y)

    Lift > 1 means positive association

ProcessApriori algorithm
  1. 1

    Find frequent 1-itemsets

    Support ≥ minimum

  2. 2

    Join to form candidate k-itemsets

  3. 3

    Prune

    Drop candidates with an infrequent subset

  4. 4

    Count support and keep frequent ones

  5. 5

    Repeat until no new itemsets

  6. 6

    Generate rules with confidence ≥ minimum

Example

In 5 transactions, {bread, butter} appears in 3 and bread in 4: support = 60%, confidence(bread ⇒ butter) = 3/4 = 75%.

4

Topic 4

Classification and decision trees

Classification learns a model from labelled data to predict the class of new data. It has two steps: training (learning) and testing (classification). A decision tree splits data on attributes; leaves are class labels. Attribute selection measures choose the best split:

  • Information gain (ID3): reduction in entropy, Entropy = −Σ pᵢ log₂ pᵢ
  • Gain ratio (C4.5): information gain normalised by split information
  • Gini index (CART): 1 − Σ pᵢ²

Exam tip

In an exam, compute the entropy of the whole data set first, then the expected entropy after each split, and pick the attribute with the highest gain.

Key terms

Data warehouse
A subject-oriented, integrated, time-variant, non-volatile store
OLAP
Online analytical processing of multidimensional data
Support
How often an itemset appears
Confidence
How often a rule is true when X occurs
Information gain
Reduction in entropy from splitting on an attribute

Quick revision

  • Warehouse: subject-oriented, integrated, time-variant, non-volatile.
  • OLAP: roll-up, drill-down, slice, dice, pivot.
  • Apriori: every subset of a frequent itemset is frequent.
  • ID3 information gain, C4.5 gain ratio, CART Gini index.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Define a data warehouse.
  2. Q2.Differentiate between roll-up and drill-down.
  3. Q3.Define support and confidence.
  4. Q4.State the Apriori property.
  5. Q5.What is information gain?

Long-answer questions

  1. Q1.Explain the characteristics of a data warehouse and OLAP operations.
  2. Q2.Find frequent itemsets and association rules from a transaction set using Apriori.
  3. Q3.Explain decision tree induction and attribute selection measures with an example.

Stuck on this unit?

Message SBS on WhatsApp for help with Database Management Systems-II, or to ask about studying BCA at Synetic.

WhatsApp us