CT075!3!2-DTM-Topic 7 - Data Warehouse

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

Data Management

CT075-3-2-DTM

Data Warehouse & OLAP


Technologies
Topic & Structure of Lesson

– OLTP
– OLAP
– Data Cube
– Star Scheme
– Snowflake schema
– Fact constellations
– Information processing
– Analytical processing

Database Architecture Slide 4 (of 25)


Data Warehousing and OLAP

• What is a data warehouse?

• A multi-dimensional data model

• Data warehouse architecture

Database Architecture
What is Data Warehouse?

• Defined in many different ways, but not strictly.


– A decision support database that is maintained
separately from the organization’s operational
database
– Support information processing by providing a solid
platform of consolidated, historical data for analysis.
• “A data warehouse is a subject-oriented, integrated,
time-variant, and nonvolatile collection of data in support
of management’s decision-making process.”—W. H.
Inmon
• Data warehousing:
– The process of constructing and using data
warehouses
Database Architecture
Data Warehouse—Subject-
Oriented

• Organized around major subjects, such as customer,


product, sale.
• Focusing on the modeling and analysis of data for
decision makers, not on daily operations or transaction
processing.
• Provide a simple and concise view around particular
subject issues by excluding data that are not useful in the
decision support process.

Database Architecture
Data Warehouse—Integrated

• Constructed by integrating multiple, heterogeneous


data sources
– relational databases, flat files, on-line transaction
records
• Data cleaning and data integration techniques are
applied.
– Ensure consistency in naming conventions,
encoding structures, attribute measures, etc. among
different data sources
• E.g., Hotel price: currency, tax, breakfast covered, etc.
– When data is moved to the warehouse, it is
converted.

Database Architecture
Data Warehouse—Time Variant

• The time horizon for the data warehouse is significantly


longer than that of operational systems.
– Operational database: current value data.
– Data warehouse data: provide information from a
historical perspective (e.g., past 5-10 years)
• Every key structure in the data warehouse
– Contains an element of time, explicitly or implicitly
– But the key of operational data may or may not contain
“time element”.

Database Architecture
Data Warehouse—Non-Volatile

• A physically separate store of data transformed from the


operational environment.
• Operational update of data does not occur in the data
warehouse environment.
– Does not require transaction processing, recovery,
and concurrency control mechanisms
– Requires only two operations in data accessing:
• initial loading of data and access of data.

Database Architecture
How are organizations using the
information from data warehouses ?
• Many organizations use this information to support
business decision making activities:

• Increasing customer focus, which includes the analysis


of customer buying patterns (such as buying preference,
buying time, budget cycles, and appetites for spending).

• Repositioning products and managing product portfolios


by comparing the performance of sales by quarter, by
year, and by geographic regions in order to fine-tune
production strategies.

Database Architecture Data Mining: Concepts and Techniques


OLTP vs. OLAP
OLTP OLAP
users clerk, IT professional knowledge worker
function day to day operations decision support
DB design ER diagram, Star/snowflake, subject-oriented
application-oriented
data current, up-to-date historical,
detailed, flat relational summarized, multidimensional
isolated integrated, consolidated
usage repetitive ad-hoc
unit of work short, simple transaction complex query
# records accessed tens millions
#users thousands hundreds
DB size 100MB-GB 100GB-TB

Database Architecture
Why Separate Data Warehouse?
• High performance for both systems
– DBMS— tuned for OLTP: access methods, indexing,
concurrency control, recovery
– Warehouse—tuned for OLAP: complex OLAP queries,
multidimensional view, consolidation.
• Different functions and different data:
– missing data: Decision support requires historical data
which operational DBs do not typically maintain
– data consolidation: DS requires consolidation
(aggregation, summarization) of data from
heterogeneous sources
– data quality: different sources typically use inconsistent
data representations, codes and formats which have to
be reconciled
Database Architecture
Data Warehousing and OLAP

• What is a data warehouse?

• A multi-dimensional data model

• Data warehouse architecture

Database Architecture
A 2-D view of sales data for
AllElectronics

Database Architecture Data Mining: Concepts and Techniques


3-D view of sales data for
AllElectronics

Database Architecture Data Mining: Concepts and Techniques


4 – D View of sales data

Database Architecture Data Mining: Concepts and Techniques


From Tables and
Spreadsheets to Data Cubes
• A data warehouse is based on a multidimensional data model
which views data in the form of a data cube
• A data cube, such as sales, allows data to be modeled and viewed
in multiple dimensions
– Dimension tables, such as item (item_name, brand, type), or
time(day, week, month, quarter, year)
– Fact table contains measures (such as dollars_sold) and keys
to each of the related dimension tables
• In data warehousing literature, an n-D base cube is called a base
cuboid. The top most 0-D cuboid, which holds the highest-level of
summarization, is called the apex cuboid. The lattice of cuboids
forms a data cube.
Database Architecture
Cube: A Lattice of Cuboids

all
0-D(apex) cuboid

time item location supplier


1-D cuboids

time,item time,location item,location location,supplier


2-D cuboids
time,supplier item,supplier

time,location,supplier
time,item,location 3-D cuboids
time,item,supplier item,location,supplier

4-D(base) cuboid
time, item, location, supplier
Database Architecture
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
Database Architecture
Star schema
• The most common modeling paradigm is the
star schema, in which the data warehouse
contains :
• (1) a large central table (fact table) containing
the bulk of the data, with no redundancy, and

• (2) a set of smaller attendant tables (dimension


tables), one for each dimension. The schema
graph resembles a starburst, with the dimension
tables displayed in a radial pattern around the
central fact table.
Database Architecture Data Mining: Concepts and Techniques
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

Database Architecture
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
branch location
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

Database Architecture
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
Database Architecture shipper_type
A Concept Hierarchy: Dimension (location)

all all

region Europe ... North_America

country Germany ... Spain Canada ... Mexico

city Frankfurt ... Vancouver ... Toronto

office L. Chan ... M. Wind

Database Architecture
View of Warehouses and Hierarchies

Database Architecture
Multidimensional Data

• Sales volume as a function of product,


month, and region Dimensions: Product, Location, Time
Hierarchical summarization paths
o n
gi

Industry Region Year


Re

Category Country Quarter


Product

Product City Month Week

Office Day

Month
Database Architecture
A Sample Data Cube
Total annual sales
Date of TV in U.S.A.
1Qtr 2Qtr 3Qtr 4Qtr sum
t
uc

TV
od

PC U.S.A
Pr

VCR

Country
sum
Canada

Mexico

sum

Database Architecture
Cuboids Corresponding to the
Cube

all
0-D(apex) cuboid
product date country
1-D cuboids

product,date product,country date, country


2-D cuboids

3-D(base) cuboid
product, date, country

Database Architecture
Typical OLAP Operations

• Roll up (drill-up): summarize data


– by climbing up hierarchy or by dimension
reduction
• Drill down (roll down): reverse of roll-up
– from higher level summary to lower level
summary or detailed data, or introducing new
dimensions

Database Architecture
Data Warehousing and OLAP

• What is a data warehouse?

• A multi-dimensional data model

• Data warehouse architecture

Database Architecture
Data Warehouse Design Process

• Top-down, bottom-up approaches or a combination of both


– Top-down: Starts with overall design and planning (mature)
– Bottom-up: Starts with experiments and prototypes (rapid)
• From software engineering point of view
– Waterfall: structured and systematic analysis at each step before
proceeding to the next
– Spiral: rapid generation of increasingly functional systems, short
turn around time, quick turn around
• Typical data warehouse design process
– Choose a business process to model, e.g., orders, invoices, etc.
– Choose the grain (atomic level of data) of the business process
– Choose the dimensions that will apply to each fact table record
– Choose the measure that will populate each fact table record

Database Architecture
Multi-Tiered Architecture

Monitor
Metadata & OLAP Server
other
source Integrator
s Analysis
Operational Extract Query
Transform Data Serve Reports
DBs
Load
Refresh
Warehouse Data mining

Data Marts

Data Sources Data Storage OLAP Engine Front-End Tools


Database Architecture
Two Data Warehouse Models
• Enterprise warehouse
– collects all of the information about subjects spanning
the entire organization

• Data Mart
– a subset of corporate-wide data that is of value to a
specific groups of users. Its scope is confined to
specific, selected groups, such as marketing data mart

Database Architecture
Data Warehouse Development:
A Recommended Approach
Multi-Tier Data
Warehouse
Distributed
Data Marts

Data Data Enterprise


Mart Mart Data
Warehouse

Model refinement Model refinement

Define a high-level corporate data model


Database Architecture
Data Warehouse Usage

• Three kinds of data warehouse applications


– Information processing
• supports querying, basic statistical analysis, and reporting
using crosstabs, tables, charts and graphs
– Analytical processing
• multidimensional analysis of data warehouse data
• supports basic OLAP operations, slice-dice, drilling, pivoting
– Data mining
• knowledge discovery from hidden patterns
• supports associations, constructing analytical models,
performing classification and prediction, and presenting the
mining results using visualization tools.

Database Architecture
Question & Answer Session

Q&A
Database Architecture ‹#›

You might also like