Вы находитесь на странице: 1из 56

Data warehousing Concepts

Agenda
 Data warehousing –
overview

 Data warehouse Vs OLTP

 Data warehouse Vs Data


Mart
What is BI?
 Business intelligence (BI) is a broad category of
application programs and technologies for gathering,
storing, analyzing, and providing access to data to
help enterprise users make better business
decisions.

 BI applications include the activities of decision


support, query and reporting, online analytical
processing (OLAP), statistical analysis, forecasting,
and data mining.

Examples : Business Objects :


www.businessobjects.com
integration * intelligence * insight 3
BI- Nutshell

Raw
Data

integration * intelligence * insight 4


A producer wants to know….
Which are our
lowest/highest margin
customers ?
Who are my customers
What is the most and what products
effective distribution are they buying?
channel?

What product prom- Which customers


-otions have the biggest are most likely to go
impact on revenue? to the competition ?
What impact will
new products/services
have on revenue
and margins?
Data, Data everywhere
yet ...  I can’t find the data I need
data is scattered over the
network
many versions, subtle
differences
 I can’t get the data I need
need an expert to get the data

 I can’t understand the data I


found
available data poorly documented

 I can’t use the data I found


results are unexpected
data needs to be transformed
from one form to other
What is a Data Warehouse?

A single, complete and


consistent store of data
obtained from a variety
of different sources
made available to end
users in a what they
can understand and use
in a business context.

[Barry Devlin]
What are the users saying...

Data should be integrated


across the enterprise
Summary data has a real
value to the organization
Historical data holds the
key to understanding data
over time
What-if capabilities are
required
What is Data Warehousing?

A process of
Information
transforming data into
information and
making it available to
users in a timely
enough manner to
make a difference

Data
Evolution
 60’s: Batch reports
hard to find and analyze information
inflexible and expensive, reprogram every new
request
 70’s: Terminal-based DSS and EIS (executive
information systems)
still inflexible, not integrated with desktop tools
 80’s: Desktop data access and analysis tools
query tools, spreadsheets, GUIs
easier to use, but only access operational databases
 90’s till now: Data warehousing with
integrated OLAP engines and tools, real time
DW
Data Warehouse

 A data warehouse is a
subject-oriented
integrated
time-varying
non-volatile
 Accessible
collection of data that is used primarily in
organizational decision making.
-- Bill Inmon, Building the Data Warehouse 1996
Explorers, Farmers and Tourists

Tourists: Browse information


harvested by farmers

Farmers: Harvest information


from known access paths

Explorers: Seek out the unknown and


previously unsuspected rewards hiding in
the detailed data
Data Warehouse Architecture

Relational
Databases
Optimized Loader
Extraction
ERP
Systems Cleansing

Data Warehouse
Engine Analyze
Purchased Query
Data

Legacy
Data Metadata Repository
Data Mining works with Warehouse
Data

Data Warehousing
provides the Enterprise
with a memory

Data Mining provides


the Enterprise with
intelligence
What makes data mining possible?

Advances in the following areas are


making data mining deployable:
data warehousing
better and more data (i.e., operational,
behavioral, and demographic)
the emergence of easily deployed data
mining tools and
the advent of new data mining
techniques.
• -- Gartner Group
Why Separate Data Warehouse?
 Performance
 Operational database designed & tuned for known transactions &
workloads.
 Complex OLAP queries would degrade performance. for op
transactions.
 Special data organization, access & implementation methods
needed for multidimensional views & queries.

 Function
 Missing data: Decision support requires historical data, which
Operational database do not typically maintain.

 Data consolidation: Decision support requires consolidation


(aggregation, summarization) of data from many heterogeneous
sources: operational databases, external sources.

 Data quality: Different sources typically use inconsistent data


representations, codes, and formats which have to be reconciled.
Benefits of a Data Warehouse
Reliable reporting
Rapid access to data
Integrated data
Flexible presentation of data
Better decision making
So, what’s different?
Application-Orientation vs. Subject-
Orientation

Application-Orientation Subject-Orientation

Operational Data
Database Warehouse

Credit
Loans Customer
Card
Vendor
Trust Product

Savings Activity
OLTP vs Data Warehouse

 OLTP  Warehouse (DSS)


Application Oriented Subject Oriented
Used to run business Used to analyze business
Detailed data Summarized and refined
Current up to date Snapshot data
Isolated Data Integrated Data
Repetitive access Ad-hoc access
Clerical User Knowledge User
(Manager)
OLTP vs Data Warehouse

 OLTP  Data Warehouse


Performance Sensitive Performance relaxed
Few Records accessed at Large volumes accessed
a time (tens) at a time(millions)
Mostly Read (Batch
Read/Update Access Update)
Redundancy present
No data redundancy Database Size
Database Size 100MB 100 GB - few terabytes
-100 GB Hundreds of users
Thousands of users
To summarize ...

OLTP Systems are


used to “run” a
business

The Data
Warehouse helps
to “optimize” the
business
Why Now?
 Data is being produced

 ERP provides clean data

 The computing power is available

 The computing power is affordable

 The competitive pressures are strong

 Commercial products are available


Data Warehouses:
Architecture, Design & Construction

DW Architecture

Loading, refreshing

Structuring/Modeling

DWs and Data Marts


Stages in Data Warehousing Life Cycle
Data Warehouse Architectures
Generic Two-Level Architecture

Independent Data Mart

Dependent Data Mart and


Operational Data Store

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


Generic two-level architecture

L
One,
company-
wide
T warehouse

Periodic extraction  data is not completely current in warehouse


Independent Data Mart
Data marts:
Mini-warehouses, limited in scope

T
E

Separate ETL for each Data access complexity


independent data mart due to multiple data marts
Dependent data mart with operational data store ODS provides option for
obtaining current data

T
E Simpler data access
Single ETL for
enterprise data warehouse Dependent data marts
(EDW) loaded from EDW
The ETL Process
Capture

Scrub or data cleansing

Transform

Load

ETL = Extract, transform, and load


Steps in data reconciliation

Capture = extract…obtaining a snapshot


of a chosen subset of the source data for
loading into the data warehouse

Static extract = capturing a Incremental extract =


snapshot of the source data at capturing changes that have
a point in time occurred since the last static
extract
Steps in data reconciliation (continued)

Scrub = cleanse…uses pattern


recognition and AI techniques to
upgrade data quality

Fixing errors: misspellings, Also: decoding, reformatting, time


erroneous dates, incorrect field usage, stamping, conversion, key generation,
mismatched addresses, missing data, merging, error detection/logging,
duplicate data, inconsistencies locating missing data
Steps in data reconciliation (continued)

Transform = convert data from format


of operational system to format of data
warehouse

Record-level: Field-level:
Selection – data partitioning single-field – from one field to one field
Joining – data combining multi-field – from many fields to one, or
Aggregation – data summarization one field to many
Steps in data reconciliation (continued)

Load/Index= place transformed data


into the warehouse and create indexes

Refresh mode: bulk rewriting of Update mode: only changes in


target data at periodic intervals source data are written to data
warehouse
Data Warehouse vs. Data Marts

What comes first ?


Data Mart

Data mart is:


A functional segment of an enterprise
restricted for purposes of security, locality,
performance, or business necessity using
modeling and information delivery
techniques identical to data warehousing.
Data Mart
Why build a data mart?
Allows an organization to visualize the large but focus
on the small and attainable.

Provides a platform for rapid delivery of an operational


system.

Minimizes risk.

A corporate warehouse can be constructed from the


union of the enterprise data marts.
Data Mart- Approach

Physical data warehouse (physical)

Data warehouse --> data marts

Data marts --> data warehouse

Parallel data warehouse and data marts


Top-down

External
Data

SOURCE DATA

Operational Data

Data Warehouse Data Marts

Staging Area

Physical Data Warehouse:


Data Warehouse --> Data Marts
Bottom-up approach

External
Data

SOURCE DATA

Operational Data

Data Warehouse
Data Marts

Staging Area

Physical Data Warehouse:


Data Marts --> Data Warehouse
Hybrid

Data Warehouse

External
Data

SOURCE DATA

Staging Area
Operational Data

Data Marts

Physical Data Warehouse:


Parallel Data Warehouse & Data Marts
Schema Design

Database organization
must look like business
must be recognizable by business user
approachable by business user
Must be simple
Schema Types
Star Schema
Fact Constellation Schema
Snowflake schema
42
Conceptual Modeling of
Data Warehouses
 Modeling data warehouses: dimensions &
measures
Star schema: A fact table in the middle connected to a
set of dimension tables
Snowflake schema: A refinement of star schema where
some dimensional hierarchy is normalized into a set of
smaller dimension tables, forming a shape similar to
snowflake
Fact constellations: Multiple fact tables share dimension
tables, viewed as a collection of stars, therefore called
galaxy schema or fact constellation
Dimension Tables

Dimension tables
Define business in terms already
familiar to users
Wide rows with lots of descriptive text
Small tables (about a million rows)
Joined to fact table by a foreign key
heavily indexed
typical dimensions
time periods, geographic region (markets,
cities), products, customers, salesperson,
etc.
44
Fact Table

Central table
mostly raw numeric items
narrow rows, a few columns at most
large number of rows (millions to a
billion)
Access via dimensions

45
Example of Star Schema
time
time_key item
day item_key
day_of_the_week Sales Fact Table item_name
month brand
quarter time_key type
year supplier_type
item_key
branch_key
branch location
location_key
branch_key location_key
branch_name units_sold street
branch_type city
dollars_sold province_or_street
country
avg_sales
Measures
Example of Snowflake Schema
time
time_key item
day item_key supplier
day_of_the_week Sales Fact Table item_name supplier_key
month brand supplier_type
quarter time_key type
year item_key supplier_key

branch_key
location
branch location_key
location_key
branch_key
units_sold street
branch_name
city_key city
branch_type
dollars_sold
city_key
avg_sales city
province_or_street
Measures country
Example of Fact Constellation
time
time_key item Shipping Fact Table
day item_key
day_of_the_week Sales Fact Table item_name time_key
month brand
quarter time_key type item_key
year supplier_type shipper_key
item_key
branch_key from_location

branch location_key location to_location


branch_key location_key dollars_cost
branch_name
units_sold
street
branch_type dollars_sold city units_shipped
province_or_street
avg_sales country shipper
Measures shipper_key
shipper_name
location_key
shipper_type
Dimensional model
 Visualise a dimensional model as a CUBE (hypercube
because dimensions can be more than 3 in number)
 Operations for OLAP
Drill Down :Higher level of detail

Roll Up: summarized level of data


(The navigation path is determined by hierarchies within
dimensions.)

Slice: cuts through the cube.Users can focus on specific


perspectives

Dice: rotates the cube to another perspective (change the


dimension)
Drill down …. Roll up
Slice and Dice
Metadata Repository
 Administrative metadata
source databases and their contents
gateway descriptions
warehouse schema, view & derived data definitions
dimensions, hierarchies
pre-defined queries and reports
data mart locations and contents
data partitions
data extraction, cleansing, transformation rules,
defaults
data refresh and purging rules
user profiles, user groups
security: user authorization, access control
Metdata Repository .. 2

Business data
business terms and definitions
ownership of data
charging policies
operational metadata
data lineage: history of migrated data and
sequence of transformations applied
currency of data: active, archived, purged
monitoring information: warehouse usage
statistics, error reports, audit trails.
The BI/DW Lifecycle

Source:
http://www.atre.com/navigator/#3
The BI/DW Lifecycle…

Source: http://www.atre.com
Popular BI/DW Suites & Tools
 Oracle • IBM
 LDMs & Database Logical Data Model & IBM DB2 Database
 Oracle Warehouse Builder
 Oracle Discoverer & Oracle Reporting DB2 Cube Views
 BI Beans & JOLAP API ETL Ascential DataStage
 Microsoft Full Suites DB2 Alphabox
 Database • Cognos BI Suite
 SQL Server Analysis Services • BusinessObjects & Crystal
 SQL Server Reporting Services
 SQL Server Integration Services • Microstrategy
• Actuate
Reporting
• SAS 9 – the BI Platform • Hyperion/Brio (Acquired by
Tools
Hyperion)
 Logical Data Model & SAS Database
 SAS ETL
 BI and Reporting
 SAS Data Mining
• Informatica • SAP BW
• Ab initio • Peoplesoft EPM
• Any Database SQL Language or any other • Embarcadero Suite
Programming Language • Erwin
• Teradata Databases • Cognos Performance
Specialized
• Redbrick Apps
ETL Tools Tools
• Hyperion Essbase • Planning &
• Oracle Express Server Budgeting

56