Top Banner
CS 8630 Database Administration, Dr. Guimaraes 10-28-2008, Tuesday Data Warehouse Class Will Start Momentarily… CS8630 Database Administration Dr. Mario Guimaraes
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

10-28-2008, TuesdayData Warehouse

ClassWill

Start Momentarily…

CS8630 Database AdministrationDr. Mario Guimaraes

Page 2: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Datawarehouse example

Page 3: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Definition

• Data WarehouseData Warehouse: – A subject-oriented, integrated, time-variant, non-

updatable collection of data used in support of management decision-making processes

– Subject-oriented: e.g. customers, patients, students, products

– Integrated: Consistent naming conventions, formats, encoding structures; from multiple data sources

– Time-variant: Can study trends and changes– Nonupdatable: Read-only, periodically refreshed

• Data MartData Mart:– A data warehouse that is limited in scope. Subset of

a Data Warehouse

Page 4: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Need for Data Warehousing

• Integrated, company-wide view of high-quality information (from disparate databases)

• Separation of operational and informational systems and data (for improved performance)

Page 5: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Data Warehouse vs. Data Mart

Source: adapted from Strange (1997).

Page 6: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Generic two-level architecture

E

T

LOne, company-wide warehouse

Periodic extraction data is not completely current in warehouse

Page 7: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Data Warehouse Architectures

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

Data Store• Logical Data Mart and @ctive

Warehouse• Three-Layer architecture

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

Page 8: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Independent Data Mart

E

T

L

Separate ETL for each independent data mart

Data access complexity due to multiple data marts

Page 9: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Dependent data mart with operational data store

ET

L

Single ETL for enterprise data warehouse(EDW)(EDW)

Simpler data access

Dependent data marts loaded from EDW

Page 10: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Logical data mart and @ctive data warehouse

ET

L

Near real-time ETL for @active Data Warehouse@active Data Warehouse

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

Page 11: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Three-layer architecture

Page 12: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Data Reconciliation

• 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– Quality controlled – accurate with full integrity

Page 13: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

The ETL Process

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

ETL = Extract, transform, and load

Page 14: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Steps in data reconciliation

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

Incremental extractIncremental 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

Page 15: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Steps in data reconciliation

Scrub = cleanse…uses pattern recognition and AI techniques to upgrade data quality

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

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

Page 16: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Steps in data reconciliation

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

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

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

Page 17: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Steps in data reconciliation

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

Refresh mode:Refresh mode: bulk rewriting of target data at periodic intervals

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

Page 18: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

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

Page 19: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Multifield transformation

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

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

Page 20: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Derived Data

• Objectives– Ease of use for decision support applications– Fast response to predefined user queries– Customized data for particular target

audiences– Ad-hoc query support– Data mining capabilities

Characteristics– Detailed (mostly periodic) data– Aggregate (for summary)– Distributed (to departmental servers)

Most common data model = star schemastar schema(also called “dimensional model”)

Page 21: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Components of a star schemastar schema

Fact 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 22: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Star schema example

Fact table provides statistics for sales broken down by product, period and store dimensions

Page 23: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Star schema with sample data

Page 24: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Issues Regarding Star Schema

• Dimension table keys must be surrogate (non-intelligent and non-business related), because:– Keys may change over time– Length/format consistency

• Granularity of Fact Table – what level of detail do you want? – Transactional grain – finest level– Aggregated grain – more summarized– Finer grains better market basket analysis

capability– Finer grain more dimension tables, more rows in fact

table

Page 25: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Modeling dates

Fact tables contain time-period data Date dimensions are important

Page 26: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

The User Interface Metadata

• Identify subjects of the data mart• Identify dimensions and facts• Indicate how data is derived from enterprise data

warehouses, including derivation rules• Indicate how data is derived from operational data

store, including derivation rules• Identify available reports and predefined queries• Identify data analysis techniques (e.g. drill-down)• Identify responsible people

Page 27: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Data Mining and Visualization

• Knowledge discovery using a blend of statistical, AI, and computer graphics techniques

• Goals:– Explain observed events or conditions– Confirm hypotheses– Explore data for new or unexpected relationships

• Techniques– Case-based reasoning– Rule discovery– Signal processing– Neural nets– Fractals

• Data visualization – representing data in graphical/multimedia formats for analysis

Page 28: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Summary Data warehouse Characteristics

• At one time, a huge amount of information may be queried as opposed to conventional DBMS that a typical query involves few records.

• Data changes much more than operational data (in terms of new datatypes, new tables, etc.). DDL changes a lot.

• Don’t work with real-time data but snapshots.• Historical data – Time is important• Frequently work with Terabytes of Data• Require different types of indexes and/or search engines. For

example, bit-map indexing, or full table scan with partitioning.• Materialized Views are an important part.• Roll-up/Drill-down: Data is summarized with increasing

generalization (weekly, quarterly, annually).• Fact Table x Dimension Table (Derived Table, Views, etc.)• Star Schema x Snow flake schema 

Page 29: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Typical Data Warehouse functions

• Extract and Load• Clean and Transform• Backup and Arquive• Query Management

Page 30: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

GUIDELINES

1)      Start extracting data from data sources when it represents the same snapshot time as all other data sources.

2)      Do not execute consistency checks until all the data sources have been loaded into the temporary data store.

3)      Expect the effort required to clean up the source systems to increase exponentially with the number of overlapping data sources.

4)      Always assume that the amount of effort required to clean up data sources is substantially greater than you would expect.

5)      Consider dropping index prior to loading and recreate index afterwards.

6)      Determine what business activities require detailed transaction information.

7)      Read only in separate tablespaces from r/w.8)      Separate your FACT data from your DIMENSION data.9)      Consider Partitioning Data. If DBMS doesn’t support this, use each

partition as a separate table and using a view that it is a union of all the tables.

 

Page 31: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Generic Tools for Datawarehouse

• Bitmap Index• Materialized Views and Snapshots• Partitioning Tables• 3rd party tools for optimizing SQL

statements• Backup Database, Drop tables, Restore

Database, re-build indexes.

Page 32: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

DW x Data Mining

• Extraction, Query and Analysis of Data

• Searches for patterns.Can use neural networks,

statistics, etc.

Page 33: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Oracle Specific Tools for DW

• Datawarehouse Builder is a generic DW tool (for custom DW development) runs on top of Oracle 8i and Oracle 9i.

• OFA (Oracle Financial Analyzer) and Oracle Sales Analyzer are specific tool.

• Imports data from Oracle General Ledger to Express

• It runs on top of the Express Database Engine.

Page 34: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

Oracle Data Mining Tool

• Darwin: has its own database engine

Page 35: 10-28-2008Old.ppt

CS 8630 Database Administration, Dr. Guimaraes

End of Lecture

End Of

Today’s

Lecture.