Schema Designs
Schema Designs
Juice 10
as a
Cola function
47
Milk
of time,
30
city and
Cream 12 product
3/1 3/2 3/3 3/4
Date
Approaches to OLAP Servers
Relational OLAP (ROLAP)
• Relational and Specialized Relational DBMS to store and manage warehouse
data
• OLAP middleware to support missing pieces
– Optimize for each DBMS backend
– Aggregation Navigation Logic
– Additional tools and services
• Example: Microstrategy, MetaCube (Informix)
Multidimensional OLAP (MOLAP)
• Array-based storage structures
• Direct access to array data structures
• Example: Essbase (Arbor), Accumate (Kenan)
Domain-specific enrichment
Warehouse Database Schema
ER design techniques not appropriate
Design should reflect multidimensional
view
• Star Schema
• Snowflake Schema
• Fact Constellation Schema
Example of a Star Schema
Order
Product
Order No ProductNO
Order Date ProdName
Fact Table ProdDescr
Customer
OrderNO Category
Customer No CategoryDescription
SalespersonID
Customer Name UnitPrice
CustomerNO
Customer
Address ProdNo Date
City DateKey DateKey
CityName Date
Salesperson
Quantity City
SalespersonID
SalespersonName Total Price
CityName
City
State
Quota
Country
Star Schema
A single fact table and a single table for each dimension
Every fact points to one tuple in each of the dimensions
and has additional attributes
Does not capture hierarchies directly
Generated keys are used for performance and maintenance
reasons
Fact constellation: Multiple Fact tables that share many
dimension tables
• Example: Projected expense and the actual expense may share
dimensional tables
Example of a Snowflake Schema
Order
Product
Order No Category
ProductNO
Order Date ProdName CategoryName
Fact Table
ProdDescr CategoryDescr
Customer
Category
OrderNO
Customer No Category
SalespersonID
Customer Name UnitPrice
Customer CustomerNO
Address Date
ProdNo
Month
City DateKey
DateKey Month
Year
Date
Salesperson CityName Year
Year
Month
SalespersonID Quantity City
SalespersonName State
Total Price CityName
City StateName
State
Quota Country
Country
Snowflake Schema
Represent dimensional hierarchy directly by
normalizing the dimension tables
Easy to maintain
Saves storage, but is alleged that it reduces
effectiveness of browsing (Kimball)
Fact Constellation
Fact Constellation
• Multiple fact tables that share many dimension
tables
• Booking and Checkout may share many
dimension tables in the hotel industry
Promotion
Hotels
Booking
Checkout
Travel Agents Room Type
Customer
Example of a FC Schema
OrderNO Fact Table 2
SalespersonID
CustomerNO
Order
CityName
Quantity Product
Category
Order No ProductNO
Total Price
Order Date ProdName CategoryName
Fact Table 1 ProdDescr CategoryDescr
Customer
Category
OrderNO
Customer No Category
SalespersonID
Customer Name UnitPrice
Customer CustomerNO
Address Date
ProdNo
Month
City DateKey
DateKey Month
Year
Date
Salesperson CityName Year
Year
Month
SalespersonID Quantity City
SalespersonName State
Total Price CityName
City StateName
State
Quota Country
Country