Data Warehousing and Data Mining. Announcements (December 1) Data integration. CPS 116 Introduction to Database Systems

Similar documents
Data Warehousing & Mining. Data integration. OLTP versus OLAP. CPS 116 Introduction to Database Systems

Apriori Algorithm. 1 Bread, Milk 2 Bread, Diaper, Beer, Eggs 3 Milk, Diaper, Beer, Coke 4 Bread, Milk, Diaper, Beer 5 Bread, Milk, Diaper, Coke

Frequent Pattern Mining. Based on: Introduction to Data Mining by Tan, Steinbach, Kumar

Chapter 4: Mining Frequent Patterns, Associations and Correlations

Chapter 6: Basic Concepts: Association Rules. Basic Concepts: Frequent Patterns. (absolute) support, or, support. (relative) support, s, is the

BCB 713 Module Spring 2011

Frequent Pattern Mining

CS377: Database Systems Data Warehouse and Data Mining. Li Xiong Department of Mathematics and Computer Science Emory University

Chapter 7: Frequent Itemsets and Association Rules

Mining Association Rules in Large Databases

Lecture Topic Projects 1 Intro, schedule, and logistics 2 Data Science components and tasks 3 Data types Project #1 out 4 Introduction to R,

Chapter 4: Association analysis:

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 8 - Data Warehousing and Column Stores

Pattern Mining. Knowledge Discovery and Data Mining 1. Roman Kern KTI, TU Graz. Roman Kern (KTI, TU Graz) Pattern Mining / 42

CS 245: Database System Principles. Warehousing. Outline. What is a Warehouse? What is a Warehouse? Notes 13: Data Warehousing

Carnegie Mellon Univ. Dept. of Computer Science /615 DB Applications. Data mining - detailed outline. Problem

Effectiveness of Freq Pat Mining

Data warehouses Decision support The multidimensional model OLAP queries

CS 6093 Lecture 7 Spring 2011 Basic Data Mining. Cong Yu 03/21/2011

Data mining - detailed outline. Carnegie Mellon Univ. Dept. of Computer Science /615 DB Applications. Problem.

Association Rules. A. Bellaachia Page: 1

On-Line Application Processing

CS570 Introduction to Data Mining

Chapter 7: Frequent Itemsets and Association Rules

ANU MLSS 2010: Data Mining. Part 2: Association rule mining

Jarek Szlichta Acknowledgments: Jiawei Han, Micheline Kamber and Jian Pei, Data Mining - Concepts and Techniques

Question Bank. 4) It is the source of information later delivered to data marts.

Overview. Introduction to Data Warehousing and Business Intelligence. BI Is Important. What is Business Intelligence (BI)?

Oracle 1Z0-515 Exam Questions & Answers

Data Warehousing and Data Mining

What Is Data Mining? CMPT 354: Database I -- Data Mining 2

PESIT- Bangalore South Campus Hosur Road (1km Before Electronic city) Bangalore

Data Mining Concepts & Techniques

On-Line Analytical Processing (OLAP) Traditional OLTP

Market baskets Frequent itemsets FP growth. Data mining. Frequent itemset Association&decision rule mining. University of Szeged.

DATA WAREHOUING UNIT I

Mining Frequent Patterns without Candidate Generation

Data Warehousing and Decision Support

Association rules. Marco Saerens (UCL), with Christine Decaestecker (ULB)

Information Integration

Data Warehousing and Decision Support

DATA MINING TRANSACTION

Data Warehousing and Decision Support. Introduction. Three Complementary Trends. [R&G] Chapter 23, Part A

Lectures for the course: Data Warehousing and Data Mining (IT 60107)

Data Mining & Data Warehouse

Time: 3 hours. Full Marks: 70. The figures in the margin indicate full marks. Answers from all the Groups as directed. Group A.

Data Warehousing Conclusion. Esteban Zimányi Slides by Toon Calders

Table of Contents. Knowledge Management Data Warehouses and Data Mining. Introduction and Motivation

Knowledge Management Data Warehouses and Data Mining

Data Warehouses. Yanlei Diao. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Evolution of Database Systems

Frequent Pattern Mining

Data Warehousing and OLAP

An Improved Apriori Algorithm for Association Rules

Warehousing. Data Mining

DATA MINING II - 1DL460

CS246: Mining Massive Datasets Jure Leskovec, Stanford University

Big Trend in Business Intelligence: Data Mining over Big Data Web Transaction Data. Fall 2012

Association Rule Mining. Entscheidungsunterstützungssysteme

Data Mining. Ryan Benton Center for Advanced Computer Studies University of Louisiana at Lafayette Lafayette, La., USA.

CompSci 516 Data Intensive Computing Systems

This tutorial will help computer science graduates to understand the basic-to-advanced concepts related to data warehousing.

Data Mining: Concepts and Techniques. Chapter 5. SS Chung. April 5, 2013 Data Mining: Concepts and Techniques 1

CompSci 516 Data Intensive Computing Systems

Most database operations involve On- Line Transaction Processing (OTLP).

1Z0-526

GUJARAT TECHNOLOGICAL UNIVERSITY MASTER OF COMPUTER APPLICATIONS (MCA) Semester: IV

Reading Material. Data Mining - 2. Data Mining - 1. OLAP vs. Data Mining 11/19/17. Four Main Steps in KD and DM (KDD) CompSci 516: Database Systems

SQL Server Analysis Services

Association Rules. Berlin Chen References:

Dta Mining and Data Warehousing

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Evolving To The Big Data Warehouse

Data Analysis and Data Science

Data Warehouse and Data Mining

Data Mining for Knowledge Management. Association Rules

Introduction to DWML. Christian Thomsen, Aalborg University. Slides adapted from Torben Bach Pedersen and Man Lung Yiu

This tutorial has been prepared for computer science graduates to help them understand the basic-to-advanced concepts related to data mining.

Nesnelerin İnternetinde Veri Analizi

Data Mining: Concepts and Techniques. (3 rd ed.) Chapter 6

Acknowledgment. MTAT Data Mining. Week 7: Online Analytical Processing and Data Warehouses. Typical Data Analysis Process.

Performance and Scalability: Apriori Implementa6on

Data warehouse and Data Mining

Advanced Data Management Technologies Written Exam

Frequent Pattern Mining S L I D E S B Y : S H R E E J A S W A L

Data Structures. Notes for Lecture 14 Techniques of Data Mining By Samaher Hussein Ali Association Rules: Basic Concepts and Application

Fundamental Data Mining Algorithms

TIM 50 - Business Information Systems

Basic Concepts: Association Rules. What Is Frequent Pattern Analysis? COMP 465: Data Mining Mining Frequent Patterns, Associations and Correlations

Decision Support Systems aka Analytical Systems

Decision Support Systems

Improved Frequent Pattern Mining Algorithm with Indexing

Business Analytics in the Oracle 12.2 Database: Analytic Views. Event: BIWA 2017 Presenter: Dan Vlamis and Cathye Pendley Date: January 31, 2017

A Novel Approach of Data Warehouse OLTP and OLAP Technology for Supporting Management prospective

Chapter 1, Introduction

Exam Datawarehousing INFOH419 July 2013

Data Warehousing and Decision Support (mostly using Relational Databases) CS634 Class 20

Advanced Data Management Technologies

Decision Support. Chapter 25. CS 286, UC Berkeley, Spring 2007, R. Ramakrishnan 1

Data Warehousing 11g Essentials

Transcription:

Data Warehousing and Data Mining CPS 116 Introduction to Database Systems Announcements (December 1) 2 Homework #4 due today Sample solution available Thursday Course project demo period has begun! Check email for your scheduled slot Check course website for what to submit Final exam next Tuesday, Dec. 8, 9am-12pm Again, open book, open notes Focus on the second half of the course Sample final (from last year) available today Sample final solution available Thursday Course evaluations Data integration Data resides in many distributed, heterogeneous OLTP (On-Line Transaction Processing) sources Sales, inventory, customer, NC branch, NY branch, CA branch, Need to support OLAP (On-Line Analytical l Processing) over an integrated view of the data Possible approaches to integration Eager: integrate in advance and store the integrated data at a central repository called the data warehouse Lazy: integrate on demand; process queries over distributed sources mediated or federated systems 3 1

OLTP versus OLAP 4 OLTP Mostly updates Short, simple transactions Clerical users Goal: ACID, transaction throughput OLAP Mostly reads Long, complex queries Analysts, decision makers Goal: fast queries Implications on database design and optimization? Eager versus lazy integration 5 Eager (warehousing) In advance: before queries Copy data from sources Answer could be stale Need to maintain consistency Query processing is local to the warehouse Faster Can operate when sources are unavailable Lazy On demand: at query time Leave data at sources Answer is more up-to-date No need to maintain consistency Sources participate in query processing Slower Interferes with local processing Maintaining a data warehouse 6 The ETL process Extraction: extract relevant data and/or changes from sources Transformation: transform data to match the warehouse schema Loading: integrate data/changes into the warehouse Approaches Recomputation Easy to implement; just take periodic dumps of the sources, say, every night Incremental maintenance Compute and apply only incremental changes 2

Star schema of a data warehouse Dimension table Dimension table Store SID city Product PID name cost s1 Durham p1 beer 10 s2 Chapel Hill p2 diaper 16 s3 RTP 7 OID date CID PID SID qty price Sale 100 11/23/2009 c3 p1 s1 1 12 Fact table 102 12/12/2009 c3 p2 s1 2 17 Big 105 12/24/2009 c5 p1 s3 5 13 Constantly growing Stores measures (often aggregated in queries) CID name address city Dimension table c3 Amy 100 Main St. Durham Small c4 Ben 102 Main St. Durham Updated infrequently c5 Coy 800 Eighth St. Durham Data cube 8 Product Simplified schema: Sale (CID, PID, SID, qty) (c5, p1, s3) = 5 p2 p1 s1 s2 s3 (c3, p2, s1) = 2 Store (c3, p1, s1) = 1 (c5, p1, s1) = 3 ALL c3 c4 c5 Completing the cube plane 9 Total quantity of sales for each product in each store SELECT PID, SID, SUM(qty) FROM Sale Product PID, SID; (c5, p1, s3) = 5 (ALL, p1, s3) = 5 (ALL, p2, s1) = 2 (c3, p2, s1) = 2 Store p2 (ALL, p1, s1) = 4 s3 (c3, p1, s1) = 1 (c5, p1, s1) = 3 s2 p1 s1 Project all points onto Product-Store plane ALL c3 c4 c5 3

Completing the cube axis 10 Product Total quantity of sales for each product SELECT PID, SUM(qty) FROM Sale PID; (c5, p1, s3) = 5 (ALL, p1, s3) = 5 (ALL, p2, s1) = 2 (c3, p2, s1) = 2 (ALL, p2, ALL) Store = 2 p2 (ALL, p1, s1) = 4 s3 (c3, p1, s1) = 1 (c5, p1, s1) = 3 s2 (ALL, p1, ALL) = 9 p1 s1 Further project points onto Product axis ALL c3 c4 c5 Completing the cube origin 11 Product Total quantity of sales SELECT SUM(qty) FROM Sale; (c5, p1, s3) = 5 (ALL, p1, s3) = 5 (ALL, p2, s1) = 2 (c3, p2, s1) = 2 (ALL, p2, ALL) Store = 2 p2 (ALL, p1, s1) = 4 s3 (c3, p1, s1) = 1 (c5, p1, s1) = 3 s2 (ALL, p1, ALL) = 9 p1 s1 Further project points onto the origin ALL (ALL, ALL, ALL) = 11 c3 c4 c5 CUBE operator 12 Sale (CID, PID, SID, qty) Proposed SQL extension: SELECT SUM(qty) FROM Sale CUBE CID, PID, SID; Output contains: Normal groups produced by (c1, p1, s1, sum), (c1, p2, s3, sum), etc. Groups with one or more ALL s (ALL, p1, s1, sum), (c2, ALL, ALL, sum), (ALL, ALL, ALL, sum), etc. Can you write a CUBE query using only s? Gray et al., Data Cube: A Relational Aggregation Operator Generalizing Group-By, Cross-Tab, and Sub-Total. ICDE 1996 4

Aggregation lattice 13 Roll up CID PID SID Drill down CID, PID CID, SID CID, PID, SID PID, SID A parent can be computed from any child Materialized views 14 Computing and CUBE aggregates is expensive OLAP queries perform these operations over and over again Idea: precompute and store the aggregates as materialized views Maintained automatically as base data changes Called automatic summary tables in DB2 Selecting views to materialize 15 Factors in deciding what to materialize What is its storage cost? What is its update cost? Which queries can benefit from it? How much can a query benefit from it? Example is small, but not useful to most queries CID, PID, SID is useful to any query, but too large to be beneficial Harinarayan et al., Implementing Data Cubes Efficiently. SIGMOD 1996 5

Data mining 16 Data knowledge DBMS meets AI and statistics Clustering, prediction (classification and regression), association analysis, outlier analysis, evolution analysis, etc. Usually complex statistical queries that are difficult to answer often specialized algorithms outside DBMS We will focus on frequent itemset mining Mining frequent itemsets 17 Given: a large database of transactions, each containing a set of items Example: market baskets Find all frequent itemsets A set of items X is frequent if no less than s min % of all transactions contain X Examples: {diaper, beer}, {scanner, color printer} TID T001 T002 T003 T004 T005 T006 T007 T008 T009 items diaper, milk, candy milk, egg milk, beer diaper, milk, egg diaper, beer milk, beer diaper, beer diaper, milk, beer, candy diaper, milk, beer First try 18 A naïve algorithm Keep a running count for each possible itemset For each transaction T, and for each itemset X, if T contains X then increment the count for X Return itemsets with large enough counts Problem: Think: How do we prune the search space? 6

The Apriori property 19 All subsets of a frequent itemset must also be frequent Because any transaction that contains X must also contains subsets of X If we have already verified that X is infrequent, there is no need to count X s supersets because they must be infrequent too The Apriori algorithm 20 Multiple passes over the transactions Pass k finds all frequent k-itemsets (itemset of size k) Use the set of frequent k-itemsets found in pass k to construct candidate (k+1)-itemsets to be counted in pass (k+1) A (k+1)-itemset is a candidate only if all its subsets of size k are frequent Example: pass 1 TID items T001 A, B, E T002 B, D T003 B, C T004 A, B, D T005 A, C T006 B, C {A} 6 T007 A, C {B} 7 T008 A, B, C, E {C} 6 T009 A, B, C {D} 2 T010 F {E} 2 Transactions s min % = 20% 1-itemsets (Itemset {F} is infrequent) 21 7

Example: pass 2 Generate TID items T001 A, B, E T002 B, D T003 B, C T004 A, B, D T005 A, C T006 B, C T007 A, C T008 A, B, C, E T009 A, B, C T010 F Transactions s min % = 20% {A} 6 {B} 7 {C} 6 {D} 2 {E} 2 1-itemsets candidates Scan and count itemset {A,B} {A,C} {A,D} count 4 4 1 {A,E} 2 {B,C} 4 {B,D} 2 {B,E} 2 {C,D} 0 {C,E} 1 {D,E} 0 Candidate 2-itemsets Check min. support {A,B} 4 {A,C} 4 {A,E} 2 {B,C} 4 {B,D} 2 {B,E} 2 2-itemsets 22 Example: pass 3 TID T001 T002 T003 T004 T005 T006 T007 T008 T009 T010 items A, B, E B, D B, C A, B, D A, C B, C A, C A, B, C, E A, B, C F Transactions s min % = 20% Generate candidates {A,B} 4 {A,C} 4 {A,E} 2 {B,C} 4 {B,D} 2 {B,E} 2 2-itemsets Scan and count Candidate 3-itemsets Check min. support {A,B,C} 2 {A,B,E} 2 3-itemsets 23 Example: pass 4 TID T001 T002 T003 T004 T005 T006 T007 T008 T009 T010 items A, B, E B, D B, C A, B, D A, C B, C A, C A, B, C, E A, B, C F Transactions s min % = 20% Generate candidates {A,B,C} 2 {A,B,E} 2 3-itemsets Candidate 4-itemsets 24 8

Example: final answer 25 {A} 6 {B} 7 {C} 6 {D} 2 {E} 2 1-itemsets {A,B} 4 {A,C} 4 {A,E} 2 {B,C} 4 {B,D} 2 {B,E} 2 2-itemsets {A,B,C} 2 {A,B,E} 2 3-itemsets Summary 26 Data warehousing Eagerly integrate data from operational sources and store a redundant copy to support OLAP OLAP vs. OLTP: different workload different degree of redundancy Data mining Only covered frequent ing Skipped many other techniques (clustering, classification, regression, etc.) One key difference from statistics and machine learning: massive datasets and I/O-efficient algorithms 9