You are on page 1of 21

Department of Computer Science and Engineering (CSE)

Data Warehousing: Data


Models and OLAP operations

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Data Warehouse Objectives


•Understand needs and concepts of decision support
systems
•Understand concepts of Data Warehouse
•Understand how Data Warehouse is implemented
•Understand concepts of data mining

University Institute of Engineering (UIE) 2


Department of Computer Science and Engineering (CSE)

Student Learning Objectives


•List and describe the key characteristics of data
warehouse
•Use of schemas
•Use of decision support system

University Institute of Engineering (UIE) 3


Department of Computer Science and Engineering (CSE)
Topics Covered
1. Understanding the term “Data Warehousing”

2. Three-tier Decision Support Systems

3. Approaches to OLAP servers

4. Multi-dimensional data model

5. ROLAP

6. MOLAP

7. HOLAP

8. Which to choose: Compare and Contrast

9. Conclusion

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Data Warehouse Architecture

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Three-Tier Decision Support


Systems
• Warehouse database server
• OLAP servers
– (ROLAP
– MOLAP
• Clients
– Query and reporting tools
– Analysis tools
– Data mining tools

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

The Complete Decision Support


System
Information Sources Data Warehouse OLAP Servers Clients
Server (Tier 2) (Tier 3)
(Tier 1)
e.g., MOLAP
Semistructured OLAP
Sources Data
serve
Warehouse
extract Query/Reporting
transform serve
load
refresh e.g., ROLAP
Operationaletc.
Data Mining
DB’s serve

Data Marts
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)

Approaches to OLAP Servers

Three possibilities for OLAP servers


(1) Relational OLAP (ROLAP)
(2) Multidimensional OLAP (MOLAP)
(3) Hybrid OLAP (HOLAP)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

The Multi-Dimensional Data


Model

Store Info Key columns joining fact table


to dimension tables Numerical Measures

Prod Code Time Code Store Code Sales


Fact table for
Product Info measures

Dimension tables
Time Info

...
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)

Star Schema (in RDBMS)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Star Schema Example

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Star Schema
with Sample
Data

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

The “Snowflake” Schema


Store Dimension
STORE KEY District_ID Region_ID
Store Description District Desc. Region Desc.
City Region_ID Regional Mgr.
State
District ID
Region_ID
Regional Mgr.
Store Fact Table
STORE KEY
PRODUCT KEY
PERIOD KEY
Dollars
Units
Price

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Aggregation in a Single Fact Table


Sto re Dim e nsio n Fa c t Ta b le Tim e Dim e nsio n
STORE KEY STORE KEY
PERIOD KEY
Sto re De sc rip tio n PRODUCT KEY
City PERIOD KEY Pe rio d De sc
Sta te Ye a r
Do lla rs Qua rte r
Distric t ID
Units
Distric t De sc . Mo nth
Pric e
Re g io n_ID Da y
Re g io n De sc . Curre nt Fla g
Re g io na l Mg r.
Pro d uc t Dim e nsio n
Re so lutio n
Le ve l PRODUCT KEY Se q ue nc e
Pro d uc t De sc .
Bra nd
Co lo r
Size
Ma nufa c ture r
Le ve l

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)
The “Fact Constellation”
Sto re Dim e nsio n
Schema
Fa c t Ta ble Tim e Dim e nsio n
STORE KEY STORE KEY
PERIOD KEY
Sto re De sc rip tio n PRODUCT KEY
City PERIOD KEY Pe rio d De sc
Sta te Ye a r
Do lla rs Qua rte r
Distric t ID
Units
Distric t De sc . Mo nth
Pric e
Re g io n_ID Da y
Re g io n De sc . Curre nt Fla g
Re g io na l Mg r.
Pro d uc t Dim e nsio n
Se que nc e
PRODUCT KEY
Pro d uc t De sc .
Bra nd District Fact Table
Co lo r Region Fact Table
Size District_ID Region_ID
Ma nufa c ture r
PRODUCT_ PRODUCT_KEY
PERIOD_KEY
KEY
Dollars Dollars
PERIOD_KE
Units Units
YPrice Price

University Institute of Engineering (UIE)


The
Department of Computer Science and Engineering (CSE)
Aggregations using “Snowflake” Schema and Multiple Fact
Tables

St o re Dime ns io n
STORE KEY Dis t ric t _ ID Re g io n_ ID
St o re De s c ript io n Dis t ric t De s c . Re g io n De s c .
Cit y Re g io n_ ID Re g io nal Mg r.
St at e
Dis t ric t ID
Dis t ric t De s c .
Re g io n_ ID
Re g io n De s c .
Re g io nal Mg r.
St o re Fac t Table Dis t ric t Fac t Table Re g io nFac t Table
Region_ID
STORE KEY District_ID
PRODUCT_KEY
PRODUCT_KEY PERIOD_KEY
PRODUCT KEY PERIOD_KEY Do llars
PERIOD KEY Do llars Unit s
Unit s Pric e
Do llars Pric e
Unit s
Pric e

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Aggregation Contd …

St o re Dime ns io n
STORE KEY Dis t ric t _ ID Re g io n_ ID
St o re De s c ript io n Dis t ric t De s c . Re g io n De s c .
Cit y Re g io n_ ID Re g io nal Mg r.
St at e
Dis t ric t ID
Dis t ric t De s c .
Re g io n_ ID
Re g io n De s c .
Re g io nal Mg r.
St o re Fac t Table Dis t ric t Fac t Table Re g io nFac t Table
District_ID Region_ID
STORE KEY PRODUCT_KEY
PRODUCT_KEY PERIOD_KEY
PRODUCT KEY PERIOD_KEY Do llars
PERIOD KEY Do llars Unit s
Unit s Pric e
Do llars Pric e
Unit s
Pric e

Advantage: Queries involing aggregation provide best perfomance

Disadvantage: very much complidated for maintennace

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Aggregates
· Add up amounts for day 1
· In SQL: SELECT sum(amt) FROM SALE
WHERE date = 1

sale prodId storeId date amt


p1 s1 1 12
p2 s1 1 11 81
p1 s3 1 50
p2 s2 1 8
p1 s1 2 44
p1 s2 2 4

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Aggregates
· Add up amounts by day
· In SQL: SELECT date, sum(amt) FROM SALE
GROUP BY date

sale prodId storeId date amt


p1 s1 1 12
p2 s1 1 11 ans date sum
p1 s3 1 50 1 81
p2 s2 1 8 2 48
p1 s1 2 44
p1 s2 2 4

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

References
• http://dimlab.usc.edu/csci599/Fall2002/paper/I2_P064.pdf
– OLAP, Relational, and Multidimensional Database Systems, by George Colliat,
Arbor Software Corporation

• http://www.donmeyer.com/art3.html
– Data warehousing Services, Data Mining & Analysis, LLC

• http://www.cs.man.ac.uk/~franconi/teaching/2001/CS636/CS636-ol
ap.ppt
– Data Warehouse Models and OLAP Operations, by Enrico Franconi

• http://www.promatis.com/mediacenter/papers
- ROLAP, MOLAP, HOLAP: How to determine which to technology is
appropriate, by Holger Frietch, PROMATIS Corporation

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Frequently Asked Questions


1.Who according to you would be the user of OLAP?
2. What does subject-oriented data warehouse signify?
3. List the process that are involved in Data Warehousing?

University Institute of Engineering (UIE)

You might also like