acm introtodw-data warehousing

58
Introduction to Data Introduction to Data Warehousing Warehousing Ms Swapnil Shrivastava [email protected]

Upload: suresh-kumar

Post on 27-Oct-2014

29 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: ACM IntrotoDW-Data Warehousing

Introduction to Data WarehousingIntroduction to Data Warehousing

Ms Swapnil Shrivastava

[email protected]

Page 2: ACM IntrotoDW-Data Warehousing

Why Data Warehouse?Why Data Warehouse?

Necessity is the mother of invention

Page 3: ACM IntrotoDW-Data Warehousing

Scenario 1Scenario 1

ABC Pvt Ltd is a company with branches at Mumbai, Delhi, Chennai and Banglore. The Sales Manager wants quarterly sales report. Each branch has a separate operational system.

Page 4: ACM IntrotoDW-Data Warehousing

Scenario 1 : ABC Pvt Ltd.Scenario 1 : ABC Pvt Ltd.

Mumbai

Delhi

Chennai

Banglore

SalesManager

Sales per item type per branchfor first quarter.

Page 5: ACM IntrotoDW-Data Warehousing

Solution 1:ABC Pvt Ltd.Solution 1:ABC Pvt Ltd.

Extract sales information from each database. Store the information in a common repository at a

single site.

Page 6: ACM IntrotoDW-Data Warehousing

Solution 1:ABC Pvt Ltd.Solution 1:ABC Pvt Ltd.

Mumbai

Delhi

Chennai

Banglore

DataWarehouse

SalesManager

Query &Analysis tools

Report

Page 7: ACM IntrotoDW-Data Warehousing

Scenario 2Scenario 2

One Stop Shopping Super Market has hugeoperational database.Whenever Executives wantssome report the OLTP system becomesslow and data entry operators have to wait for some time.

Page 8: ACM IntrotoDW-Data Warehousing

Scenario 2 : One Stop ShoppingScenario 2 : One Stop Shopping

OperationalDatabase

Data Entry Operator

Data Entry Operator

ManagementWait

Report

Page 9: ACM IntrotoDW-Data Warehousing

Solution 2Solution 2

Extract data needed for analysis from operational database.

Store it in warehouse. Refresh warehouse at regular interval so that it

contains up to date information for analysis. Warehouse will contain data with historical

perspective.

Page 10: ACM IntrotoDW-Data Warehousing

Solution 2Solution 2

Operationaldatabase

DataWarehouse

Extractdata

Data EntryOperator

Data EntryOperator

Manager

Report

Transaction

Page 11: ACM IntrotoDW-Data Warehousing

Scenario 3Scenario 3

Cakes & Cookies is a small,new company.President of the company wants his company should grow.He needs information so that he can make correct decisions.

Page 12: ACM IntrotoDW-Data Warehousing

Solution 3Solution 3

Improve the quality of data before loading it into the warehouse.

Perform data cleaning and transformation before loading the data.

Use query analysis tools to support adhoc queries.

Page 13: ACM IntrotoDW-Data Warehousing

Solution 3Solution 3

Query and Analysistool

President

Expansion

Improvement

sales

time

DataWarehouse

Page 14: ACM IntrotoDW-Data Warehousing

What is Data Warehouse??What is Data Warehouse??

Page 15: ACM IntrotoDW-Data Warehousing

Inmons’s definitionInmons’s definition

A data warehouse is-subject-oriented,-integrated,-time-variant,-nonvolatile

collection of data in support of management’sdecision making process.

Page 16: ACM IntrotoDW-Data Warehousing

Subject-orientedSubject-oriented

Data warehouse is organized around subjects such as sales,product,customer.

It focuses on modeling and analysis of data for decision makers.

Excludes data not useful in decision support process.

Page 17: ACM IntrotoDW-Data Warehousing

IntegrationIntegration

Data Warehouse is constructed by integrating multiple heterogeneous sources.

Data Preprocessing are applied to ensure consistency.

RDBMS

LegacySystem

DataWarehouse

Flat File Data ProcessingData Transformation

Page 18: ACM IntrotoDW-Data Warehousing

IntegrationIntegrationIn terms of data.

– encoding structures.

– Measurement ofattributes.

– physical attribute. of data

– naming conventions.

– Data type format

remarks

Page 19: ACM IntrotoDW-Data Warehousing

Time-variantTime-variant

Provides information from historical perspective e.g. past 5-10 years

Every key structure contains either implicitly or explicitly an element of time

Page 20: ACM IntrotoDW-Data Warehousing

NonvolatileNonvolatile

Data once recorded cannot be updated. Data warehouse requires two operations in data

accessing– Initial loading of data– Access of data

load

access

Page 21: ACM IntrotoDW-Data Warehousing

Operational v/s Information SystemOperational v/s Information System

Features Operational Information

Characteristics Operational processing Informational processing

Orientation Transaction Analysis

User Clerk,DBA,database professional

Knowledge workers

Function Day to day operation Decision support

Data Current Historical

View Detailed,flat relational Summarized, multidimensional

DB design Application oriented Subject oriented

Unit of work Short ,simple transaction Complex query

Access Read/write Mostly read

Page 22: ACM IntrotoDW-Data Warehousing

Operational v/s Information SystemOperational v/s Information System

Features Operational Information

Focus Data in Information out

Number of records accessed

tens millions

Number of users thousands hundreds

DB size 100MB to GB 100 GB to TB

Priority High performance,high availability

High flexibility,end-user autonomy

Metric Transaction throughput Query througput

Page 23: ACM IntrotoDW-Data Warehousing

Data Warehousing ArchitectureData Warehousing Architecture

Extract Transform

Load Refresh

Serve

ExternalSources

Operational Dbs

Analysis

Query/Reporting

Data Mining

Monitoring &Administration

MetadataRepository

DATA SOURCES TOOLS

DATA MARTS

OLAP Servers

Reconciled data

Page 24: ACM IntrotoDW-Data Warehousing

Data Warehouse ArchitectureData Warehouse Architecture

Data Warehouse server– almost always a relational DBMS,rarely flat

files OLAP servers

– to support and operate on multi-dimensional data structures

Clients– Query and reporting tools– Analysis tools– Data mining tools

Page 25: ACM IntrotoDW-Data Warehousing

Data Warehouse SchemaData Warehouse Schema

Star SchemaFact Constellation SchemaSnowflake Schema

Page 26: ACM IntrotoDW-Data Warehousing

Star SchemaStar Schema

A single,large and central fact table and one table for each dimension.

Every fact points to one tuple in each of the dimensions and has additional attributes.

Does not capture hierarchies directly.

Page 27: ACM IntrotoDW-Data Warehousing

Star Schema (contd..)Star Schema (contd..)

Store Key

Product Key

Period Key

Units

Price

Store Dimension

Time Dimension

Product Dimension

Fact Table

Benefits: Easy to understand, easy to define hierarchies, reduces no. of physical joins.

Store Key

Store Name

City

State

Region

Period Key

Year

Quarter

Month

Product Key

Product Desc

Page 28: ACM IntrotoDW-Data Warehousing

SnowFlake SchemaSnowFlake Schema

Variant of star schema model.A single,large and central fact table and one

or more tables for each dimension.Dimension tables are normalized i.e. split

dimension table data into additional tables

Page 29: ACM IntrotoDW-Data Warehousing

SnowFlake Schema (contd..)SnowFlake Schema (contd..)

Store Key

Product Key

Period Key

Units

Price

Time Dimension

Product Dimension

Fact Table

Store Key

Store Name

City Key

Period Key

Year

Quarter

Month

Product Key

Product Desc

City Key

City

State

Region

City Dimension

Store Dimension

Drawbacks: Time consuming joins,report generation slow

Page 30: ACM IntrotoDW-Data Warehousing

Fact ConstellationFact Constellation

Multiple fact tables share dimension tables.This schema is viewed as collection of stars

hence called galaxy schema or fact constellation.

Sophisticated application requires such schema.

Page 31: ACM IntrotoDW-Data Warehousing

Fact Constellation (contd..)Fact Constellation (contd..)

Store Key

Product Key

Period Key

Units

Price

Store Dimension

Product Dimension

SalesFact Table

Store Key

Store Name

City

State

Region

Product Key

Product Desc

Shipper Key

Store Key

Product Key

Period Key

Units

Price

ShippingFact Table

Page 32: ACM IntrotoDW-Data Warehousing

Building Data WarehouseBuilding Data Warehouse

Data SelectionData Preprocessing

– Fill missing values– Remove inconsistency

Data Transformation & IntegrationData Loading Data in warehouse is stored in form of fact tables

and dimension tables.

Page 33: ACM IntrotoDW-Data Warehousing

Case StudyCase Study Afco Foods & Beverages is a new company which

produces dairy,bread and meat products with production unit located at Baroda.

There products are sold in North,North West and Western region of India.

They have sales units at Mumbai, Pune , Ahemdabad ,Delhi and Baroda.

The President of the company wants sales information.

Page 34: ACM IntrotoDW-Data Warehousing

Sales InformationSales Information

Report: The number of units sold.

113

Report: The number of units sold over time

January February March April

14 41 33 25

Page 35: ACM IntrotoDW-Data Warehousing

Sales InformationSales InformationReport : The number of items sold for each product withtime

Jan Feb Mar Apr

Wheat Bread 6 17

Cheese 6 16 6 8

Swiss Rolls 8 25 21

Product

Tim

e

Page 36: ACM IntrotoDW-Data Warehousing

Sales InformationSales InformationReport: The number of items sold in each City for each product with time

Jan Feb Mar Apr

Mumbai Wheat Bread 3 10

Cheese 3 16 6

Swiss Rolls 4 16 6

Pune Wheat Bread 3 7

Cheese 3 8

Swiss Rolls 4 9 15

Product

Tim

e

City

Page 37: ACM IntrotoDW-Data Warehousing

Sales InformationSales Information

Report: The number of items sold and income in each region for each product with time.

Jan Feb Mar Apr

Rs U Rs U Rs U Rs U

Mumbai Wheat Bread 7.44 3 24.80 10

Cheese 7.95 3 42.40 16 15.90 6

Swiss Rolls 7.32 4 29.98 16 10.98 6

Pune Wheat Bread 7.44 3 17.36 7

Cheese 7.95 3 21.20 8

Swiss Rolls 7.32 4 16.47 9 27.45 15

Page 38: ACM IntrotoDW-Data Warehousing

Sales Measures & DimensionsSales Measures & Dimensions

Measure – Units sold, Amount.Dimensions – Product,Time,Region.

Page 39: ACM IntrotoDW-Data Warehousing

Sales Data Warehouse ModelSales Data Warehouse Model

City Product Month Units Rupees

Mumbai Wheat Bread January 3 7.95

Mumbai Cheese January 4 7.32

Pune Wheat Bread January 3 7.95

Pune Cheese January 4 7.32

Mumbai Swiss Rolls February 16 42.40

Fact Table

Page 40: ACM IntrotoDW-Data Warehousing

Sales Data Warehouse ModelSales Data Warehouse Model

City_ID Prod_ID Month Units Rupees

1 589 1/1/1998 3 7.95

1 1218 1/1/1998 4 7.32

2 589 1/1/1998 3 7.95

2 1218 1/1/1998 4 7.32

1 589 2/1/1998 16 42.40

Page 41: ACM IntrotoDW-Data Warehousing

Sales Data Warehouse ModelSales Data Warehouse Model

Product Dimension Tables

Prod_ID Product_Name Product_Category_ID

589 Wheat Bread 1

590 White Bread 1

288 Coconut Cookies 2

Product_Category_Id Product_Category

1 Bread

2 Cookies

Page 42: ACM IntrotoDW-Data Warehousing

Sales Data Warehouse ModelSales Data Warehouse Model

Region Dimension Table

City_ID City Region Country

1 Mumbai West India

2 Pune NorthWest India

Page 43: ACM IntrotoDW-Data Warehousing

Sales Data Warehouse ModelSales Data Warehouse Model

Sales Fact

Region

ProductProduct

Category

Time

Page 44: ACM IntrotoDW-Data Warehousing

Online Analysis Processing(OLAP)Online Analysis Processing(OLAP)

It enables analysts, managers and executives to gain insight into data through fast, consistent, interactive access to a wide variety of possible views of information that has been transformed from raw data to reflect the real dimensionality of the enterprise as understood by the user.

Data Warehouse

Time

Product

Reg

ion

Page 45: ACM IntrotoDW-Data Warehousing

OLAP CubeOLAP Cube

City Product Time Units Dollars

All All All 113 251.26

Mumbai All All 64 146.07

Mumbai White Bread All 38 98.49

Mumbai Wheat Bread All 13 32.24

Mumbai Wheat Bread Qtr1 3 7.44

Mumbai Wheat Bread March 3 7.44

Page 46: ACM IntrotoDW-Data Warehousing

OLAP OperationsOLAP OperationsDrill Down

Time

Reg

ion

Product

Category e.g Electrical Appliance

Sub Category e.g Kitchen

Product e.g Toaster

Page 47: ACM IntrotoDW-Data Warehousing

OLAP OperationsOLAP OperationsDrill Up

Time

Reg

ion

Product

Category e.g Electrical Appliance

Sub Category e.g Kitchen

Product e.g Toaster

Page 48: ACM IntrotoDW-Data Warehousing

OLAP OperationsOLAP OperationsSlice and Dice

Time

Reg

ion

ProductProduct=Toaster

Time

Reg

ion

Page 49: ACM IntrotoDW-Data Warehousing

OLAP OperationsOLAP OperationsPivot

Time

Reg

ion

Product

RegionT

ime

Product

Page 50: ACM IntrotoDW-Data Warehousing

OLAP ServerOLAP Server

An OLAP Server is a high capacity,multi user data manipulation engine specifically designed to support and operate on multi-dimensional data structure.

OLAP server available are– MOLAP server– ROLAP server– HOLAP server

Page 51: ACM IntrotoDW-Data Warehousing

PresentationPresentation

Time

Reg

ion

Product

Report

ReportingTool

Page 52: ACM IntrotoDW-Data Warehousing

Data Warehousing includesData Warehousing includes

Build Data Warehouse Online analysis processing(OLAP). Presentation.

RDBMS

Flat File

Presentation

Cleaning ,Selection &Integration

Warehouse & OLAP serverClient

Page 53: ACM IntrotoDW-Data Warehousing

Need for Data WarehousingNeed for Data Warehousing

Industry has huge amount of operational data Knowledge worker wants to turn this data into

useful information. This information is used by them to support

strategic decision making .

Page 54: ACM IntrotoDW-Data Warehousing

Need for Data Warehousing (contd..)Need for Data Warehousing (contd..)

It is a platform for consolidated historical data for analysis.

It stores data of good quality so that knowledge worker can make correct decisions.

Page 55: ACM IntrotoDW-Data Warehousing

Need for Data Warehousing (contd..)Need for Data Warehousing (contd..)

From business perspective

-it is latest marketing weapon

-helps to keep customers by learning more about their needs .

-valuable tool in today’s competitive fast evolving world.

Page 56: ACM IntrotoDW-Data Warehousing

Data Warehousing ToolsData Warehousing Tools

Data Warehouse– SQL Server 2000 DTS– Oracle 8i Warehouse Builder

OLAP tools– SQL Server Analysis Services– Oracle Express Server

Reporting tools– MS Excel Pivot Chart– VB Applications

Page 57: ACM IntrotoDW-Data Warehousing

ReferencesReferences

Building Data Warehouse by Inmon Data Mining:Concepts and Techniques by Han,Kamber. www.dwinfocenter.org www.datawarehousingonline.com www.billinmon.com

Page 58: ACM IntrotoDW-Data Warehousing

Thank YouThank You