data warehousing chapter 4 1. outline definition of data warehouse reasons for creating data marts...

33
Data Warehousing Chapter 4 1

Upload: robert-phelps

Post on 23-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

1

Data Warehousing

Chapter 4

Page 2: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

2

Outline• Definition of Data Warehouse

• Reasons for creating Data Marts

• Benefits and characteristics of Data Warehouse

• Reasons for need of data warehousing

• Operational and Informational Systems

• Data Warehouse vs Data Mart

• Types of Systems Used

• Data warehouse architectures

• List four steps of data reconciliation

• Design a data mart

• Star Schema

Page 3: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

3

Definition of Data Warehouse• It is a huge central database that accepts, stores and maintain

data from different sources and locations.• Disparate sources may use different formats and technologies.

Page 4: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

4

Definition of Data Mart• A data mart is a simple form of a data warehouse

that is focused on a single subject (or functional area), such as sales, finance or marketing.

• Data marts are small slices of the data warehouse.

• Data marts are often built and controlled by a single department within an organization.

• Given their single-subject focus, data marts usually draw data from only a few sources.

• The sources could be internal operational systems, a central data warehouse, or external data.

Page 5: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

5

Reasons for creating a data mart• Easy access to frequently needed data• Creates collective view by a group of users• Improves end-user response time• Ease of creation• Lower cost than implementing a full data

warehouse• Potential users are more clearly defined than

in a full data warehouse• Contains only business essential data and is

less cluttered.

Page 6: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

6

Benefits of Data Warehouse• Collect data from multiple sources into a single database so a

single query engine can be used to present data.• Maintain data history, even if the source transaction systems

do not.• Integrate data from multiple source systems, enabling a

central view across the enterprise. • Improve data quality by flagging or even fixing bad data.• Present the organization's information consistently (constantly

and reliably).• Provide a single common data model for all data of interest

regardless of the data's source.• Restructure the data so that it makes sense to the business

users.• Making decision–support queries are easier to write.

Page 7: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

7

Example of using a Data Warehouse

Page 8: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

8

Characteristics of Data Warehouse• A data warehouse is a system used for reporting and

data analysis.

• Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW).

• Data warehouses store current and historical data and are used for creating trending reports for senior management reporting such as annual and quarterly comparisons.

• The data stored in the warehouse is uploaded from the operational systems.

Page 9: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

9

Operational and Informational Systems

Page 10: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

10

Data Warehouse Versus Data Mart

Page 11: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

11

Types of systems used (1)Online Analytical Processing (OLAP)• It is characterized by a low volume of transactions. • Queries are often very complex and involve

aggregations. • OLAP databases store aggregated, historical data in

multi-dimensional schemas (usually star schemas).

Online Transaction Processing (OLTP)• Characterized by a large number of transactions

(INSERT, UPDATE, DELETE). • OLTP databases contain detailed and current data. • The schema used to store transactional databases is

the entity model (usually 3NF).

Page 12: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

12

Types of systems used (2)Predictive analysis

• It is about finding and quantifying hidden patterns in the data using complex mathematical models that can be used to predict future outcomes.

• Predictive analysis is different from OLAP in that OLAP focuses on historical data analysis and is reactive in nature, while predictive analysis focuses on the future.

Page 13: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

13

Data Warehouse Architectures• Generic Two-Level Architecture• Independent Data Mart• Dependent Data Mart and Operational Data

Store• Logical Data Mart and Real-Time Data

Warehouse• Three-Layer architecture

All involve some form of extraction, transformation and loading (ETL)

Page 14: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

Generic two-level data warehousing architecture

E

T

LOne, company-wide warehouse

Periodic extraction data is not completely current in warehouse14

Page 15: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

15

Independent Data Mart Data Warehousing Architecture

Data marts: Mini-warehouses, limited in scope

E

T

L

Separate ETL for each independent data mart

Data access complexity due to multiple data marts

Page 16: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

16

Dependent data mart with operational data store: a three-level architecture

E

T

L

Single ETL for Enterprise Data Warehouse (EDW)

Simpler data access

ODS provides option for obtaining current data

Dependent data marts loaded from EDW

Page 17: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

17

ET

L

Near real-time ETL for Data Warehouse

ODS and data warehouse are one and the same

Data marts are NOT separate databases, but logical views of the data warehouse Easier to create new data marts

Logical data mart and real time warehouse architecture

Page 18: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

18

Three-layer data architecture for a data warehouse

Page 19: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

19

Data Characteristics: Status vs. Event Data

Status

Status

Event = a database action (create/update/delete) that results from a transaction

Page 20: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

20

Data Characteristics: Transient vs. Periodic Data

With transient data, changes to existing records are written over previous records, thus destroying the previous data content

Transient operational

data

Page 21: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

21

Periodic data are never physically altered or deleted once they have been added to the store

Data Characteristics: Transient vs. Periodic Data

Periodic warehouse

data

Page 22: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

22

The Reconciled Data Layer• Typical operational data is:

– Transient–not historical– Not normalized (perhaps due to denormalization for

performance)– Restricted in scope–not comprehensive– Sometimes poor quality–inconsistencies and errors

• After ETL, data should be:– Detailed–not summarized yet– Historical–periodic– Normalized–3rd normal form or higher– Comprehensive–enterprise-wide perspective– Timely–data should be current enough to assist decision-

making– Quality controlled–accurate with full integrity

Page 23: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

23

The ETL Process

• Capture/Extract• Scrub or data cleansing• Transform• Load and Index

ETL = Extract, transform, and load

Page 24: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

Static extract = capturing a snapshot of the source data at a point in time

Incremental extract = capturing changes that have occurred since the last static extract

Capture/Extract…obtaining a snapshot of a chosen subset of the source data for loading into the data warehouse

Steps in data reconciliation (1)

24

Page 25: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

25

Scrub/Cleanse…uses pattern recognition and AI techniques to upgrade data quality

Fixing errors: misspellings, erroneous dates, incorrect field usage, mismatched addresses, missing data, duplicate data, inconsistencies

Also: decoding, reformatting, time stamping, conversion, key generation, merging, error detection/logging, locating missing data

Steps in data reconciliation (2)

Page 26: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

Transform = convert data from format of operational system to format of data warehouse

Record-level:Selection–data partitioningJoining–data combiningAggregation–data summarization

Field-level: single-field–from one field to one fieldmulti-field–from many fields to one, or one field to many

Steps in data reconciliation (3)

26

Page 27: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

Load/Index= place transformed data into the warehouse and create indexes

Refresh mode: bulk rewriting of target data at periodic intervals

Update mode: only changes in source data are written to data warehouse

Steps in data reconciliation (4)

27

Page 28: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

28

Single-field transformation

In general–some transformation function translates data from old form to new form

Algorithmic transformation uses a formula or logical expression

Table lookup–another approach, uses a separate table keyed by source record code

Page 29: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

29

Multifield transformation

M:1–from many source fields to one target field

1:M–from one source field to many target fields

Page 30: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

30

Star Schema

• The star schema separates business

process data into facts.

• Facts hold the measurable, quantitative

data about a business, and dimensions

which are descriptive attributes related to

fact data.

• Examples of fact data include sales price,

sale quantity, and time, distance, speed,

and weight measurements.

Page 31: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

31

Components of a star schemaFact tables contain factual or quantitative data

Dimension tables contain descriptions about the subjects of the business

1:N relationship between dimension tables and fact tables

Excellent for ad-hoc queries, but bad for online transaction processing

Dimension tables are denormalized to maximize performance

Page 32: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

32

Star schema exampleFact table provides statistics for sales broken down by product, period and store dimensions

Page 33: Data Warehousing Chapter 4 1. Outline Definition of Data Warehouse Reasons for creating Data Marts Benefits and characteristics of Data Warehouse Reasons

33

Star schema with sample data