DATA CUBES E0 261. Jayant Haritsa Computer Science and Automation Indian Institute of Science. JAN 2014 Slide 1 DATA CUBES



Similar documents
OLAP and Data Warehousing! Introduction!

Data Warehousing and Decision Support. Introduction. Three Complementary Trends. Chapter 23, Part A

Decision Support. Chapter 23. Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 1

CS54100: Database Systems

Overview. Data Warehousing and Decision Support. Introduction. Three Complementary Trends. Data Warehousing. An Example: The Store (e.g.

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2007 Lecture 16 - Data Warehousing

Data Warehousing. Outline. From OLTP to the Data Warehouse. Overview of data warehousing Dimensional Modeling Online Analytical Processing

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 15 - Data Warehousing: Cubes

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 29-1

Week 3 lecture slides

DATA WAREHOUSING AND OLAP TECHNOLOGY

Data W a Ware r house house and and OLAP II Week 6 1

DATA WAREHOUSING - OLAP

Part 22. Data Warehousing

Overview of Data Warehousing and OLAP

Data Warehousing: Data Models and OLAP operations. By Kishore Jaladi

Anwendersoftware Anwendungssoftwares a. Data-Warehouse-, Data-Mining- and OLAP-Technologies. Online Analytic Processing

Introduction to Data Warehousing. Ms Swapnil Shrivastava

LITERATURE SURVEY ON DATA WAREHOUSE AND ITS TECHNIQUES

OLAP OLAP. Data Warehouse. OLAP Data Model: the Data Cube S e s s io n

Data Warehousing. Read chapter 13 of Riguzzi et al Sistemi Informativi. Slides derived from those by Hector Garcia-Molina

Week 13: Data Warehousing. Warehousing

CS2032 Data warehousing and Data Mining Unit II Page 1

1. OLAP is an acronym for a. Online Analytical Processing b. Online Analysis Process c. Online Arithmetic Processing d. Object Linking and Processing

14. Data Warehousing & Data Mining

2074 : Designing and Implementing OLAP Solutions Using Microsoft SQL Server 2000

Data Warehousing and OLAP Technology for Knowledge Discovery

Outline. Data Warehousing. What is a Warehouse? What is a Warehouse?

Database Applications. Advanced Querying. Transaction Processing. Transaction Processing. Data Warehouse. Decision Support. Transaction processing

BUILDING BLOCKS OF DATAWAREHOUSE. G.Lakshmi Priya & Razia Sultana.A Assistant Professor/IT

Published by: PIONEER RESEARCH & DEVELOPMENT GROUP ( 28

When to consider OLAP?

OLAP and OLTP. AMIT KUMAR BINDAL Associate Professor M M U MULLANA

Turkish Journal of Engineering, Science and Technology

Mario Guarracino. Data warehousing

Review. Data Warehousing. Today. Star schema. Star join indexes. Dimension hierarchies

Multi-dimensional index structures Part I: motivation

Lecture Data Warehouse Systems

OLAP and Data Mining. Data Warehousing and End-User Access Tools. Introducing OLAP. Introducing OLAP

(Week 10) A04. Information System for CRM. Electronic Commerce Marketing

Basics of Dimensional Modeling

CASE PROJECTS IN DATA WAREHOUSING AND DATA MINING

Data Warehousing and OLAP

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

Data Warehousing & OLAP

New Approach of Computing Data Cubes in Data Warehousing

DATA WAREHOUSING APPLICATIONS: AN ANALYTICAL TOOL FOR DECISION SUPPORT SYSTEM

Module 1: Introduction to Data Warehousing and OLAP

M Designing and Implementing OLAP Solutions Using Microsoft SQL Server Day Course

Business Intelligence, Analytics & Reporting: Glossary of Terms

OLAP & DATA MINING CS561-SPRING 2012 WPI, MOHAMED ELTABAKH

1960s 1970s 1980s 1990s. Slow access to

Search and Data Mining Techniques. OLAP Anna Yarygina Boris Novikov

CHAPTER 3. Data Warehouses and OLAP

Dimodelo Solutions Data Warehousing and Business Intelligence Concepts

Business Benefits From Microsoft SQL Server Business Intelligence Solutions How Can Business Intelligence Help You? PTR Associates Limited

LEARNING SOLUTIONS website milner.com/learning phone

Data Warehousing. Overview, Terminology, and Research Issues. Joachim Hammer. Joachim Hammer

IBM Cognos 8 Business Intelligence Analysis Discover the factors driving business performance


Data Warehouse design

Data Warehousing Systems: Foundations and Architectures

An Overview of Data Warehousing, Data mining, OLAP and OLTP Technologies

A Technical Review on On-Line Analytical Processing (OLAP)

Data Warehouse Snowflake Design and Performance Considerations in Business Analytics

Chapter 3, Data Warehouse and OLAP Operations

INFO 321, Database Systems, Semester

A Critical Review of Data Warehouse

OLAP. Business Intelligence OLAP definition & application Multidimensional data representation

University of Gaziantep, Department of Business Administration

Data Warehousing, OLAP, and Data Mining

Data W a Ware r house house and and OLAP Week 5 1

Data Warehousing. Yeow Wei Choong Anne Laurent

Data Warehousing and Data Mining

Learning Objectives. Definition of OLAP Data cubes OLAP operations MDX OLAP servers

European Archival Records and Knowledge Preservation Database Archiving in the E-ARK Project

IST722 Data Warehousing

On-Line Application Processing. Warehousing Data Cubes Data Mining

ORACLE OLAP. Oracle OLAP is embedded in the Oracle Database kernel and runs in the same database process

OLAP Systems and Multidimensional Expressions I

Business Intelligence for SUPRA. WHITE PAPER Cincom In-depth Analysis and Review

MS 20467: Designing Business Intelligence Solutions with Microsoft SQL Server 2012

Data Mining for Knowledge Management. Data Warehouses

<Insert Picture Here> Enhancing the Performance and Analytic Content of the Data Warehouse Using Oracle OLAP Option

CHAPTER 4 Data Warehouse Architecture

Data Warehousing & OLAP

UNIT-3 OLAP in Data Warehouse

Dimensional Modeling for Data Warehouse

Data warehousing. Han, J. and M. Kamber. Data Mining: Concepts and Techniques Morgan Kaufmann.

Unit -3. Learning Objective. Demand for Online analytical processing Major features and functions OLAP models and implementation considerations

Databases in Organizations

Data Warehousing OLAP

Monitoring Genebanks using Datamarts based in an Open Source Tool

BUSINESS ANALYTICS AND DATA VISUALIZATION. ITM-761 Business Intelligence ดร. สล ล บ ญพราหมณ

HYPERION MASTER DATA MANAGEMENT SOLUTIONS FOR IT

Fluency With Information Technology CSE100/IMT100

Designing a Dimensional Model

Turning your Warehouse Data into Business Intelligence: Reporting Trends and Visibility Michael Armanious; Vice President Sales and Marketing Datex,

Distance Learning and Examining Systems

Data Warehousing Overview

Transcription:

E0 261 Jayant Haritsa Computer Science and Automation Indian Institute of Science JAN 2014 Slide 1

Introduction Increasingly, organizations are analyzing historical data to identify useful patterns and support business strategies. Emphasis is on complex, interactive, exploratory analysis of very large datasets created by integrating data from across all parts of an enterprise; data is fairly static. Contrast such On-Line Analytic Processing (OLAP) with traditional On-line Transaction Processing (OLTP): mostly long queries, instead of short update Xacts. JAN 2014 Slide 2

Overview Data Warehousing: Consolidate data from many sources in one large repository Loading, periodic synchronization of replicas. Semantic integration. OLAP: Complex SQL queries and views. Queries based on spreadsheet-style operations and multidimensional view of data. Interactive and online queries. Note that Data Warehouses form the substrate on which Data Mining can be carried out. JAN 2014 Slide 3

Data Warehousing EXTERNAL DATA SOURCES Integrated data spanning long time periods, often augmented with summary information. Several terabytes to petabytes common. Interactive response times expected for complex queries; ad-hoc updates uncommon. Metadata Repository EXTRACT TRANSFORM LOAD REFRESH SUPPORTS DATA WAREHOUSE OLAP JAN 2014 Slide 4 Mining

Warehousing Issues Semantic Integration: When getting data from multiple sources, must eliminate mismatches, e.g., different currencies, schemas. Heterogeneous Sources: Must access data from a variety of source formats and repositories. Load, Refresh, Purge: Must load data, periodically refresh it, and purge too-old data. Metadata Management: Must keep track of source, loading time, and other information for all data in the warehouse. JAN 2014 Slide 5

Multidimensional Data Model Collection of numeric measures, which depend on a set of dimensions. E.g., measure Sales, dimensions Product (pid), Location (locid), and Time (timeid). Slice locid=1 is shown: pid 11 12 13 8 10 10 30 20 50 25 8 15 1 2 3 timeid locid pid timeid locid sales 11 1 1 25 11 2 1 8 11 3 1 15 12 1 1 30 12 2 1 20 12 3 1 50 13 1 1 8 13 2 1 10 13 3 1 10 11 1 2 35 JAN 2014 Slide 6

MOLAP vs ROLAP Multidimensional data can be stored physically in a (disk-resident, persistent) array; called MOLAP systems (covered in TIDS course) Essbase Alternatively, can store as a relation; called ROLAP systems (today s paper) Redbrick, Oracle JAN 2014 Slide 7

ROLAP Tables The main relation, which relates dimensions to a measure, is called the fact table. Example: SALES(pid, timeid, locid, sales) Each dimension can have additional attributes and an associated dimension table. Example: Products(pid, pname, category, price) Fact tables are much larger than dimensional tables. Their schema is {foreign keys of all dimension tables + all measure attributes} JAN 2014 Slide 8

Dimension Hierarchies For each dimension, the set of values can be organized in a hierarchy: PRODUCT TIME LOCATION year quarter country category week month state pname date city JAN 2014 Slide 9

OLAP Queries Influenced by SQL and by spreadsheets. A common operation is to aggregate a measure over one or more dimensions. Find total sales. Find total sales for each city, or for each state. Find top five products ranked by total sales. Roll-up: Aggregating at different levels of a dimension hierarchy. E.g., Given total sales by city, we can roll-up to get sales by state. JAN 2014 Slide 10

OLAP Queries (contd) Drill-down: The inverse of roll-up. E.g., Given total sales by state, can drill-down to get total sales by city. E.g., Can also drill-down on different dimension to get total sales by product for each state. Pivoting: Aggregation on selected dimensions. E.g., Pivoting on Location and Time yields this cross-tabulation: equivalent to rotation 1995 63 81 144 1996 1997 Total WB UP Total 38 107 145 75 35 110 176 223 339 JAN 2014 Slide 11

OLAP Queries (contd) Slicing : Equality selections on one or more dimensions. Dicing: Range selections on one or more dimensions. JAN 2014 Slide 12

Comparison with SQL Queries The cross-tabulation obtained by pivoting can also be computed using a collection of SQL queries: SELECT SUM(S.sales) FROM Sales S, Times T, Locations L WHERE S.timeid=T.timeid AND S.locid=L.locid GROUP BY T.year, L.state SELECT SUM(S.sales) FROM Sales S, Times T WHERE S.timeid=T.timeid GROUP BY T.year SELECT SUM(S.sales) FROM Sales S, Location L WHERE S.locid=L.locid GROUP BY L.state JAN 2014 Slide 13

3-D CUBE Model JAN 2014 Slide 14

The CUBE Operator Generalizing the previous example, if there are k dimensions, we have 2 k possible SQL GROUP BY queries that can be generated through pivoting on a subset of dimensions. CUBE pid, locid, timeid BY SUM Sales Equivalent to rolling up Sales on all eight subsets of the set {pid, locid, timeid}; each roll-up corresponds to an SQL query of the form: Lots of work on optimizing the CUBE operator! SELECT SUM(S.sales) FROM Sales S GROUP BY grouping-list JAN 2014 Slide 15

Cube Operator (contd) Devised by Jim Gray et al Jim Gray, a key architect of System R IBM Almaden for several years, then with Tandem, then Digital, then Microsoft Very practical orientation Received Turing award in 1999! Went missing on a boat trip off California coast in January 2007, no trace found JAN 2014 Slide 16

Aggregation Hierarchy GROUP BY <select list 3> ROLLUP <select list 2> CUBE <select list 1> SELECT manufacturer, year, month, day, color, model, SUM (price) as revenue FROM Sales GROUP BY Manufacturer ROLLUP Year(Time) as Year, Month(Time) as Month, Day(Time) as Day, CUBE Color, Model (Figure 5 in paper) Use ALL to represent the set over which aggregation is computed JAN 2014 Slide 17

CUBE Research Issues Storage Structures for Cubes (ROLAP, MOLAP) Schemas for ROLAP Cube (Star, Snowflake) Index Structures for Cubes Level of Materialization of Cube (next paper)... JAN 2014 Slide 18

CUBE SCHEMAS JAN 2014 Slide 19

Star Schema TIMES timeid date week month quarter year holiday_flag pid timeid locid sales SALES (Fact table) PRODUCTS LOCATIONS pid pname category price locid city state country Fact table in BCNF; dimension tables not normalized. Dimension tables are small; updates/inserts/deletes are rare. So, anomalies less important than good query performance. Computing the join of all these relations is called a star join. JAN 2014 Slide 20

Snowflake Schema TIMES timeid date week month quarter year holiday_flag pid timeid locid sales SALES (Fact table) PRODUCTS mfr pid pname category price locid city LOCATIONS state country mfr name MANUFACTURER location stockprice Dimension tables are also normalized to reduce redundancy. JAN 2014 Slide 21

CUBE INDEXES JAN 2014 Slide 22

Indexes Joins are common between fact table and dimension tables Interactive response is expected, so indexes are required. Problems: Space maintenance is not a problem because readonly data JAN 2014 Slide 23

Join Indexes Consider the join of Sales, Products, Times, and Locations, possibly with additional selection conditions (e.g., country= India ). A join index can be constructed to speed up such joins. The index contains [p,t,l,s] if there are tuples p in Products, t in Times and l in Locations that satisfy the join (with sid) s in Sales. E.g. [Beer,March 9, Malleswaram, {2567,3089,156323}] Problem: Number of join indexes can grow rapidly. A variant of the idea addresses this problem: For each column with an additional selection (e.g., country), build an index with [c,s] in it if a dimension table tuple with value c in the selection column joins with a Sales tuple with sid s; if indexes are bitmaps, called bitmapped join index. JAN 2014 Slide 25

Bitmapped Join Index TIMES timeid date week month quarter year holiday_flag pid timeid locid sales SALES (Fact table) PRODUCTS LOCATIONS pid pname category price locid city state country Consider a query with conditions price=10 and country= India. Suppose tuple (with sid) s in Sales joins with a tuple p with price=10 and a tuple l with country = India. There are two join indexes; one containing [10,s] and the other [India,s]. Intersecting these indexes tells us which tuples in Sales are in the join and satisfy the given selection. JAN 2014 Slide 26

Summary Decision support is an emerging, rapidly growing subarea of databases. Involves the creation of large, consolidated data repositories called data warehouses. Warehouses exploited using sophisticated analysis techniques: complex SQL queries and OLAP multidimensional queries (influenced by both SQL and spreadsheets). New techniques for database design, indexing, view maintenance, and interactive querying need to be supported. JAN 2014 Slide 27

END E0 261 JAN 2014 Slide 28