Data cube

HiteshMohapatra 2,887 views 21 slides Sep 10, 2019
Slide 1
Slide 1 of 21
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21

About This Presentation

Data Warehousing and Data mining


Slide Content

Data Cube:
A Multidimensional
Data Model

Example
•Althoughweusuallythinkofcubesas3-Dgeometricstructures,indata
warehousingthedatacubeisn-dimensional.
•Togainabetterunderstandingofdatacubesandthemultidimensional
datamodel,let’sstartbylookingatasimple2-Ddatacubethatis,infact,a
tableorspreadsheetforsalesdatafromAllElectronics.
•Inparticular,wewilllookattheAllElectronicssalesdataforitemssoldper
quarterinthecityofVancouver.
•ThesedataareshowninTable4.2.Inthis2-Drepresentation,thesalesfor
Vancouverareshownwithrespecttothetimedimension(organizedin
quarters)andtheitemdimension(organizedaccordingtothetypesof
itemssold).
•Thefactormeasuredisplayedisdollarssold(inthousands).

2-D

Example
•Now, suppose that we would like to view the sales data with a third
dimension.
•For instance, suppose we would like to view the data according to
time and item, as well as location, for the cities Chicago, New York,
Toronto, and Vancouver.
•These 3-D data are shown in Table 4.3. The 3-D data in the table are
represented as a series of 2-D tables.
•Conceptually, we may also represent the same data in the form of a 3-
D data cube, as in Figure 4.3.

3-D
Inthisway,wemaydisplayanyn-dimensionaldataasaseriesof(n-1)-dimensional“cubes.”Thedata
cubeisametaphorformultidimensionaldatastorage.Theactualphysicalstorageofsuchdatamay
differfromitslogicalrepresentation.Theimportantthingtorememberisthatdatacubesaren-
dimensionalanddonotconfinedatato3-D.

3-D data cube representation

4.4 is often referred to as a cuboid

Lattice

Stars, Snowflakes, and Fact Constellations:
Schemas for Multidimensional Data Models
Themostpopulardatamodelforadatawarehouseisamultidimensional
model,whichcanexistintheformofastarschema,asnowflakeschema,or
afactconstellationschema.Let’slookateachofthese.
•Starschema:Themostcommonmodelingparadigmisthestarschema,in
whichthedatawarehousecontains(1)alargecentraltable(facttable)
containingthebulkofthedata,withnoredundancy,and(2)asetof
smallerattendanttables(dimensiontables),oneforeachdimension.The
schemagraphresemblesastarburst,withthedimensiontablesdisplayed
inaradialpatternaroundthecentralfacttable.

Star schema of sales data warehouse

Snowflakeschema:Thesnowflakeschemaisavariantofthestar
schemamodel,wheresomedimensiontablesarenormalized,thereby
furthersplittingthedataintoadditionaltables.Theresultingschema
graphformsashapesimilartoasnowflake.

Snowflake schema of a sales data warehouse

•Factconstellation:Sophisticatedapplicationsmayrequiremultiple
facttablestosharedimensiontables.Thiskindofschemacanbe
viewedasacollectionofstars,andhenceiscalledagalaxyschemaor
afactconstellation.

Fact constellation schema of a sales and shipping
data warehouse

Dimensions: The Role of Concept Hierarchies
•Aconcepthierarchydefinesasequenceofmappingsfromasetof
low-levelconceptstohigher-level,moregeneralconcepts.
•Consideraconcepthierarchyforthedimensionlocation.Cityvalues
forlocationincludeVancouver,Toronto,NewYork,andChicago.
•Eachcity,however,canbemappedtotheprovinceorstatetowhichit
belongs.
•Forexample,VancouvercanbemappedtoBritishColumbia,and
ChicagotoIllinois.

Example

Hierarchical and lattice structures

A concept hierarchy for price.

Examples of typical OLAP operations on
multidimensional data

A StarnetQuery Model for Querying
Multidimensional Databases

Source