Transcript
Page 1: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data
Page 2: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

OutlineOutline

What is a data warehouse? What is a data warehouse?

A multi-dimensional data modelA multi-dimensional data model

Data warehouse architectureData warehouse architecture

Data warehouse implementationData warehouse implementation

Further development of data cube technologyFurther development of data cube technology

From data warehousing to data miningFrom data warehousing to data mining

Page 3: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Efficient Data Cube ComputationEfficient Data Cube Computation

Data cube can be viewed as a lattice of cuboids Data cube can be viewed as a lattice of cuboids The bottom-most cuboid is the base cuboidThe bottom-most cuboid is the base cuboid The top-most cuboid (apex) contains only one cellThe top-most cuboid (apex) contains only one cell How many cuboids in an n-dimensional cube with L How many cuboids in an n-dimensional cube with L

levels?levels?

Materialization of data cubeMaterialization of data cube Materialize every (cuboid) (full materialization), noneMaterialize every (cuboid) (full materialization), none

(no materialization), or (no materialization), or some (partial materialization)some (partial materialization) Selection of which cuboids to materializeSelection of which cuboids to materialize

Based on size, sharing, access frequency, etc.Based on size, sharing, access frequency, etc.

)11( +∏

==n

i iLT

Page 4: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Cube OperationCube Operation

Cube definition and computation in DMQLCube definition and computation in DMQL

define cube define cube sales[item, city, year]: sum(sales_in_dollars)sales[item, city, year]: sum(sales_in_dollars)

compute cubecompute cube sales sales

Transform it into a SQL-like language (with a new operator Transform it into a SQL-like language (with a new operator cube bycube by, introduced by Gray et al.’96), introduced by Gray et al.’96)

SELECT item, city, year, SUM (amount)SELECT item, city, year, SUM (amount)

FROM SALESFROM SALES

CUBE BYCUBE BY item, city, year item, city, year

Need compute the following Group-BysNeed compute the following Group-Bys ((date, product, customer),date, product, customer),(date,product),(date, customer), (product, customer),(date,product),(date, customer), (product, customer),(date), (product), (customer)(date), (product), (customer)() ()

(item)(city)

()

(year)

(city, item) (city, year) (item, year)

(city, item, year)

Page 5: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Cube Computation: ROLAP-Based MethodCube Computation: ROLAP-Based Method

Efficient cube computation methodsEfficient cube computation methods ROLAP-based cubing algorithms (Agarwal et al’96)ROLAP-based cubing algorithms (Agarwal et al’96) Array-based cubing algorithm (Zhao et al’97)Array-based cubing algorithm (Zhao et al’97) Bottom-up computation method (Bayer & Ramarkrishnan’99)Bottom-up computation method (Bayer & Ramarkrishnan’99)

ROLAP-based cubing algorithms ROLAP-based cubing algorithms Sorting, hashing, and grouping operations are applied to the Sorting, hashing, and grouping operations are applied to the

dimension attributes in order to reorder and cluster related dimension attributes in order to reorder and cluster related

tuplestuples

Grouping is performed on some sub-aggregates as a “partial Grouping is performed on some sub-aggregates as a “partial

grouping step”grouping step”

Aggregates may be computed from previously computed Aggregates may be computed from previously computed

aggregates, rather than from the base fact tableaggregates, rather than from the base fact table

Page 6: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Multi-way Array Aggregation for Cube Multi-way Array Aggregation for Cube ComputationComputation

Partition arrays into chunks (a small sub-cube which fits in memory) Partition arrays into chunks (a small sub-cube which fits in memory)

Compressed sparse array addressing: (chunk_id, offset)Compressed sparse array addressing: (chunk_id, offset)

Compute aggregates in “mul-tiway” by visiting cube cells in the order Compute aggregates in “mul-tiway” by visiting cube cells in the order which minimizes the # of times to visit each cell, and reduces memory which minimizes the # of times to visit each cell, and reduces memory access and storage costaccess and storage cost

What is the best traversing order to do multi-way aggregation?

A

B

29 30 31 32

1 2 3 4

5

9

13 14 15 16

6463626148474645

a1a0

c3c2

c1c 0

b3

b2

b1

b0

a2 a3

C

B

4428 56

4024 52

3620

60

Page 7: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Multi-way Array Aggregation for Multi-way Array Aggregation for Cube ComputationCube Computation

A

B

29 30 31 32

1 2 3 4

5

9

13 14 15 16

6463626148474645

a1a0

c3c2

c1c 0

b3

b2

b1

b0

a2 a3

C

4428 56

4024 52

3620

60

B

Page 8: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Multi-way Array Aggregation for Multi-way Array Aggregation for Cube ComputationCube Computation

A

B

29 30 31 32

1 2 3 4

5

9

13 14 15 16

6463626148474645

a1a0

c3c2

c1c 0

b3

b2

b1

b0

a2 a3

C

4428 56

4024 52

3620

60

B

Page 9: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Multi-Way Array Aggregation for Multi-Way Array Aggregation for Cube Computation (2)Cube Computation (2)

Method: the planes should be sorted and computed Method: the planes should be sorted and computed according to their size in ascending order.according to their size in ascending order.

Study an ExampleStudy an Example Idea: keep the smallest plane in the main memory, fetch and Idea: keep the smallest plane in the main memory, fetch and

compute only one chunk at a time for the largest planecompute only one chunk at a time for the largest plane

Limitation of the method: computing well only for a Limitation of the method: computing well only for a small number of dimensionssmall number of dimensions

If there are a large number of dimensions, “bottom-up If there are a large number of dimensions, “bottom-up computation” and iceberg cube computation methods can be computation” and iceberg cube computation methods can be exploredexplored

Page 10: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Indexing OLAP Data: Bitmap IndexIndexing OLAP Data: Bitmap Index

Index on a particular columnIndex on a particular columnEach value in the column has a bit vector: bit-op is fastEach value in the column has a bit vector: bit-op is fastThe length of the bit vector: # of records in the base tableThe length of the bit vector: # of records in the base tableThe The i i-th bit is set if the -th bit is set if the i i-th row of the base table has the value for -th row of the base table has the value for the indexed columnthe indexed columnnot suitable for high cardinality domainsnot suitable for high cardinality domains

Cust Region TypeC1 Asia RetailC2 Europe DealerC3 Asia DealerC4 America RetailC5 Europe Dealer

RecID Retail Dealer1 1 02 0 13 0 14 1 05 0 1

RecIDAsia Europe America1 1 0 02 0 1 03 1 0 04 0 0 15 0 1 0

Base table Index on Region Index on Type

Page 11: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Indexing OLAP Data: Join IndicesIndexing OLAP Data: Join Indices

Join index: JI(R-id, S-id) where R (R-id, …) Join index: JI(R-id, S-id) where R (R-id, …) S (S-id, …)S (S-id, …)Traditional indices map the values to a list of Traditional indices map the values to a list of record idsrecord ids

It materializes relational join in JI file and speeds It materializes relational join in JI file and speeds up relational join — a rather costly operationup relational join — a rather costly operation

In data warehouses, join index relates the values In data warehouses, join index relates the values of the of the dimensionsdimensions of a start schema to of a start schema to rowsrows in in the fact table.the fact table.

E.g. fact table: E.g. fact table: Sales Sales and two dimensions and two dimensions citycity and and productproductA join index on A join index on citycity maintains for each distinct maintains for each distinct

city a list of R-IDs of the tuples recording the city a list of R-IDs of the tuples recording the Sales in the city Sales in the city

Join indices can span multiple dimensionsJoin indices can span multiple dimensions

Page 12: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Efficient Processing OLAP QueriesEfficient Processing OLAP Queries

Determine which operations should be performed Determine which operations should be performed

on the available cuboids:on the available cuboids: transform drill, roll, etc. into corresponding SQL and/or transform drill, roll, etc. into corresponding SQL and/or

OLAP operations, e.g, dice = selection + projectionOLAP operations, e.g, dice = selection + projection

Determine to which materialized cuboid(s) the Determine to which materialized cuboid(s) the

relevant operations should be applied.relevant operations should be applied.

Exploring indexing structures and compressed vs. Exploring indexing structures and compressed vs. dense array structures in MOLAPdense array structures in MOLAP

Page 13: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Metadata RepositoryMetadata Repository

Meta data is the data defining warehouse objects. It has Meta data is the data defining warehouse objects. It has the following kinds the following kinds

Description of the structure of the warehouseDescription of the structure of the warehouseschema, view, dimensions, hierarchies, derived data defn, data mart schema, view, dimensions, hierarchies, derived data defn, data mart

locations and contentslocations and contents Operational meta-dataOperational meta-data

data lineage (history of migrated data and transformation path), data lineage (history of migrated data and transformation path), currency of data (active, archived, or purged), monitoring information currency of data (active, archived, or purged), monitoring information (warehouse usage statistics, error reports, audit trails)(warehouse usage statistics, error reports, audit trails)

The algorithms used for summarizationThe algorithms used for summarization The mapping from operational environment to the data warehouseThe mapping from operational environment to the data warehouse Data related to system performanceData related to system performance

warehouse schema, view and derived data definitionswarehouse schema, view and derived data definitions Business dataBusiness data

business terms and definitions, ownership of data, charging policiesbusiness terms and definitions, ownership of data, charging policies

Page 14: Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data

Data Warehouse Back-End Tools and Data Warehouse Back-End Tools and UtilitiesUtilities

Data extraction:Data extraction: get data from multiple, heterogeneous, and external sourcesget data from multiple, heterogeneous, and external sources

Data cleaning:Data cleaning: detect errors in the data and rectify them when possibledetect errors in the data and rectify them when possible

Data transformation:Data transformation: convert data from legacy or host format to warehouse formatconvert data from legacy or host format to warehouse format

Load:Load: sort, summarize, consolidate, compute views, check integrity, and sort, summarize, consolidate, compute views, check integrity, and

build indicies and partitionsbuild indicies and partitions

RefreshRefresh propagate the updates from the data sources to the warehousepropagate the updates from the data sources to the warehouse


Top Related