DM 6
DM 6
(CS64120)
Dr. Anshul
(Assistant Professor)
Department of Computer Science & Engineering
NIT Patna, Ashok Rajpath, Bihar-80005
UNIT-II
Introduction to Data Mining
Chapter 4: Data Warehousing and On-line
Analytical Processing
3
Conceptual Modeling of Data Warehouses
4
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 state_or_province
country
avg_sales
Measures
5
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
branch_type
dollars_sold city
city_key
avg_sales city
state_or_province
Measures country
6
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
all all
8
Data Cube Measures: Three Categories
Office Day
Month
10
A Sample Data Cube
Country
sum
Canada
Mexico
sum
all
0-D (apex) cuboid
product date country
1-D cuboids
12
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
◼ Slice and dice: project and select
◼ Pivot (rotate):
◼ reorient the cube, visualization, 3D to series of 2D planes
◼ Other operations
◼ drill across: involving (across) more than one fact table
◼ drill through: through the bottom level of the cube to its
back-end relational tables (using SQL)
13
Typical OLAP
Operations
14
Browsing a Data Cube
◼ Visualization
◼ OLAP capabilities
◼ Interactive manipulation
15
Data Warehousing and On-line Analytical
Processing
16
Design of Data Warehouse: A Business
Analysis Framework
◼ Four views regarding the design of a data warehouse
◼ Top-down view
◼ allows selection of the relevant information necessary for the
data warehouse
◼ Data source view
◼ exposes the information being captured, stored, and
managed by operational systems
◼ Data warehouse view
◼ consists of fact tables and dimension tables
◼ Business query view
◼ sees the perspectives of data in the warehouse from the view
of end-user
17
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
18
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
19
Data Warehousing and On-line Analytical
Processing
20
Efficient Data Cube Computation
◼ Data cube can be viewed as a lattice of cuboids
◼ The bottom-most cuboid is the base cuboid
◼ The top-most cuboid (apex) contains only one cell
◼ How many cuboids in an n-dimensional cube with L
levels? n
T = ( Li +1)
i =1
◼ Materialization of data cube
◼ Materialize every (cuboid) (full materialization),
none (no materialization), or some (partial
materialization)
◼ Selection of which cuboids to materialize
◼ Based on size, sharing, access frequency, etc.
21
The “Compute Cube” Operator
◼ Cube definition and computation in DMQL
define cube sales [item, city, year]: sum (sales_in_dollars)
compute cube sales
◼ Transform it into a SQL-like language (with a new operator cube
by, introduced by Gray et al.’96) ()
SELECT item, city, year, SUM (amount)
FROM SALES (city) (item) (year)
◼ A join index on city maintains for each distinct city a list of R-IDs
24
Indexing OLAP Data: Join Indices
25
OLAP Server Architectures
27
Summary
◼ Data warehousing: A multi-dimensional model of a data warehouse
◼ A data cube consists of dimensions and measures
◼ Star schema, snowflake schema, fact constellations
◼ OLAP operations: drilling, rolling, slicing, dicing and pivoting
◼ Data Warehouse Architecture, Design, and Usage
◼ Multi-tiered architecture
◼ Business analysis design framework
◼ Information processing, analytical processing, data mining, OLAM (Online
Analytical Mining)
◼ Implementation: Efficient computation of data cubes
◼ Partial vs. full vs. no materialization
◼ Indexing OALP data: Bitmap index and join index
◼ OLAP query processing
◼ OLAP servers: ROLAP, MOLAP, HOLAP
28
Thank You
Questions