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

From Tables and Spreadsheets to

Data Cubes
• A data warehouse is based on a multidimensional data model
• A Data warehouse for subject 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
• A data warehouse is based on a multidimensional data model which
views data in the form of a data cube

• In data warehousing literature, another term I introduce is Data


Cubes
Data Cube
• Data warehouse is multidimensional Model
(MDM)
• A better view of this MDM is cube
Ex: subject sales & Dimension Time,
Location, Item

Generalize : 3 dimension to n-dimension


Imp: Remember data cube is n-dimension, only
shape wise it is cube
Cube: A Lattice of Cuboids
• 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.
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
OLAP (On Line Analytical
Processing)
• Warehouses are to analyzing current and historical data of
organization to identify useful patterns and support business
strategies.

• For that one need a complex, interactive, exploratory analysis


of very large datasets created by integrating data from across
all parts of an enterprise; data is fairly static.

• This processing is OLAP

- Contrast such On-Line Analytic Processing


(OLAP) with traditional On-line Transaction
Processing (OLTP): mostly long queries,
instead of short update transactions.
Data Warehouse vs. Operational
DBMS
• OLTP (on-line transaction processing)
– Major task of traditional relational DBMS
– Day-to-day operations: purchasing, inventory, banking,
manufacturing, payroll, registration, accounting, etc.
• OLAP (on-line analytical processing)
– Major task of data warehouse system
– Data analysis and decision making
• Distinct features (OLTP vs. OLAP):
– User and system orientation: customer vs. market
– Data contents: current, detailed vs. historical, consolidated
– Database design: ER + application vs. star + subject
– View: current, local vs. evolutionary, integrated
– Access patterns: update vs. read-only but complex queries
OLAP Queries
• By traditional SQL

How many units of Product A did we sell in the store in Kukatpally in HYDERABAD.

• Traditional tools:report writers,query products,spread sheets,language intreface are

inadeduate

• A common operation is to aggregate a measure over one or more dimensions.

– Find total sales.

– Find total sales for each city, or for each state.

– Find top five products ranked by total sales.

• Rollup and Cube operators

• Include Fig 15.1 , 15.3 Polraj


OLTP versus Warehouse Reporting tools versus
OLAP
Warehouse
Characteristics OLTP Reporting OLAP
Tools

Primary operation Collect Report Analyze

Level of analytical Low Medium High

Data per Very


Small to large Very large
transaction small

Detailed and Summary


Type of data Detailed summary

Must be Current and Current &


Timeliness of data current historical historical
OLTP vs. OLAP
OLTP OLAP
users clerk, IT professional knowledge worker
function day to day operations decision support
DB design application
-oriented subject
-oriented
data current, up
-to-date historical,
detailed, flat relational summarized, multidimension
al
isolated integrated, consolidated
usage repetitive ad-hoc
access read/write lots of scans
index/hash on prim. key
unit of work short, simple transaction complex query
# records accessed tens millions
#users thousands hundreds
DB size 100MB-GB 100GB-TB
metric transaction throughput query throughput, response
Definition
• OLAP is a category of software technology
that enables analysts, managers and
executives to gain insight into data
through fast, consistent, interactive access
to a wide variety of possible views of
information that has been transformed
from raw data to reflect the real
dimensionality of the enterprise
understood by user.
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)
Multi-Tiered Architecture

Monitor
& OLAP Server
other Metadata
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


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

Вам также может понравиться