data warehouses and olap - concepts architectures and solutions

361

Upload: usemore

Post on 29-Dec-2015

68 views

Category:

Documents


1 download

DESCRIPTION

fwfwqfwfwq

TRANSCRIPT

Page 1: Data Warehouses and OLAP - Concepts Architectures and Solutions
Page 2: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouses and OLAP: Concepts, Architectures

and Solutions

Robert WrembelPoznań University of Technology, Poland

Christian KonciliaPanoratio GmbH, Germany

IRM PressPublisher of innovative scholarly and professional infor-

mation technology titles in the cyberage

Hershey • London • Melbourne • Singapore

Page 3: Data Warehouses and OLAP - Concepts Architectures and Solutions

��

AcquisitionsEditor: KristinKlingerDevelopmentEditor: KristinRothSeniorManagingEditor: JenniferNeidigManagingEditor: SaraReedAssistantManagingEditor: SharonBergerCopyEditor: AprilSchmidtTypesetter: DianeHuskinsonCoverDesign: LisaTosheffPrintedat: IntegratedBookTechnology

PublishedintheUnitedStatesofAmericabyIRMPress(animprintofIdeaGroupInc.)701E.ChocolateAvenue,Suite200HersheyPA17033-1240Tel:717-533-8845Fax:717-533-8661E-mail:[email protected]:http://www.irm-press.com

andintheUnitedKingdombyIRMPress(animprintofIdeaGroupInc.)3HenriettaStreetCoventGardenLondonWC2E8LUTel:442072400856Fax:442073790609Website:http://www.eurospanonline.com

Copyright©2007byIdeaGroupInc.Allrightsreserved.Nopartofthisbookmaybereproduced,storedordistributedinanyformorbyanymeans,electronicormechanical,includingphotocopying,withoutwrittenpermissionfromthepublisher.

Product or company names used in this book are for identification purposes only. Inclusion of the names of the productsorcompaniesdoesnotindicateaclaimofownershipbyIGIofthetrademarkorregisteredtrademark.

LibraryofCongressCataloging-in-PublicationData

DatawarehousesandOLAP:concepts,architectures,andsolutions/RobertWrembelandChristianKoncilia,editors.p.cm.Summary:“Thisbookprovidesaninsightintoimportantresearchandtechnologicalproblems,solutions,anddevelopment trends in the field of data warehousing and OLAP. It also serves as an up-to-date bibliography of publishedworksforanyoneinterestedincutting-edgeDWandOLAPissues”--Providedbypublisher.Includesbibliographicalreferencesandindex.ISBN1-59904-364-5(hardcover)--ISBN1-59904-365-3(softcover)--ISBN1-59904-366-1(ebook)1.Datawarehousing.2.OLAPtechnology.I.Wrembel,Robert.II.Koncilia,Christian,1969-QA76.9.D37D3922007005.74--dc222006027721BritishCataloguinginPublicationData

ACataloguinginPublicationrecordforthisbookisavailablefromtheBritishLibrary.

Allworkcontributedtothisbookisnew,previously-unpublishedmaterial.Theviewsexpressedinthisbookarethoseoftheauthors,butnotnecessarilyofthepublisher.

Page 4: Data Warehouses and OLAP - Concepts Architectures and Solutions

iii

Data Warehouses and OLAP:Concepts, Architectures

and Solutions

Table of Contents

Foreword........................................................................................................... vi

Preface............................................................................................................. viii

Section.I:.Modeling.and.Designing

Chapter.IConceptual.Modeling.Solutions.for.the.Data.Warehouse............................. 1 Stefano Rizzi, DEIS-University of Bologna, Italy

Chapter.IIHandling.Structural.Heterogeneity.in.OLAP............................................... 27 Carlos A. Hurtado, Universidad de Chile, Chile Claudio Gutierrez, Universidad de Chile, Chile

Chapter.IIIData.Quality-Based.Requirements.Elicitation.for.Decision.Support.Systems............................................................................................................. 58 Alejandro Vaisman, Universidad de Buenos Aires, Argentina

Page 5: Data Warehouses and OLAP - Concepts Architectures and Solutions

iv

Section.II:.Loading.and.Refreshing

Chapter.IVExtraction,.Transformation,.and.Loading.Processes.................................. 88 Jovanka Adzic, Telecom Italia, Italy Valter Fiore, Telecom Italia, Italy Luisella Sisto, Telecom Italia, Italy

Chapter.VData.Warehouse.Refreshment......................................................................111 Alkis Simitsis, National Technical University of Athens, Greece Panos Vassiliadis, University of Ioannina, Greece Spiros Skiadopoulos, University of Peloponnese, Greece Timos Sellis, National Technical University of Athens, Greece

Section III: Efficiency of Analytical Processing

Chapter.VIAdvanced.Ad.Hoc.Star.Query.Processing.................................................. 136 Nikos Karayannidis, National Technical University of Athens, Greece Aris Tsois, National Technical University of Athens, Greece Timos Sellis, National Technical University of Athens, Greece

Chapter.VIIBitmap.Indices.for.Data.Warehouses.......................................................... 157 Kurt Stockinger, Lawrence Berkeley National Laboratory, University of California, USA Kesheng Wu, Lawrence Berkeley National Laboratory, University of California, USA

Chapter.VIIIIndexing.in.Data.Warehouses:.Bitmaps.and.Beyond................................ 179 Karen C. Davis, University of Cincinnati, USA Ashima Gupta, University of Cincinnati, USA

Chapter.IXEfficient and Robust Node-Partitioned Data Warehouses........................ 203 Pedro Furtado, Universidade de Coimbra, Portugal

Chapter.XOLAP with a Database Cluster.................................................................... 230 Uwe Röhm, University of Sydney, Australia

Page 6: Data Warehouses and OLAP - Concepts Architectures and Solutions

v

Chapter.XIToward.Integrating.Data.Warehousing.with.Data.Mining.Techniques... 253 Rokia Missaoui, Université du Québec en Outaouais, Canada Ganaël Jatteau, Université du Québec en Outaouais, Canada Ameur Boujenoui, University of Ottawa, Canada Sami Naouali, Université du Québec en Outaouais, Canada

Chapter.XIITemporal.Semistructured.Data.Models.and.Data.Warehouses................ 277 Carlo Combi, University of Verona, Italy Barbara Oliboni, University of Verona, Italy Chapter.XIIISpatial.Online.Analytical.Processing.(SOLAP):.Concepts,.Architectures,.and.Solutions.from.a.Geomatics.Engineering.Perspective....................... 298 Yvan Bédard, Laval University, Canada Sonia Rivest, Laval University, Canada Marie-Josée Proulx, Laval University, Canada

About the Editors.......................................................................................... 320

About the Authors......................................................................................... 321

Index................................................................................................................ 328

Page 7: Data Warehouses and OLAP - Concepts Architectures and Solutions

vi

Foreword

Datawarehousesystemshavebecomeakeycomponentofthecorporateinforma-tion systemarchitecture, inwhich theyplay a crucial role in building businessdecisionsupportsystems.Bycollectingandconsolidatingdatafromavarietyofenterpriseinternalandexternalsources,datawarehousestrytoprovideahomo-geneousinformationbasisforenterpriseplanninganddecisionmaking.Wehaverecentlywitnessedarapidgrowthbothinthenumberofdatawarehousingproductsandservicesofferedaswellasintheacceptanceofthesetechnologiesbyindustry.Withinrecentyears,datawarehouseshavefacedatremendousshiftfromsimplecentralizedrepositoriesusedtostorecash-registertransactionstoaplatformfordataintegration,federation,andsophisticateddataanalysis.Nowadays,datawarehousingtechnologiesaresuccessfullyusedinmanyindustriesincludingretail,manufactur-ing, financial services, banking, telecommunication, healthcare, and so forth. Data warehousing technology is currently a very active field of research. Research problemsassociatedwithcreating,maintaining,andusingdatawarehousetechnologyare partially similar to those specific for database systems. In fact, a data warehouse canbeconsideredas“large”databasesystemwithadditionalfunctionality.However,thewell-knownproblemsofindexselection,datapartitioning,materializedviewmaintenance,dataintegration,queryoptimization,havereceivedrenewedattentionin warehousing research. Some research problems are specific to data warehousing: dataacquisitionanddatacleaning,datawarehouserefreshment,evolutionofdatawarehouseschema,multidimensionalandparallelqueryoptimization,conceptualmodeling for thedatawarehouses,dataqualitymanagement,andso forth.Thisbookaddressesalltheabovementionedissuesintheareaofdatawarehousingfrommultipleperspectives,intheformofindividualcontributionswrittenbyprominentdatawarehousetechnologyresearchers,anditalsooutlinesnewtrendsandfuturechallengesinthecontextofnextgenerationdatawarehousesystems.

Page 8: Data Warehouses and OLAP - Concepts Architectures and Solutions

vii

In reading the book, I was impressed by how much the field of data warehousing has advancedandmatured.Thebookdescribesdifferentaspectsofdatawarehousingtechnologyandgivesaninsightintoimportantresearch,technological,andpracticalproblemsandsolutionsrelatedtothedatawarehousingtechnology.Thecontentofthebookcoversfundamentalaspectsofdatawarehousingtechnologysuchastheconceptualmodelinganddesignofdatawarehousesystems,datawarehouserefresh-ment,queryoptimization,indexes,integrationofthedatawarehousetechnologywith data mining techniques, and, finally, new trends in data warehousing such as temporalsemistructureddatamodelsandspatialonlineanalyticalprocessing.Iampleasedtorecommendthisbooktothereaders.Ifyouarearesearcher,adatawarehousedeveloper,orjustakeenreaderwishingtounderstandimportantaspectsof data warehouses and their potential, you will find that this book provides both a solid technical background and state-of-the-art knowledgeon this interestingandimportanttopic.Thebookisavaluablesourceofinformationforacademicsand practitioners who are interested in learning the key ideas in the field of data warehousing. This book is likely to become a standard reference in the field of data warehousingformanyyears.

Tadeusz MorzyPoznań University of Technology, PolandJune 2006

Page 9: Data Warehouses and OLAP - Concepts Architectures and Solutions

viii

Preface

Nowadaystheeconomyischaracterizedbyfastandcontinuouslychangingmarketsandbusinessopportunities.Therefore,inordertobesuccessful,itisessentialforanenterprise tomake rightbusinessdecisionsand tomake themfast.Businessdecisionsaretakenonthebasisofanalysesofthepastandcurrentconditionofanenterpriseaswellasmarketanalysisandpredictionsforthefuture.Tothisend,variousbusinessoperationaldatacollectedduringthelifetimeofanenterpriseareanalyzed.Typically,operationaldataarestoredwithinanenterpriseinmultipledatastoragesystems(subsystems)thataregeographicallydistributed,areheterogeneousandautonomous.Theheterogeneityofdatastoragesystemsmeans that theycomefromdifferentsoftwarevendors;theyareimplementedindifferenttechnologies(e.g.,C,C++,.Net,Java,4thgenerationprogramminglanguages);theyofferdifferentfunctionality(e.g.,fully-functional databases, ODBC data sources, spreadsheets, Web pages, text files); theyusedifferentdatamodels(e.g.,relational,object-relational,object-oriented,semistructured) anddifferent storage techniques; they are installedondifferentoperatingsystemsandusedifferentcommunicationprotocols.Theautonomyofdatastoragesystemsimpliesthattheyareoftenindependentfromeachotherandremainunderseparate,independentcontrol;thatis,alocalsystem’sadministratorcandecidewhichlocaldataaretobeaccessiblefromtheoutsideofthesystem.Themanagementofanenterpriserequiresacomprehensiveviewofallaspectsofacompany,thusitrequiresaccesstoallpossibledataofintereststoredinmultiplesubsystems.However,ananalysisofdatastoredindistributed,heterogeneous,andautonomous subsystems is likely to be difficult, slow, and inefficient. Therefore, the abilitytointegrateinformationfrommultipledatasourcesiscrucialfortoday’sbusi-ness.

Page 10: Data Warehouses and OLAP - Concepts Architectures and Solutions

�x

Data.Warehouse.and.OLAP

Oneofthemostimportantapproachestotheintegrationofdatasourcesisbasedonadata warehouse architecture.Inthisarchitecture,datacomingfrommultipleexternal data sources (EDSs) are extracted, filtered, merged, and stored in a central repository,calledadatawarehouse (DW).Dataarealsoenrichedbyhistoricalandsummaryinformation.Fromatechnologicalpointofview,adatawarehouseisahugedatabasefromseveralhundredGBtoseveraldozensofTB.Thankstothisarchitecture,usersoperateonalocal,homogeneous,andcentralizeddatarepositorythatreducesaccesstimetodata.Moreover,adatawarehouseisindependentofEDSsthatmaybetemporarilyunavailable.However,adatawarehousehastobekeptuptodatewithrespecttothecontentofEDSs,bybeingperiodicallyrefreshed.The content of aDW is analyzedby the so calledonline analytical processing(OLAP)applicationsforthepurposeofdiscoveringtrends,patternsofbehavior,andanomalies as well as for finding hidden dependencies between data. The outcomes of theseanalysesare then thebasis formakingvariousbusinessdecisions.Themarketanalysisofdemandandsupplyisoneofimportantstepsintakingstrategicdecisionsinacompany.Likewise,ananalysisofthedevelopmentandcourseofdiseasesaswellastheimpactofdifferentmedicationsonthecourseofillnessesis indispensable in order to choose the most efficient methods of treatment. Many otherapplicationsinclude,amongothers:stockmarket,banking,insurance,energymanagement,andscience.DatawarehousesandOLAPapplicationsarecorecom-ponentsofdecisionsupportsystems.Sincethelate1980s,whenthedatawarehousetechnologydeveloped,mostoflargeandmidsizecompaniesworldwidehavebeenbuildingtheirownDWsintotheirinformationsysteminfrastructuresandhavebeensuccessfullyapplyingthistech-nologyinbusiness.Majorcommerciallyavailabledatabasemanagementsystems(e.g.,Oracle9i/10g,IBMDB2UDB,SybaseIQ,ComputerAssociatesCleverPathOLAP,NCRTeradataDatabase,HyperionEssbaseOLAPServer,MSSQLServer,SAPBusinessWarehouse,SASEnterpriseBIServer)includetheDWandOLAPtechnologiesintheirdatabaseengines.However,despitesomesubstantialachieve-mentsinthistechnology,itstillisandwillbeaveryactiveresearchandtechnologi-cal field. The OLAPReport (2004) estimates that the total worldwide OLAP market constantlygrewfromlessthan$1billionin1994tolessthan$5billionin2005,anditwillgrowupto$6billionin2007.TheMETAGroup’s(currentlyGartner)surveyestimatesthattheOLAPmarketwillbeworthalmost$10billionin2008(EDWMarket,2004).Forthesereasons,itisimportanttounderstandthecoretech-nological issues and challenges in the field of DW and OLAP.

Page 11: Data Warehouses and OLAP - Concepts Architectures and Solutions

x

Technological. and.Research.Challenges

ThesizeofaDW,highcomplexityofOLAPqueriesaswellastheheterogeneousnatureofintegrateddataposeseriousresearchandtechnologicalchallenges.In-tensive research is conducted in several fields, that include, among others: schema designmethodologyandimplementationmodels,dataloadingandDWrefreshingtechniques, efficient query processing, metadata management, and data quality is-sues(cf.Nguyen,Tjoa,&Trujillo,2005).ADWisdesignedforquickdataretrievalbyad-hocqueries.Thesequeriesoftencomputeaggregatesbasedonotheraggregatesbyrollingthemuportheyanalyzedetailsbydrillingtheaggregatesdown.Moreover,dataareanalyzedinthecontextofotherdata,forexample,themonthlysalesofproductsbyparticularshops.Inordertosupportsuchkindsofanalyticalqueries,aDWtypicallyusesamultidimensionaldatamodel(Gyssens&Lakshmanan,1997).Inthismodel,factsrepresentingel-ementarydatabeingthesubjectofanalysisareorganizedinn-dimensionalspaces,calleddatacubes.Ann-dimensionaldatacubecanbeimplementedeitherinMOLAPserversorinROLAPservers.Intheformercase,acubeisstoredeitherinamultidimensionalarrayorinahashtable(e.g.,SQLServer)orasthevalueofabinarylargeobject(e.g.,Oracle)orasanotherspecializeddatastructurelikeQuadtreeorK-Dtree.Inthelattercase,acubeisimplementedasthesetofrelationaltables,someofthemrepresentdimensions,andarecalleddimensiontables,whileothersstorevaluesofmeasures,andarecalledfacttables.TwobasictypesofROLAPschemasareusedfor an implementation of a cube, that is, a star schema and a snowflake schema (Chaudhuri & Dayal, 1997). The efficiency of executing OLAP queries strongly dependsonanimplementationdatamodelandthetypeoftheROLAPschemaused.Therefore,alotofworkisbeingspentondevelopingDWdesignmethods(e.g.,Adamson&Venerable,1998;Kimball,Reeves,Ross,&Thornthwaite,1998;Luján-Mora&Trujillo,2004)andonmodelingdimensions(e.g.,Hurtado&Mendelzon,2002;Letz,Henn&Vossen,2002).HavingdesignedandimplementedaDWonehastoloaditwithdata.TheprocessofloadingdataintoaDWisorganizedintoseveralstepsthatinclude:(1)readingdatafromdatasources,(2)transformingdataintoacommondatamodel,(3)cleansingdatainordertoremoveinconsistencies,duplicates,andnullvalues,(4)integratingcleanseddataintooneset,(5)computingsummaries,and(6)loadingdataintoaDW.Thisprocess,calledETL(Extraction,Translation/Transformation,Loading),isexecutedbyasoftwarelayerlocatedbetweendatasourcesandaDW(Kimball&Caserta,2004;Simitsis,Vassiliadis,Terrovitis,&Skiadopoulos,2005).Thesoftwareincludes:monitorsthatareresponsiblefordetectingandreadingchangesindatasources,wrappersthatareresponsiblefortransformingasourcedatamodelintoacommonDWmodelaswellasanintegratorthatisresponsibleforintegratingdata,cleansingthemandloadingthemintoaDW(Widom,1995).

Page 12: Data Warehouses and OLAP - Concepts Architectures and Solutions

x�

TheinitialloadingintoanemptyDWreadsalldataofinterestfromEDSsandstorestheminaDW.Asthedatasourcesareoperationalsystemsthatareusedeveryday,theircontentchangesfrequently.Asaconsequence,thecontentofaDWbecomesobsoleteandhastoberefreshed.Adatawarehouseisoftenimplementedasthecollectionofmaterializedviews,thustheproblemofaDWrefreshingtransformstotheproblemofmaintainingandrefreshingmaterializedviews.Thisproblemhasbeenextensivelyinvestigatedbytheresearchcommunity(Gupta&Mumick,1999;Roussopoulos,1998)andhasresultedinmultiplealgorithmsforrefreshingmateri-alizedviews.Typically,refreshingamaterializedviewisacostlytask.Inordertooptimizeit,multipleincrementalrefreshingtechniqueshavebeenproposed.Theycanbecategorizedasrefreshingwithaccessingdatasources(e.g.,Ceri&Widom,1991)aswellasself-maintenablerefreshing(e.g.,Samtani,Kumar,&Mohania,1999).Inthelattercase,additionaldatastructuresarestoredinaDWalongwithmaterializedviewsinordertoeliminatetheneedofaccessingdatasources.Theprocessofrefreshingamaterializedviewisusuallyexecutedconcurrentlywithtransactionsondatasourcesandwithuseranalyticalqueries.Suchconcurrentex-ecutionsmayresultininconsistentdatastoredinmaterializedviewsanderroneousresultsofanalyticalqueries.Multiplesolutionsforavoidingtheseproblemshavebeendeveloped,thatis,recomputingaviewfromscratch,applyingcompensationalgorithms,maintainingversions of views, using additional data structures andtransactions(e.g.,Gupta&Mumick,1999;Quass&Widom,1997;Zhuge,Garcia-Molina&Wiener,1996).Yetanotherproblemisrelatedtomaintainingconsistencyofmultipledependentviewsduringtheprocessoftheirrefreshment(e.g.,Colby,Kawaguchi,Lieuwen,Mumick,&Ross,1997;Zhuge,Wiener,&Garcia-Molina,1997).OLAPapplicationsanalyzedatabymeansofcomplexqueriesrangingfromafewto dozens operations of joining, filtering, grouping, and aggregating. Since these queriesareverycomplexandtheyoftenreadterabytesofdata,theirexecutionmaytakedozensofminutes,hours,orevendays.Therefore,akeyissueisthedataware-house efficiency. Well developed solutions to this problem are based on materialized viewsandqueryrewritingaswellasonadvancedindexstructures.A challenging issue within the first solution concerns the selection of such a set of materializedviewsthat:(1)willbeusedforoptimizingthegreatestpossiblenumberofthemostexpensivequeriesand(2)whosemaintenancewillnotbecostly.Severalresearchworkshaveaddressedthisproblemandtheyhaveproposedmultiplealgo-rithmsforselectingoptimalsetsofmaterializedviewsforagivenqueryworkload(e.g.,deSousa&Sampaio,1999;Gupta,1997;Theodoratos&Xu,2004).A specific characteristic of OLAP queries that typically join fact tables with multiple dimension tables as well as a specific distribution of values in fact tables requires differentindexingschemes.ThreekindsofindexeshavebeendevelopedinordertooptimizeOLAPqueries,namely,joinindexes,bitmapindexes,andbitmapjoinindexes(e.g.,Aouiche,Darmont,&Boussaïd,2005;O’Neil&Graefe,1995;Valdu-riez, 1987; Wu, Otoo, & Shoshani, 2004). The efficiency of executing OLAP queries

Page 13: Data Warehouses and OLAP - Concepts Architectures and Solutions

x��

canalsobeincreasedbyparallelprocessinganddatapartitioningtechniques(e.g.,Furtado,2004;Rao,Zhang,Magiddo,&Lohman,2002;Stöhr&Rahm,2001).TheETLandrefreshingprocessesmayinserterroneousorinconsistentdataintoaDW.Asaconsequence,useranalyseswillproduceconfusingorwrongresults.That,inturn,mayresultindisastrousbusinessdecisionsmadebydecisionmakers.Forthesereasons,researchfocusedalsoonmeasuringandassuringdataquality(e.g.,Jarke,Jeusfeld,Quix,&Vassiliadis,1998;Vassiliadis,Bouzeghoub,&Quix,1999).Foralongperiodoftime,theexistingDWtechnologieshavetacitlyassumedthataDWistimeinvariant;thatis,itsschemaandthestructureofdimensionsdonotchangeduringaDWlifetime.Inpractice,however,aDWstructurechangesastheresultoftheevolutionofEDSs(Rundensteiner,Koeller,&Zhang,2000),changesoftherealworldrepresentedbyaDW,newuserrequirements,aswellasthecreationofsimulationenvironments,tolistthemostcommoncases.SeveralapproachestohandlingchangesinDWshavebeendeveloped.TheyarecategorizedassupportingDW evolution (e.g., Blaschka, Sapia, & Höfling, 1999), temporal extensions (e.g., Hurtado,Mendelson,&Vaisman,1999;Eder,Koncilia,&Morzy,2002),simulation(e.g.,Balmin,Papadimitriou,&Papakonstanitnou,2000)aswellasversioning(e.g.,Body,Miquel,Bédard,&Tchounikine,2002;Golfarelli,Lechtenbörger,Rizzi,&Vossen,2004;Morzy&Wrembel,2004).In order to work properly and efficiently, all the above mentioned issues and tech-niquesneedtousemetadata.ManagingvarioustypesofmetadatainDWsalsohasreceiveda lotofattentionresulting inwidelyaccepted industrystandardCWM(OMG,2003;Vetterli,Vaduva,&Staudt,2000),supportedbymajorDWsoftwarevendors.Despitethecontinuousdevelopmentinthedatawarehousingtechnologythathaslastedforemorethan20years,itisstillaveryactiveareaofresearch.Althoughmostofthediscussedresearchandtechnologicalachievementshavebeenincorpo-ratedintovariouscommercialdatabase/datawarehousemanagementsystems,thediscussedissuesarestillbeinginvestigatedandthealreadyimplementedtechnolo-giesarebeingfurtherimproved.

Further.Development.Directions

Thealreadymaturetechnologiesdiscussedintheprevioussectionarecontinuouslybeingdevelopedbutnewareasofresearchandnewchallengesappearonthescene.Thesenewissuescomefromvariousnovel information technologiesapplied torealbusiness.Nowadays,hugeamountsofdataarestoredinvariousWebsystems,typicallyintheXMLformat.Thesedataarecrucialforbusinessand,therefore,thereisaneed

Page 14: Data Warehouses and OLAP - Concepts Architectures and Solutions

x���

toanalyzetheminasimilarwayasintraditionalDWs.ThisrequirementledtoseveralattemptstobuilddatawarehousesfromWebdatasources(e.g.,Golfarelli,Rizzi,&Vrdoljak,2001)andtoprovideOLAPfunctionalityforXMLdocuments(e.g.,Nassis,Rajugan,Dillon,&Rahayu,2005;Park,Han,&Song,2005).Advancedimageprocessingtechnologiesmaketheuseofimagesandmapseasierandmorecommon,forexample,GoogleMapsandNASAEarthObservingSys-temDataandInformationSystem(EOSDIS).InordertouseinformationhiddeninthiskindofdataauserneedsatechnologythatcombinesthefunctionalityofGeographicalInformationSystemswiththefunctionalityofdatawarehousesandOLAP.Tothisend,thesocalledSpatialOLAPsystemsarebeingdeveloped(e.g.,Stefanovic,Han,&Koperski,2000).Last but not least, our environment is becoming gradually filled with different kinds of sensors, for example, monitoring the intensity of traffic, controlling physical parametersoftechnologicalprocesses,andmonitoringpatients’vitalsigns.Sensorsproducestreamsofdatathathavetobeanalyzed,oftenonline.Streamdataarrivealsofromothersources,forexample,aclick-streamformontheInternet,sharesfromastockmarket,andtransmissionsignalsintelecommunications.Streamdataare characterized by a continuous flow, requiring huge storage space. In order to reduce thespace,historicaldataarestoredassummariesor samples.Typically,incomingstreamdataneedtobecontinuouslyanalyzed.Thisleadstochallengesin(1)queryingstreamsonline,(2)queryingbothhistoricalsummarized/sampleddataandjustincomingdata,aswellas(3)quicklyaccessingdata,thatis,indexing.SomesubstantialachievementshavealreadybeendoneinthisareaandsomeattemptshavebeenmadetowardsimplementingDWsforstreamdata(Stream,2006).Asitcanbeclearlyobserved,therearemultiplekindsofdatawarehouses(rela-tional,XML,spatial,stream)storingdataofdifferentformatsandofferingdifferentfunctionality.UsersofthesetechnologiesareofteninterestedincombiningdatacomingfrommultipleDWs.ThisrequirementleadstotheproblemofintegratingheterogeneousDWs(Torlone&Panella,2005).

Book Objectives

Thegoalofthisbookistoprovideaninsightintoimportantresearchandtechno-logical problems, solutions, and development trends in the field of data warehous-ingandOLAP.Thecontentofthebookencompassesimportantaspectsofthesetechnologies,fromaDWdesigningandimplementing,viadataintegration,loading,andDWrefreshing,advancedqueryoptimizationtechniques,tonewareasofDWapplication.Assuch,thebook:

Page 15: Data Warehouses and OLAP - Concepts Architectures and Solutions

xiv

• Providesthecurrentstateoftheresearchandtechnologyintheaforementioneddomains,

• Constitutesaresourceofpossiblesolutionsandtechnologiesthatcanbeap-pliedwhendesigning,implementing,anddeployingaDW,and

• Servesasanup-to-datebibliographyofpublishedworksforanyoneinterestedincutting-edgeDWandOLAPissues.

Sincethebookcoversawiderangeoftechnical,technological,andresearchissuesconcerningDWandOLAPtechnologies,itisintendedfordatawarehousedesign-ers, administrators, programmers, andprojectmanagers. It offers themabetterunderstandingofchallenges,possiblesolutions,andadvancedapplicationsofthesetechnologies.Moreover,technicalaspectscoveredinthebookwillsuitthecontentsofmanyDWcoursesofferedatuniversitiesbothinEuropeandintheU.S.Forthisreason,thebookcanbeausefulresourceforstudentsaswell.

Structure.of. the.Book

Thebodyofthebookconsistsof13chaptersdividedintofoursections.Eachofthesectionsaddressesaparticularresearchandtechnologicalarea,namely:

• Modelinganddesigning,• Loadingandrefreshing,• Efficiency of analytical processing, and • Advancedtechnologiesandapplications.

SectionIaddressesissuesconcerningoneoftheinitialstepsinthewholelifecycleof a datawarehouse, namely, requirements analysis, conceptualmodeling, anddesigning.Thissectionconsistsofthreechapters.Chapter I,Conceptual Modeling Solutions for the Data Warehouse, byStefanoRizzi,focusesonaconceptualmodelingthatprovidesabstractrepresentationsofwarehousingprocess, data structures, and architectures.The aimof conceptualmodelingistoassurethatamodelisindependentofanimplementation.Theauthorconcentratesonaconceptualgraphicalmodelcalledthedimensional fact model (DFM)thatwasdevelopedtosupportmultidimensionalmodeling.TherepresentationoftherealityconstructedusingtheDFMconsistsofthesetoffact schemata.Thebasicconceptsofthemodelincludefacts,measures,dimensions,andhierarchies.TheDFMsuitsthevarietyofmodelingsituationsthatmaybeencounteredinrealprojectsofsmalltolargecomplexity.Thechapterprovidesacomprehensivesetof

Page 16: Data Warehouses and OLAP - Concepts Architectures and Solutions

xv

solutionsforconceptualmodelingaccordingtotheDFMandservesaDWdesignerasapracticalguideforapplyingdifferentmodelingsolutions.ThechapterprovidesalsoafoundationfortherestofthebookasitdiscussesfundamentalconceptsusedintheDWtechnology,amongothers:multidimensionalmodeling;dimensionsandtheirattributes;andshared,incomplete,recursive,anddynamichierarchies.Chapter II,Handling Structural Heterogeneity in OLAP, byCarlosA.HurtadoandClaudioGutierrez,goesbeyondtheDFMmodelanditfocusesonmodelingdimensionsthatmayhavedifferentstructures;thatis,theyareheterogeneous.Suchdimensionsarecreatedastheresultofmixingmultipledimensionswithdifferentstructuresintoasingledimension.Inthechapter,theauthorsshowhowtoincorpo-ratestructuralheterogeneityinthedesignofOLAPmodels,explainwhystructuralheterogeneityweakensaggregatenavigation,surveydifferenttechniquestodealwithheterogeneity,presentaclassofdimensionintegrityconstraintstomodelstructuralheterogeneity,anddemonstratethepracticalapplicationofdimensionconstraintstosupportaggregatenavigation.Chapter III, Data Quality-Based Requirements Elicitation for Decision Support Systems,byAlejandroVaisman,presentsaDWdesignmethodthatsupportscom-pleteandconsistentelicitationoffunctionalandnonfunctionalrequirements.Func-tionalrequirementstakeintoconsiderationqueriesissuedinapplications,whereasnonfunctionalrequirementscomprisedatastructuresanddataquality.Theauthorarguesthattraditionaldesignmethodsforrequirementselicitationareinappropriatein the field of decision support systems, and presents the so called DSS-METRIQ method.Theoutcomesofthemethodarethesetofrequirementdocumentsandthespecification of the operational data sources that can satisfy user requirements. The chapter contains also the state-of-the-art in the field of requirements elicitation and designmethods.SectionII.addresses theproblemsrelated to loadingdata intoadatawarehouseandkeeping the content of aDWup to date.This section is composedof twochapters.ChapterIV,Extraction, Transformation, and Loading Processes,byJovankaAdzic,ValterFiore,andLuisellaSisto,isanexperiencereportontheapplicationoftheETLprocesstorealworldcases.ThemainfocusofthischapterisondesigningETLprocessesforhighdataloadingfrequency,forlargevolumesofloadeddata,andforcomplexdataprocessing/transformations.Inthiscontext,theauthorsidentifythemostcommoncriticalissuesandconstraintsthathaveanimpactondesigningtheETLprocesses.AstheETLdesignsolution,theauthorsproposetoapplyalayeredinfrastructure.TheinfrastructureiscomposedoftypicallyusedfunctionalitiesandservicesintheETLscenarioanditisabasisforbuildingvariousapplications.Theinfrastructure includes, among others: DBMS access modules, file access modules, parallelread/writemodules,anddataprocessingmodules.Theauthorsalsodiscussandgivepracticalsuggestionsonimplementationissuesincludingdatabaseparti-tioningoptions,parallelprocessing,andpipelininginthecontextofETL.

Page 17: Data Warehouses and OLAP - Concepts Architectures and Solutions

xvi

ChapterV,Data Warehouse Refreshment, byAlkisSimitsis, PanosVassiliadis,Spiros Skiadopoulos, and Timos Sellis, focuses on methods for designing efficient workflows of tasks within ETL processes. The features that make ETL challenging include,amongothers:hugedatavolumes,assuringthequalityofdata,assuringhigh performance, adapting workflows after changes in data sources, and changes inadatawarehouseitself.Asaresponsetothesechallenges,theauthorsproposeamodelingapproach/frameworkanditsexamplaryapplicationfortheconstructionof ETL workflows. This approach is based on the life cycle of the ETL processes. Thelifecycleconsistsoffourphases:reverseengineeringandrequirementscoll-ection;logicaldesign;tuningandphysicaldesign;andsoftwareconstruction.Theaimofthepresentedframeworkistofacilitate,manage,andoptimizethedesignand implementation of the ETL workflows in order to create an optimal workflow. TheframeworksupportsallthephasesofETLdesign,fromtheinitialdesigntoadeploymentstageandutilization,undercontinuousevolutionofadatawarehouse.Thechaptercontainsalsoacomprehensivestateoftheartoncommerciallyavail-able tools and research achievements in the field of ETL. SectionIII.describes challenges and solutions to the problem of assuring the effi-ciencyofanalyticalprocessing.Fundamentalresearchandtechnologicalsolutionstothisproblemincludeoptimizationtechniquesofstarqueries,indexing,partition-ing,andclustering.ChapterVI,Advanced Ad Hoc Star Query Processing, byNikosKarayannidis,Aris Tsois, and Timos Sellis, focuses on efficient processing of OLAP queries. OLAPapplicationsrelyheavilyonthesocalledstarqueriesthatjoinfacttableswithmultipledimensiontables.ReducingexecutiontimeofsuchjoinsiscrucialforaDWperformance.Tothisend,anewapproachtofacttableorganizationhasbeendeveloped,calledahierarchicalclustering.Thehierarchicalclusteringallowsclusteringoffactdataaccordingtopathsindimensionhierarchies.Thisclusteringtechniqueexploitspath-basedsurrogatekeys.Inthecontextofhierarchicalcluster-ing,starqueryprocessingchangesradically.Inthischapter,theauthorspresentacompleteabstractprocessingplanthatcapturesallthenecessarystepsinevaluatingstarqueriesoverhierarchicallyclusteredfacttables.Furthermore,theauthorsdis-cussissuesonoptimizingstarquerieswithinthecontextoftheabstractprocessingplan and they define the abstract operations in terms of physical operations over theCUBEFiledatastructure.ChapterVII,Bitmap Indices for Data Warehouses,byKurtStockingerandKesh-engWu,overviewstheissuesrelatedtoaspecialkindofindexusedforoptimizingOLAPqueries,namely,thebitmapindex.Typically,bitmapindexesworkwellforattributesof lowcardinalitysincethe indexesaresmallforsuchatrributes.Thehighercardinalityofanindexedattribute,thelargersizeofabitmapindex.Inordertoreducethesizesofbitmapindexesvarioustechniquesareused.Thischapterover-viewssuchtechniques,namely,encoding,compression,andbinninganditfocusesonaparticularcompressiontechniquecalledaword-aligned-hybridcompression.

Page 18: Data Warehouses and OLAP - Concepts Architectures and Solutions

xvii

Moreover,theauthorspresentmultipleexperimentalresultscomparingdifferentencodingtechniquesandshowingthecharacteristicsoftheword-aligned-hybridcompression.Theresultsindicatethatforhighcardinalityattributescompressedbitmapindexesalsooffergoodindexcharacteristicswithrespecttotheirsizesandqueryresponsetimes.ChapterVIII,Indexing in Data Warehouses: Bitmaps and Beyond,byKarenC.Davis andAshimaGupta, elaborates furtheron the issuespresented inChapterVII.Inthischaptertheauthorsfocusonanalternativeencodingtechniquethatisbasednotonlyonvaluesofindexedattributesbutalsoonanadditionalknowledgederivedfromqueries.Thisknowledgeisusedforconstructingthesocalledpropertymaps,eachofwhichdescribespropertiesofindexedattributes.Thecharacteristicsofpropertymapswithrespecttoqueryprocessingisthemaincontributionofthischapter.Additionally,thechaptercontainsaconciseoverviewofdifferentkindsofbitmapindexes.Chapter IX,Efficient and Robust Node-Partitioned Data Warehouses, byPedroFurtado, addresses the problem of running large data warehouses efficiently on lowcostplatforms.Inordertoachievethisgoal,theauthorproposestopartitionadatawarehouseovermultipleservers(nodes)inanetwork.Suchapartitioningmaycauseotherchallengesinassuringdataavailabilityaswellasdistributedanalyticalqueryoptimization.Inthischaptertheauthorshowshowtousereplicasforthepurposeofdesigningarobustdatawarehousepartitioningstrategythatguaranteesefficient OLAP processing and data availability. The author also concentrates on data partitioning strategies as well as on efficient parallel join processing and query transformations.ChapterX,OLAP with a Database Cluster,byUweRöhm,presentsclustereddatawarehousearchitectureasanalternativetotheapproachdiscussedinChapterIX.Theclusteredarchitectureisbasedonaclusterofcommercialoff-the-shelfcomput-ersashardwareinfrastructurethatrunoff-the-shelfdatabasemanagementsystemsastransactionalstoragemanagers.Inthisarchitecture,thesamedatamaybedis-tributedoverseveralnodesbyusingreplicationmechanisms.Asaconsequence,somereplicasmaybeoutofdate.Inordertohandlequeriesonoutdateddata,theauthorproposesanapproach toreplicationmanagement,calledfreshness-awarescheduling, that introduces a newquality-of-service parameter.This parameterallows the specification of an explicit freshness limit in queries having an impact onreplicasusedinthesequeries.Basedonthevalueofquality-of-serviceaquerymayberoutedtothemostappropriatenode.Multiplequeryroutingstrategiesandphysicaldatadesignalternativesarealsodiscussedinthischapter.SectionIV.focusesonnewdomainsforapplyingthedatawarehouseandOLAPtechnologies.These novel domains pose newchallenges, amongothers in datamodeling techniques, assuring analytical processing efficiency as well as in data storage/organizationtechniques.ChapterXI,Towards Integrating Data Warehousing with Data Mining Techniques,byRokiaMissaoui,GanaëlJatteau,AmeurBoujenoui,andSamiNaouali,addresses

Page 19: Data Warehouses and OLAP - Concepts Architectures and Solutions

xviii

problemsandpresentssolutionsforcouplingdatawarehousinganddataminingtechnologies. The work aims at developing an approach for flexible and efficient answertodataminingqueriesaddressedeithertoarelationaloramultidimensionaldatabase. The authors investigate the two following techniques. The first one ex-ploitslatticebasedminingalgorithmsforgeneratingfrequentcloseditemsetsfrommultidimensionaldata.Thesecondtechniqueusesnewoperators,similarinspirittotheOLAPones,inordertosupportdataminingondemand.Thesenewoperatorsworkingonconceptlatticesincludeprojection,selection,andassembly.ChapterXII,Temporal Semistructured Data Models and Data Warehouses, byCarloCombiandBarbaraOliboni,extendstheapplicationoftheDWtechnologytosemistructureddatathatmayevolveintime.Inordertostoreandanalyzedataofthiskind,theauthorsproposeagraph-basedtemporalsemistructureddatamodel.Inthismodel,semistructureddataarerepresentedasalabeledgraphwithcomplexnodesrepresentingabstractentities,simplenodesrepresentingprimitivevaluesaswellaswithedgesconnectingnodes.Labelsareassociatedwithnodesandedges.Temporalaspectsofdataarehandledbyincludingvalidtimeintervalsinlabels.Inordertoassuretheconsistencyofthismodel,theauthorsproposetwokindsofintegrityconstraints,namely,basicanddomain-dependentones.Basicconstraintshave to be satisfied by every graph, whereas domain-dependent constraints can be defined either for some specific nodes and edges or for the whole graph for a specific application domain. ChapterXIII,Spatial Online Analytical Processing (SOLAP): Concepts, Architec-tures, and Solutions from a Geomatics Engineering Perspective,byYvanBédard,SoniaRivest,andMarie-JoséeProulx,makesthereaderfamiliarwithchallengesrelatedtoanalyzingspatialdatawithinthesocalledframeworkofspatialOLAP.ThechapteroutlinestheparticularitiesofspatialdataandpresentsthestateoftheartofspatialOLAPapplications.Themainpartofthechapterdiscussestheconcepts,issues,challenges,andsolutionsrelatedtospatialOLAP.ThisvaluablediscussionresultsfromtheexperienceoftheauthorswithbuildingacommerciallyavailablespatialOLAPsystem.

Robert WrembelPoznań, Poland

Christian KonciliaMunich, Germany

June 2006

Page 20: Data Warehouses and OLAP - Concepts Architectures and Solutions

x�x

References

Adamson,C.,&Venerable,M. (1998).Data warehouse design solutions. JohnWiley&Sons.

Aouiche,K.,Darmont,J.,&Boussaïd,O.(2005).Automaticselectionofbitmapjoinindexesindatawarehouse.InA.MinTjoa&J.Trujillo(Eds.),International Conference on Data Warehousing and Knowledge Discovery (LNCS3589,pp.64-73).SpringerVerlag.

Balmin,A.,Papadimitriou,T.,&Papakonstanitnou,Y.(2000).HypotheticalqueriesinanOLAPenvironment.InA.ElAbbadi,etal.(Eds.),International Confer-ence on Very Large Data Bases(pp.220-231).MorganKaufmann.

Blaschka, M., Sapia, C., & Höfling, G. (1999). On schema evolution in multidimen-sionaldatabases.InM.K.Mohania&A.MinTjoa(Eds.),Data warehousing and knowledge discovery(LNCS1676,pp.153-164).Springer-Verlag.

Body,M.,Miquel,M.,Bédard,Y.,&Tchounikine,A.(2002).AmultidimensionalandmultiversionstructureforOLAPapplications.InD.Theodoratos(Ed.),ACM International Workshop on Data Warehousing and OLAP (pp. 1-6).ACMPress.

Ceri, S.,&Widom, J. (1991).Deriving production rules for incremental viewmaintenance.InG.M.Lohmanetal.(Eds.),International Conference on Very Large Data Bases(pp.577-589).MorganKaufmann.

Chaudhuri,S.,&Dayal,U.(1997).AnoverviewofdatawarehousingandOLAPtechnology.SIGMOD Record, 26(1),65-74.

Colby,L.S.,Kawaguchi,A.,Lieuwen,D.F.,Mumick,I.S.,&Ross,K.A.(1997).Supportingmultipleviewmaintenancepolicies.InJ.Peckham(Ed.),ACM SIGMOD International Conference on Management of Data(pp.405-416).ACMPress.

de Sousa, M. F., & Sampaio, M. C. (1999). Efficient materialization and use of viewsindatawarehouses.SIGMOD Record, 28(1),78-83.

Eder,J.,Koncilia,C.,&Morzy,T.(2002).TheCOMETmetamodelfortemporaldatawarehouses.InA.BanksPidduck,etal.(Eds.),International Conference CAiSE(LNCS2348,pp.83-99).Springer-Verlag.

EDWMarket. (2004). The evolving enterprise data warehouse market: Part 1. Retrieved June 15, 2006, from http://www.teradata.com/t/pdf.aspx?a=83673&b=118524

Furtado,P.(2004).Workload-basedplacementandjoinprocessinginnode-parti-tioneddatawarehouses.InY.Kambayashi,etal.(Eds.),International Con-ference on Data Warehousing and Knowledge Discovery(LNCS3181,pp.38-47).Springer-Verlag.

Page 21: Data Warehouses and OLAP - Concepts Architectures and Solutions

xx

Golfarelli,M.,Lechtenbörger,J.,Rizzi,S.,&Vossen,G.(2004).Schemaversion-ingindatawarehouses.InS.Wang,etal.(Eds.),Conceptual Modeling for Advanced Application Domains, ER 2004 Workshops(LNCS3289,pp.415-428).Springer-Verlag.

Golfarelli,M.,Rizzi,S.,&Vrdoljak,B.(2001).DatawarehousedesignfromXMLsources.InJ.Hammer(Ed.),ACM International Workshop on Data Warehous-ing and OLAP(pp.40-47).ACMPress.

Gupta,H.(1997).Selectionofviewstomaterialiseinadatawarehouse.InF.N.Afrati&P.G.Kolaitis(Eds.),Database theory: ICDT(LNCS1186,pp.98-112).Springer-Verlag.

Gupta,A.,&Mumick,I.S.(Eds.).(1999).Materialized views: Techniques, imple-mentations, and applications.MITPress.

Gyssens,M.,&Lakshmanan,L.V.S.(1997).Afoundationformulti-dimensionaldatabases.InM.Jarke,etal.(Eds.),International Conference on Very Large Data Bases(pp.106-115).MorganKaufmannPublishers.

Hurtado,C.,&Mendelzon,A.(2002).OLAPdimensionconstraints.InL.Popa(Ed.),ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems(pp.169-179).ACMPress.

Hurtado,C.A.,Mendelzon,A.O.,&Vaisman,A.A.(1999).Maintainingdatacubesunderdimensionupdates.InProceedings of theInternational Conference on Data Engineering(pp.346-355).IEEEComputerSocietyPress.

Jarke,M., Jeusfeld,M.A.,Quix,C.,&Vassiliadis,P. (1998).Architecture andqualityindatawarehouses.InB.Pernici&C.Thanos(Eds.),International Conference on Advanced Information Systems Engineering(LNCS1413,pp.93-113).Springer-Verlag.

Kimball,R.,&Caserta,J.(2004).The data warehouse ETL tookit.JohnWiley&Sons.

Kimball,R.,Reeves,L.,Ross,M.,&Thornthwaite,W.(1998).The data warehouse lifecycle toolkit.JohnWiley&Sons.

Letz,C.,Henn,E.T.,&Vossen,G.(2002).Consistencyindatawarehousedimen-sions.InM.A.Nascimento,etal.(Eds.),International Database Engineering & Applications Symposium(pp.224-232).IEEEComputerSocietyPress.

Luján-Mora,S.,&Trujillo,J.(2004).PhysicalmodelingofdatawarehousesusingUML.InK.Davis&M.Ronthaler(Eds.),ACM International Workshop on Data Warehousing and OLAP(pp.48-57).ACMPress.

Morzy,T.,&Wrembel,R.(2004).Onqueryingversionsofmultiversiondataware-house.InK.Davis&M.Ronthaler(Eds.),ACM International Workshop on Data Warehousing and OLAP(pp.92-101).ACMPress.

Nassis,V.,Rajugan,R.,Dillon,T.S.,&Rahayu,J.W.(2005).Arequirementengi-neeringapproachfordesigningXML-viewdriven,XMLdocumentwarehous-

Page 22: Data Warehouses and OLAP - Concepts Architectures and Solutions

xx�

es.InProceedings of theInternational Computer Software and Applications Conference (COMPSAC)(pp.388-395).IEEEComputerSocietyPress.

Nguyen,T.M.,MinTjoa,A.,&Trujillo,J.(2005).Datawarehousingandknowledgediscovery:Achronologicalviewofresearchchallenges.InA.MinTjoa&J.Trujillo(Eds.),Data warehousing and knowledge discovery(LNCS3589,pp.530-535).Springer-Verlag.

OLAPReport.(2004).Market share analysis.RetrievedJune15,2006,fromhttp://www.olapreport.com/Market.htm

OMG (Object Management Group). (2003). Common warehouse metamodel specification, v1.1.RetrievedJune15,2006,fromhttp://www.omg.org/cgi-bin/doc?formal/03-03-02

O’Neil,P.,&Graefe,G.(1995).Multi-tablejoinsthroughbitmappedjoinindices.SIGMOD Record, 24(3),8-11.

Park,B.K.,Han,H.,&SongI.Y.(2005).XML-OLAP:AmultidimensionalanalysisframeworkforXMLwarehouses.InA.MinTjoa&J.Trujillo(Eds.),Data warehousing and knowledge discovery (LNCS3589,pp.32-42).Springer-Verlag.

Quass,D.,&Widom,J.(1997).On-linewarehouseviewmaintenance.InJ.Peckham(Ed.),ACM SIGMOD International Conference on Management of Data(pp.393-404).ACMPress.

Rao, J., Zhang,C.,Megiddo,N.,&Lohman,G. (2002).Automating physicaldatabasedesigninaparalleldatabase.InM.J.Franklinetal.(Eds.),ACM SIGMOD International Conference on Management of Data(pp.558-569).ACMPress.

Roussopoulos,N.(1998).Materializedviewsanddatawarehouses.SIGMOD Re-cord, 27(1),21-26.

Rundensteiner,E.,Koeller,A.,&Zhang,X.(2000).Maintainingdatawarehousesoverchanginginformationsources.Communications of the ACM, 43(6),57-62.

Samtani,S.,Kumar,V.,&Mohania,M.(1999).Selfmaintenanceofmultipleviewsindatawarehousing.InProceedings of theACM CIKM International Conference on Information and Knowledge Management(pp.292-299).ACMPress.

Simitsis,A.,Vassiliadis,P.,Terrovitis,M.,&Skiadopoulos,S.(2005).Graph-basedmodelingofETLactivitieswithmulti-leveltransformationsandupdates.InA.MinTjoa&J.Trujillo(Eds.),International Conference on Data Warehousing and Knowledge Discovery(LNCS3589,pp.43-52).Springer-Verlag.

Stefanovic,N.,Han,J.,&Koperski,K.(2000).Object-basedselectivematerializa-tion for efficient implementation of spatial data cubes. IEEE Transactions on Knowledge and Data Engineering, 12(6),938-958.

Page 23: Data Warehouses and OLAP - Concepts Architectures and Solutions

xx��

Stöhr,T.,&Rahm,E.(2001).WARLOCK:Adataallocationtoolforparallelware-houses.InP.M.G.Apersetal.(Eds.),International Conference on Very Large Data Bases(pp.721-722).MorganKaufmann.

Stream. (2006).Stanford Stream Data Manager.RetrievedJune15,2006, fromhttp://hake.stanford.edu/stream/

Torlone,T.,&Panella,I.(2006).Designanddevelopmentofatoolforintegratingheterogeneousdatawarehouses. InA.MinTjoa&J.Trujillo (Eds.),Datawarehousingandknowledgediscovery(LNCS3589,pp.105-114).Springer-Verlag.

Theodoratos,D.,&Xu,W.(2004).Constructingsearchspaceformaterializedviewselection.InK.Davis&M.Ronthaler(Eds.),ACM International Workshop on Data Warehousing and OLAP(pp.48-57).ACMPress.

Valduriez,P.(1987).Joinindices.ACM Transactions on Database Systems (TODS), 12(2),218-246.

Vassiliadis,P.,Bouzeghoub,M.,&Quix,C.(1999).Towardsquality-orienteddatawarehouseusageandevolution.InM.Jarke&A.Oberweis(Eds.),Interna-tional Conference CAiSE(LNCS1626,pp.164-179).Springer-Verlag.

Vetterli,T.,Vaduva,A.,&Staudt,M.(2000).Metadatastandardsfordatawarehous-ing:Open informationmodel vs. commonwarehousemetadata.SIGMOD Record, 29(3),68-75.

Widom,J.(1995).Researchproblemsindatawarehousing.InProceedings of the Fourth International Conference on Information and Knowledge Management(pp.25-30).ACMPress.

Wu,K.,Otoo,E.J.,&Shoshani,A.(2004).Ontheperformanceofbitmapindicesforhighcardinalityattributes.InM.A.Nascimentoetal.(Eds.),International Conference on Very Large Data Bases(pp.24-35).MorganKaufmann.

Zhuge,Y.,Garcia-Molina,H.,&Wiener,J.L.(1996).Thestrobealgorithmsformulti-sourcewarehouse consistency. InProceedings of the Conference on Parallel and Distributed Information Systems(pp.146-157).IEEEComputerSocietyPress.

Zhuge,Y.,WienerJ.,Garcia-Molina,H.(1997):Multipleviewconsistencyfordatawarehousing.InW.A.Gray&P.A.Larson(Eds.),International Conference on Data Engineering(pp.289-300).IEEEComputerSocietyPress.

Page 24: Data Warehouses and OLAP - Concepts Architectures and Solutions

xx���

Acknowledgments

Theeditorswouldliketoacknowledgethehelpofallinvolvedinthereviewprocessofthebook.Thereviewersprovidedcomprehensive,critical,andconstructivecomments.Withouttheirsupporttheprojectcouldnothavebeensatisfactorilycompleted.

List.of.ReviewersBartosz Bębel, Poznań University of Technology, PolandMauricio Minuto Espil, Pontificia Universidad Católica, ArgentinaPedroFurtado,UniversityofCoimbra,SpainMatteoGolfarelli,UniversityofBologna,ItalyCarlosHurtado,UniversidaddeChile,ChileStanisław Kozielski, Silesian University of Technology, PolandJensLechtenbörger,UniversityofMünster,GermanySergioLujánMora,UniversityofAlicante,SpainChristophMayer,OFFIS,GermanyDieterMitsche,ETHZurich,SwitzerlandStefanoRizzi,UniversityofBologna,ItalyKurtStockinger,UniversityofCalifornia,USADavidTaniar,MonashUniversity,Australia

Page 25: Data Warehouses and OLAP - Concepts Architectures and Solutions

xxiv

AlejandroVaisman,UniversidaddeBuenosAires,ArgentinaMarek Wojciechowski, Poznań University of Technology, Poland

SpecialthanksalsogotothepublishedteamatIdeaGroupInc.Inparticular,toJanTraversandMehdiKhosrow-Pourwhogaveustheopportunitytopublishthebook.Thankyoualsotoourdevelopmenteditor,KristinRoth,whoassistedusthroughtheprocessofeditingthebook.

Robert WrembelPoznań, Poland

Christian KonciliaMunich, Germany

June 2006

Page 26: Data Warehouses and OLAP - Concepts Architectures and Solutions

xxv

Section I

ModelingandDesigning

Page 27: Data Warehouses and OLAP - Concepts Architectures and Solutions

xxvi

Page 28: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse �

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.I

Conceptual.Modeling.Solutions.for.the.Data.Warehouse

Stefano RizziDEIS-University of Bologna, Italy

Abstract

In the context of data warehouse design, a basic role is played by conceptual mod-eling, that provides a higher level of abstraction in describing the warehousing process and architecture in all its aspects, aimed at achieving independence of implementation issues. This chapter focuses on a conceptual model called the DFM that suits the variety of modeling situations that may be encountered in real projects of small to large complexity. The aim of the chapter is to propose a comprehensive set of solutions for conceptual modeling according to the DFM and to give the de-signer a practical guide for applying them in the context of a design methodology. Besides the basic concepts of multidimensional modeling, the other issues discussed are descriptive and cross-dimension attributes; convergences; shared, incomplete, recursive, and dynamic hierarchies; multiple and optional arcs; and additivity.

Page 29: Data Warehouses and OLAP - Concepts Architectures and Solutions

� Rizzi

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Introduction

Operational databases are focused on recording transactions, thus they are prevalently characterized by an OLTP (online transaction processing) workload. Conversely, data warehouses (DWs) allow complex analysis of data aimed at decision support; the workload they support has completely different characteristics, and is widely known as OLAP (online analytical processing). Traditionally, OLAP applications are based on multidimensional modeling that intuitively represents data under the metaphor of a cube whose cells correspond to events that occurred in the business domain (Figure 1). Each event is quantified by a set of measures; each edge of the cube corresponds to a relevant dimension for analysis, typically associated to a hierarchy of attributes that further describe it. The multidimensional model has a twofold benefit. On the one hand, it is close to the way of thinking of data analyz-ers, who are used to the spreadsheet metaphor; therefore it helps users understand data. On the other hand, it supports performance improvement as its simple structure allows designers to predict the user intentions.Multidimensional modeling and OLAP workloads require specialized design tech-niques. In the context of design, a basic role is played by conceptual modeling that provides a higher level of abstraction in describing the warehousing process and architecture in all its aspects, aimed at achieving independence of implementation issues. Conceptual modeling is widely recognized to be the necessary foundation for building a database that is well-documented and fully satisfies the user require-

Figure 1. The cube metaphor for multidimensional modeling

Page 30: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse �

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ments;usually,itreliesonagraphicalnotationthatfacilitateswriting,understand-ing,andmanagingconceptualschematabybothdesignersandusers.Unfortunately, in the field of data warehousing there still is no consensus about a formalismforconceptualmodeling(Sen&Sinha,2005).Theentity/relationship(E/R)modeliswidespreadintheenterprisesasaconceptualformalismtoprovidestandarddocumentationforrelationalinformationsystems,andagreatdealofef-forthasbeenmadetouseE/Rschemataastheinputfordesigningnonrelationaldatabasesaswell (Fahrner&Vossen,1995);nevertheless,asE/Risoriented tosupport queries that navigate associations between data rather than synthesizethem,itisnotwellsuitedfordatawarehousing(Kimball,1996).Actually,theE/RmodelhasenoughexpressivitytorepresentmostconceptsnecessaryformodelingaDW;ontheotherhand,initsbasicform,itisnotabletoproperlyemphasizethekeyaspectsofthemultidimensionalmodel,sothatitsusageforDWsisexpensivefromthepointofviewofthegraphicalnotationandnotintuitive(Golfarelli,Maio,&Rizzi,1998).Somedesignersclaimtousestarschemataforconceptualmodeling.Astar schemaisthestandardimplementationofthemultidimensionalmodelonrelationalplat-forms; it is just a (denormalized) relational schema, so it merely defines a set of relationsandintegrityconstraints.Usingthestarschemaforconceptualmodelingislikestartingtobuildacomplexsoftwarebywritingthecode,withoutthesup-portofandstatic,functional,ordynamicmodel,whichtypicallyleadstoverypoorresultsfromthepointsofviewofadherencetouserrequirements,ofmaintenance,andofreuse.Forallthesereasons,inthelastfewyearstheresearchliteraturehasproposedseveraloriginalapproachesformodelingaDW,somebasedonextensionsofE/R,someonextensionsofUML.Thischapterfocusesonanadhocconceptualmodel,thedimensional fact model (DFM), that was first proposed in Golfarelli et al. (1998) and continuously enriched and refined during the following years in order to optimally suitthevarietyofmodelingsituationsthatmaybeencounteredinrealprojectsofsmalltolargecomplexity.TheaimofthechapteristoproposeacomprehensivesetofsolutionsforconceptualmodelingaccordingtotheDFMandtogiveapracticalguideforapplyingtheminthecontextofadesignmethodology.Besidesthebasicconceptsofmultidimensionalmodeling,namelyfacts,dimensions,measures,andhierarchies,theotherissuesdiscussedaredescriptiveandcross-dimensionattributes;convergences;shared,incomplete,recursive,anddynamichierarchies;multipleandoptionalarcs;andadditivity.Afterreviewingtherelated literature in thenextsection, in the thirdandfourthsections,weintroducetheconstructsofDFMforbasicandadvancedmodeling,re-spectively. Then, in the fifth section we briefly discuss the different methodological approachestoconceptualdesign.Finally,inthesixthsectionweoutlinetheopenissuesinconceptualmodeling,andinthelastsectionwedrawtheconclusions.

Page 31: Data Warehouses and OLAP - Concepts Architectures and Solutions

� R�zz�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Related.Literature

Inthecontextofdatawarehousing,theliteratureproposedseveralapproachestomultidimensionalmodeling.Someofthemhavenographicalsupportandareaimedatestablishingaformalfoundationforrepresentingcubesandhierarchiesaswellasanalgebraforqueryingthem(Agrawal,Gupta,&Sarawagi,1995;Cabibbo&Torlone,1998;Datta&Thomas,1997;Franconi&Kamble,2004a;Gyssens&Lakshmanan,1997;Li&Wang,1996;Pedersen&Jensen,1999;Vassiliadis,1998);sincewebelievethatadistinguishingfeatureofconceptualmodelsisthatofprovid-ingagraphicalsupporttobeeasilyunderstoodbybothdesignersanduserswhendiscussingandvalidatingrequirements,wewillnotdiscussthem.Theapproachesto“strict”conceptualmodelingforDWsdevisedsofararesum-marized inTable1.Foreachmodel, the tableshows if it isassociated tosomemethodforconceptualdesignandifitisbasedonE/R,isobject-oriented,orisanadhocmodel.ThediscussionaboutwhetherE/R-based,object-oriented,oradhocmodelsarepreferableiscontroversial.SomeclaimthatE/Rextensionsshouldbeadoptedsince(1)E/Rhasbeentestedforyears;(2)designersarefamiliarwithE/R;(3)E/Rhasproven flexible and powerful enough to adapt to a variety of application domains; and(4)severalimportantresearchresultswereobtainedfortheE/R(Sapia,Blas-chka, Hofling, & Dinter, 1998; Tryfona, Busborg, & Borch Christiansen, 1999). On theother hand, advocates of object-orientedmodels argue that (1) they aremoreexpressiveandbetterrepresentstaticanddynamicpropertiesofinformationsystems;(2)theyprovidepowerfulmechanismsforexpressingrequirementsandconstraints;(3)object-orientationiscurrentlythedominanttrendindatamodeling;and (4) UML, in particular, is a standard and is naturally extensible (Abelló, Samos, &Saltor,2002;Luján-Mora,Trujillo,&Song,2002).Finally,webelievethatadhocmodelscompensateforthelackoffamiliarityfromdesignerswiththefactthat(1)theyachievebetternotationaleconomy;(2)theygiveproperemphasistothepeculiaritiesofthemultidimensionalmodel,thus(3)theyaremoreintuitiveand

E/Rextension object-oriented adhoc

nomethod

FranconiandKamble(2004b);

Sapiaetal.(1998);Tryfonaetal.(1999)

Abelló et al. (2002);Nguyen,Tjoa,andWagner

(2000)Tsoisetal.(2001)

method Luján-Moraetal.(2002) Golfarellietal.(1998);Hüsemannetal.(2000)

Table 1. Approaches to conceptual modeling

Page 32: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse �

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

readablebynonexpertusers.Inparticular,theycanmodelsomeconstraintsrelatedtofunctionaldependencies(e.g.,convergencesandcross-dimensionalattributes)inasimplerwaythanUML,thatrequirestheuseofformalexpressionswritten,forinstance,inOCL.AcomparisonofthedifferentmodelsdonebyTsois,Karayannidis,andSellis(2001)pointedoutthat,abstractingfromtheirgraphicalform,thecoreexpressivityissimi-lar. In confirmation of this, we show in Figure 2 how the same simple fact could be modeledthroughanE/Rbased,anobject-oriented,andanadhocapproach.

Figure 2. The SALE fact modeled through a starER (Sapia et al., 1998), a UML class diagram (Luján-Mora et al., 2002), and a fact schema (Hüsemann, Lechtenbörger, & Vossen, 2000)

Page 33: Data Warehouses and OLAP - Concepts Architectures and Solutions

� R�zz�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

The.Dimensional.Fact.Model:............Basic.Modeling

Inthischapterwefocusonanadhocmodelcalledthedimensionalfactmodel.TheDFM is a graphical conceptual model, specifically devised for multidimensional modeling,aimedat:

• Effectivelysupportingconceptualdesign• Providing an environment on which user queries can be intuitively ex-

pressed• Supporting the dialogue between the designer and the end users to refine the

specification of requirements• Creatingastableplatformtogroundlogicaldesign• Providinganexpressiveandnon-ambiguousdesigndocumentation

TherepresentationofrealitybuiltusingtheDFMconsistsofasetoffact schemata.Thebasicconceptsmodeledarefacts,measures,dimensions,andhierarchies.Inthe following we intuitively define these concepts, referring the reader to Figure 3 thatdepictsasimplefactschemaformodelinginvoicesatlinegranularity;aformaldefinition of the same concepts can be found in Golfarelli et al. (1998).

Definition 1: Afactisafocusofinterestforthedecision-makingprocess;typically,itmodelsasetofeventsoccurringintheenterpriseworld.A

Figure 3. A basic fact schema for the INVOICE LINE fact

Page 34: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse �

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

factisgraphicallyrepresentedbyaboxwithtwosections,oneforthefactnameandoneforthemeasures.

Examplesoffactsinthetradedomainaresales,shipments,purchases,claims;inthe financial domain: stock exchange transactions, contracts for insurance policies, grantingofloans,bankstatements,creditcardspurchases.Itisessentialforafacttohavesomedynamicaspects,thatis,toevolvesomehowacrosstime.

Guideline.1:Theconceptsrepresentedinthedatasourcebyfrequently-updated archives are good candidates for facts; those represented byalmost-staticarchivesarenot.

Asamatteroffact,veryfewthingsarecompletelystatic;eventherelationshipbetweencitiesandregionsmightchange,ifsomeborderwererevised.Thus,thechoiceoffactsshouldbebasedeitherontheaverageperiodicityofchanges,oronthe specific interests of analysis. For instance, assigning a new sales manager to a salesdepartmentoccurslessfrequentlythancouplingapromotiontoaproduct;thus,whiletherelationshipbetweenpromotionsandproductsisagoodcandidatetobemodeledasafact,thatbetweensalesmanagersanddepartmentsisnot—exceptforthepersonnelmanager,whoisinterestedinanalyzingtheturnover!

Definition 2:Ameasureisanumericalpropertyofafact,anddescribesoneofitsquantitativeaspectsofinterestsforanalysis.Measuresarein-cludedinthebottomsectionofthefact.

Forinstance,eachinvoicelineismeasuredbythenumberofunitssold,thepriceperunit,thenetamount,andsoforth.Thereasonwhymeasuresshouldbenumeri-calisthattheyareusedforcomputations.Afactmayalsohavenomeasures,iftheonlyinterestingthingtoberecordedistheoccurrenceofevents;inthiscasethefactschemeissaidtobeemptyandistypicallyqueriedtocounttheeventsthatoccurred.

Definition 3: Adimension is a fact property with a finite domain and describesoneofitsanalysiscoordinates.Thesetofdimensionsofafactdetermines its finest representation granularity. Graphically, dimensions arerepresentedascirclesattachedtothefactbystraightlines.

Typicaldimensionsfortheinvoicefactareproduct,customer,agent,anddate.

Page 35: Data Warehouses and OLAP - Concepts Architectures and Solutions

� R�zz�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Guideline.2:Atleastoneofthedimensionsofthefactshouldrepresenttime,atanygranularity.

Therelationshipbetweenmeasuresanddimensionsisexpressed,attheinstancelevel,bytheconceptofevent.

Definition 4:Aprimary eventisanoccurrenceofafact,andisidenti-fied by a tuple of values, one for each dimension. Each primary event is describedbyonevalueforeachmeasure.

Primaryeventsaretheelementalinformationwhichcanberepresented(inthecubemetaphor,theycorrespondtothecubecells).Intheinvoiceexampletheymodeltheinvoicingofoneproducttoonecustomermadebyoneagentononeday;itisnotpossibletodistinguishbetweeninvoicespossiblymadewithdifferenttypes(e.g.,active,passive,returned,etc.)orindifferenthoursoftheday.

Guideline.3:.Ifthegranularityofprimaryeventsasdeterminedbythesetofdimensionsiscoarserthanthegranularityoftuplesinthedatasource,measures should be defined as either aggregations of numerical attributes inthedatasource,orascountsoftuples.

Remarkably, some multidimensional models in the literature focus on treatingdimensionsandmeasuressymmetrically(Agrawaletal.,1995;Gyssens&Lak-shmanan,1997).Thisisanimportantachievementfromboththepointofviewofthe uniformity of the logical model and that of the flexibility of OLAP operators. Neverthelessweclaimthat,ataconceptuallevel,distinguishingbetweenmeasuresand dimensions is important since it allows logical design to be more specifically aimed at the efficiency required by data warehousing applications.Aggregation is the basic OLAP operation, since it allows significant information usefulfordecisionsupporttobesummarizedfromlargeamountsofdata.Fromaconceptualpointofview,aggregationiscarriedoutonprimaryeventsthankstothedefinition of dimension attributes and hierarchies.

Definition 5:Adimension attribute is a property, with a finite domain, of adimension.Likedimensions,itisrepresentedbyacircle.

Forinstance,aproductisdescribedbyitstype,category,andbrand;acustomer,byitscityanditsnation.Therelationshipsbetweendimensionattributesareexpressedbyhierarchies.

Page 36: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse �

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Definition 6: Ahierarchyisadirectedtree,rootedinadimension,whosenodesareallthedimensionattributesthatdescribethatdimension,andwhosearcsmodelmany-to-oneassociationsbetweenpairsofdimensionattributes.Arcsaregraphicallyrepresentedbystraightlines.

Guideline 4:Hierarchiesshouldreproducethepatternofinterattributefunctionaldependenciesexpressedbythedatasource.

Hierarchies determine how primary events can be aggregated into secondaryevents and selected significantly for the decision-making process. The dimension in which a hierarchy is rooted defines its finest aggregation granularity, while the other dimension attributes define progressively coarser granularities. For instance, thankstotheexistenceofamany-to-oneassociationbetweenproductsandtheircategories,theinvoicingeventsmaybegroupedaccordingtothecategoryoftheproducts.

Definition 7:Given a set of dimension attributes, each tupleof theirvalues identifies a secondary eventthataggregatesallthecorrespondingprimaryevents.Eachsecondaryeventisdescribedbyavalueforeachmeasurethatsummarizesthevaluestakenbythesamemeasureinthecorrespondingprimaryevents.

Weclosethissectionbysurveyingsomealternativeterminologyusedeitherintheliteratureorinthecommercialtools.Thereissubstantialagreementonus-ingthetermdimensionstodesignatethe“entrypoints”toclassifyandidentifyevents;whilewe refer inparticular to the attributedetermining theminimumfactgranularity,sometimesthewholehierarchiesarenamedasdimensions(forinstance,theterm“timedimension”oftenreferstothewholehierarchybuiltondimensiondate).Measuresaresometimescalledvariablesormetrics.Finally,insomedatawarehousingtools,thetermhierarchydenoteseachsinglebranchofthetreerootedinadimension.

The.Dimensional.Fact.Model:............Advanced.Modeling

Theconstructsweintroduceinthissection,withthesupportofFigure4,aredescrip-tiveandcross-dimensionattributes;convergences;shared,incomplete,recursive,

Page 37: Data Warehouses and OLAP - Concepts Architectures and Solutions

�0 Rizzi

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

anddynamichierarchies;multipleandoptionalarcs;andadditivity.Thoughsomeofthemarenotnecessaryinthesimplestandmostcommonmodelingsituations,theyarequiteusefulinordertobetterexpressthemultitudeofconceptualshadesthatcharacterizereal-worldscenarios.Inparticularwewillseehow,followingtheintroduction of some of this constructs, hierarchies will no longer be defined as trees tobecome,inthegeneralcase,directedgraphs.

Descriptive Attributes

Inseveralcasesitisusefultorepresentadditionalinformationaboutadimensionattribute,thoughitisnotinterestingtousesuchinformationforaggregation.Forinstance,theusermayaskforknowingtheaddressofeachstore,buttheuserwillhardlybeinterestedinaggregatingsalesaccordingtotheaddressofthestore.

Definition 8:Adescriptive attribute specifies a property of a dimension attribute,towhichisrelatedbyanx-to-oneassociation.Descriptiveat-tributesarenotusedforaggregation;theyarealwaysleavesoftheirhi-erarchyandaregraphicallyrepresentedbyhorizontallines.

Therearetwomainreasonswhyadescriptiveattributeshouldnotbeusedforag-gregation:

Guideline. 5:A descriptive attribute either has a continuously-valueddomain(forinstance,theweightofaproduct),orisrelatedtoadimen-sionattributebyaone-to-oneassociation(forinstance,theaddressofacustomer).

Cross-Dimension Attributes

Definition 9: Across-dimension attributeisa(eitherdimensionordescrip-tive)attributewhosevalueisdeterminedbythecombinationoftwoormoredimensionattributes,possiblybelongingtodifferenthierarchies.Itisdenotedbyconnectingthroughacurvelinethearcsthatdetermineit.

Forinstance,iftheVATonaproductdependsonboththeproductcategoryandthestatewheretheproductissold,itcanberepresentedbyacross-dimensionattributeasshowninFigure4.

Page 38: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Convergence

Considerthegeographichierarchyondimensioncustomer(Figure4):customersliveincities,whicharegroupedintostatesbelongingtonations.Supposethatcustom-ersaregroupedintosalesdistrictsaswell,andthatnoinclusionrelationshipsexistbetweendistrictsandcities/states;ontheotherhand,salesdistrictsnevercrossthenationboundaries.Inthiscase,eachcustomerbelongstoexactlyonenationwhich-everofthetwopathsisfollowed(customer → city → state → nation or customer → sales district → nat�on).

Definition 10:Aconvergencetakesplacewhentwodimensionattributeswithinahierarchyare connectedby twoormorealternativepathsofmany-to-oneassociations.Convergencesarerepresentedbylettingtwoormorearcsconvergeonthesamedimensionattribute.

Theexistenceofapparentlyequalattributesdoesnotalwaysdetermineaconver-gence.Ifintheinvoicefactwehadabrand cityattributeontheproducthierarchy,representingthecitywhereabrandismanufactured,therewouldbenoconvergencewithattribute(customer) city,sinceaproductmanufacturedinacitycanobviouslybesoldtocustomersofothercitiesaswell.

Figure 4. The complete fact schema for the INVOICE LINE fact

Page 39: Data Warehouses and OLAP - Concepts Architectures and Solutions

�2 Rizzi

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Optional.Arcs

Definition 11:Anoptional arcmodelsthefactthatanassociationrepre-sented within the fact scheme is undefined for a subset of the events. An optionalarcisgraphicallydenotedbymarkingitwithadash.

Forinstance,attributediettakesavalueonlyforfoodproducts;fortheotherprod-ucts, it is undefined. Inthepresenceofasetofoptionalarcsexitingfromthesamedimensionattribute,theircoveragecanbedenotedinordertoposeaconstraintontheoptionalitiesin-volved.LikeforIS-AhierarchiesintheE/Rmodel,thecoverageofasetofoptionalarcsischaracterizedbytwoindependentcoordinates.Letabeadimensionattribute,andb1,...,bmbeitschildrenattributesconnectedbyoptionalarcs:

• Thecoverageistotalifeachvalueofaalwayscorrespondstoavalueforatleastoneofitschildren;conversely,ifsomevaluesofaexistforwhichallofits children are undefined, the coverage is said to be partial.

• Thecoverageisdisjointifeachvalueofacorrespondstoavaluefor,atmost,oneofitschildren;conversely,ifsomevaluesofaexistthatcorrespondtovaluesfortwoormorechildren,thecoverageissaidtobeoverlapped.

Thus,overall,therearefourpossiblecoverages,denotedbyT-D,T-O,P-D,andP-O.Figure4showsanexampleofoptionalityannotatedwithitscoverage.Weassumethatproductscanhavethreetypes:food,clothing,andhousehold,sinceexpirationdate and size are defined only for, respectively, food and clothing, the coverage is partialanddisjoint.

Multiple.Arcs

Inmostcases,asalreadysaid,hierarchiesincludeattributesrelatedbymany-to-oneassociations.Ontheotherhand,insomesituationsitisnecessarytoincludealsoat-tributesthat,forasinglevaluetakenbytheirfatherattribute,takeseveralvalues.

Definition 12: Amultiple arc isanarc,withinahierarchy,modelingamany-to-manyassociationbetweenthetwodimensionattributesitconnects.Graphically,itisdenotedbydoublingthelinethatrepresentsthearc.

Page 40: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Considerthefactschemamodelingthesalesofbooksinalibrary,representedinFigure5,whosedimensionsaredateandbook.Userswillprobablybeinterestedinanalyzingsalesforeachbook author;ontheotherhand,sincesomebookshavetwoormoreauthors,therelationshipbetweenbookandauthormustbemodeledasamultiplearc.

Guideline.6:Inpresenceofmany-to-manyassociations,summarizabil-ityisnolongerguaranteed,unlessthemultiplearcisproperlyweighted.Multiplearcsshouldbeusedsparinglysince,inROLAPlogicaldesign,theyrequirecomplexsolutions.

Summarizabilityisthepropertyofcorrectingsummarizingmeasuresalonghierar-chies(Lenz&Shoshani,1997).Weightsrestoresummarizability,buttheirintro-duction is artificial in several cases; for instance, in the book sales fact, each author ofamultiauthoredbookshouldbeassignedanormalizedweightexpressingher“contribution”tothebook.

Shared.Hierarchies

Sometimes,largeportionsofhierarchiesarereplicatedtwiceormoreinthesamefactschema.Atypicalexampleisthetemporalhierarchy:afactfrequentlyhasmorethanonedimensionoftypedate,withdifferentsemantics,anditmaybeusefultodefine on each of them a temporal hierarchy month-week-year.Anotherexamplearegeographic hierarchies, that may be defined starting from any location attribute in thefactschema.Toavoidredundancy,theDFMprovidesagraphicalshorthandfordenotinghierarchysharing.Figure4showstwoexamplesofsharedhierarchies.FactINVOICE LINEhastwodatedimensions,withsemantics invoice dateandorderdate,

Figure 5. The fact schema for the SALES fact

Page 41: Data Warehouses and OLAP - Concepts Architectures and Solutions

�4 Rizzi

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

respectively.Thisisdenotedbydoublingthecirclethatrepresentsattributedateandspecifyingtworolesinvoiceandorderontheenteringarcs.Thesecondsharedhierarchyistheoneonagent,thatmayhavetworoles:theorderingagent,thatisadimension,andtheagentwhoisresponsibleforacustomer(optional).

Guideline.8:Explicitlyrepresentingsharedhierarchiesonthefactschemaisimportantsince,duringROLAPlogicaldesign,itenablesadhocsolu-tionsaimedatavoidingreplicationofdataindimensiontables.

Ragged.Hierarchies

Leta1,...,an be a sequence of dimension attributes that define a path within a hier-archy(suchascity,state,nat�on).Uptonowweassumedthat,foreachvalueofa1,exactlyonevalueforeveryotherattributeonthepathexists.Inthepreviouscase,thisisactuallytrueforeachcityintheU.S.,whileitisfalseformostEuropeancountries where no decomposition in states is defined (see Figure 6).

Definition 13: Aragged (orincomplete) hierarchyisahierarchywhere,forsomeinstances, the values of one or more attributes are missing (since undefined or un-known).Araggedhierarchyisgraphicallydenotedbymarkingwithadashtheat-tributeswhosevaluesmaybemissing.

AsstatedbyNiemi(2001),withinaraggedhierarchyeachaggregationlevelhaspreciseandconsistentsemantics,butthedifferenthierarchyinstancesmayhavedifferentlengthsinceoneormorelevelsaremissing,makingtheinterlevelrelation-shipsnotuniform(thefatherof“SanFrancisco”belongstolevelstate,thefatherof“Rome”tolevelnat�on).Thereisanoticeabledifferencebetweenaraggedhierarchyandanoptionalarc.Inthe first case we model the fact that, for some hierarchy instances, there is no value foroneormoreattributesin any position of the hierarchy.Conversely,throughan

Figure 6. Ragged geographic hierarchies

Page 42: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

optionalarcwemodelthefactthatthereisnovalueforanattributeand for all of its descendents.

Guideline.9:.Raggedhierarchiesmayleadtosummarizabilityproblems.Awayforavoidingthemistofragmentafactintotwoormorefacts,eachincludingasubsetofthehierarchiescharacterizedbyuniforminterlevelrelationships.

Thus,intheinvoiceexample,fragmenting INVOICE LINEintoU.S. INVOICE LINE andE.U. INVOICE LINE (the first with the stateattribute,thesecondwithoutstate)restoresthecompletenessofthegeographichierarchy.

Unbalanced Hierarchies

Definition 14: Anunbalanced (orrecursive)hierarchy is ahierarchywhere, though interattribute relationshipsareconsistent, the instancesmayhavedifferentlength.Graphically,itisrepresentedbyintroducingacyclewithinthehierarchy.

Atypicalexampleofunbalancedhierarchyistheonethatmodelsthedependenceinterrelationshipsbetweenworkingpersons.Figure4includesanunbalancedhierar-chy on sale agents: there are no fixed roles for the different agents, and the different “leaf”agentshaveavariablenumberofsupervisoragentsabovethem.

Guideline.10:.RecursivehierarchiesleadtocomplexsolutionsduringROLAP logicaldesign and topoorqueryingperformance.Away foravoidingthemisto“unroll”themforagivennumberoftimes.

Forinstance,intheagentexample,iftheuserstatesthattwoisthemaximumnumberofinterestinglevelsforthedependencerelationship,thecustomerhierarchycouldbetransformedasinFigure7.

Dynamic.Hierarchies

Timeisakeyfactorindatawarehousingsystems,sincethedecisionprocessisoftenbasedontheevaluationofhistoricalseriesandonthecomparisonbetweensnapshotsoftheenterprisetakenatdifferentmoments.Themultidimensionalmodelsimplicitlyassumethattheonlydynamiccomponentsdescribedinacubearetheeventsthat

Page 43: Data Warehouses and OLAP - Concepts Architectures and Solutions

�6 Rizzi

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

instantiateit;hierarchiesaretraditionallyconsideredtobestatic.Ofcoursethisisnotcorrect:salesmanageralternate,thoughslowly,ondifferentdepartments;newproductsareaddedeveryweektothosealreadybeingsold;theproductcategorieschange, and their relationship with products change; sales districts can be modified, andacustomermaybemovedfromonedistricttoanother.1

Theconceptualrepresentationofhierarchydynamicityisstrictlyrelatedtoitsimpactonuserqueries.Infact,inpresenceofadynamichierarchywemaypicturethreedifferenttemporalscenariosforanalyzingevents(SAP,1998):

•. Today. for. yesterday: All events are referred to the current configuration ofhierarchies.Thus,assumingonJanuary1,2005theresponsibleagentforcustomerSmithhaschangedfromMr.BlacktoMr.White,andthatanewcustomerO’HarahasbeenacquiredandassignedtoMr.Black,whencomput-ingtheagentcommissionsallinvoicesforSmithareattributedtoMr.White,whileonlyinvoicesforO’HaraareattributedtoMr.Black.

•. Yesterday.for.today: All events are referred to some past configuration of hierarchies.Inthepreviousexample,allinvoicesforSmithareattributedtoMr.Black,whileinvoicesforO’Haraarenotconsidered.

•. Today.or.yesterday.(or.historical.truth):Eacheventisreferredtothecon-figuration hierarchies had at the time the event occurred. Thus, the invoices forSmithupto2004andthoseforO’HaraareattributedtoMr.Black,whileinvoicesforSmithfrom2005areattributedtoMr.White.

Whileintheagentexample,dynamicityconcernsanarcofahierarchy,theoneexpressingthemany-to-oneassociationbetweencustomerandagent,insomecasesitmayaswellconcernadimensionattribute:forinstance,thenameofaproductcategory may change. Even in this case, the different scenarios are defined in much thesamewayasbefore.Ontheconceptualschema,itisusefultodenotewhichscenariostheuserisinterestedfor each arc and attribute, since this heavily impacts on the specific solutions to be adoptedduringlogicaldesign.Bydefault,wewillassumethattheonlyinterestingscenarioistodayforyesterday—itisthemostcommonone,andtheonewhose

Figure 7. Unrolling the agent hierarchy

Page 44: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

implementationonthestarschemaissimplest.Ifsomeattributesorarcsrequiredifferentscenarios,thedesignershouldspecifythemonatablelikeTable2.

Additivity

Aggregation requires defining a proper operator to compose the measure values characterizingprimaryeventsintomeasurevaluescharacterizingeachsecondaryevent.Fromthispointofview,wemaydistinguishthreetypesofmeasures(Lenz&Shoshani,1997):

•. Flow.measures:.Theyrefertoatimeperiod,andarecumulativelyevaluatedattheendofthatperiod.Examplesarethenumberofproductssoldinaday,themonthlyrevenue,thenumberofthoseborninayear.

•. Stock.measures:Theyareevaluatedatparticularmomentsintime.Examplesarethenumberofproductsinawarehouse,thenumberofinhabitantsofacity,thetemperaturemeasuredbyagauge.

•. Unit.measures:Theyareevaluatedatparticularmomentsintime,buttheyareexpressedinrelativeterms.Examplesaretheunitpriceofaproduct,thediscountpercentage,theexchangerateofacurrency.

Theaggregationoperatorsthatcanbeusedonthethreetypesofmeasuresaresum-marizedinTable3.

arc/attribute todayforyesterday yesterdayfortoday todayoryesterday

customer-resp. agent YES YES YES

customer-city YES YES

sale district YES

Table 2. Temporal scenarios for the INVOICE fact

temporalhierarchies nontemporalhierarchies

flow measures SUM,AVG,MIN,MAX SUM,AVG,MIN,MAX

stockmeasures AVG,MIN,MAX SUM,AVG,MIN,MAX

unitmeasures AVG,MIN,MAX AVG,MIN,MAX

Table 3. Valid aggregation operators for the three types of measures (Lenz, 1997)

Page 45: Data Warehouses and OLAP - Concepts Architectures and Solutions

�8 Rizzi

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Definition 15:Ameasureissaidtobeadditivealongadimensionifitsvaluescanbeaggregatedalongthecorrespondinghierarchybythesumoperator,otherwise it is callednonadditive.Anonadditivemeasure isnonaggregableifnootheraggregationoperatorcanbeusedonit.

Table 3 shows that, in general, flow measures are additive along all dimensions, stockmeasuresarenonadditivealongtemporalhierarchies,andunitmeasuresarenonadditivealongalldimensions.Ontheinvoicescheme,mostmeasuresareadditive.Forinstance,quantity has flow type:thetotalquantityinvoicedinamonthisthesumofthequantitiesinvoicedinthesingledaysofthatmonth.Measureunit pricehasunittypeandisnonadditivealongalldimensions.Thoughitcannotbesummedup,itcanstillbeaggregatedbyusingoperatorssuchasaverage,maximum,andminimum.Sinceadditivityisthemostfrequentcase,inordertosimplifythegraphicnotationintheDFM,onlytheexceptionsarerepresentedexplicitly.Inparticular,ameasureisconnectedtothedimensionsalongwhichitisnonadditivebyadashedlinelabeledwiththeotheraggregationoperators(ifany)whichcanbeusedinstead.Ifameasureisaggregatedthroughthesameoperatoralongalldimensions,thatoperatorcanbesimplyreportedonitsside(seeforinstance unit priceinFigure4).

Approaches. to.Conceptual.Design

Inthissectionwediscusshowconceptualdesigncanbeframedwithinamethod-ology for DW design. The approaches to DW design are usually classified in two categories(Winter&Strauch,2003):

• Data-driven(orsupply-driven)approachesthatdesigntheDWstartingfromadetailedanalysisofthedatasources;userrequirementsimpactondesignbyallowingthedesignertoselectwhichchunksofdataarerelevantfordecisionmakingandbydeterminingtheirstructureaccordingtothemultidimensionalmodel(Golfarellietal.,1998;Hüsemannetal.,2000).

• Requirement-driven(ordemand-driven)approachesstartfromdeterminingtheinformationrequirementsofendusers,andhowtomaptheserequirementsontotheavailabledatasourcesisinvestigatedonlya posteriori(Prakash&Gosain,2003;Schiefer,List&Bruckner,2002).

Whiledata-drivenapproachessomehowsimplifythedesignofETL(extraction,trans-formation,andloading),sinceeachdataintheDWisrootedinoneormoreattributes

Page 46: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ofthesources,theygiveuserrequirementsasecondaryroleindeterminingtheinfor-mationcontentsforanalysis,andgivethedesignerlittlesupportinidentifyingfacts,dimensions,andmeasures.Conversely,requirement-drivenapproachesbringuserrequirementstotheforeground,butrequirealargereffortwhendesigningETL.

Data-Driven.Approaches

Data-drivenapproachesarefeasiblewhenallofthefollowingaretrue:(1)detailedknowledgeofdatasourcesisavailablea priorioreasilyachievable;(2)thesourceschemata exhibit a gooddegreeof normalization; (3) the complexityof sourceschemataisnothigh.Inpractice,whenthechosenarchitecturefortheDWreliesonareconciled level(oroperational data store)theserequirementsarelargelysat-isfied: in fact, normalization and detailed knowledge are guaranteed by the source integrationprocess.Thesameholds,thankstoacarefulsourcerecognitionactivity,inthefrequentcasewhenthesourceisasinglerelationaldatabase,well-designedandnotverylarge.Inadata-drivenapproach,requirementanalysisistypicallycarriedoutinformally,basedonsimplerequirementglossaries(Lechtenbörger,2001)ratherthanonformaldiagrams.Conceptualdesignisthenheavilyrootedonsourceschemataandcanbelargelyautomated.Inparticular,thedesignerisactivelysupportedinidentifyingdimensionsandmeasures,inbuildinghierarchies,indetectingconvergencesandsharedhierarchies.Forinstance,theapproachproposedbyGolfarellietal.(1998)consists of five steps that, starting from the source schema expressed either by an E/Rschemaorarelationalschema,createtheconceptualschemafortheDW:

1. Choosefactsofinterestonthesourceschema2. Foreachfact,buildanattribute treethatcapturesthefunctionaldependencies

expressedbythesourceschema3. Edittheattributetreesbyadding/deletingattributesandfunctionaldependencies4. Choosedimensionsandmeasures5. Createthefactschemata

Whilestep2iscompletelyautomated,someadvancedconstructsoftheDFMaremanuallyappliedbythedesignerduringstep5.On-the-field experience shows that, when applicable, the data-driven approach is preferablesinceitreducestheoveralltimenecessaryfordesign.Infact,notonlyconceptualdesigncanbepartiallyautomated,butevenETLdesignismadeeasiersincethemappingbetweenthedatasourcesandtheDWisderivedatnoadditionalcostduringconceptualdesign.

Page 47: Data Warehouses and OLAP - Concepts Architectures and Solutions

20 Rizzi

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Requirement-Driven.Approaches

Conversely,withinarequirement-drivenframework,intheabsenceofknowledgeofthesourceschema,thebuildingofhierarchiescannotbeautomated;themainassuranceofasatisfactoryresultistheskillandexperienceofthedesigner,andthedesigner’sabilitytointeractwiththedomainexperts.Inthiscaseitmaybeworthadoptingformaltechniquesforspecifyingrequirementsinordertomoreaccuratelycaptureusers’needs;forinstance,thegoal-orientedapproachproposedbyGiorgini,Rizzi,andGarzetti(2005)isbasedonanextensionoftheTroposformalismandincludesthefollowingsteps:

1. Create,intheTroposformalism,anorganizational modelthatrepresentsthestakeholders,theirrelationships,theirgoalsaswellastherelevantfactsfortheorganizationandtheattributesthatdescribethem.

2. Create,intheTroposformalism,adecisional modelthatexpressestheanalysisgoalsofdecisionmakersandtheirinformationneeds.

3. Createpreliminaryfactschematafromthedecisionalmodel.4. Editthefactschemata,forinstance,bydetectingfunctionaldependenciesbe-

tweendimensions,recognizingoptionaldimensions,andunifyingmeasuresthatonlydifferfortheaggregationoperator.

This approach is, in our view, more difficult to pursue than the previous one. Neverthe-less,itistheonlyalternativewhenadetailedanalysisofdatasourcescannotbemade(forinstance,whentheDWisfedfromanERPsystem),orwhenthesourcescomefromlegacysystemswhosecomplexitydiscouragesrecognitionandnormalization.

Mixed.Approaches

Finally,alsoafewmixed approachestodesignhavebeendevised,aimedatjoiningthefacilitiesofdata-drivenapproacheswiththeguaranteesofrequirement-drivenones(Bonifati,Cattaneo,Ceri,Fuggetta,&Paraboschi,2001;Giorginietal.,2005).Heretheuserrequirements,capturedbymeansofagoal-orientedformalism,arematchedwiththeschemaofthesourcedatabasetodrivethealgorithmthatgener-atestheconceptualschemafortheDW.Forinstance,theapproachproposedbyGiorginietal.(2005)encompassesthreephases:

1. Create,intheTroposformalism,anorganizational modelthatrepresentsthestakeholders,theirrelationships,theirgoals,aswellastherelevantfactsfortheorganizationandtheattributesthatdescribethem.

Page 48: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse 2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

2. Create,intheTroposformalism,adecisional modelthatexpressestheanalysisgoalsofdecisionmakersandtheirinformationneeds.

3. Map facts, dimensions, and measures identified during requirement analysis ontoentitiesinthesourceschema.

4. Generateapreliminaryconceptualschemabynavigatingthefunctionalde-pendenciesexpressedbythesourceschema.

5. Editthefactschematatofullymeettheuserexpectations.

Notethat,thoughstep4maybebasedonthesamealgorithmemployedinstep2ofthedata-drivenapproach,herenavigationisnot“blind”butratheritisactivelybiasedbytheuserrequirements.Thus,thepreliminaryfactschematageneratedheremaybeconsiderablysimplerandsmallerthanthoseobtainedinthedata-drivenap-proach.Besides,whileinthatapproachtheanalystisaskedforidentifyingfacts,dimensions, and measures directly on the source schema, here such identification isdrivenbythediagramsdevelopedduringrequirementanalysis.Overall,themixedframeworkisrecommendablewhensourceschemataarewell-knownbuttheirsizeandcomplexityaresubstantial.Infact,thecostforamorecarefulandformalanalysisofrequirementisbalancedbythequickeningofcon-ceptualdesign.

Open. Issues

A lot of work has been done in the field of conceptual modeling for DWs; never-thelesssomeveryimportantissuesstillremainopen.Wereportsomeoftheminthissection,astheyemergedduringjointdiscussionatthePerspective Seminar on “Data Warehousing at the Crossroads”thattookplaceatDagstuhl,GermanyonAugust2004.

• Lack. of. a. standard: Though several conceptual models have been pro-posed,noneofthemhasbeenacceptedasastandardsofar,andallvendorsproposetheirownproprietarydesignmethods.Weseetwomainreasonsforthis:(1)thoughtheconceptualmodelsdevisedaresemanticallyrich,someofthemodeledpropertiescannotbeexpressedinthetargetlogicalmodels,sothetranslationfromconceptualtologicalisincomplete;and(2)commercialCASEtoolscurrentlyenabledesignerstodirectlydrawlogicalschemata,thusno industrial push is given to any of the models. On the other hand, a unified conceptualmodelforDWs,implementedbysophisticatedCASEtools,wouldbeavaluablesupportforboththeresearchandindustrialcommunities.

Page 49: Data Warehouses and OLAP - Concepts Architectures and Solutions

�� R�zz�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Design.patterns:.Insoftwareengineering,designpatternsareaprecioussup-portfordesignerssincetheyproposestandardsolutionstoaddresscommonmodelingproblems.Recently,somepreliminaryattemptshavebeenmadetoidentifyrelevantpatternsformultidimensionaldesign,aimedatassistingDWdesignersduringtheirmodelingtasksbyprovidinganapproachforrecogniz-ingdimensionsinasystematicandusableway(Jones&Song,2005).Thoughwe agree that DW design would undoubtedly benefit from adopting a pattern-basedapproach,andwealsorecognizetheutilityofpatternsinincreasingtheeffectivenessofteachinghowtodesign,webelievethatfurtherresearchisnecessaryinordertoachieveamorecomprehensivecharacterizationofmul-tidimensionalpatternsforbothconceptualandlogicaldesign.

• Modeling.security:Informationsecurityisaseriousrequirementthatmustbecarefullyconsideredinsoftwareengineering,notinisolationbutasanissueunderlyingallstagesofthedevelopmentlifecycle,fromrequirementanalysistoimplementationandmaintenance.TheproblemofinformationsecurityisevenbiggerinDWs,asthesesystemsareusedtodiscovercrucialbusinessinformation in strategic decision making. Some approaches to security inDWs,focused,forinstance,onaccesscontrolandmultilevelsecurity,canbefoundintheliterature(see,forinstance,Priebe&Pernul,2000),butneitherofthemtreatssecurityascomprisingallstagesoftheDWdevelopmentcycle.Besides,theclassicalsecuritymodelusedintransactionaldatabases,centeredontables,rows,andattributes,isunsuitableforDWandshouldbereplacedbyanadhocmodelcenteredonthemainconceptsofmultidimensionalmodel-ing—suchasfacts,dimensions,andmeasures.

• Modeling.ETL:.ETLisacornerstoneofthedatawarehousingprocess,anditsdesignandimplementationmayeasilytake50%ofthetotaltimeforsettingupaDW.IntheliteraturesomeapproachesweredevisedforconceptualmodelingoftheETLprocessfromeitherthefunctional(Vassiliadis,Simitsis,&Skia-dopoulos,2002),thedynamic(Bouzeghoub,Fabret,&Matulovic,1999),orthestatic(Calvanese,DeGiacomo,Lenzerini,Nardi,&Rosati,1998)pointsofview.Recently,alsosomeinterestingworkontranslatingconceptualintologicalETLschematahasbeendone(Simitsis,2005).Nevertheless,issuessuchastheoptimizationofETLlogicalschemataarenotverywellunderstood.Besides,thereisaneedfortechniquesthatautomaticallypropagatechangesoccurredinthesourceschemastotheETLprocess.

Conclusion

InthischapterwehaveproposedasetofsolutionsforconceptualmodelingofaDWaccordingtotheDFM.Since1998,theDFMhasbeensuccessfullyadopted,inreal

Page 50: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse 2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

DW projects mainly in the fields of retail, large distribution, telecommunications, health,justice,andinstruction,whereithasprovedexpressiveenoughtocaptureawidevarietyofmodelingsituations.Remarkably,inmostprojectstheDFMwasalsousedtodirectlysupportdialoguewithendusersaimedatvalidatingrequire-ments,andtoexpresstheexpectedworkloadfortheDWtobeusedforlogicalandphysicaldesign.ThiswasmadepossiblebytheadoptionofaCASEtoolnamedWAND (warehouseintegrateddesigner),entirelydevelopedattheUniversityofBologna,thatassiststhedesignerinstructuringaDW.WANDcarriesoutdata-drivenconceptualdesigninasemiautomaticfashionstartingfromthelogicalschemeofthe source database (see Figure 8), allows for a core workload to be defined on the conceptualscheme,andcarriesoutworkload-basedlogicaldesigntoproduceanoptimizedrelationalschemefortheDW(Golfarelli&Rizzi,2001).Overall, our on-the-field experience confirmed that adopting conceptual modeling withinaDWprojectbringsgreatadvantagessince:

• Conceptual schemata are the best support for discussing, verifying, and refining user specifications since they achieve the optimal trade-off between expres-sivityandclarity.Starschematacouldhardlybeusedtothispurpose.

• Forthesamereason,conceptualschemataareanirreplaceablecomponentofthedocumentationfortheDWproject.

• Theyprovidea solidandplatform-independent foundation for logical andphysicaldesign.

• TheyareaneffectivesupportformaintainingandextendingtheDW.• Theymaketurn-overofdesignersandadministratorsonaDWprojectquicker

andsimpler.

Figure 8. Editing a fact schema in WAND

Page 51: Data Warehouses and OLAP - Concepts Architectures and Solutions

�� R�zz�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

References

Abelló, A., Samos, J., & Saltor, F. (2002, July 17-19). YAM2 (Yet another multidi-mensionalmodel):AnextensionofUML.InProceedings of the International Database Engineering & Applications Symposium(pp.172-181).Edmonton,Canada.

Agrawal,R.,Gupta,A.,&Sarawagi,S.(1995).Modeling multidimensional databases(IBMResearchReport).IBMAlmadenResearchCenter,SanJose,CA.

Bonifati,A.,Cattaneo,F.,Ceri,S.,Fuggetta,A.,&Paraboschi,S.(2001).Designingdatamartsfordatawarehouses.ACM Transactions on Software Engineering and Methodology,10(4),452-483.

Bouzeghoub,M.,Fabret,F.,&Matulovic,M.(1999).Modelingdatawarehouserefreshment process as a workflow application. In Proceedings of the Inter-national Workshop on Design and Management of Data Warehouses,Heidel-berg,Germany.

Cabibbo,L.,&Torlone,R.(1998,March23-27).Alogicalapproachtomultidimen-sionaldatabases.InProceedings of the International Conference on Extending Database Technology (pp.183-197).Valencia,Spain.

Calvanese,D.,DeGiacomo,G.,Lenzerini,M.,Nardi,D.,&Rosati,R.(1998,August20-22).Informationintegration:Conceptualmodelingandreasoningsupport.InProceedings of the International Conference on Cooperative Information Systems (pp.280-291).NewYork.

Datta,A.,&Thomas,H.(1997).Aconceptualmodelandalgebraforon-lineana-lyticalprocessing indatawarehouses. InProceedings of the Workshop for Information Technology and Systems(pp.91-100).

Fahrner,C.,&Vossen,G.(1995).Asurveyofdatabasetransformationsbasedontheentity-relationshipmodel.Data & Knowledge Engineering,15(3),213-250.

Franconi,E.,&Kamble,A.(2004a,June7-11).TheGMDdatamodelandalgebraformultidimensionalinformation.InProceedings of the Conference on Ad-vanced Information Systems Engineering(pp.446-462).Riga,Latvia.

Franconi,E.,&Kamble,A.(2004b).Adatawarehouseconceptualdatamodel.InProceedings of the International Conference on Statistical and Scientific Da-tabase Management(pp.435-436).

Giorgini,P.,Rizzi,S.,&Garzetti,M.(2005,November4-5).Goal-orientedrequirementanalysisfordatawarehousedesign.InProceedings of the ACM International Workshop on Data Warehousing and OLAP(pp.47-56).Bremen,Germany.

Golfarelli,M.,Maio,D.,&Rizzi,S.(1998).Thedimensionalfactmodel:Acon-ceptual model for data warehouses. International Journal of Cooperative Information Systems,7(2-3),215-247.

Page 52: Data Warehouses and OLAP - Concepts Architectures and Solutions

Conceptual Modeling Solutions for the Data Warehouse 2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Golfarelli,M.,&Rizzi,S.(2001,April2-6).WAND:ACASEtoolfordataware-housedesign.InDemo Proceedings of the International Conference on Data Engineering(pp.7-9).Heidelberg,Germany.

Gyssens,M.,&Lakshmanan,L.V.S.(1997).Afoundationformulti-dimensionaldatabases.InProceedings of the International Conferenceon Very Large Data Bases(pp.106-115),Athens,Greece.

Hüsemann,B.,Lechtenbörger,J.,&Vossen,G.(2000).Conceptualdatawarehousedesign.InProceedings of the International Workshop on Design and Manage-ment of Data Warehouses,Stockholm,Sweden.

Jones,M.E.,&Song,I.Y.(2005).Dimensionalmodeling:Identifying,classifying&applyingpatterns.InProceedings of the ACM International Workshop on Data Warehousing and OLAP(pp.29-38).Bremen,Germany.

Kimball,R.(1996).The data warehouse toolkit.NewYork:JohnWiley&Sons.Lechtenbörger ,J. (2001).Data warehouse schema design (Tech.Rep.No.79).

DISDBISAkademischeVerlagsgesellschaftAkaGmbH,Germany.Lenz,H.J.,&Shoshani,A.(1997).SummarizabilityinOLAPandstatisticaldata-

bases.InProceedings of the 9th International Conference on Statistical and Scientific Database Management(pp.132-143).Washington,DC.

Li, C., & Wang, X. S. (1996).A data model for supporting on-line analyticalprocessing.InProceedings of the International Conference on Information and Knowledge Management(pp.81-88).Rockville,Maryland.

Luján-Mora,S.,Trujillo,J.,&Song,I.Y.(2002).ExtendingtheUMLformultidi-mensionalmodeling.InProceedings of the International Conference on the Unified Modeling Language(pp.290-304).Dresden,Germany.

Niemi,T.,Nummenmaa,J.,&Thanisch,P.(2001,June4).Logicalmultidimensionaldatabasedesignforraggedandunbalancedaggregation.Proceedings of the 3rd International Workshop on Design and Management of Data Warehouses, Interlaken,Switzerland (p.7).

Nguyen,T.B.,Tjoa,A.M.,&Wagner,R.(2000).Anobject-orientedmultidimen-sionaldatamodelforOLAP.InProceedings of the International Conference on Web-Age Information Management(pp.69-82).Shanghai,China.

Pedersen,T.B.,&Jensen,C.(1999).Multidimensionaldatamodelingforcomplexdata.InProceedings of the International Conference on Data Engineering(pp.336-345).Sydney,Austrialia.

Prakash,N.,&Gosain,A.(2003).Requirementsdrivendatawarehousedevelop-ment.InProceedings of the Conference on Advanced Information Systems Engineering—Short Papers,Klagenfurt/Velden,Austria.

Priebe,T.,&Pernul,G.(2000).TowardsOLAPsecuritydesign:Surveyandre-searchissues.InProceedings of the ACM International Workshop on Data Warehousing and OLAP(pp.33-40).Washington,DC.

Page 53: Data Warehouses and OLAP - Concepts Architectures and Solutions

�� R�zz�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

SAP.(1998).Data modeling with BW.SAPAmericaInc.andSAPAG,Rockville,MD.

Sapia, C., Blaschka, M., Hofling, G., & Dinter, B. (1998). Extending the E/R model forthemultidimensionalparadigm.InProceedings of the International Con-ference on Conceptual Modeling,Singapore.

Schiefer, J.,List,B.,&Bruckner,R. (2002).Aholistic approach formanagingrequirements of data warehouse systems. In Proceedings of the Americas Conference on Information Systems.

Sen,A.,&Sinha,A.P.(2005).Acomparisonofdatawarehousingmethodologies.Communications of the ACM,48(3),79-84.

Simitsis,A.(2005).MappingconceptualtologicalmodelsforETLprocesses.InProceedings of the ACM International Workshop on Data Warehousing and OLAP (pp.67-76).Bremen,Germany.

Tryfona,N.,Busborg,F.,&BorchChristiansen,J.G.(1999).starER:Aconceptualmodelfordatawarehousedesign.InProceedings of the ACM International Workshop on Data Warehousing and OLAP, KansasCity,Kansas(pp.3-8).

Tsois,A.,Karayannidis,N.,&Sellis,T.(2001).MAC:ConceptualdatamodelingforOLAP.InProceedings of the International Workshop on Design and Man-agement of Data Warehouses(pp.5.1-5.11).Interlaken,Switzerland.

Vassiliadis,P.(1998).Modelingmultidimensionaldatabases,cubesandcubeopera-tions.InProceedings of the 10th International Conference on Statistical and Scientific Database Management,Capri,Italy.

Vassiliadis,P.,Simitsis,A.,&Skiadopoulos,S.(2002,November8).ConceptualmodelingforETLprocesses.InProceedings of the ACM International Work-shop on Data Warehousing and OLAP(pp.14-21).McLean,VA.

Winter,R.,&Strauch,B.(2003).Amethodfordemand-driveninformationrequire-mentsanalysisindatawarehousingprojects.InProceedings of the Hawaii International Conference on System Sciences, Kona(pp.1359-1365).

Endnote

1 Inthischapterwewillonlyconsiderdynamicityattheinstancelevel.Dy-namicityattheschemalevelisrelatedtotheproblemofevolutionofDWsandisoutsidethescopeofthischapter.

Page 54: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP 2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.II

Handling.Structural.Heterogeneity.in.OLAP

Carlos A. HurtadoUniversidad de Chile, Chile

Claudio GutierrezUniversidad de Chile, Chile

Abstract

Structural heterogeneous OLAP data arise when several OLAP dimensions with different structures are mixed into a single OLAP dimension. In this chapter, we examine the problems encountered when handling structural heterogeneity in OLAP and survey techniques that have been proposed to solve them. We show how to in-corporate structural heterogeneity in the design of OLAP models. We explain why structural heterogeneity weakens aggregate navigation, the framework that guides users to formulate correct OLAP operations and systems to efficiently process them. We survey different techniques to deal with heterogeneity, including the modeling of heterogeneity by unbalanced dimensions, the solution proposed by Kimball, and the use of null elements to fix heterogeneity. Finally, we present a class of integrity constraints to model structural heterogeneity, called dimension constraints, intro-duced in previous work of the authors. We show the practical application of dimen-sion constraints to support aggregate navigation and some of the aforementioned techniques for dealing with the problem.

Page 55: Data Warehouses and OLAP - Concepts Architectures and Solutions

28 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction

MuchofthesuccessofOLAPcanbeattributedtotheintuitiveapproachtodatavi-sualizationprovidedbythemultidimensionaldatamodel.Nowadays,thenotionsoffactsanddimensionshavebeenlargelydisseminatedamongdatabasepractitionersandresearchersandhavebeenprovedtobeusefulmetaphorstosupportqueryingdatafordecisionsupport.Thesimplicityofthemultidimensionalmodel,however,standsonsomeassumptionsabout theregularityofdatawhichareunnatural inmanyapplications.Inthischapter,westudytheimplicationsofrelaxingoneofthecoresofsuchassumptions,namelythehomogeneityofthestructureofOLAPdi-mensions.StructurallyheterogeneousOLAPdatahavebeenreportedintheOLAPliteraturealmostsincetheoriginsofthetermOLAPitselfandhaveconcentratedsignificant research work since then (Hurtado, Gutierrez, & Mendelzon, 2005; Huse-man,Lechtenborger,&Vossen,2000;Jagadish,Lakshmanan,&Srivastava,1999;Kimball, 1996;Lehner,Albrecht,&Wedekind,1998; Malinowski&Zimanyi,2004;Pedersen,Jensen,&Dyreson,2001).

Motivation

Inthemultidimensionaldatamodel,dimensionsrepresenttheperspectivesuponwhichdataisviewed,andfactsrepresenteventsthatassociatepointsofsuchdimen-sionstomeasures.Forexample,asaleofaparticularproductinaparticularstoreofaretailchaincanbeviewedasafact,whichmayberepresentedasapointinaspacewhosedimensionsareproducts,stores,andtime,andcanbeassociatedwithone or more measures such as price or profit.ThephenomenonwestudyinthischapterisrelatedtoOLAPdimensionsand,moreprecisely,totheirstructure.Thestructureofadimensionismodeledasahierarchyofcategories.Eachcategoryrepresentsalevelofabstractionuponwhichfactsareaggregated.Forexample, inadimension thatmodels theproductsofa retailer,showninFigure1,wehaveacategoryProductwhichrollsuptoaBrandcategory,whichinturnrollsuptothetopcategoryAll.Theelementsofthedimensionsaregrouped into thecategoriesandconnectedbyachild/parent relationship,whichyieldsahierarchyofelementswhichparallelsthehierarchyofcategories.FollowingterminologyfromJagadishetal.(1999)andfromHurtadoetal.(2005),werefertothehierarchiesofcategoriesandelementsrespectivelyashierarchyschemaandhierarchydomain.Eachelementofadimensioncanbeviewedashavingastructureonitsown.Thisstructureofanelement is thesubgraphof thehierarchyschemainducedby theancestorsof that element and their child/parent relationship. Inour exampleofFigure1,theProductelementp1hastheentirehierarchyschemaasstructure,and

Page 56: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP 2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

theBrandelementb2onlyhasthesubstructurecomposedbythecategoriesBrandandAll.Nevertheless,alltheelementsinthesamecategoryhavethesamestruc-tureinthisdimension.Inthissensethedimensioncanberegardedasstructurallyhomogeneous.Inseveralsituations,thestructureoftheelementsinacategorymaynotbethesame.Dimensionsmayrequiremixinginasinglecategoryelementsrepresentingthesameconceptualentity,buthavingdifferentstructure.Thesedimensions,whicharethefocusofthischapter,havebeencallednon-covering(Malinowsky&Zimanyi,2004;Pedersenetal.,2001),structurallyheterogeneous(Hurtado&Mendelzon,2002;Hurtadoetal.,2005),orraggedintheOLAPindustry.Kimball(1996), modeling products of retailers, coined the term heterogeneous productstorefertoproductelementsthatexhibitirregularitiesintheirdimensionstructure. As an example, he stated that virtually every financial services database hasproductswithdifferentstructures.Abankcouldeasilyhaveadozenormoreproduct typessuchassavingsaccount, timedeposit,orcreditcard,andeachofthemmayhaveitsownsetofcategoriesandmeasures.Similarsituationsariseinotherapplicationdomainssuchasretail,insurance,subscription,andvoyagesbusi-ness.Asanexample,considertheproductdimensionforaretailwarehousegiveninFigure2,whichhasproductelementswithdifferentstructures.Productsmaybemusical(e.g.,CDs)orelectricalproducts(e.g.,speakers,audiosystems).Theelec-tricalproductshavebrands,butthemusicaldonot.Similarly,notalltheproductsaresoldonshelvesofphysicalstores,sincetheretailerhasane-commercesite

Figure 1. A homogeneous product dimension; (a) hierarchy schema; (b) hierarchy domain

Note: To each category node in (a) correspond a set of element nodes in (b). This dimension is homogeneous; that is, each element node has the same structure; their ancestors induce the same subgraph.

(A)

Product

Brand

Category

Department

All

(B)

b1 b2

d1

all

c1 c2

p1 p2 p3 p4

Page 57: Data Warehouses and OLAP - Concepts Architectures and Solutions

�0 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

wheresomeproductsareoffered.Figure3showsthedifferentstructuresmixedinthisheterogeneousversionofaproductdimension.Theexamplecouldbeturnedmuchmorecomplexifweconsiderdifferentcategoriesandattributesassociatedtoelectricproductssuchasspeakers,videosystems,andsoon.Inarelationaldatabasesetting,anOLAPdimensioncanbeviewedasasetoftuples,whoseattributesare thecategoriesof thehierarchyschema.Inparticular, if the

Figure 2. A heterogeneous product dimension; (a) hierarchy schema; (b) hierarchy domain

Note: This dimension is heterogeneous; that is, there are element nodes with different structures. For example, the element p1 and p6 belong to the same category but have different structures.

(a)

(b)

Page 58: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

dataaremodeledusingastarschema(Kimball,1996),thedimensionwouldbeasingletablehavingatupleforeachleafelementinitshierarchydomain.Onemaygeneralizethisideaandthinkofanelementasatuplecomposedoftheancestor’selementsandtheirattributes.Asanexample,theelementp1inthedimensionofFigure1producesthetuple:

Figure 3. Different structures mixed in the heterogeneous dimension of Figure 2

Page 59: Data Warehouses and OLAP - Concepts Architectures and Solutions

�2 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

[Product:p1,Brand:b1,Category:c1,Department:d1,All:all].

By viewing a dimension as a set of relational tuples, it is not difficult to realize practicalsituationsthatcausestructuralheterogeneity.Asanexample,theproblemmayarisewhentheOLAPserverextractstuplesfrommorethanonetablehavingdifferentattributes.Inaddition,atableitselfmayhavenonapplicableattributesormissingvalues,whichtranslateintonon-applicableattributesforthecorrespondingelementsinthedimension.Asanexample,thefollowingtwostructurallydifferenttuplesarisefortheproductelementsp1andp6inthedimensionofFigure2:

[Product:p1,Brand:b1,ElectricalCategory:ec1,All:all],

[Product:p6,Shelf:sh1,MusicalCategory:mc1,All:all].

Thenonapplicabilityofcategoriesisnottheonlysituationthatcausesstructuralheterogeneity.Adifferenceinthehierarchicalarrangementofthecategoriesoftwoelementsmaycauseheterogeneity.Asanexample,considertheproductdimensionofFigure4.Thetwodifferentstructuresmixedinthetopcategoryofthisdimen-sionareshowninFigure5.Theelementsp1,p2,p3,p4havethestructureshownintheleft-handsideofFigure5,andtheelementp5hasthestructureoftheright-handside.Noticethattheelementshavethesamesetofcategoriesintheirstructures.Ahomogeneousmodelforthisdimensioncanbeobtainedsimplybyabstractingawaythechild/parentrelationfromBrandtoCategory.However,theheterogeneousversionmodelsanunderlyinghierarchypathfromsomeproductsviasomebrandstosomecategories,whichcanbeofinteresttobenavigatedbyusersviastandardOLAP operations. As we will illustrate in further sections, the artificial flattening of thehierarchyisnotingeneralthebestapproachtohandlestructuralirregularities.ItiscentraltoOLAPsystemstotakeadvantageofthehierarchicalarrangementofdataindimensionsatthequeryformulationandqueryprocessingstages.InOLAP,queriesareessentiallyviewsthataggregaterawfacts toagranularityspecified by a list of categories, called granularities, selected from a list of dimen-sions.ThecentraltechniqueforspeedingupOLAPqueryprocessingistomateri-alize(precompute)someaggregateviewsandusethemforthederivationofotheraggregateviews,usingoperationscalledroll-upoperations.Aggregatenavigation,acentral technique in OLAP, is the process of finding and testing correct derivations ofaggregateviewsfromotherprecomputedaggregateviewsatlowergranularities.Sincethecostofcomputingacubeviewisessentiallylinearinthenumberoffactsaccessedinthecomputation,thistechniquecanspeedupthisprocessingbyafactorwhichcanbeuptoseveralordersofmagnitudeinrealscenarios(Kimball,1995).Thecentralproblemcausedbyheterogeneityistheobsolescenceoftheframework

Page 60: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ofOLAPaggregatenavigationthatunderliesOLAPsystems,whichyieldstheinef-ficiency of computing the aggregate views always from the raw facts.

Content.

Inthischapter,weshowhowtoincorporatestructuralheterogeneityinOLAPdatamodels.Weexplainthecentralconceptsofthegraphmodelproposedinpreviouswork(Hurtadoetal.,2005),andstudystructuralheterogeneityinthisframework.Weexplainwhystructuralheterogeneityweakenstheroleofthehierarchyschemasinsupportingaggregatenavigation,andinhelpinguserstoformulatecorrectOLAPoperations. We also explain the implication of heterogeneity to star and snowflake models.

Figure 4. A heterogeneous version of a product dimension; (a) hierarchy schema; (b) hierarchy domain

Figure 5. Different structures mixed in a heterogeneous dimension of Figure 4

(a) (b)

Page 61: Data Warehouses and OLAP - Concepts Architectures and Solutions

�4 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

WestudydifferentsolutionsproposedtokeeptheabilityofOLAPsystemstoper-formaggregatenavigationwhenthedimensionsarestructurallyheterogeneous.WeoverviewthemodelingofheterogeneitybytheunbalanceddimensionsofJagadishetal.(1999)andthesolutionproposedbyKimball(1996).Wealsoexplainhowtheirregularity of heterogeneous dimensions can be fixed with null elements, which is theapproachofPedersen,Jensen,andDyreson(1999).Thesolutionshaveincommonthatheterogeneousdataaretransformedintohomo-geneousdata;thusanycommercialOLAPsystemmaybeusedtohandlethedata.Intheseframeworks,gettingridofheterogeneitybecomesaproblemthatappearsinthedesignandpreprocessingstageofOLAPdata.Weexplainadifferentstrategytoapproachtheproblem,whichisthemodelheterogeneityattheschemalevelofthedimensionsbyenrichingitwithaclassofintegrityconstraintscalleddimensionconstraints introduced inpreviouswork(Hurtado&Mendelzon,2002;Hurtadoetal.,2005).DimensionconstraintsareBooleanexpressionsovercategoriesandpathsofthem,whichallowstatingrestrictionsonthestructureofthedimensionelements.Weexplaintwomajorapplicationsofdimensionconstrains.Weshowtheroledimensionconstraintsplayinsupportingtransformationsofheterogeneousdimensionstothestructuraladaptations.WealsoexplainhowstandardOLAPag-gregatenavigationcanbeextendedtoheterogeneousschemasbyperforminginfer-enceoverdimensionconstraints.Finally,wepresenttheconclusionsandoutlineopenproblems.

Structural.Heterogeneity

Wewillstartthissectionbystudyingdimensions,facts,cubeviews,anddatacubes,which are the main notions in the multidimensional data model. We also define structuralheterogeneity.Thenwewillexplainthenotionofaggregatenavigationandtheproblemscausedbyheterogeneity.

Dimension.Modeling

InthissectionweintroduceamodelofOLAPdimensionspresentedinpreviouswork(Hurtadoetal.,2005),whichconsidersnotionsfrompreviousdimensionmodels(Cabibbo&Torlone,1998;Hurtado,Mendelzon&Vaisman,1999;Jagadishetal.,1999)andformalizesthemintermsofbasicnotionsofgraphtheory.Basicnotionsofgraphtheoryusedcanbeconsultedinanystandardgraphtheorybook(West,1996).Themodelallowsheterogeneity,amongotherfeaturesnotencounteredintraditionaldimensionmodels.By“traditional”werefertothemostcommontype

Page 62: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ofdimensionsthatappearintextbooks,whitepapers,andearlyresearchpapersonOLAP, first formalized by Cabbibo and Torleone (1998).

Hierarchy Schema

ThehierarchyschemaisthestandardstructureforrepresentingthesemanticsofOLAPdimensions.Thisstructureiscommontodifferentmodels.Thehierarchyschemaismodeledasadirectedacyclicgraph(DAG)(C,)whosesetofnodesC containscategories,and representstheincidencerelation,thatis,c1 c2indi-catesthatthecategoryc1isconnectedtothecategoryc2inthehierarchyschema.Wewilldrawthedirectionoftheedgesalwaysupward.TheDAGhasadistinguishedcategoryAllreachablebyapathfromeveryothercategory(topcategory).Theremaybeseveralnodeswithnoancestors(bottomcategories).Ahierarchy pathisapathofcategoriesfromabottomcategorytothetopcategory.Asanexample,thegraphsintheleft-handsidesofFigures1,2,and4arehierarchyschemas.Thenotionofhierarchyschemapresentedhastwodifferenceswiththetraditionalnotionforhomogeneousdimensions.First,weallowmorethanonebottomcat-egory.Thisisimportantinorderforthemodeltoallowunbalanceddimensions,astructuraladaptationofdimensionmodels,whichwillbeexplainedinwhatfollows.Second,themodelallowsshortcutsinthehierarchyschema.Ashortcutisapathoflengthgreaterthanonebetweenapairofadjacentcategories.Asanexample,thepathBrand Category Department AllinFigure4aisashortcut.Shortcutsareimportantinheterogeneousdatabecausetheyallowthemodelingofthesitua-tionwhereanelementskipsaparentcategorywhengoingtoahighercategory.Asanexample,thecityofWashingtonmayskipthecategoryStateandgodirectlytothecategoryCountryinadimensionrepresentinglocations.

Hierarchy Domain

Thehierarchydomain is thegraph thatmodels thehierarchical arrangementoftheelementsofthedimension.ItisalsoformalizedwithaDAG,wherethenodesrepresenttheelementsofthedimension.Formally,thehierarchydomainisapair(M,<),whereMisthesetofelementsofthedimensionand<representsthechild/parentrelationshipbetweenelements.TheDAGhasadistinguishedtopnodeall.Asanexample,inthedimensionofFigure4,wehavep5<b3<c2<d1<all.Thedescendant/ancestorrelationship,denoted<,isthetransitiveclosureoftherelation<.Asanexample,inthedimensionofFigure4,fromtheexistenceofachild/parentpathfrom5toall,itfollowsp5<all.Thehierarchydomainmayhavemanybottomelements,butitisnotallowedtohaveshortcuts.Thereasonforthisisthatashort-cutfromanelemente1toanelemente2isredundantinformation.Asexamples,thegraphsintheright-handsidesofFigures1,2,and4arehierarchydomains.

Page 63: Data Warehouses and OLAP - Concepts Architectures and Solutions

�6 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Dimension

Adimensioncomprisesahierarchyschema(C,),ahierarchydomain(M,<),andafunctiond:M→ C that defines the category to which each element belongs. In particular,theelementall ismappedtothecategoryAll,thatis,d(all)=All .Thefundamentalpropertyofthefunctiondisthatwhenevertwoelementssatisfye1<e2inthehierarchydomain,thecorrespondingcategoriestowhichtheybelongsat-isfyd(e1) d(e2).Inotherwords,anedgeinthehierarchydomainimpliesanedgebetweenthecorrespondingcategoriesinthehierarchyschema.Inmoretechnicalwords,thefunctiond isagraph morphism(West,1996)thatrelatesthetwographsofadimension.Asanexample,considerthedimensionofFigure4.Here,because b3<c2,theremustexistanedgefromBrandtoCategory(i.e.,Brand Category) inthehierarchyschema.AcentralrestrictioninOLAPdatamodels(Cabibbo&Torlone,1998;Hurtado&Mendelzon,2001,2002;Hurtadoetal.,2005;Lehneretal.,1998)isthateachele-mentofacategorycshouldgo(directlyorindirectly)tonomorethanoneelementineachcategoryabovethecategoryc.Thisrestrictioniscalledstrictness.Formally,ifx<yandx<z fortwodifferentelementsy,z,thend(y)¹ (z).ThehandlingofnonstrictdimensionsinOLAPhasbeenstudiedbyPedersenetal.(1999)andbyMalinowskiandZymanyi(2004).Thisissueisorthogonaltothetopicstreatedinthischapter.

Defining Heterogeneity

Heterogeneitycanbecharacterizedinthegraphmodelinasimpleway.Adimensionishomogeneousifforeverypairsofconnectedcategoriesc1,c2(i.e.,c1 c2),eachelementofc1hasaparentin c2.Adimensionisheterogeneousifitisnothomoge-neous.Asanexample,thedimensionofFigure1ishomogeneous.Incontrast,thedimensionsofFigures2and4areheterogeneous.

Rollup Relation

Therecouldbedifferentapproaches toqueryOLAPdataovergraphmodelsofdimensionslikethemodelexplainedhere.Jagadishetal.(1999)proposeSQL(H),aquerylanguagethatincludesthedescendant/ancestorrelationshipasabuilt-inpredicatewhichallowsforsuccinctlyexpressingmanyusefulqueriesinanSQLstyle.Therolluprelationbetweentwocategoriesallowsexpressingrelationalqueriesoverthegraphmodelofthedimension(e.g.,usingSQL).Letc1,c2betwocatego-ries of a fixed dimension such that c1reachesc2inthehierarchyschema(i.e.,c1

Page 64: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

c2).Therolluprelationfromc1toc2inadimensiond, denoted Γ[c1,c2]is defined astherelationaltablehavingattributesc1,c2,andcontainingthesetoftuples[c1:e1:c2:e2]suchthatd(e1)=c1,d(e2)=c2,ande1<e2.Noticethattherolluprelationis defined for pairs of categories that are (directly or indirectly) connected in the hierarchyschema.Notealsothatthenotionsofstrictnessandhomogeneitycanbedefined in terms of the rollup relation. A dimension is strict if and only it has func-tional(i.e.,singlevalued)rolluprelations.Adimensionishomogeneousifandonlyif each rollup relation Γ[c1,c2] istotalovertheelementsinc1.

Facts and Data Cubes

Afactisadataentitythatrelatesalistofelements,takenfromalistofdimensions,tomeasuresofinterest.Factsmayberepresentedastuplesinfacttables.Amulti-dimensionaldatabasecomprisesasetofdimensions,alongwithabasefacttable,thatis,afacttablewhoseattributesarethebottomcategoriesofthedimensions.Ifthe dimension has many bottom categories, we may define a new unique category, containingallthebottomelements,toaddressthebasefacts.

Cube Views, Data Cube

OLAPusersneedtoanalyzefactsaggregatedatmultiplelevelsofabstraction.Thebasicquerythataggregatesbasefactsatagranularitygivenbyalistofcategories,oneperdimension,iscalledacubeview.Asanexample,considerthatthelistofdimensionshasonlythedimensionofFigure1.Inthiscase,agranularityalsocanbe specified with a single category. The base fact table is the table SalesAtProductwhichhasasattributesProductandAmount(thislastattributeisthemeasure).AcubeviewthatsumstheamountssoldatthecategoryDepartment can be defined bythefollowingaggregatequery:

SELECTDepartment,SUM(Amount)

FROMSalesAtProduct,Γ[Product,Department]

WHERESalesAtProduct.Product=Γ[Product,Department].Product

GROUPBYDepartment.

Adata cube is the set of all possible cube views defined over a list of dimensions, a base table, and aggregated measures. In the context of a fixed data cube, we may denoteacubeviewsimplyasCV[G]whereGisagranularity(listofcategories).Asanexample,thepreviouscubeviewcanbedenotedsimplyasCV[Department].

Page 65: Data Warehouses and OLAP - Concepts Architectures and Solutions

�8 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

OLAP Aggregate Navigation

Rollup and Drilldown Operations

Therearetwomainoperatorstomoveamongthedifferentcubeviewsinadatacube,namely the rollupanddrilldownoperators (Jarke,Lenzerini,Vassiliou,&Vassiliadis,1997).GiventwogranularitiesGandG’,arollupoperationaggregatesthecubeviewCV[G]tothegranularityG’.Asanexample,arollupfromasingle-categorygranularityCategorytothegranularityDepartmentinadatacubeforthedimension of Figure 1 can be defined using the following aggregate query:

SELECTDepartment,SUM(Amount)

FROMCV[Category],Γ[Category,Department]

WHERECV[Category].Category=Γ[Category,Department].Category

GROUPBYDepartment.

Thisrollupoperation,appliedtothecubeviewCV[Category]aggregatesthefactsin it to the granularity of aggregation specified by the category Department.Inthecontext of a fixed data cube we abbreviate this rollup operation as ROLLUP Cat-egoryTODepartment.Rollupoperationshavealsobeencalledsummarizations(Lenz&Shoshani,1997)orconsolidations(Harinarayan,Rajaraman,&Ullman,1996).Thedrilldownoperationhastheinverseeffectoftherollupoperationandallowsuserstomovetoacubeviewatalowergranularity.

Dependence

Thepossibleroll-upanddrill-downoperationscanberepresentedbyastructurecalledcube dependence graph, which is defined as the direct product of the list of hierarchyschemasinvolved.Thatis,agranularityG’isconnectedtoagranularityG if theircorrespondingcategoriesarepairwiseconnectedinthecorrespondingdimension.Thecubedependencegraphisausefulrepresentationforthesystemandusertonavigatethroughoutaggregatesatdifferentgranularities(Harinarayanetal.,1996).Thecubedependencegraphalsogeneralizesstructurestovisualizeaggregateviewsproposedforstatisticaldatabases,suchas in thestatisticalobject representationmodelbyRafanelliandShoshani(1990).Asanexample,Figure6showsacubedependencegraphfortheproductdimensionofFigure1andatimedimensionwithcategoriesDay,Year,andAll.

Page 66: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

AfundamentalpropertyofacubedependencegraphintraditionalOLAPmodels(homogeneousdimensions)isthattherollupoperationsarecorrectinthefollowingsense:ifagranularityGreachesG’,thenthefollowingholds:CV[G’]=ROLLUPGTOG’.Thatis,thecubeviewatG’canbecorrectlycomputedbyarollupopera-tionfromGtoG’.IntheterminologyofHarinarayanetal.(1996),G’dependsonG.Thusdependencybetweengranularitiescorrespondstoreachabilityinthecubedependencegraph.Ofcourse,inorderforthistohappentheaggregatefunctioninvolvedshouldbedistributive.Adistributiveaggregatefunctioncanbecomputedonasetofmeasuresbypartitioningthesetintodisjointsubsets,aggregatingeachseparately,andthencomputingtheaggregationofthesepartialresultswithanotheraggregatefunction(whichinmanycasesisthesamefunction).AmongtheSQLaggregatefunctions,COUNT,SUM,MIN,andMAXaredistributive.Aswewillseelater,inthissetting,thecorrectnessoftherollupoperationsrequiresthedimen-sionstobehomogeneous.

Summarizability

Thenotionofsummarizabilitywasproposedtostudyaggregatenavigationforstatis-ticalobjectsandOLAPdimensions(Hurtado&Mendelzon,2001,2002;Hurtadoetal.,2005;Lehneretal.,1998;Lenz&Shoshani,1997).Summarizabilityreferstotheconditions upon which a rollup operation defined over a single dimension is correct; thatis,summarizabilitycorrespondstodependenceforsinglecategoriestakenfroma fixed dimension. For the one-dimensional case, the cube dependence graph is just

Figure 6. A cube dependence graph

Page 67: Data Warehouses and OLAP - Concepts Architectures and Solutions

40 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thehierarchyschema,andconsequentlyintraditionalOLAPmodels(homogeneousdimensions)summarizabilityisequivalenttoreachabilityinthehierarchyschema.

Anomalies Caused by Heterogeneity

ThemainroleoftheschemaofadimensionistoguideusersintheapplicationofOLAPoperationsandtopreventusersfromformulatingerroneousoperations.HeterogeneitymayturnhierarchyschemasintoentangledstructuresforvisualizingOLAPdataandformulatingcorrectaggregateoperations.

Complexity of Heterogeneous Dimensions

Inthepresenceofheterogeneitythehierarchyschemamaybecomeawkward.Aheterogeneousdimensioncomprisingadozenproducttypesmaycarrymorethan100categories,andsomeofthemwouldbeemptyforalmosteveryelementofthedimension(Kimball,1996).Theproblemisnotonlythatsomecategoriesarenotvalidforsomeelements,butthatdifferentcombinationsofcategoriesandpathsmaynotbevalid,andthehierarchyschemadoesnotprovideenoughsemanticsto understand this. Consequently, it may be difficult for users to understand the hierarchydomainbyvisualizingthehierarchyschema,ascanbeobservedinthedimensionofFigure7.ThisdimensionisamorecomplexheterogeneousversionthatmodelselectronicproductsandCDsofaretailer.

Implications for Summarizability

In a heterogeneousdimension the rollupoperations are not necessarily correct.StatedinOLAPterminology,inheterogeneousdimensionssummarizabilitydoesnotnecessarilycorrespondtoreachabilityinthehierarchyschema.Thatis,wecan-notinferthecorrectnessofrollupoperationsjustbyviewingthehierarchyschema.Asanexample,therollupoperation

ROLLUPBrandTOCategory

is not correct in the dimension of Figure4, since some products would not becountedinthederivation.Ingeneral,underheterogeneity,hierarchyschemasmayhaveinconsistentpaths,thatis,pathsc1 c2 c3 ...cninthehierarchyschemaforwhichsomecategoryi+1isnotsummarizablefromitsprecedingcategoryiinthepath.Asanexample,thefollowinghierarchypathisinconsistentinthedimen-sionofFigure7:

Page 68: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP 4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Product ElectricalCategory Category Department All.

Incontrast,thepathProduct Brand Company Allisconsistentforthesamedimension.

Figure 7. A heterogeneous dimension: (a) hierarchy schema; (b) hierarchy domain

(a)

(b)

Page 69: Data Warehouses and OLAP - Concepts Architectures and Solutions

42 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Implications for the Cube Dependence Graph

Whenthehomogeneityconditionisdropped,thecorrectnessofarollupopera-tiondoesnotfollowfromthecubedependencegraph.Theproblemcanbeeasilyrealizedbynotingthatthecubedependencegraphofasingledimensioncorre-spondstoitshierarchyschema.TheanomalousbehaviorofthecubedependencegraphhasdeepimplicationsforOLAPqueryprocessing,sincethecubedepen-dencegraphisusedinalgorithmstocomputeandmaintaindatacubes(Mumick,Quass,&Mumick,1997),andtospeedupOLAPqueryprocessing(Harinarayanetal.,1996).

Implications for Relational OLAP Models

Kimball(1996)arguesthatthebestlogicalmodeltoplaceOLAPqueriesisthestarschema.Inthestarschemathedimensionconsistsofasingletablewherethecategoriesarearrangedasattributes.Wewillrefertothistableasastardimen-sion.Thetableorganizesthedimensionelementsastuples,andallowssimpletuple browsing to place filters in OLAP queries. A star dimension requires the hierarchyschematohaveasinglebottomcategory,whichisthekeyattributeofthetable.Theedgesinthehierarchyschemaareregardedasfunctionaldepen-denciesoverthetable.AnotherrelationalrealizationofOLAPdataisthesnowflake schema, which yields snowflake dimensions. A snowflake dimension has one table per category c,whichstorestogetheralltherolluprelationstotheparentcategoriesofc.Thetablesarenormalizedavoidingredundantdata.However,incontrasttothestardimension,thesnowflake dimension requires to process join operations over its tables, in order toassembletuplesforbrowsingandaggregatequeryprocessing.

Relationship among Graph, Star, and Snowflake Dimensions

Dimensionsinthegraphmodelwepresented(wewillrefertothemsimplyasdi-mensions, in contrast to star and snowflake dimensions) can be easily translated to astardimension(Hurtadoetal.,1999),providedthedimensionishomogeneousandhasasinglebottomcategory.Thetablehasasattributesthecategoriesofthedimension.Foreachbottomelementmofthegraphdimension,thereisatupleinthetablecomposedoftheancestorsofm.Asanexample,Table1showsthestardimensioncorrespondingtothedimensionofFigure4.The translationofastardimension toagraphdimensionrequirescapturing therolluprelationsfromthetable.Itissimplyobtainedbyprojectingthetableover

Page 70: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP 4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thecategoriesinvolvedintherolluprelation.Asanexample,therolluprelationΓ[Brand,Category]canbeobtainedbythefollowingquery:

SELECTBrand,CategoryFROMTable_Product.

The translation between graph and snowflake dimensions is straightforward.The problems reported in this chapter also appear in star and snowflake dimensions. Wenextexplainfurtherimplicationsofheterogeneityforthem.

Allowing Heterogeneity

Inarelationaltableeachelementofdimensiontableneedsoneentryforeachattri-bute. Thus in order to allow structural heterogeneity in star and snowflake schemas, nullvaluesshouldbeallowedinthetables.Itisnoteasytodothissincefunctionaldependenciesshouldbeinterpretedinpresenceofnullvalues.Inordertoallownulls,Lehneretal.(1998)proposeweakfunctionaldependencies,thatis,functionaldependenciesA→ B thatdonotconstraintupleswhentheyhavenullvaluesintheattributeB.Theattributesthatparticipateintherightsidesofweakfunctionaldependenciesaretreatedoutsidethehierarchyschemaasdescriptiveattributesforthe categories. Weak functional dependencies can be used in snowflake dimensions. However,instardimensionswemayalsoneedtointerpretfunctionaldependen-cieswhennullsappearintheleftsideofthefunctionaldependence.Anadditionalproblemisthatduetothedenormalizednatureofstardimensions,heterogeneitymayleadtoaproliferationofnullvaluesinthetable.Duetotheseproblems,someresearchershavestatedthatthestarschemadoesnotallowstructuralheterogene-ity(Jagadishetal.,1999).

Table 1.

Product Brand Category Department

p1 b1 c1 d1

p2 b1 c2 d1

p3 b2 c1 d1

p4 b2 c2 d1

p5 b3 c2 d1

Page 71: Data Warehouses and OLAP - Concepts Architectures and Solutions

44 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Implications to the Representation of the Hierarchy Domain

Inthepresenceofheterogeneitythereisnoprecisecorrespondencebetweendimen-sionsandstardimensions.Thehierarchydomain(i.e.,thehierarchicalarrangementofelements)ofaheterogeneousdimensionmaynotbecorrectlycapturedbythestardimension.Asanexample,ifwerepresenttheheterogeneousdimensionofFigure4asastardimension,wecannotrecovertheoriginalchild/parentrelationback.Indeed,ifwe try to recover the rollup relation Γ[Brand,Category],weobtaintherelationwithasinglepair[Brand:b3,Category:c2].TheoriginalrolluprelationisshowinTable2.Amongotherproblems,thisimpliesthatthestandardsemanticsofdrilldownandrollupoperationsdifferforbothmodels.Noticealsothatinthiscase,althoughthedimensionisheterogeneous,itsstarrepresentationdoesnothavenullvalues.Thissituationillustratesthat,asexplainedintheintroductorysection,heterogeneityisnotonlycausedbythenonapplicabilityofattributes(e.g.,dimensionofFigure2)butalsobythemixtureofhierarchiesinthedimension(e.g.,dimensionofFigure4).

Adapting.Heterogenous.Dimensions

ThegeneralapproachtohandlestructuralheterogeneityinOLAPis toadaptortransformthedimensionsinordertoobtainhomogeneousdata.Inthissectionweexaminetwoapproachesalongthisidea.First,weexplaintheuseofnullelements,andthenweexplorestructuraladjustmentsofheterogeneousdimensionnecessarytoobtainhomogeneousdimensions.Inthelattercase,thehierarchyschemasoftheoriginal dimensions are modified.

Table 2.

Brand Category

b1 c1

b1 c2

b2 c1

b2 c2

b3 c2

Page 72: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP 4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Null Elements

At first sight, as heterogeneity is nothing more than having elements without parents insomecategories,theproblemcouldbesolvedstraightforwardlybyaddingnullelements.Inthisformaheterogeneousdimensionwouldbeturnedhomogeneouswithout any modification of its structure. However, it is not easy to add null elements togetahomogeneousdimensionwhoserolluprelationsarestrict,thatis,withoutviolatingthefundamentalpropertyofdimensionsexplained.Usingasinglenullelementnull,asintherelationaldatabasesetting,doesnotpreventthisproblem.Pedersenetal.(1999)proposeamethodforaddingnullelementswhichovercomesthisdrawback.Thecentralideaistoallowaddingdifferentnulls,whichmaybetheresultofbreakingupsomeoftheoriginalelementsofthedimension.Thenullsareinterpretedasregularelementsandtheresultingdimensionishomogeneous,sotheframeworkofaggregatenavigationcanbeapplied.ThetransformationhaslowandpracticalcomplexityandcanbeappliedtoOLAPdatainapreprocessingstagebeforeloadingthedatacube.Analgorithm,calledMakeCov-ering,performsthetransformation.Thealgorithmhaspolynomialtimecomplexityonthesizeofthedimension.Moreprecisely,thealgorithmtakesO(k2nlogn),wherekisthenumberofcategories,andnisthesizeofthelargestrolluprelation.Inmanysituationsthenullelementshavealowinterferencewiththeoriginaldata;andthereforehandlingheterogeneitywithnullelementshaspracticalapplicabilityinmanycases.Intuitively,insuchcases,thenullelementsplaytheroleoftheotherortheunknownclass.However,inworst-casescenarios,thetransformationmayleadtodimensionswithmanynewnullelementspercategory.Inthesecases,thenumberofrowsofthedatacubeandcubeviewsmaybeconsiderablyincreasedduetothenullelements.Assomeoriginalelementsofthedimensionmaybebrokenupintodifferentnulls,thesemanticsoftheoriginaldimensionmaybealtered.Asanexample,Figure8showsahomogeneousversionofthedimensionofFigure4withnullelements.Noticethatinorderforthedimensiontobestrict,theelementsb1andb2havebeenbrokenupintothenullelementsb11,b12andb21,b22,respectively.AlsonoticethattheedgesBrand CategoryandProduct Categoryarenotrequiredinthisdimension.Now,thehierarchyschemaonlymodelsthehierarchypathProduct Brand Category Department All.Althoughtheadditionofnullsturnshierarchypathsconsistent,nullelementsmaycausemeaninglessaggregationsinsiderollupoperations.Asanexample,considerthedimensionofFigure4,andthefacttableSalesAtProductrepresentingthesalesoftheretailer.Wemaycomputethesalesandbreakthemdownbybrandsusingthefollowingrollupoperation:

ROLLUPProductTOBrand.

Page 73: Data Warehouses and OLAP - Concepts Architectures and Solutions

46 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

NothingwillpreventtheOLAPsystemfromscanningtheentiresetofbasefactstocomputetheanswer.However,notallofthebasefactshavebrands;thustheyarenotneededintheaggregation.Nullvaluesmayalsointerferewiththeresultofmorecomplexaggregatequeriesplacedoverfactsatthedatacube.Anexampleisaclassofqueriesthatinvolvesmultipledependentaggregatescalledmultifeature aggregates(Chatziantoniou&Ross,1996).Considerthefollowingquerythatcomputesthemaximumamountoverallthetotalamountssoldforeachbrand:

SELECTBrand,MAX(Amount)

FROMCV[Brand].

Theresultwouldbeincorrectifthetotalsalesatsomenullelementsurpassthesalesofeachbrand.Thiscanhappeninthedimensionathandifthesalesofmusicalproductssurpassthesalesforeachelectricalproduct.Lehneretal.(1998)reportadditionalanomaliesinactualOLAPscenariosduetocontradictoryqueriesthatarisewhenhandlingheterogeneitywithnulls.

Structural.Adaptations

AnotheradaptationofstandarddimensionmodelstoovercometheproblemsposedbystructuralheterogeneityisproposedbyJagadishetal.(1999).Themainpropertyofthismodelistoallowhierarchypathsstartingfromdifferentbottomcategories.Inthissettingthehierarchypathslookunbalanced,fromwherecomesthemoti-vationforcallingsodimensionshavingthisproperty.Thismodelissubsumedby

Figure 8. A version of the dimension of Figure 4 with null elements: (a) hierarchy schema; (b) hierarchy domain

(a) (b)

Page 74: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP 4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thegraphmodeldescribedinthischapter.Thetermunbalanceddimensionisalsousedtorefertodimensionswhichhandlechild/parentrelationshipsthatcannotbemodeled with fixed length paths in the dimension hierarchy (a good example is the relationboss/employeeinacompany).Thisuseofthetermslightlydiffersfromtheusegiveninthischapter.Theunbalancednessofthehierarchyschemaisnotallowedintraditionalmodels,asin the early model of Cabbibo and Torleone (1998), along with the snowflake and thestarschemas.Therestrictionofhavingabottomcategoryinthesemodelsisdue

Figure 9. An unbalanced dimension that models the Product dimension of Figure 2: (a) hierarchy schema; (b) hierarchy domain

(a)

(b)

Page 75: Data Warehouses and OLAP - Concepts Architectures and Solutions

48 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

tothesimplicityofhavingauniquebottomgranularityatwhichthebasefactsareaddressed(theattributeassociatedtosuchcategoryparticipatesinthecomposedkey of the fact table in star and snowflake schemas). By allowing many bottom cat-egories,theheterogeneousdimensioncanbebrokenupintothedifferentstructuresthataremixedintheoriginaldimension.Inthisformahomogeneousdimensionhavingconsistentpathsforaggregatenavigationisobtained.SeveralcommercialOLAPsystemsallowstoringthissortofstructure.Basicallytheusershouldenterseparatelyeachhierarchypathinadimensionsettoallowmultiplehierarchies.Asanexample,Figure9showsanunbalancedhomogeneousdimensionthatmodelstheproductdimensionofFigure2.Noticethatthetwodimensionshavethesamehier-archydomain.However,inthenewdimensiontheproductsarebrokenupandstoredindifferentcategoriesforeachofthefourstructuresofFigure3.Figure10showsanunbalancedhomogeneousversionfortheheterogeneousdimensionofFigure4.The model provides flexibility to define a different base fact table for each bottom category,asinglebasefacttableforallthecategories,orboth.Ifweconsiderdif-ferentfacttables,thehierarchypathsoftheformerareconsistent.NowthecubeviewCV[Department]canbecorrectlycomputedbytherollup:

ROLLUPCategoryTODepartment

If we consider cube views defined over a single base fact table that contains all the elements, thehierarchypathsarenotconsistent. In thiscaseweneedROLLUPoperationsthatcombinecategories,aswewillseeinthenextsection.Kimball(1996)proposesasimilarsolutiontodealwithheterogeneity,butinhisapproach thehomogeneousstructuresmixedareplaced inseparatedimensions.

Figure 10. An unbalanced dimension that models the Product dimension of Figure 4: (a) hierarchy schema; (b) hierarchy domain

(a) (b)

Page 76: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP 4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Althoughtheproblemtosolveisthenonapplicabilityofattributes,thatis,theformofheterogeneityillustratedinthedimensionofFigure4,thesolutionworksforthegeneralcase.Theapproachinvolvespartitioningtheoriginaldatacubeintoonedatacubeforeachdimension.Adimensionthatcontainsthestructuresharedbyalltheresultinghomogeneousdimensions,calledthecoredimension,iskeptwithadatacube,calledcoredatacube,whichaggregatefactsatallthebottomelementsoftheoriginaldimension.

Dimension.Constraints

Inthissectionwedescribetheapproachofmodelingheterogeneitywithintegrityconstraints.Weexplaintheframeworkofdimensionconstraints(Hurtado&Men-delzon,2001;Hurtadoetal.,2005),aclassofintegrityconstraintsforOLAPdatathatprovidesemanticstothehierarchyschemasothatitisturnedintoabetterab-stractiontocaptureheterogeneity.We first motivate dimension constraints. Then we explain how the homogeneous structuresmixedinthedimension,calledfrozendimensions,canbecomputedfromtheconstraints,andexplaininferenceofdimensionconstraintsinthisframework.Finally,weshowtheapplicationofdimensionconstraintstosupportthestructuraladaptationsexplainedintheprevioussection,andtoreasonaboutthecorrectnessofOLAPaggregateoperatorsinheterogeneousdimensions.

Examples

Dimensionconstraintsarestatementsthatspecifycategoriesandpathsallowedinthestructures of the elements of a dimension. We will illustrate the flavor of dimension constraintsusingthedimensionofFigure4.ObservethateveryproductelementofthisdimensionhasthecategoriesBrandandElectricalCategoryappearingtogetherornotappearingatall.Thiscanbeexpressedwiththefollowingconstraint:

⟨Product,Brand⟩⇔⟨Product,ElectricalCategory⟩.

ThisconstraintisastatementthatholdsforallelementsatthecategoryProduct,whichistheroot categoryoftheconstraint.Asanexample,ifwetaketheelementp1andreplaceitintheconstraintweobtaintheexpression:

⟨p1,Brand⟩ ⇔ ⟨p1,ElectricalCategory⟩,

Page 77: Data Warehouses and OLAP - Concepts Architectures and Solutions

�0 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

whichmeansthatp1hasanancestorinBrandifandonlyifp1hasanancestorinElectricalCategory.SotheconstraintallowstodiscardthestructuresinwhichBrandandMusicCategorydonotappeartogether.Thisisimportant,sinceifwegeneralizethedimensionofFigure4tohavendifferentcategoriesinsteadofjustfour,theremightbe2n–1possiblestructures(oneforeachnonemptysubsetofcategories).Thehierarchyschemadoesnotprovidesemanticstodiscardanyofsuchstructures.DimensionconstraintsareBooleancombinationsofatomicstatementscalledatoms.WeusethestandardBooleanconnectives( ∧ ,∨,¬,⇔,⇒).Atomsaretheexpres-sionsinbrackets.Asanexample,theconstraint:

¬⟨Product,ElectricalCategory⟩ ∨¬⟨Product,MusicCategory⟩

statesthattheproductshaveparentsineitherElectricalCategoryorMusicCategorybutnotinbothofthem.Weneednegation,conjunction,anddisjunction,torestrictstructuresandtoreasonaboutsummarizability(Hurtadoetal.,2005).ThismotivatedustoincorporatetheentireexpressivenessoftheBooleanconnectivesintodimensionconstraints.Di-mensionconstraintsalsoincorporateatomsoftheform⟨Product, Brand=b3⟩calledequality atomwhichmakeitpossibletoplacerestrictionsconditionedonparticularelements.Asanadditionalexample,wemaywritethattheproductsthatbelongtobrandb3aresoldonshelves,usingthefollowingconstraint:

⟨Product, Brand=b3⟩ ⇒ ⟨Product,Shelf⟩.

Theconstraintswehavealreadyshowedarestatementsabouttheapplicabilityofcategories.Wemayalsoneedtoplacerestrictionsabouttheapplicabilityofhierar-chypaths.Weusepaths atomsforthispurpose.Asanexample,inthedimensionofFigure7,wemaystatethattheproductsthatbelongtotheelectricalcategoryec2havethepathBrandCategoryDepartmentAllintheirstructure,usingthefollowingconstraint:

⟨Product, ElectricalCategory=ec2⟩ ⇒ ⟨Product,Brand,Category,Department,All⟩.

Therearealsoatomsthatrestrictcategoriesthatmaybeindirectlyreachedbytherootcategory.Asanexample,thedimensionofFigure4maybemodeledwithjustthefollowingconstraint:

⟨Product,Brand⟩ ∨ ⟨Product,..,Category⟩.

Page 78: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

WiththisconstraintwediscardstructuresthatdonotcontainBrandorCategory.However,theproductelementsmayreachbothdirectlyorindirectlytheelementsatCategory.Inparticular,theedgeBrandCategoryallowssomeelementstoreachCategoryindirectlypassingthroughBrand.Inpreviouswork(Hurtadoetal.,2005),dimensionconstraintsarecomparedwithotherclassesofconstraintsproposedtocapturedifferentformsofheterogeneityforOLAP(Husemanetal.,2000;Lehneretal.,1998),relational(Goldstein,1981),andsemistructured(Abiteboul&Vianu,1999;Buneman,Fan&Weinstein,1998)data.Amongthem,theconstraintsofHusemannetal.(2000)arecloselyrelatedtodimensionconstraintsinthattheyaddressaformofstructuralheterogeneitystudyinthischapter.Theseconstraintsaresubsumedbydimensionconstraints.Theyallowexpressingthattwopathsinthehierarchyschemathatstartfromasinglecategoryaremandatoryoralternative

Extracting.Homogeneous.Structures

In general, a hierarchy schema allows an exponential number of homogeneousstructuresandwemayexpressthemsuccinctlywithdimensionconstraints.Thesituationisanalogoustousingpropositionalformulastospecifythetruthvaluesofasetofpropositions.Intheframeworkofdimensionconstraintstheproposi-tionsaretheatomsthatstatewhichpartsofthehomogeneousstructureallowed.Such structures, called frozen dimensions, are themselves important to supportvisualizationandtotransformheterogeneousdimensionstostructuraladaptationspreviouslyexplained.Inaddition,theyarethebasisforaninferencealgorithmfordimensionconstraints.Inpreviouswork(Hurtadoetal.,2005),weproposeanalgorithmtocomputethefrozendimensionsthatariseinadimensionschema.Adimensionschemaisahi-erarchyschemaalongwithasetofdimensionconstraints.Thealgorithmexploressubgraphsofthehierarchyschema,andtestswhethertheysatisfytheconstraints.Thesubgraphsarebuiltbytraversingthehierarchyschemafromthebottomcategories,andusingdimensionconstraintsforpruning.Thealgorithmrunsinexponentialtimeinthesizeoftheschema.Anexperimentalevaluationprovidedshowsthatthesetfrozendimensionscanbecomputedintheorderofthefewsecondsfordimensionschemasofaround25categoriesand120.000frozendimensions,thatis,forschemasofmuchmorecomplexitythantheonesfoundinpracticalscenarios.

Inference

Intheframeworkofdimensionconstraintsthehierarchyschemaisaugmentedwithconstraintsyieldingthenotionofdimensionschema.Adimensionschemaisapair

Page 79: Data Warehouses and OLAP - Concepts Architectures and Solutions

�2 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

D =(H,∑),whereH isahierarchyschema,and∑ isasetofdimensionconstraints.A dimension schema specifies a set of possible dimensions, that is, the dimensions thathavethehierarchyschemaH andsatisfythesetofconstraints∑.Thosedimen-sionsarethepossibleinstancesoftheschema.AdimensionschemaD logically impliesadimensionconstrainta,ifeverydimen-siondovertheschemaD satisfies a.Theimplication problemfordimensioncon-straintsistheproblemofdetermining,givenadimensionschemaD andadimensionconstraint α, whether D implies α. Although the implication problem for dimension constraintsisCoNP-completeinthesizeoftheschema,duetothesizesofschemasoccurringinpractice,itistreatable.Theproblemreducestocomputingthefrozendimensionsoftheschema.Analgorithmtotestimplicationbasedonthecompu-tationoffrozendimensions,calledDimsat,ispresentedinHurtadoetal.(2005).Here,experimentsshowthatDimsattakesfewsecondstotesttheimplicationofadimensionconstraintfromahighlyheterogeneousschemaof25categories.

Supporting.Structural.Adaptations

Theframeworkofdimensionconstraintsandfrozendimensionscanbeusedtoau-tomatetheconstructionofthestructuraladaptationsexplainedinprevioussections.Inthisformwemayusethesemanticsoftheschematotransformheterogeneousdimensions, a task that could be difficult to do manually when handling complex dimensions.Asanexample,itisnoteasytoobtaintheunbalanceddimensionofFigure11fromtheentangledproductdimensionofFigure7.FrozendimensionscorrespondtothehomogeneousdimensionsinthedecompositionproposedbyKimball(1996),sothedecompositioncanbeobtainedbythealgo-rithmthatcomputesfrozendimensions,explainedbefore.InHurtadoandGutierrez(2004),weproposeanalgorithmthattransformsheterogeneousdimensionschemasintotheunbalancedhomogeneousschemasofJagadishetal.(1999),wecalledca-nonical schemas. The algorithm first computes the set of frozen dimensions of the originalschemaandtheniterativelysplitsthecategoriesthatcauseheterogeneity.Ineachsplitoperationthehierarchyschemaistransformedsothattheresultinghierarchyschemahasasinglecategoryforeachdifferentfrozendimensionoverthecategory.Thealgorithmoutputsadimensionschemahavingtheconstraintsthatstatethehomogeneitycondition.Ifthesetoffrozendimensionsareprecomputed,thealgorithmrunsintimeO(fi3),wherenisthesizeofthehierarchyschema,andfisthenumberoffrozendimensions.Thetransformationdescribedhasanimportantproperty.Theresultingschemaisequivalenttotheoriginalschemainthattheybothmodelthesamesetofhierarchydomains(Hurtado&Gutierrez,2004).Thisprovesthatheterogeneousschemascanbetransformedintocanonicalschemaswithoutlosinginformationcapacityintheschemas,andwithoutbreakingdownthehierarchyarrangementofelements.

Page 80: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Supporting Aggregate Navigation

Integrityconstraintscanbealsousedtosupportaggregatenavigation.Hierarchyschemasenrichedwithdimensionconstraintsbecomeanadequateabstractmodeltoinferthecorrectnessofrollupoperationsifonemaywanttokeeptheheteroge-neousstructureofthedimension.Insomesituationsitcanbeusefultokeeptheheterogeneous structure, since it allows fewer categories and tomore naturally

Figure 11. An unbalanced dimension: (a) hierarchy schema; (b) rollup relation

(a)

(b)

Page 81: Data Warehouses and OLAP - Concepts Architectures and Solutions

�4 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

groupelementsintocategories.Asmallernumberofcategoriesmightexponentiallydecreasethenumberofcubeviewswemayneedtohandleandstoreinstarandsnowflake realizations. Wenextshowthattheproblemoftestingthecorrectnessofarollupoperation(thatis,summarizability)reducestoaninferenceproblemoverdimensionconstraints.Rollupoperationscanbegeneralizedrollupoperationstoallowthecombinationofseveralgranularities(Hurtado&Mendelzon,2001,2002;Hurtadoetal.,2005).Thisisneededsinceonemayobtainacubeviewbycombiningothercubeviewsinheterogeneousdimensions.AsanexampleinthedimensionofFigure4thecubeviewCV[All]canbecomputedbythefollowingrollupoperator,thatcombinesthecubeviewsCV[MusicCategory]andCV[ElectricalCategory]:

ROLLUPMusicCategory,ElectricalCategoryTOAll.

Inordertocheckthecorrectnessofthisoperation,twoconstraintsabout(a)dis-jointnessand(b)completenessofthecategoriescombinedshouldbeinferredfromadimensionschemaDthatmodelsthedimension.Thereforetheproblemreducestotestingthefollowingconstraints:

(a) ¬ ⟨Product,MusicCat,All⟩ ∨ ¬ ⟨Product,ElectricalCat,All⟩

(b) ⟨Product,MusicCat,All⟩ ∨ ⟨Product,ElectricalCat,All⟩.

Heretheatom⟨Product,MusicCat,All⟩expressesthattheproductelementgotheelementallinAllpassingthroughanelementinMusicCat.Theotheratomisin-terpretedsimilarly.Inpreviouswork(Hurtado&Gutierrez,2003),weprovideanalgorithmtocomputethesetofcorrectrollupoperationsfromthedimensionschema.Asthedimensionschema is fixed, the correct operations can be computed once before the data cube isqueried.Inaddition,dimensionconstraintsallowidentifyingconsistentpathsofaggregationinthehierarchyschema.Asanexample,fromaschemaD thatmodelsthedimensionofFigure7,onemaywanttocheckwhetherthepathProductBrandCompanyAllisconsistent,whichreducestotestingtheimplicationoffollow-ingconstraint⟨Product,Brand,Company,All⟩fromtheschemaD.

Conclusion

WhenthehomogeneityconditionisdroppedtheframeworkforaggregatenavigationthatunderliesOLAPsystemscannotbeapplied.Inthischapterwehavesurveyed

Page 82: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

differentmethodstodealwiththisproblem.Thesituationcanbehandledbyaddingnullelementsinawaysuchthatweobtainhomogeneousdimensionswithallthestan-dardproperties.Thisseemstobeapracticalsolutioninmanysituations,inparticularwhenheterogeneityarisesasanexceptionduetoincompleteinformation,orwhenthestructureofthedimensionissimple.Inothercases,itseemsbettertorepairthestructuresoitcanservetoguideusersinqueryformulation.Usingthesetechniqueswecantransformheterogeneousintohomogeneousdatasothatthestandardframe-workofOLAPaggregatenavigationapplies.Wehavealsoexplainedtheframeworkofdimensionconstraints,whichallowtocapturethemixtureofstructuresandtosupporttransformationstohomogeneousstructures.Besides,dimensionconstraintssupportreasoningaboutaggregatenavigationinheterogeneousOLAPdata.ThereareotherformsofstructuralheterogeneityinOLAPmodels.Itmaybefoundinrealdatawarehousingheterogeneityresultingfromthenonvalidityofdescrip-tiveattributesattachedtothecategoriesofthedimensions.Theseattributesallowtodescribeelementsofthecategory.Asanexample,wemayhavetheattributesCEO,numberofemployees,totalrevenue,andsoforth,todescribetheelementsofacategorycompany(Jagadishetal.,1999).Thereisalsoanotherformofhet-erogeneitythatinvolvesthestructureoffacttables,sincedifferentelementsmayrequiredifferentmeasures.Forexample,whilecheckingaccountshaveminimumbalances,overdraftlimits,andservicecharges,savingaccountshaveinterestpaid,andchargeabledebits(Kimball,1996).Thedevelopmentoftechniquesandtoolstosupporttransformationsfordifferentformsofheterogeneityandirregularitiesinthe data is an open problem of practical significance for the improvement of cur-rentOLAPsystems.

Acknowledgments.

ThisworkwassupportedbyMillenniumNucleus,CenterforWebResearch(P04-067-F),Mideplan,Chile.

References

Abiteboul,S.,&Vianu,V.(1999).Regularpathquerieswithconstraints.Journal of Computer and System Science, 58(3),428-452.

Buneman,P.,Fan,W.,&Weinstein,S.(1998).Pathconstraintsonsemistructuredandstructureddata.InProceedings of the Seventeenth ACM Symposium on Principles of Database Systems,NewYork(pp.129-138).

Page 83: Data Warehouses and OLAP - Concepts Architectures and Solutions

�6 Hurtado & Gutierrez

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Cabibbo,L.,&Torlone,R.(1998).Queryingmultidimensionaldatabases.InPro-ceedings of the Sixth International Workshop on Database Programming Languages,London(pp.319-335).

Chatziantoniou,D.,&Ross,K.A.(1996).Queryingmultiplefeaturesofgroupsin relationaldatabases. InProceedings of the Twenty-Second International Conference on Very Large Data Bases,SanFrancisco(pp.295-306).

Goldstein,B.S.(1981).Constraintsonnullvaluesinrelationaldatabases.InPro-ceedings of the Seventh International Conference on Very Large Data Bases,Cannes,France(pp.101-110).

Harinarayan,V.,Rajaraman,A.,&Ullman,J. (1996). Implementingdatacubesefficiently. In Proceedings of the 1996 ACM International Conference on Management of Data, Montreal,Canada(pp.205-216).

Hurtado,C.,&Gutierrez,C.(2003).ComputingcubeviewdependenciesinOLAPdatacubes.InProceedings of theFifteenth IEEE International Conference on Scientific and Statistical Database Management,Boston (pp.33-43).

Hurtado,C.,&Gutierrez,C.(2004).EquivalenceofOLAPdimensionschemas.In Proceedings of the Third International Symposium on Foundations of Information and Knowledge Systems,WilhelminenburgCastle,Austria(pp.176-195).

Hurtado,C.,Gutierrez,C.,&Mendelzon,A.(2005).CapturingsummarizabilitywithintegrityconstraintsinOLAP.ACM Transaction on Databases Systems, 30(3),854-886.

Hurtado,C.,&Mendelzon,A.(2001).Reasoningaboutsummarizabilityinhetero-geneousmultidimensionalschemas.InProceedings of the Eighth International Conference on Database Theory(pp.375-389).London.

Hurtado,C.,&Mendelzon,A.(2002).OLAPdimensionconstraints.InProceed-ings of the Twenty-First ACM Symposium on Principles of Database Systems,NewYork(pp.169-179).

Hurtado,C.,Mendelzon,A.,&Vaisman,A.(1999).Maintainingdatacubesunderdimensionupdates.InProceedings of the Fifteenth International Conference on Data Engineering,Washington,DC(pp.346-355).

Hurtado,C.,Mendelzon,A.,&Vaisman,A.(1999).UpdatingOLAPdimensions.InProceedings of the Second IEEE International Workshop on Data Warehous-ing and OLAP,KansasCity,Missouri (pp.60-66).

Huseman,B.,Lechtenborger,J.,&Vossen,G.(2000).Conceptualdatawarehousedesign.InProceedings of the International Workshop on Design and Manage-ment of Data Warehouses,Stockholm,Sweden (pp.6-16).

Page 84: Data Warehouses and OLAP - Concepts Architectures and Solutions

Handling Structural Heterogeneity in OLAP ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Jagadish,H.,Lakshmanan,L.,&Srivastava,D.(1999).Whatcanhierarchiesdofordatawarehouses?InProceedings of the Twenty-Fifth International Conference on Very Large Data Bases,SanFrancisco(pp.530-541).

Jarke,M.,Lenzerini,M.,Vassiliou,Y.,&Vassiliadis,P.(1997).Fundamentals of data warehouses.Berlin,Heidelberg;NewYork:Springer.

Kimball,R.(1995).Theaggregatenavigator.DBMS and Internet Systems Magazine. RetrievedMay26,2006,from http://www.dbmsmag.com/9511d05.html

Kimball,R.(1996).The data warehouse toolkit.NewYork:JohnWiley&Sons.Kimball,R.(1997,August).Adimensionalmodelingmanifesto.DBMS and Inter-

net Systems Magazine. RetrievedMay26,2006,fromhttp://www.dbmsmag.com/9708d15.html

Lehner,W.,Albrecht,J.,&Wedekind,H.(1998).Normalformsformultidimensionaldatabases.InProceedings of theTenth International Conference on Scientific and Statistical Database Management,Capri,Italy(pp.63-72).

Lenz,H.,&Shoshani,A.(1997).SummarizabilityinOLAPandstatisticaldatabases.InProceedings of the Ninth Scientific and Statistical Database Management Conference,Olympia,Washington(pp.132-143).

Malinowski,E.,&Zimanyi,E.(2004).OLAPhierarchies:Aconceptualperspective.InProceedings of the 16th International Conference Advanced Information Systems Engineering, Riga,Latvia (pp.447-491).

Mumick,I.,Quass,D.,&Mumick,B.(1997).Maintenanceofdatacubesandsummarytablesinawarehouse.InProceedings of the 1997 ACM SIGMOD International Conference on Management of Data,Tucson,Arizona(pp.100-111).

Pedersen,T.,Jensen,C.,&Dyreson,C.(1999).Extendingpracticalpre-aggrega-tioninon-lineanalyticalprocessing.InProceedings of the Twenty-Fifth In-ternational Conference on Very Large Data Bases,Edinburgh,Scotland(pp.663-674).

Pedersen,T.,Jensen,C.,&Dyreson,C.(2001).Afoundationforcapturingandquery-ingcomplexmultidimensionaldata.Information Systems, 26(5),383-423.

Rafanelli,M.,&Shoshani,A. (1990).Storm:Astatisticalobject representationmodel.InProceedings of the Fifth International Conference on Scientific and Statistical Database Management,Charlotte,NorthCarolina (pp.14-29).

West,D.B.(1996).Introduction to graph theory.PrenticeHall.

Page 85: Data Warehouses and OLAP - Concepts Architectures and Solutions

�8 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.III

Data.Quality-Based.Requirements.

Elicitation.for.Decision.Support.Systems

Alejandro VaismanUniversidad de Buenos Aires, Argentina

Abstract

Today, information and timely decisions are crucial for an organization’s success. A decision support system (DSS) is a software tool that provides information allowing its users to make decisions timely and cost effectively. This is highly conditioned by the quality of the data involved, usually stored in a data warehouse, and by a sound and complete requirements analysis. In this chapter we show that conven-tional techniques for requirements elicitation cannot be used in DSS, and present a methodology denoted DSS-METRIQ,.aimed at providing a single data quality-based procedure for complete and consistent elicitation of functional (queries) and nonfunctional (data quality) requirements. The outcomes of the process are a set

Page 86: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

of requirement documents and a specification of the operational data sources that can satisfy such requirements. We review the state-of-the-art in the field, and show that in spite of the tools and methodologies already proposed for the modeling and design of decision support systems, DSS-METRIQ is the first one that supports the whole process by means of an integral technique.

Introduction

Itisawell-knownfactthat,amongthephasesofthesoftwaredevelopmentpro-cess, analysis and specification of functional and nonfunctional requirements is a crucial one. The lack of good requirements specification is a major cause of failure insoftwaredevelopment(Thayer,2002).Thesoftwareengineeringcommunityhasdevelopedmanyuseful toolsforrequirementsanalysis in transactionalsystems.Thesekindsofsystemsdealwiththeday-to-dayoperationofanorganization.De-cisionsupportsystems (DSS)areofacompletelydifferentkind:theyarefocusedonintegratingdataandmodelsinordertoimprovethedecision-makingprocess.ThedatathatfeedaDSSgenerallyresideinadatawarehouse.Thesoftwarede-velopmentcycleofDSShasparticularities that requireapplyingmethodologiesdifferentthantheonesusedforoperationalsystems.Thereasonforthisistwofold:ontheonehand,traditionalmethodologieshavebeenthoughtanddesignedwithtransactional systems in mind; on the other hand, specific methodologies applicable toDSSaroseasad-hocanswerstopracticalneeds,andmostofthemarejustmereenumerationsofactivitiesthatmusttakeplaceinordertoimplementthesystem,focusingonpopulatingthedatarepositorywhileignoringimportantissuesliketheimpactofchangesintheoperationaldatasources,orworse,ifthesedatasourcessatisfytheusers’informationrequirements.NewsourcesoffailurearepresentinDSS:correctnessandtrustworthinessoftheinformationarethebasisofthedeci-sion-makingprocess.Wedonotonlyneedtounderstandtheuser’s informationneeds,butalsoaccountforkeepingthedatarepositoryup-to-dateaccordingtouserspecifications. Also, update processes and their frequency must be considered, as wellastheanalysisofthequalityandcompletenessofthedatasources.Itfollowsthatthereisaneedfortechniquesthat,besidesaccountingforthesoftwareprocesscycleandfunctionalrequirements,alsoconsiderthequalityoftheinforma-tionthesystemwilldeliver.Thereareseveralreasonsforthis.Forinstance,mostofthetime,peopledevelopinginformationsystemsdonotconsidertheimpactoflowqualitydata(Kimball,Reeves,Ross,&Thornthwaite,1998).Lowdataqual-ityismorearulethananexception.Justtogiveanexample,ithasbeendetectedintheU.S.,thatapproximately50to80%ofthecomputerizedcriminalrecordsareinaccurate,incomplete,orambiguous(Strong,Yang,&Wang,1997).Sofar,thecontributionofsoftwareengineeringforaddressingtheproblemsstatedhasbeen

Page 87: Data Warehouses and OLAP - Concepts Architectures and Solutions

60 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

limited, althoughmany techniqueshavebeenproposed inorder to analyzeandmeasureadataqualityrequirement.SomeexamplesofthesetechniquesareGQM(goalquestionmetric)(Basili,Caldiera,&Rombach,1992)andQFD(qualityfunc-tiondeployment)(Akao,1997).Insummary,traditionalsoftwaredevelopmentmethodologiesdonotapplytoDSS,andfocusonsoftwarecorrectness,payinglittleattentiontotheproblemofdataqualityandcompleteness,giventhat,ingeneral,thisisnotconsideredanissueintherequirementanalysisphaseofthesoftwaredevelopmentcycleforoperationalsystems.Basedonthesepoints,weproposeamethodologycalledDSS-METRIQthatintegratesconceptsofrequirementsengineeringanddataquality,inordertoprovide a comprehensive solution to the requirements elicitation process specifi-callyorientedtoDSS.

Case.Study

Throughoutthechapterwewilldiscussthefollowingcasestudy.WemustcollectrequirementsforaDSSforawholesalechaincalled“LosAndes”(specializedinfoodproducts).ThechainhasthreebranchesintheArgentinacountryside.TheprojectinvolvesthedevelopmentofadatawarehouseandaDSSforsupportingthedailytasksofdecisionmakers.Thecompanyhasmanydifferentsourcesofoperationaldata.Wemustcarryouttherequirementselicitationprocess,withthefollowinggoalsinmind:discoveryanddocumentationofuserqueries,addressingtheinformationqualityrequiredbyourcustomer(that we must also help to define).Itwillalsobeourtasktoanalyzedataqualityineachoneofthedatasources,indicatingforeachpieceofdata,thedatasourcefromwhichwewillobtainitandthedataqualitywecanexpect.Thus,wemustspecifythequeries(functionalrequirements)thatcouldbeaddressedbythesystem(giventheavailabledatasources)satisfyingthedataqualitylevelsimposedbyourcustomer(nonfunctionalrequirements).Therewillbearequirementsengineeringteam,composedofaprojectleader,atrainingteam,ateamforcarryingout theinterviews,adataprocessingteam,andadictionarymanager(moreondictionariesinthefollowingsections).Ourcustomerprovidedalistcontainingthecontactinformationoftheemployees(belongingtodifferentareas),whowillcooperateintheprocess.

Contributions and Chapter Organization

Weintroduceamethodology(denotedDSS-METRIQ)forrequirementselicitationin DSS, aimed at providing an integrated process specification for the complete andconsistentanalysisoffunctional(queries)andnonfunctional(dataquality)re-quirementsinDSS.Weprovidedetailedmechanismsforcollectingfunctionaland

Page 88: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

nonfunctionalrequirementsasawhole,addressingdataqualityandcompletenessoftheoperationaldatasources.Wegivetoolsallowingansweringthefollowingquestions:(a)can we answer the set of queries required by the user with the data currently available in the data sources? (b) what is the quality of the answers we will obtain? (c) does this quality satisfy users’ requirements?Thisisasubjectof-tenignoredinotherproposals.Theoutcomesoftheprocessareasetofdocumentsandarankingoftheoperationaldatasourcesthatcansatisfytheusers’qualityandinformationrequirements,basedontwoparametersdenoted local and global data source performance.Asfarasweareawareof,nootherproposalhasaddressedtheprobleminthisway.Ofcourse,theanalysismayalsotriggercorrectiveactionsoverdatathatdonotreachtherequiredlevelofquality.Finally,eachphaseofthismethodology needs a technical solution from the software engineering or datawarehousingcommunities.Forinstance,forrequirementselicitationweadapttheGQM(goalquestionmetric)methodology.FordatasourceselectionweintroduceatechniquebasedonQFD(qualityfunctiondeployment).In this chapter we first review related work and study the differences between DSS andoperationalsystemswithrespecttorequirementselicitation.AfterpresentingbasicdataqualityconceptsweintroduceDSS-METRIQandexplaineachphaseofthemethodologyindetail.Weconcludewithadiscussiononpossibleresearchdirections.

Related.Work

Thesoftwaredevelopmentcycleinvolvesdifferentstagesorphases,eachoneofthemcomposed of a set of activities. The final goal is obtaining a software product reflect-inguserrequirementsinthebestpossibleway.WaterfallandBaseline Managementare popular models for software development. There are five phases in these models: requirementsanalysis,design,coding,testing,andsystemintegration,insequentialform.Modeling throughprototypes consists inquicklydevelopingasystemforhelpingtodeterminesoftwarerequirements.Anotherpopulartechnique,theSpiral modelemphasizestheideathatrequirementscannotbedeterminedinaprecisewayfromthestart,leadingtotheideaofa“spiral”whichincludesacompletecyclethatmust be revised iteratively until the final system satisfies the expected functionality. Inallofthesemodels,therequirementsanalysisphaseisdividedintofourmainac-tivities: requirement elicitation, analysis and modeling, specification, and validation. Duringrequirements elicitation,requirementengineersgainunderstandingoftheuser needs. A requirements engineer carries out interviews, classifies and integrates theinformationobtained.TechniqueslikeIBIS(issue-basedinformationsystem)(Christel&Kang,1992),orJAD(jointapplicationdevelopment),arewidelyused.Theanalysis and modeling outcome is the definition of user requirements..Themost

Page 89: Data Warehouses and OLAP - Concepts Architectures and Solutions

62 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

popularmethodsforthesetasksareenterprisemodeling,datamodeling(throughentity-relationshipmodeling),object-orientedtechniques,andstructuredmethod-ologieslikeSADT(structuredanalysisanddesigntechniques)(Ross&Schoman,1979).Specification istheprocessofgeneratingtherequirementsdocumentation.CORE(controlledrequirementsexpression)(Mullery,1979)canbeusedinthisstep.Thepurposeof requirements validationistocertifythatrequirementsareanacceptabledescriptionofthesystemtobeimplemented.Inputsfortheprocessaretherequirementsdocument,organizationalstandards,andorganizationalknowledge.Theoutputisalistthatcontainsthereportedproblemsandtheactionsnecessarytocopewiththem.Requirementsreviewsandrequirementstestingarecommontechniquesusedforthisactivity.Decision supportsystemsextractinformationfromadatabaseanduseittosupportthedecisionmakingprocess.ADSSusuallyrequiresprocessinggreatvolumesofdataforgeneratingvaluableinformation.GillandRao(1996)classifythesekindsofsystemsas(a)data-driven,whichemphasizesaccessandmanipulationoflargestructureddatabases;(b)modeldriven,whichemphasizestheaccessandmanipula-tionofamodel;(c)knowledgedriven,whichrecommendsactionstothemanagers,oftencustomizedforacertaindomain;and(d)documentdriven,integratingavarietyofstorageandprocessingtechnologies.ADSSismadeupof:(a)database(typicallya data warehouse); (b) components for data extraction and filtering, used to extract andvalidatethedatatakenfromtheoperationaldatabases;(c)querytools;and(d)presentationtools.Adata warehousegathersdatacomingfromdifferentsourcesofanorganization(Chaudhuri&Dayal,1997).Data warehousing involvesaseriesofprocessesthatturnrawdataintodatasuitabletobequeried.Asetofdatatransfor-mationprocessesdenotedETL(Extraction,Transformation,Loading)exportsdatafromtheoperationaldatabases(generallyinheterogeneousformats),andaftersomedepurationandconsolidation,loadthemintothedatawarehouse.OLAP(onlineanalyticalprocessing)toolsareusedforqueryingthewarehouse.System development involves three clearly defined phases: design, implementation, andmaintenance.However,inthedevelopmentcycleoftraditionalsoftwaresystem,activitiesarecarriedoutsequentially,whileinaDSStheyfollowaheuristicprocess(Cippico,1997).Thus,methodologiesfordevelopingoperationalandDSSsystemsaredifferent.Forinstance,inoperational systems(a)thedevelopmentcycleispro-cess driven,basedonastabledatamodel;(b)datamustbenormalizedinordertosupport transaction processing; (c) hardware is defined in the planning phase, remain-ingquitestable;and(d)thereisnoperiodicdataloading.InDSS,wehave(a)thedevelopmentcycleisdata driven;(b)dataisgenerallydenormalized;(c)hardwarechangesdynamically;and(d)periodicaldataloadingisatypicalprocess.InspiteofthepopularitygainedbyDSSinthelastdecade,amethodologyforsoft-waredevelopmenthasnotbeenagreedupon.Thus,itisnotsurprisingthatmostcontributionsonrequirementsanalysisforDSScamefromconsultingcompaniesandsoftwarevendors.TheNCR methodology isaimedatdevelopingandmain-

Page 90: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

taining the data warehouse infrastructure, assuring data quality, and improvingperformanceencouraging theuseof traditionaldatabasedesign techniques.The SAS Institute Rapid Development methodology is basedontheargumentthatthetwogreatsourcesoffailureofdatawarehouseprojectsarethelackofexperienceandthedevelopmentofverylargeprojects.Thus,thismethodologytriestohandlesuchriskdividingtheprojectintounitscalled“builds.”Eachcycleofthesebuildsconsistsofthefollowingstages:valuation,requirements,design,implementation,final testing, and distribution. Microsoft methodology proposes eight activities:fourdevotedtocreatingthedatawarehouseandfourtoreviewingandmaintainingit,withfeedbackfromtheprocesses.Kimballetal.(1998)proposea“federated”architecture,withdatamartsbasedonstarschemas.Allthemethodsarefocusedonthedevelopmentoftheinfrastructurefordecisionsupportsystems,butnoneofthemhandlesdataqualityinacomprehensivefashion.There are several proposals addressing thedesignof datawarehouses anddatamarts.Manyofthemusesomeofthetechniquesweproposeinthischapter.How-ever, these works do not compare with ours because the goals are different:weareinterestedintherequirementelicitationprocessitself,andnotinthedesignprocess,whichbelongstoalaterstage.Forexample,theworkbyMoodyandKortink (2000)proposestheuseoftheentity-relationshipmodelfordatawarehousedesign.Witha different approach,Bonifati,Cattaneo,Ceri, Fuggetta, andParaboschi (2001)introducedaninterestingrequirements-drivendesignmethodologyfordatamarts.However,theyfocusonthedesignstage,andonlyaddressfunctionalrequirementsin the requirements elicitation phase (they useGQM for this task).Vassiliadis,Bouzeghoub,andQuix (1999)alsouseGQM,butinthiscaseforidentifyingmetricsthatallowevaluatingthequalityofadatawarehouseonceithasbeendeveloped.Closertoourproposal,WinterandStrauch(2003,2004)introducedademand-drivenmethodology (i.e., a methodology where end users define the business goals) for data warehousing requirement analysis. They define four steps where they identify usersandapplicationtype,assignpriorities,andmatchinformationrequirementswithactualinformationsupply(i.e., datainthedatasources).Thereareseveraldif-ferenceswiththemethodologywepresenthere.Themainoneresidesinthatourapproachisbasedondataquality,whichisnotconsideredinthementionedpaper.Moreover,althoughtheauthorsmentiontheproblemofmatchingrequiredandsup-pliedinformation,theydonotprovideawayofquantifyingthedifferencebetweenthem.Onthecontrary,wegiveamethodfordeterminingthedatasourcesthatbestmatch the information needs for each query defined by the user. Paim and Castro (2003)introducedDWARF,amethodologythat, likeDSS-METRIQ,dealswithfunctionalandnonfunctionalrequirements.Theyadaptrequirementsengineeringtechniques and propose a methodology for requirements definition for data ware-houses.Fornonfunctionalrequirements,theyusetheextended-datawarehousingNFRFramework(Paim&Castro,2002).AlthoughDWARFandthisframeworkareclosetotherationaleofDSS-METRIQ,themaindifferencesare(a)wegive

Page 91: Data Warehouses and OLAP - Concepts Architectures and Solutions

64 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

amoredetailedandconcretesetoftoolsfornonfunctionalrequirementselicita-tion; (b) we provide a QFD-based method for data source ranking on a quantifiable basis;and(c)wegiveacomprehensivedetailofalltheprocessesanddocumentsinvolved.PrakashandGosain (2003)alsoemphasizetheneedforarequirementsengineeringphaseindatawarehousingdevelopment.Thisphaseprecedesthelogi-cal,conceptual,andphysicaldesignphasestheyproposeascomponentsofthedatawarehousedevelopmentprocess.TheyproposetheGDI(goaldecisioninforma-tion)model.However,theauthorsdonotprovidealevelofdetailthatmayallowamorein-depthanalysis.Insummary,althoughourproposalintersectsmanyothersimilarones,itintegratesthemostpopulartechniques,resultinginacomprehensiveandself-containedmeth-odology where each phase has clearly defined steps, as we will see in the follow-ingsections.Mostofall,DSS-METRIQaddressestheoverlookedproblemofdatasource qualification and selection.

Quality.Concepts

Whenspeakingaboutquality,peopledonotalwaysrefertothesameconcept(Bo-browski,Marré&Yankelevich,1999).Manytechniqueshavebeendevelopedformeasuringquality.Inwhatfollows,wesurveytheoneswearegoingtouseintheremainderofthischapter.

Goal.Question.Metric.(GQM).

GQM is a framework for metric definition (Basili et al., 1992). It defines a top-down procedureallowingforspecifyingwhatisgoingtobemeasured,andtotracehowmeasuringmustbeperformed,providingaframeworkforresultinterpretation.Theoutcome of the process is the specification of a system of measurements that con-sistsofasetofresultsandasetofrulesfortheinterpretationofthecollecteddata.The model defines three levels of analysis: (a) conceptual (Goal), where a goal for a product, process, or resource is defined; (b) operational (Question): at this level, a set of questions is used for describing the way a specific goal will be reached; and (c)quantitative(Metric):themetricassociatedwitheachquestion.Themodelisahierarchical structure that starts from a goal, follows with a set of questions refining thegoal,andendswiththemetricsthatwillhelpanswerthequestions.Forexample,ifourgoalconsistsinmeasuringthelegibilityofacertaintext,thequestionwouldbe“whatisthelevelofreaders’comprehension?”Themetricwillbethenumberofreaderswhounderstoodthetext.

Page 92: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Quality.Function.Deployment.(QFD)

Qualityfunctiondeployment(QFD)(Akao,1997)isamethodproposedinthe1960sby Yoji Akao in Japan. It was first conceived as a method for the development of newproductsundertheframeworkoftotalqualitycontrol.QFDaimsatassuringdesignqualitywhiletheproductisstillinitsdesignstage.Thecentralinstrumentofthemethodologyisamatrixcalled“HouseofQuality.”Thismatrixiscomposedof information blocks, and it is filled out in a sequence of steps: first, interviews areusedtomodelcustomerneeds.Here,requirementsareexpressedinavagueor ambiguous way, and must be refined. Then, technical solutions for solving user needs are proposed. The process iterates until it finds all the solutions. With the resultsobtainedintheprevioussteps,thematrixofinterrelationshipsiscompleted.Afteridentifyingtherelationshipsbetweentechnicalfactors,theroofoftheHouse of Quality is completed and possible conflicts between technical solutions are de-tected.Twotablesarecompleted:customer’svaluationsandthevaluationsofthetechnicalsolutions.Thelasttwostepsinvolveprioritizinguserrequirementsandprioritizingtechnicalrequirements.

Data.Quality

Organizationsareconsciousofdataqualityproblems.Nevertheless,effortsgenerallyfocusondataaccuracy,ignoringmanyotherattributesandimportantqualitydimen-sions (Wang & Strong, 1996). Thus, quality validation and verification techniques arestillrequired.Usually,thesetechniquesconcentrateonlyonsoftwareandassumethatexternalagentsprovidethedata(Bobrowskietal.,1999).Poorinformationqualityisduetoseveralcauses:(1)Problemsintheprocesses:tounderstandtheprocessesthatgenerate,use,andstorethedata,itisessentialtounderstanddataquality.Inanorganization,theownersoftheprocessesmustberesponsibleforthequalityofthedatatheyproduceoruse.(2)Problemsintheinformationsystems:oftenrelatedtopoorsystemdevelopment(incompletedocumentationorsystemsthathavebeenextendedbeyondtheiroriginalintention).(3)Problemsofpoliciesandprocedures:apolicyaboutdatamustcoversecurity,privacy,inventoryoftheinformationthatiscontrolled,ordataavailability.(4)Problemsindatadesign:moreoften than not, data are used for tasks they were not defined for.

Data.Quality.Dimensions.

There are basically two ways of defining data quality: the first one uses a scientific approach and defines data quality dimensions rigorously, classifying them as dimen-sionsthatareorarenotintrinsictoaninformationsystem(Wang,Storey,&Firth,

Page 93: Data Warehouses and OLAP - Concepts Architectures and Solutions

66 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

1995).Thesecondoneisapragmatic approach aimed at defining data quality in an operational fashion (Wand & Wang, 1996). Wang & Strong (1996) identified fourdataqualitycategoriesafterevaluating118variables(Wang&Strong,1996):(1)intrinsicdataquality;(2)contextual data quality (defines the quality of the in-formationwithinthecontextofthetask);(3)data quality for data representation:determinesifthesystempresentstheinformationinaconcise,consistent,under-standableway;and(4) dataqualityregardingdataaccess (defines quality in terms oftheroleoftheinformationsystemintheprovisionofthedata).Table1sum-marizestheresultsofacademicresearchonthemultipledimensionsapplicabletoinformationquality,comparingresultsfromDeloneandMcLean(1992),Hoxmeier(2000),JarkeandVassiliou(1997),Lee,Strong,Kahn,andWang(2002),WandandWang(1996),andZmud(1978).

DSS-METRIQ.Overview.

InthissectionweintroduceDSS-METRIQ. The methodology is composed of five phases: scenario, information gathering, requirements integration, data source se-

Proposal Intrinsic Contextual Representation Accessibility

Leeetal.

AccuracyCredibilityReputationObjectivity

UnderstandabledataConciserepresentationInterpretabilityConsistency

AddedvalueRelevanceCompletenessTimeliness

AccessibilitySecurityEasyoperation

Zmud Accuracy ReliabilityTimeliness

OrderLegibility

JarkeandVassiliou

AccuracyConsistencyCompletenessCredibility

RelevanceTimelinessUsefulnessUp-to-dateVolatility

InterpretabilitySyntaxSemanticsAliasSource

AccessibilityAvailabilityPrivileges

DeloneandMcLeanReliabilityAccuracyPrecision

RelevanceTimelinessUsefulnessContentCompletenessOpportunity

UnderstandingLegibilityClarityFormat“Lookandfeel”ConcisenessUniquenessComparability

UsefulnessAccessibilityConvenience

WandandWang CorrectnessAmbiguity Completeness Meaning

Table 1. Quality dimensions

Page 94: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

lection,anddocument generation,andfromanyphaseitispossibletogobacktoanyformerone.Thewholeprocesscanbesummarizedasfollows:ontheonehand,the data consumer’s functional requirements are analyzed, unified, and documented. Ontheotherhand,thequalityofdatainthedatasourcesiscollectedfromthedataproducerusers.Thisinformationisthenanalyzedasawhole,andacollectionofdocuments isproduced.Thesedocumentswillallowmatching therequirementswiththeavailabledata. Intheremainderofthissectionweintroducethegeneralframeworkofthemethodology,andtheconceptualbasisoverwhichitisbuilt.Eachphaseofthemethodologywillbedescribedindetaillaterinthischapter.

Framework

We first define the participants, concepts, techniques, and tools that will be used in therequirementanalysisprocess.

• Team: The methodology defines the following roles and participants in the team thatwillcarryouttheproject:(a)projectleader:managestheworkingteamandinteractswiththecustomer;(b)trainingleader:carriesoutthetrainingoftheusersontheconcepts,methodologies,ortechnologiesassociatedwiththeproject;(c)requirementsengineer:performsrequirementselicitation,workingjointlywiththeusers(mustbeanexperiencedprofessional);(d)queryanddatamanager:analyzesthequeries;and(e)informationadministrator:.dealswithchangesintheinformationthatsupportsthemethodology(dictionaries,forms,etc.).

• Users:.Anypersonparticipating in theproject isconsideredauser.Userstobeinterviewedare(a)data producers, whowillparticipateininterviewsaimedatunderstandingdata;(b)data consumers,whowillbeinterviewedfor defining the queries that will be posed to the system; (c) referent users are users with a higher hierarchy in the organization than the ones defined in (a) and(b);referentusersparticipateininterviewswherethescopeofthesystemand priorities are defined. She also solves conflicts between requirements of different users. Priorities are defined for users, ranging from 1 to 5. Users are associatedtodomains(sales,acquisitions).Eachdomainhasapriority,alsorangingbetween1and5.

• Data.sources: DSS-METRIQ defines two kinds of data sources: physical andlogical.Theformeraresourceswheredataareactuallystored.Thelatteraresetsofdatasourcesproducingadataelement(i.e.,setofphysicaldatasourcesproducingaview).

Example.1:Theattributedaily_salesisstoredinthetableDaily_Sales_Summary,belongingtotheoperationaldatabaseSalesCentral.Thisda-

Page 95: Data Warehouses and OLAP - Concepts Architectures and Solutions

68 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

tabaseisaphysicaldatasource.Theattributebuy_sell_daily_balanceiscomputedasthedifferenceoftwoattributesrepresentingdailybuysandsales,thatarelocatedintwodifferenttables,intwodifferentdatabases:the“BuysCentral”databaseandthe“SalesCentral”database.Thus,buy_sell_daily_balanceisalogicaldatasource.Wewillgivethisdatasourceaname,sayLDS_1(standingforLogicalDataSource1).

• Interviews:.DSS-METRIQconsiderstwokindsofinterviews:(a)groupinter-views:intherequirementsphase,JADisused(Christel&Kang,1992);and(b)individualinterviews:theuserrequirements,mainlyfromthedataconsumers,canbeobtainedthroughtraditionalstructuredorunstructuredinterviews.

Supporting.Elements

DSS-METRIQprovideselementsforsupportingthemanagementoftheinforma-tioncollectedthroughouttheprocess.Theseelementsareforms,matrices, a data dictionary, andan aggregations dictionary.Formsareelementsthatregisterthecollectedinformation.Asusual,formsaredividedintwomainsections:theheading andthebody.Theheadingcontainsnameofform,phaseofthemethodology,stepwithinthephase,version,andrevisionnumber.Inthebodyoftheform,thecol-lectedorgeneratedinformationiswritten.Ofcourse,formscanbeupdatedduringtheprocess.Thus,requirementsevolutionissupportedinthisway(meaningthatany change that occurs during the process can be reflected and documented in the forms).Matricesareequippedwithacertainintelligencethatallowsweightingtheinformationcontainedintheforms,inordertoqualifyandprioritizerequirements.Adatadictionaryisacatalogueofdatathatcontainsnames,aliases,anddetaileddescriptionsoftheatomicelementsthatcomposetheuserqueries,datasources,and the data warehouse. Its purpose is the definition of a common meaning for each oneoftheseelements,allowingexpressionofuserrequirementsonthebasisofacommonterminology.Itcanbeupdatedthroughouttheprocess.Theaggregationsdictionary isacataloguecontaininginformationondimensions,dimensionlevels,andaggregations(Chaudhuri&Dayal,1997).

Data.Quality.Requirements

DSS-METRIQ isaquality-basedandquality-ledmethodology. Itsmaingoal istointegratefunctionalrequirementsanddataquality.Assuch,thedataqualitydi-mensions to be used must be defined. We adapted and integrated the main existing proposalscommentedpreviously,consideringnotonlytherelevanceofeachqualitydimension,butalsothepossibilityofquantifyingit.Basedonthis,wewillwork

Page 96: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

withthefollowingqualitydimensions:accuracy, consistency, completeness, timeli-ness, query frequency, source availability,andaccepted response time.Associatedwithtimeliness,wealsoaddcurrencyand volatility.

• Accuracy: Measureshowclosetothevalueintherealworldthedataunderconsideration are. Another vision, from the ontological point of view, defines inaccuracyastheprobabilitythataninformationsystemrepresentsanincor-rectstateof therealworld(Wand&Wang,1996).Theaccuracyofadatawarehouse is influenced by two main factors: (a) accuracy of the data sources and(b)theerrorfactorthattheETLprocesscanintroduce.

• Consistency:.Weadopttheontologicalpointofview,whichdescribescon-sistencyasthe“logicalconsistency”ofinformation.Theunderlyingideaisthatgiventwoinstancesofrepresentationforthesamedata,thevalueofthedatamustbethesame.Forexample,ifitisknownthatthesalesofacompanyexceedacertainmonthlyvaluev, we expect the database to reflect this fact.

• Completeness:.Is the information system able to represent every significant stateoftherealworld.Themethodologypresentedhereemphasizesrepre-sentationinsteadofstructure.Forinstance,ifthereare250employeesintheorganization,weexpectatleastonerecordforeachoneofthemtobeinthedatabase.

• Timeliness:.Itmeasuresthedelaybetweenachangeinthestateoftherealworldandthecorrespondingdatawarehouseupdate.Thisdimensionistightlyassociatedwithothertwo:currencyandvolatility.Timelinessisaffectedbythreemainfactors:(a)speedatwhichthestateoftheinformationsystemisupdatedafterthechangesoccurintherealworld;(b)frequencyofchangeofthestateoftherealworld;and(c)theinstantwhenthedataareactuallyused.The first aspect depends on the design of the system, while aspects (b) and (c) aredesign-independent.

• Currency: Measurestheageofthedata.Itiscomputedasfollows(Wang&Reddy,1992)"

Currency(d)=tc–t0

Wheredisthedataelementunderconsideration,tcisthepresenttime,andt0istheinstantintherealworldwhenthedataelementwascreated.Analterna-tive definition is:

Currency(d)=tf+(tl+te+tq)

Page 97: Data Warehouses and OLAP - Concepts Architectures and Solutions

�0 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

tf=timeinthedatasource:thetimeelapsedbetweentheinstantwhenthedatawere“born”intherealworldandstoredinthedatasource,andthemomentwhentheyaretransferredtothedatawarehouse.

tl=thedurationoftheloadingprocess. te=timeelapsedbetweenthemomentwhendataareavailableforqueryingin

thedatawarehouse,andthemomentwhenthequeryisposed. tq=thequeryresponsetime.• Volatility:.Itrepresentsthelengthoftheintervalduringwhichdataarevalid

in the real world (Wang & Reddy, 1992). Pipino, Lee, and Wang (2002) define Timeliness asafunctionofcurrencyandvolatility:

Timeliness(d)=MAX[1–currency(d)/volatility(d),0]s,wheres>0

The coefficient s(notconsideredinourmethodology)isdenotedsensitivity;it reflects the criteria of the analyst, and depends on the task being performed. Timelinessrangesbetween0(worstcase)and1(desirablevalue).

• Data source availability:Itisthetimeduringwhichthedatasourceisavail-able(Jarke,Lenzerini,Vassiliou,&Vassiliadis,2003).

• Expected.query.response.time:Itisthemaximumacceptedtimeforgettingtheanswertoaquery.

• Query.frequency: Itistheminimumtimebetweentwosuccessivequeries.

Measuring.Quality.

Therearemanydifferentwaysofanalyzingandmeasuringtherequireddataqual-ity parameters. Thus, it is necessary to define a common way of specifying user needs and measuring whether the DSS or the data warehouse will be able to fulfill theminimumlevelsofqualityrequired.Tothisend,weproposetoapplyGQMtoeach one of the dimensions defined previously. This technique is used for specifying userrequirementsandmeasuringtheactualvaluesfordataqualityintheavailabledatasources.Duetospaceconstraints,nextweonlyshowhowthetechniqueisappliedtotheaccuracy, consistency,andcompleteness dimensions.Foraccuracy wehavethefollowing:

a. Specifyinguserrequirements(data consumer users).• Goal:Specifythelevelofaccuracyrequiredforeachdataelementina

query.

Page 98: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Question:Whatisthemaximumacceptabledifferencebetweentheanswersobtainedandtheactualvalueofthedataelementintherealworld?

• Metric:.Theusermustspecifytheaccepteddifference(in%)betweenthevalueofadataelementinthedatawarehouseanditsvalueintherealworld(Quix,Jarke,Jeusfeld,Vassiliadis,Lenzerini,Calvanese,&Bouzeghoub,2002).

b. Measuringaccuracyinthedatasources(data producer users).• Goal:.Determinetheaccuracyofthedataineachsource.• Question:.Whatisthedivergencebetweenthevalueofthedatainthe

sourceandintherealworld?• Metric:.Accuracy ofthedatasourceforacertainattribute.• Measuring.methodology: Givenarepresentativesampleofthedatainthe

real world, we define the accuracy of the data source empirically as:

Accuracy=[MAX]*100((X-Xreal)^2/Xreal)

whereXandXrealarethedatainthesampleandintherealworld,re-

spectively.

Regardingconsistency, iftheconditionismandatoryforthedataelementundercon-sideration, we require a 100% level of fulfillment. Consistency in the data sources ismeasuredobtaining samples fromeach source andmeasuring thenumberofinconsistentrecordswithrespecttoauserquery.Thismeansthattheuserknowsinadvancetheanswertothisqueryoverthesample.Analogously, completeness isspecified as in the previous case and measured from a data sample, posing a set of queriesoverthissampleandapplyingthefollowingformula:

(#ofquerieswithincompleteanswers/#ofqueries)*100

whereanincompleteanswerisonesuchthatarecord(orapartofit)ismissing(rememberthatweknowinadvancealltherecordsfromthesamplethatsatisfythequery).Weproceedanalogouslyfortheotherqualitydimensions.Thisallowsdeter-miningwhichdatasourcescanbeconsideredaptfordevelopingtheDSS,meaningthat if a data source does not fulfill the minimum bound for a quality dimension, eitherdatacleaningmethodsareappliedorthedatasourcemustbediscarded.

Page 99: Data Warehouses and OLAP - Concepts Architectures and Solutions

�2 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Integrated.Requirement.Analysis.

After finishing the interview phase, and when all functional and quality require-mentshavebeenobtained,informationisconsolidated,yieldingasinglerequire-mentsdocumentthatwillbeinputforthelaterphasesofdesign.Inthisprocessweneed to establish priorities and solve conflicting requirements. Thus, we define a setofprioritiesforeachfunctionalandnonfunctionalrequirement.Conceptually,thispriorityindicatesthelevelofimportanceoftherequirement.Prioritiesareas-signedanumberbetween1and5asfollows:optionalrequirement=1;lowimpor-tancerequirement=2;intermediateimportancerequirement=3;highimportancerequirement = 4; mandatory requirement = 5. When two conflicting requirements havethesamepriority,ahigh-levelusermustdecidewhichonewillbeconsidered.Once conflicts are solved, requirements validation isperformed.

•. Data.source.selection.and.document.generation:.Withtheinformationcol-lectedinthepreviousphases,interviewsarecarriedoutwithdataproducerusersinordertodeterminethequalityofdatainthedatasources,withthegoalofmatchinguserrequirementsandavailabledata. Asthisisthecornerstoneofourmethodology,wewillexplainitindetailinthenextsection.

DSS-METRIQ.in.Detail

In thissectionwedescribe thephasesof themethodology,givingdetailsof theprocesseswithineachphase.DSS-METRIQcanbeadaptedtothemostusedsoft-waredevelopmentmodels,likewaterfall,spiral,orprototyping.Asweexplainedinthe previous section, the methodology has five phases, each one grouping together tasksthatareconceptuallyrelated:scenario,informationgathering,requirementsintegration,datasourceselection,anddocumentgeneration.Eachphaseconsistsofasetofatomicsteps.Inthefollowingsectionswedescribeeachphaseintermsofasetofinitial requirements,asequenceofsteps,asetofforms,andtheoutputofthephase(theinformationobtained).Duringtheprocess,severaldocumentsandforms will be manipulated, namely (a) master files, to be denoted with the prefix MAS;(b)hierarchydocuments(e.g., dimensionhierarchies,userhierarchies),withprefix HIE; (c) dictionaries (data and aggregation); (d) query forms, with prefix QRY,containingthemostcommonqueriesthattheuserwillposetothesystem;(e) requirements forms, with prefix REQ; and (f) matrices for processing the in-formation obtained (with prefix MAT). Due to space limitations we will not show allofthesedocuments,butwewilldescribetheircontentandgiveexamplesfromourcasestudy.

Page 100: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Phase.I:.Scenario.

Thegoalofthisphaseistointroducetheprojecttothedifferentlevelsofthecom-pany,buildingaconsensusaboutthescopeandboundariesoftheproject(e.g., users,domains), priorities, and the initial configuration of the information. The inputofthisphaseconsistsof(1)detailsoftheproject;(2)initiallistofdo-mainsinvolved;and(3)scopeandlistofparticipantsoftheintroductorymeetings.Theoutputofthephaseisasetofdocumentscontaining(1)domainsanddomainhierarchy (MAS_DOM); (2) users anduser hierarchy (MAS_USR); (3) qualitydimensions(MAS_QTY);and(4)datadictionary(DIC_DATA);aggregationdic-tionary(DIC_AGGR).Thestepsofthisphaseareskills acquisition and interviews with referent people.During skills acquisition,lecturesaregiventotheprojectteaminordertounifyconceptstobeaddressedintheprocess.Intheproject presentationstep,theprojectis presented to the company’s decision levels, explaining goals, potential benefits, impact,andtheworkingmethodology.Intheglobal definitionsstep,JADmeetingsarecarriedout,aimedatobtainingconsensuson:

a. Domains: sectorsthatwillusethedatawarehouse(e.g., SalesDepartment).Theform MAS_DOM is produced, with fields domain name, domain responsible, con-tactinformation,andrelevance(anumberbetween1and5)ofthedomainwithintheorganization.Forexample,inourcasestudy,theMAS_DOMformcontainstheline<D1, Sales, Jose Hernandez, ext. 2162, 5>, statingthatJose Hernandez isresponsiblefortheSales domain(withdomainidD1),canbecontactedonphoneextension 2162, andthedomainhasthehighestimportance(5).

b. Quality.dimensions: The final set of quality dimensions to be considered, takingintoaccountorganizationalpolicies,goals,scope,developmenttime,andpreferences.Thismayimplypruningtheinitialsetofrequirements.TheformMAS_QTYisproduced.Inourrunningexample,fourqualitydimen-sionswerechosen:Accuracy, Timeliness, Consistency, and Completeness.

c. Initial.data.dictionary: Aninitialcollectionoftermsthatwillbecomethecommonvocabularytobeusedthroughoutthesoftwaredevelopmentcycle.TheformDIC_DATAisproduced.Asamplerecordinthedatadictionaryforthe“LosAndes”projectis<D5, customer, customer name, account>,statingthatthereisadataelementwithid=D5,denotedcustomer,representingacustomer’s name,andreferredalsowiththealiasaccount.

d. Initial.aggregations.dictionary:Thegoalofthisdictionaryistorecordinfor-mationregardingfactsanddimensionstobeusedinlaterphasesoftheproj-ect,inordertoproducethepreliminarystarschema.TheformDIC_AGGRisproduced.Inourproject,arecordintheaggregationsdictionarylookslike

Page 101: Data Warehouses and OLAP - Concepts Architectures and Solutions

�4 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

<D13, customerId,no, sale|purchase, Accounts, customer,10, days>.Thisrecordstatesthatthereisadataelementwithid=D13,withnamecustom-erId, thatdoesnotrepresentafact;thedataelementisalevelintheAccounts dimension,denotedcustomer,havingavolatilityof10 days.

Inthereferent people interviewsstep,theusersthatwillparticipateintheprojectaredefined, and information about them is registered. The file MAS_USR is produced. In our project, a record in this file is <U1, Jose Hernandez, D1, referent, 5>,mean-ingthatuser U1 namedJose HernandezbelongstothedomainD1andisareferent userwithhierarchylevel5 (thehighestone).Foranotherusertypewehave<U2, Maria Lopez, D1, data consumer, 1>.Phase.II:.Information.Gathering.

Thephase’sgoaliscapturinganddocumentingfunctional(queries)andnonfunctional(quality) requirements, taking into account the scope defined in Phase I. The outputofthephaseincludes(1)alistofthequeriesexpectedtobeposedtothesystem;(2)dataqualityrequirementsforms;and(3)aqualitydimensionshierarchy.Nextwedescribethestepsofthisphase.

• Interviews.with.users.and.referent.people:Aimedatdocumentingqueriesand theassociatedqualityparameters.Eachuserprovidesa listofqueries(expressedasquestionsinEnglish)theuserneedsforadailytask.Initially,thevocabulary isunrestricted.However, certain termsmayhavedifferentmeaningsfordifferentusers,orteamparticipants.Forexample,“thebestcus-tomer”or“thelargestsourceofbuyingorders.”Theseexpressionsaredisam-biguatedandconvertedto,forexample,“bestcustomeristheoneaveragingbuyingordersformorethan$1000monthly.”Theanalystmustidentifythesekindsofambiguousexpressionsandtranslatethemasexplained.TheformQRY_USRisproduced.Thisformcontains,foreachuserandquery,(1)userID;(2)aquery ID (auniquevalueoftheform“Q”plusasequentialnumber);(3)thequeryexpressedinEnglish;(4)apriorityfor thequery:therequire-mentsengineermustguidetheuserinthistask,avoidingoverestimatingthequeryhierarchy;(5)aquery frequency(theminimumelapsedtimebetweentwoinstancesofthesamequery);(6)theaccepted response time (maximumtimerequiredforgettingthequeryanswer);and(7)aglobal priority for thequery.Theglobal priority is left blank and will be defined in a later phase. Asanexample,userU2(MariaLopez)hasdeclaredthataqueryshewillbeposingregularlyis“Number of monthly contracts per sales representative.”

Page 102: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

TheentryinQRY_USR,foruserU2willbe<Q1,Number of monthly…,5, 24hs,50sec>.

•. Query.analysis:hereweperformdatarecollectionandvalidationagainstthedatadictionary.Thegoaloftheformeristhediscoveryofatomicdatarequiredfor satisfying each query defined in the previous step. However, initially the QRY_USRformmaycontainquerieswith redundant,ambiguous,orevenincorrectterms.Thus,analystsandusersreviewthequeriesandagreeona(possibly)newsetofqueries,usingtheinformationobtainedfromthedataandaggregationsdictionaries.Forexample,inqueryQ1fromuserU2,thewordcontractswillbereplacedbythewordsales,accordingtotheinformationinthedatadictionary.Thesequeriesmustbevalidatedagainstthedatadiction-ary,andalltermsnotpresentinthisdictionarymustbeadded,usingtheformDIC_DATA. This is a cyclic process, which results in a final QRY_USR form wheredatareferredinthequeriesareabsolutelyconsistentwithdatainthedictionaries.

• Preliminary identification of facts, dimensions, and aggregations:Theanalysttriestoidentifytheunderlyingfactsanddimensionsfromthequeries.Thisisamanualorsemiautomaticprocess(forexample,thisprocesscanmakeuseofoneofthemanyalgorithmsthatuseanentity-relationshipdiagramforobtainingthestarschemaforthedatawarehouse),whichincludesthevalida-tionagainsttheaggregationsdictionaryDIC_AGGR(updatingthisdictionary,ifnecessary).

• Quality.survey.interviews:.afterthequeriesarevalidated,alistofdataele-ments will be extracted from the query definitions collected in the former step. Thesearethedataelementsthatwillberequiredforansweringthequeries.Recallthatforeachdataelementthereisanentryinthedatadictionary.Thequality requirements for these data elements is then defined and registered in three forms: QRY_QTY I, QRY_QTY II, and QRY_QTY III. The first one contains, for eachquery, the following information: (1)Query IDand (2)Data ID: one for each data element in the query. This is the identifier of the elementinthedatadictionary.Alldataelementsdirectly or indirectlyrelatedtothequerymustbeincluded.Forexample,ifaqueryasksforthe“Average monthly sales,” althoughit doesnotdirectlyincludethedollarvalueofeachsale,thisvalueisinvolvedinthecomputationoftheaverage,soweneedtospecifyitsqualityrequirement;(3)descriptionoftheelement;(4)aggregation:indicatesifthedataexpressesadimensionlevel;(5)range(validrangeforthedataelement);(6)timeliness;and(7)accuracy.(Timelinessandaccuracyapplytoourcasestudy,othercasesmayrequiredifferentqualitydimensions).Theothertwoforms,QRY_QTYIIandQRY_QTYIII,specifyconsistencyandcompletenessrequirementsrespectively.

Page 103: Data Warehouses and OLAP - Concepts Architectures and Solutions

�6 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Example.2:.Inourcasestudy,intheformQRY_USR,theentryforqueryQ2,informedbyuserU5(GeorgeMartinez)reads:“Top50customers,amongthecustomerswithmonthlyaveragesaleshigherthan$1500.”Thisqueryincludesthefollowingdataelements:D1(sales),D4(month),D5(customername),D7(year),andD13(customerId).Foreachoftheseelements,thereisanentryinformQRY_QTY1.Forinstance,<Q2,D1,sales,NO,-,high,10>,meaningthatinqueryQ2,dataelementD1,rep-resentingsales,willnotbeusedtoaggregate,requiresa“high”valuefortimeliness,andaminimumaccuracyof10%(i.e.,maximumaccepteddivergencebetweendataandrealworldvalue).Analogously,formQRY_QTYIIcontainstheconsistencyconditionsfordataD5inqueryQ2.TheconditionIDisQ2C,andthedescriptionis“thebestcustomersmustbethe ones classified as ‘international.’ ” For D5, consistency is mandatory. TheformQRY_QTYIIIrecordscompletenessconditionsfordataelementD5inqueryQ2.Theconditionstatesthat“allcustomersregisteredsince2001mustbeinthedatabase,”anditisalsomandatory.

• Prioritizing quality factors:Theuserassignsaprioritytoqualitydimensions.Forinstance,somedepartmentsmaybemoreinterestedintheaccuracyofthereporteddatathanintimeliness.Thiscriteriaisdeterminedforeachuserand applied to each query posed. The form HIE_QTY is filled out, containing, foreachqualitydimension,thedimension’snameandapriority(anumberbetween1and5).

Example.3:.Inourrunningcasestudy,wehavefourqualitydimensions,denotedF1toF4:accuracy,timeliness,consistency,andcompleteness.User U2, from the Sales Department (domain D1) has defined the follow-ingpriorities:5,5,4,3,respectively.UserU3,fromdomainD2(PurchasingDepartment) defined these other set of priorities: 4,3,5,1, respectively.

Phase.III:.Requirements.Integration

In this phase, requirements from all users and domains are unified, using a criteria basedonQFD(Akao,1997).Intheinputofthephasewehave(1)aquerylist;(b)ahierarchyofqualitydimensions;(3)adataqualityrequirementsform;(4)dataandaggregationdictionaries;(5)ahierarchyofdomains;and(6)ahierarchyofusers.Theoutput of the phase is a set of documents containing the unified data model, thequerypriorities,andthedatarequirementsmatrix.Thestepsofthephaseare analysis of query redundancy, unified query prioritizing, andconstructionofthedata requirements matrix.

Page 104: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Analysis.of.query.redundancy:.Equivalent requirements are identified, that is,requirementssuchthatqueriesandassociateddataqualityarethesame.Itsgoalistoreducethenumberofrequirementstothedatasources.Wedonothavethissituationinourcasestudy.

• Unified query prioritizing: Duringtheinitialphasesweworkedwithdiffer-entdomains.Wenowneedtounifyallrequirementsfromthesedomains,anddefine priorities between them. DSS-METRIQ proposes the following order of priorities:Priorities between domains -> Priorities between users -> Priori-ties between queries of the same user: Intuitively,theideaisthattherequire-mentwiththeleastpriorityinadomainprevailsovertherequirementwiththehighestpriorityinthedomainimmediatelyfollowing(inimportance)theprevious one. The following formula defines the global priority computation foraquery“Q”denotedPriorityG(Q).Thisempiricalexpressionisintendstocapture the order of priorities defined previously:

PriorityG.(Q)=PriorityD(D)*X2+PriorityU(U)*X+PriorityQ(Q)

wherePriorityD(D),PriorityU(U),andPriorityQ(Q)arethedomain,users,

andquerypriorities.Asaresultofthisstepweobtainasetofqueriesorderedbypriority.TheformQRY_USRisupdatedinordertocompletetheGlobal priority field. These priorities are a tool for solving conflicting requirements. Forexample,inourcasestudy,query Q1haspriority5foruserU2(withpri-ority1),whobelongstodomain D1(withpriority5).Thus,theglobalpriorityforqueryQ1is135.

• Data.requirements.matrix: Thisistheintegratedrequirementsform.Thisformisusedforexchanginginformationwithdataproducerusers.TheformMAT_REQ_DATA is filled out.

Example 4: Figure1showsaportionoftheformMAT_REQ_DATAforourcasestudy.Eachtripledomain-user-queryhasassociatedwithitasetofdataqualitydimensionsandvaluesforthesedimensions.Notethatthisformsummarizesinformationobtainedduringthepreviousphases.

Phase.IV:.Data.Source.Selection

In this phase, data sources are studied in order to determine if they fulfill the infor-mationrequirementscollectedinphasesItoIII.Theoutputs ofthephaseare(1)aqueryevaluationreportand(2)adatasourceselectionorderforeachdataelement.Thisprocessiscentraltoourmethodology.Asfarasweareawareof,thisisthe

Page 105: Data Warehouses and OLAP - Concepts Architectures and Solutions

�8 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

first proposal addressing this topic in a quantitative fashion. Now we describe the stepsofthephase.

• Analysis.of.data.sources:Meetingswithdataproducersarecarriedout(withthehelpofthedocumentsproducedsofar),wherethesetofdatasourcesandthequalityoftheirdataaredocumented.Also,informationonsourceavailabilityiscollected.Twoforms,MAS_DS_PandMAS_DS_L,areusedforphysical

Figure 1. Data requirements matrix

Orig

in(d

om-u

sr)

ID D

ata

(dic

tiona

ry)

Des

crip

tion

Bus

ines

s P

roce

ssA

ggre

gatio

nR

ange

(des

crip

tion)

Ran

king

(des

crip

tion)

Tim

elin

ess

Acc

urac

yC

onsi

sten

cy

desc

riptio

nco

mpl

eten

ess

desc

riptio

nva

lue

SU

RV

EY

valu

e

FOR

M

Page 106: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

andlogicaldatasources,respectively.Eachformcontainsadatasourceiden-tifier, values for data source availability, and a source priority defined by the dataproduceruser.Inthecaseoflogicaldatasources,foreachdataelementthe corresponding expression for obtaining the data must be specified. The followingactionsaretaken:(a)thedataproduceruserdeterminestheprior-itycriteriafordatasourceusage,basedonexperienceandtechnicalissues.Priority ranges between 1 and 5. (b) The requirements engineer finds out if aphysicalsourcecontainstherequireddata;ifso,itisregisteredintheformMAS_DS_P. (c) If a combination of fields yields some of the required data, thiscombinationisconsideredalogical data source, anditisregisteredintheformMAS_DS_L.Inourcasestudywehavethreephysicaldatasources,whichforsimplicitywedenoteA,B,andC.DatasourceAisaproprietarysystemdatabase,withtransactionalavailabilityof50%andpriority5(containsthecoredataofthebusinessprocesses).DatasourceBisaSAPrepositorywith50%availabilityandpriority4.DatasourceCisastylesheetcollection(contain-ingmonthlysalesinformation)withavailability100%andpriority1.

• Data.source.quality:.Thisstepconsistsofthreetasksthatcanbeperformedinparallel.Thegoalisobtainingthequalityofthedatasourceforeachdata-sourcecombination.Thedataproviderinformsqualitycharacteristicsofthedata source and a mapping for the required fields (i.e., where is the required datalocated,andunderwhichname?).

• Data.source.quality.(data):.TheformDS_QTY_Iiscompleted.Thisformcontains, for eachquery, for eachdata element in thequery, and for eachdatasource,thefollowinginformation:(a)mapping: field in the data source containing the data element, or field to which a function must be applied. For instance,themonthofasalecouldbeobtainedasmonth(date).(b)Aggrega-tion:tellsiftheaggregateddataisorisnotpresentinthesource,orcanbecomputedfromthedatainthesource.(c)Accuracy. (d)Timeliness. Thelasttwodimensionsapplytoourcasestudy,butcanbereplacedbyadifferentsetofdimensionsiftheproblemathandrequiresit.Inourcasestudy,therecord<Q2, sales, B, amount, NO, 70, 5min> tellsthatforqueryQ2,dataelementsales canbeobtainedfromdatasourceB (whereitisinnonaggregatedform),with70%accuracy andwithatimeliness of 5minutes.

• Data.source.quality.(consistency):.TheformDS_QTY_IIiscompleted,withtheconsistencycharacteristicsofthedatasource.Thereisoneentryforeachdatasource,containinganevaluationofthesource’sconsistency.Inourcasestudy,consistencyconditionQ2Caboveisaccomplishedwitha100%preci-sionbydatasourceA,and90%precisionbydatasourceB.

• Data.source.quality.(completeness): The form DS_QTY_III is filled analo-gouslytoformDS_QTY_II,addressingcompletenessinsteadofconsistency.Inourcasestudy,thecompletenessconditionstatingthatallcustomersregis-

Page 107: Data Warehouses and OLAP - Concepts Architectures and Solutions

80 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

teredsince2001mustbeinthedatabaseisaccomplishedwith100%precisionbydatasourceA,and99%precisionbydatasourceB.

• Data.source.quality.assessment:Thegoalofthisstepistheintegration,inasingledatasourceassessmentmatrix,ofthethreeessentialcomponentsofthemethodology:(a)datarequirements;(b)qualityrequirements;and(c)datasources.Theoutputoftheprocessis,foreachdataelement,thebestdatasourcefor obtaining it, and a range with the qualification for each data source. The Global Data Source Performanceiscomputed,usingaprocedurethatadaptstheQFDmethodology.

Example.5:.ThedatasourcequalityassessmentmatrixforourrunningcasestudyisdepictedinFigure2.Weonlyshowthedataelement“sales”andtwoqueries:Q1(fromuserU2)andQ4(fromuserU3).Theinfor-mationgatheredsofaris:a. QueryQ1. Priorities. of. quality. dimensions:. accuracy:. 5, consistency: 4,

completeness:3,timeliness:5. Global priority of the query:135(asexplainedinPhaseIII).. Aggregations.required:monthandsalesman.b. QueryQ4. Priorities.of.quality.dimensions:accuracy:4,consistency:5,com-

pleteness:1,timeliness:3. Global priority of the query: 31. Aggregations.required:.Country,province,city,neighborhood. Finally, the data producer user provided the following informa-

tion: Available data sources: A,B,andC(cinFigure2),withpriorities

5,4,1respectively,asexplainedpreviously(binFigure2).

Eachmatrixblockiscomposedasfollows:(1)Consumerusers’requirements:data(h),queryID,qualitydimensions(i),aggregations(j),globalpriorityofthequery(fromPhaseII),andqualitydimensionprioritiesgivenbytheusersinPhaseIII;(2)Dataproducerusers’information,obtainedinthepreviousstepofthisphase:a submatrix indicating requirements fulfillment for each available data source. According to the degree of fulfillment, a value is given (1, 3, or 9, d in Figure 2), using the following criteria: “1” is given if the condition is not fulfilled, “3” if the condition is not fulfilled, but can be computed from the data in the source; and “9” if the condition is fulfilled. For the sake of brevity we do not extend on how to de-

Page 108: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

terminethesevalues.(3)Datasourceperformanceforeachquery(einFigure2);(4)Globaldatasourceperformance(finFigure2).Thedatasourceperformanceforeachqueryiscomputedas:

PerfLocal(S,Q,D).=.∑ (prii*reli),

where

Figure 2. Quality assessment matrix

Page 109: Data Warehouses and OLAP - Concepts Architectures and Solutions

82 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

PerfLocal.(S,Q,D):.Data source performance of source S for data D in query Q

Prii:Data, quality, and aggregations priorities, for data D in query Q

Reli: Degree of fulfillment of data source S for query Q and data element D

Theglobaldatasourceperformanceiscomputedas:

PerfGlobal(F,Q) = ∑ HierGlobal(Qj) * PerfLocal(S,Q ,D)

ForallqueriesQjinvolvingdataelementD,andgivenasetF.ofadatasourceandasetofqueriesQ.HierGlobal(Qj):GlobalpriorityofqueryQj.

Example.6:.ForthetableinExample5,thelocalperformancefordatasourceAandqueryQ1iscomputedas5*1+5*1+5*1+5*1+4*1+3*1+5*1+5*1+5*1=42.TheglobalperformanceforsourceAis:135*42+31*144=10134.

• Data.source.selection:Althoughthefinalsourceselectionisbeyondthescopeofthemethodology,adocumentisgenerated,witharankingofdatasourcesfor each data. This document will be used in the final data source selection process.Forourcasestudy,therankingis1:datasourceB(globalperformance48,468),2:datasourceC(globalperformance27,702),and3:datasourceA(globalperformance10,134).

Phase.V:.Document.Generation

WiththeinformationcollectedonPhasesItoIV,asetofrequirementsdocumentsisproduced.Thesedocumentsarereviewedbythereferent,dataproducer,anddataconsumer users, in order to reach a final agreement for closing the requirements elicitationphase.Wedescribethesedocumentsnext.

• Query.requirements.document: ContainsallthequeriesobtainedinphasesI to IV, ordered by global priority. Each query is qualified as follows: a value of“1”meansthatthequerycanbeansweredwiththeinformationcontainedinthedatasources;“2”meansthatthequeryinvolvesvaluesnotinthedatasources,thus,itcannotbeanswered;“3”meansthataquery“close”totheoriginalonecanbeansweredwiththedataavailableinthesources(e.g.,modi-

Page 110: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

fyingtherequiredgranularityortherequiredaccuracy).Inthe“LosAndes”project,queriesQ1toQ3wererated“1.”

• DSS.requirements.document: Summarizesall the requirementscollectedduring the process. Contains, for each query: the query identifier, the name of the user who specified the requirement, the query expressed in English, the samequeryafterdisambiguation,thequeryfrequency,thequery’sglobalprior-ity,andtheexpectedresponsetime.Foreachdataattributeassociatedtoeachquery, the form includes the identifier in the data dictionary, description, name tobedisplayedwhenshowingthedata,andallthequalityconditionsrequired.Data warehouse requirements documents: Therearetwodocuments:ametricsdocumentandaqualitydocument.The metrics document specifies, for each qualitydimension,therangeofvaluesthatareacceptableforeachattributeinvolvedinarequirement,andthemetricstobeusedinthedatawarehousedesign.The quality document specifies the range of values acceptable for each requirement. For each required attribute, the document defines (1) maximum timefordataloading;(2)minimumvaluefordatacurrency(i.e.,theageofthedata);and(3)acceptablevaluesforconsistencyandcompleteness.Foreachdimension,thereportincludestheformulaforobtainingmaximumorminimumvalues.

• Preliminary.data.model: Withthecollectedinformationbuildingapreliminaryversionofthestarschemamodelforthedatawarehouseisstraightforward.

• Data. source. requirements. document:. With the information obtained inPhaseIVadocumentcontainingthedatasourcesisproduced.Thisdocumentcontains for each data source an identifier, a description, and the data source availability.

• ETL.process.requirements.document:Acompletelistingof therequireddata and a mapping from the required data to the data source fields from which thesedataareobtained isprovided,possibly including formulas involvingmore than one data field. This information will be used for the design and implementationoftheETLprocess.

Summary.and.Research.Directions

InthischapterweshowedthatmethodologiesforsoftwaredevelopmentinoperationalsystemsdonotapplyintheDSSsetting.Basedonthisconclusion,wepresentedamethodologyforrequirementselicitationwithfocusondataqualitydimensionsand data source selection. The methodology aims at finding out if the data currently availableintheoperationaldatasourcesallowansweringasetofqueries(functionalrequirements) satisfying certain data quality conditions (nonfunctional require-ments).Inordertoquantifytheanswertosuchquestion,weadaptedthequality

Page 111: Data Warehouses and OLAP - Concepts Architectures and Solutions

84 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

function deployment (QFD) technique. Finally, DSS-METRIQ specifies the set of formsneededtosupporttherequirementselicitationprocess.FutureresearchdirectionsincludeaWeb-basedimplementationoftheframework,currentlyinprogress,anddevelopingadatasourceselectionenginethatcandeliverdifferent combinations of data sources fulfilling the requirements with different levelsofquality.Dataqualityevolution,andhowitaffectsdatasourceselection,allowingdynamicallychangingthedatasourcebeingselected,mustalsobeac-countedforinfuturework.

References

Akao,Y.(1997).QFD, past, present and future.Presentedatthe ThirdInternationalQFDSymposium(QFD’97),Linköpin,Sweden.

Basili,V.,Caldiera,G.,&Rombach,H.(1992).The goal question metric approach(Computer Science Technical Report Series CS-TR-2956). College Park:UniversityofMaryland.

Bobrowski,M.,Marré,M.,&Yankelevich,D.(1999).Anhomogeneousframeworktomeasuredataquality.InY.W.Lee&G.K.Tayi(Eds.),Proceedings of IQ’99 (pp.115-124). Cambridge,MA:MITPress.

Bonifati,A.,Cattaneo,F.,Ceri,S.,Fuggetta,A.,&Paraboschi,S.(2001).Designingdatamartsfordatawarehouses. ACM Transactions on Software Engineering and Methodology, 10(4), 452-483.

Chaudhuri,S.,&Dayal,U.(1997).AnoverviewofdatawarehousingandOLAPtechnology.SIGMOD Record, 26(1), 65-74.

Christel,M.G.,&Kang,K.C.(1992).Issues in requirements elicitation(Tech.Rep.No.CMU/SEI-92-TR-12).CarnegieMellonUniversity.

Cippico,V.(1997).Comparisonofthedecisionsupportsystemsandtransactionsupport systemdevelopmentmethodologies. InAdvances in database and information systems (pp.416-426). St.Petersburg,FL:NevskyDialect.

Delone,W.H.,&Mclean,E.R. (1992). Informationsystemssuccess:Thequestforthedependentvariable. Information Systems Research,3(1),60-95.

Gill,H.,&Rao,P.(1996). Data warehousing. Indianapolis,IN:PrenticeHall.Hoxmeier, J.A. (2000). Database quality dimensions. Journal of Business and

Management, 7(1).Jarke,M.,Lenzerini,M.,Vassiliou,Y.,&Vassiliadis,P.(2003).Fundamentals of

data warehouse. Berlin,Germany:Springer-Verlag.

Page 112: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Jarke,M.,&Vassiliou,Y.(1997).Datawarehousequality:AreviewoftheDWQproject.InD.Strong&B.Kahn(Eds.), Proceedings of the 1997 Conference on Information Quality (pp.299-313).Cambridge,MA: MITPress.

Kimball,R.,Reeves,L.,Ross,M.,&Thornthwaite,W.(1998). The data warehouse lifecycle toolkit.NewYork:JohnWiley&Sons.

Lee,Y.W.,Strong,D.,Kahn,B.,&Wang,R.(2002).AIMQ:Amethodologyforin-formationqualityassessment.Information & Management, 40(2),133-146.

Moody,D.,&Kortink,M.(2000,June5-6).Fromenterprisemodelstodimensionalmodels:Amethodologyfordatawarehouseanddatamartdesign.In Proceed-ings of the International Workshop on Design and Management of Data Ware-houses (DMDW2000) (pp.5:1-5:12).Stockholm,Sweden.

Mullery,G.P. (1979,September).CORE:Amethod forcontrolled requirementspecification. In Proceedings of the 4th international conference on Software engineering,Munich,Germany (pp.126-135).

Paim,F.,&Castro, J. (2002).Enhancingdatawarehousedesignwith theNFRframework.InProceedings of the 5th Workshop on Requirements Engineering (WER2002)(pp.40-57).

Paim,F.,&Castro,J.(2003,September8-12).DWARF:Anapproachforrequire-ments definition and management of data warehouse systems. In Proceedings of the 11th IEEE International Conference on Requirements Engineering(pp.75-84).

Pipino,L.,Lee,Y.W.,&Wang,R.(2002).Dataqualityassessment.Communica-tions of the ACM, 45(4),211-218.

Prakash,N.,&Gosain,A.(2003,June16-20).Requirementsdrivendatawarehousedevelopment.InProceedings of the 15th Conference on Advanced Information Systems Engineering, Klagenfurt/Velden,Austria.

Quix,C.,Jarke,M.,Jeusfeld,M.,Vassiliadis,P.,Lenzerini,M.,Calvanese,D.,&Bouzeghoub, M. (2002). Data warehouse architecture and quality model (Tech.Rep.No.DWQ-RWTH-002).LuFgTheoreticalComputerScience,RWTHAachen.

Ross, D., & Schoman, K. (1979). Structured analysis for requirements definition. IEEE Transactions on Software Engineering, 3(1), 6-15.

Strong,D.,Yang,W.,&Wang,R.(1997).Dataqualityincontext. Communications of the ACM, 40(5),103-110.

Thayer,R.(2002).Softwarerequirementsengineering:Atutorial. IEEE Computer, 35(4),68-73.

Vassiliadis,P.,Bouzeghoub,M.,&Quix,C.(1999).Towardsquality-orienteddatawarehouseusageandevolution.InProceedings of the International Confer-ence on Advanced Information Systems Engineering(pp.164-179).

Page 113: Data Warehouses and OLAP - Concepts Architectures and Solutions

86 Vaisman

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Wand,Y.,&Wang,R.Y.(1996).Anchoringdataqualitydimensionsinontologicalfoundations.Communications of the ACM, 39(11),86-95.

Wang,R.Y.,&Reddy,M.P. (1992).Quality data objects. (TotalDataQualityManagementResearchProgram,TDQM-92-06).MITSloanSchoolofMan-agement.

Wang,R.,Storey,Y.,&Firth,C.(1995).Aframeworkforanalysisofdataqual-ityresearch.IEEE Transactions on Data and Knowledge Engineering, 7(4), 623-640.

Wang,R.Y.,&Strong,D.M.(1996).Beyondaccuracy:Whatdataqualitymeanstodataconsumers. Journal of Management Information Systems,12(4),5-34.

Winter,R.,&Strauch,B. (2003).Amethod fordemand-driven information re-quirementsanalysisindatawarehousingprojects.InHICSS-36, Hawaii (pp.231-231).IEEEPress.

Winter,R.,&Strauch,B.(2004).Informationrequirementsengineeringfordatawarehousesystems.InH.Haddad,A.Omicini,R.L.Wainwright,&L.M.Liebrock(Eds.), Proceedings of SAC’04,Nicosia,Cyprus(pp.1359-1365).ACMPress.

Zmud,R.(1978).Concepts,theoriesandtechniques:Anempiricalinvestigationofthedimensionalityoftheconceptofinformation.Decision Sciences, 9(2),187-195.

Page 114: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Quality-Based Requirements Elicitation for Decision Support Systems 8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Section II

LoadingandRefreshing

Page 115: Data Warehouses and OLAP - Concepts Architectures and Solutions

88 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.IV

Extraction,.Transformation,.

and.Loading.ProcessesJovanka Adzic

Telecom Italia, Italy

Valter FioreTelecom Italia, Italy

Luisella SistoTelecom Italia, Italy

Abstract

ETL stands for extraction, transformation, and loading, in other words, for the data warehouse (DW) backstage. The main focus of our exposition here is the practical application of the ETL process in real world cases with extra problems and strong requirements, particularly performance issues related to population of large data warehouses. In a context of ETL/DW with strong requirements, we can individu-ate the most common constraints and criticalities that one can meet in developing an ETL system. We will describe some techniques related to the physical database design, pipelining, and parallelism which are crucial for the whole ETL process. We will propose our practical approach, “infrastructure based ETL”; it is not a tool but a set of functionalities or services that experience has proved to be useful and widespread enough in the ETL scenario, and one can build the application on top of it.

Page 116: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes 8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction

ETLstandsforextraction,transformation,andloading,inotherwords,forthedatawarehousebackstage.AvarietyofcommercialETLtoolsexistinthemarket(IBM,2005;Informatica,2005;Microsoft,2005;Oracle,2005),witharecentmarketre-viewofGartnerResearch(Gartner,2005).Alotofresearcheffortsexist(Golfarelli&Rizzi,1998;Husemann,Lechtenborger,&Vossen,2000;Tryfona,Busborg,&Christiansen,1999;Vassiliadis,Simitsis,&Skiadopoulos,2002,May;Vassiliadis,Simitsis,&Skiadopoulos,2002,November)mostlytargetingmodeling(concep-tual, logical) and methodology issues (like logical modeling of ETL workflows). Someworksarefocusedontheend-to-endmethodologyfor thewarehouseandETLprojects(Kimball&Caserta,2004;Kimball,Reeves,Ross,&Thornthwaite,1998;Vassiliadis,Simitsis,Georgantas,&Terrovitis,2003)targetingthecompletelifecycleof theDWproject,describinghowtoplan,design,build,andruntheDWanditsETLbackstage.ThemainfocusofourexpositionhereisthepracticalapplicationoftheETLprocessinrealworldcaseswithextraproblemsandstrongrequirements,particularlyperformanceissuesrelatedtopopulationoflargedatawarehouses(onecasestudyisdescribedinAdzic&Fiore,2003).In this chapter, we will first discuss the ETL scenario, requirements, criticalities, andsoforththatconstitutethegeneralframeworkforETLprocesses.Thenwewilldescribesometechniquesrelatedtothephysicaldatabasedesign,pipelining,andparallelismwhicharerelevantforperformanceissues.Finally,wewilldescribeourpracticalapproach,“infrastructurebasedETL”;itisnotatoolbutasetoffunction-alitiesorservicesthatexperiencehasprovedtobeusefulandwidespreadenoughintheETLscenario,andonecanbuildtheapplicationontopofit.

ETL.Scenario

TheprimaryscenarioinwhichETLtakesplaceisawideareabetweenthesourcesofdataandatargetdatabasemanagementsystem(DBMS);inthemiddle,therearealltherequiredfunctionalitiestobringandmaintainhistoricaldatainaformwellsuitedforanalysis(Figure1).Alltheworktocollect,transform,andloaddatafromdifferentandmultiplesourcestoatargetDBMSstructuredforanalysisiswhatwecallETL.ADWprojectconsistsofthreemaintechnicaltasks:ETL,databasedesign,andanalysistechniquesandtools;eachofthemhasparticularissuesandrequirements.Aboveall,wemustconsidertheproblemsinaccessingdataownedbyotherde-partments,groups,andsoon;obtainingthenecessarygrantstoaccessdataisnotalwayseasyforbothtechnicalandnontechnicalreasons.Thesepoliticalproblems

Page 117: Data Warehouses and OLAP - Concepts Architectures and Solutions

�0 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

canimposeconstraintsandwork-aroundthatmaketheETLprocessmorecomplex.Anothertopicistheabsenceofinternalenterprisestandardization.Itcanbeverydifficult to find the same rules (even in the same department) in naming files, in expressing a date, in choosing a structure for files, and so forth. These problems, involveverygeneralquestions likestandardization,metadata,andso forth,andcoverarelevantpartintheETLprocessdesign.

Requirements,.Constraints,.and.Criticalities

InaDWproject(asineveryproject),themostimportantstepistherequirementscollection. A well-defined set of requirements is essential in order to individuate thebestapproachtoETL.IftheDWmustbeloadedonceaweek,withlimitedtransformationcomplexityandvolumes, thenonecanchooseanypreferredap-proachandhenceskipthischapterentirely.Inthiscase,ETLmeansloadingdataintoDBMSwithsimpletransformation;anormalknowledgeofSQLandexpertiseinprogramming/scriptingisenoughtoachievetheobjectiveinmanycases.Onthecontrary,ifDWloadingfrequency,volumes,andcomplexityarehigh,thenamorestructuredapproachbecomesnecessary.In these cases it is necessary to find out sophisticated ETL techniques, whereas in othercasesthemoreusualapproachisthebestsolution.Itistrue,however,thatifacompanyhasboughtlicensesforacommercialtoolorhasdevelopeditsowninfrastructure(asweproposehere),thenitisstronglyrecommendedtousetheminallkindsofDWprojects.Inacontextofstrongrequirements,wecanindividuatethemostcommonconstraintsandcriticalitiesthatonecanmeetindevelopinganETLsystem:

flatfile

sourcedbmstransformations

datavalidations

dataintegrationaggregation

loadingtargetdbms

ETL

dbms/system/applicationOperation&Maintenance

othersources

othercalculations

cleaning

Extraction/acquisitionflatfile

sourcedbmstransformations

datavalidations

dataintegrationaggregation

loadingtargetdbms

ETL

dbms/system/applicationOperation&Maintenance

othersources

othercalculations

cleaning

Extraction/acquisition

Figure 1. ETL scenario

Page 118: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Volumes:Highvolumesimplyspecializedloadingtechniques(classicSQLis not suited) and require a good efficiency of transformation code.

• Near real time (NRT):Inthesecontexts,loadingandanalysisprocessesmustcoexisttogether,andthatimpliesstrongconstraintsonloadingtechniques;massiveloadingmechanismsarenotdirectlyapplicable,indexesmustbeac-tive,andsoon.

• Strict.time.constraints:.EspeciallytrueinNRTwherethepopulationcyclecanhaveaperiodof10orlessminutes,butalsointraditionalbatchsystemsinparticularcircumstances.

• Reliability/availability:Reliabilityisimportant,becauseinsomecontextsnotevenonedataitemisallowedtobelost,whichmeansthatanymissingdatamustberecovered.Theotherfaceofreliabilityisavailability,inourcontext,theabilitytorecoverfromexternal/internalerror(datalossorcorrupted,etc.)tomaintaindataintegrityandconsistency.

• Loading.atomicity:.Thesystemmustbeabletomanagepartialloadinatomicfashion(manageasortofglobal commit)inordertoallowpartialrecovery.

• Source instability:Insomecontextsthesourcesofdataarenotstable(e.g.,duetonetworkproblemsorsystemsunavailability)andacquisitionprocessmustbeabletoretry.

• Nonstandard/complex transformation: DW techniques are not only ap-pliedin“salesandrevenue”contexts;inmanycasesoneneedstoimplementcomplextransformationsorspecializedcalculationsthatdifferfromstandardanalyticalfunctions.

Wehavenotyetmentioned issues likemetadata andcleaningwhicharevastlydebated.Metadataaredatathatdescribeotherdata:forexample,acolumnnamed“price”obviouslyreferstothepriceofanarticlebutmanyotherpiecesofinforma-tionmayalsobeusefulforunderstandingitsexactmeaning.DoesthepriceincludeVATornot?Isthatpriceforwholesaleorretaildealers?Whichdepartmenthasestablished it? When was it modified last? These, and many other questions, may staybehinddata,simpleandclearonlyinappearance.Inourmind,dataalwaysexisttogetherwiththeirmetadata:whenwelookatpricesofgoodsatthegrocerystore,weknowtheanswerstoallthequestions,becauseweareawareofthecontext(goodsinalittleretailstore).Butwhenwelookatthecolumn“price”inatableandnothingelse,thecontextisunknown,anddatamayhaveseveraldifferentmeanings.Inthecaseof“enterprisedatawarehouse”therecouldbealotofinformation/metadatatomanage,sotheneedformetadatamanage-mentisclearlyvisible.OnemustknowtheexactmeaningofanysingledataitemcontainedinDW,otherwiseonecannotdoanyreliableanalysis(thatisthegoalofaDW).Inothercontexts,wherethedomainislimitedandwellknown,theneed

Page 119: Data Warehouses and OLAP - Concepts Architectures and Solutions

�2 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ofmetadataislessrelevantbecausetheoperatorsarefamiliarwiththeirowndata(e.g.,inasystemthatcollectsTelcomeasures,itisuselesstospecifywhatcolumn“erlang”means).Inthesecases,thedataarestoredintheDBMSandmetadatacouldcontinuetostayinthemindofthepersons.However,whenthemetadatamanagementisnecessary,therearestilllotsofques-tions:howtodesign,store,anddisplaymetadata.Somehigh-endETLtoolshaveasupportforstoringmetadatamoreorlesscomprehensively,althoughrarelyinter-changeablewithothers(limitsinmetadatafederations).Wehavenotgotagreatexpectationinthesetechniques,webelievethatagood,well-structuredtraditionaldocumentationmayconstituteavalidmetadatasupport;the human language has the flexibility, the undertones, and the richness to depict and contextualizeanykindofinformation.Themainproblemisthatpaperdocumen-tationisnotlinkedwiththedatascheme,andalsostoredmetadataneedahumanintervention to reflect changes. This is a problem concerning the organization of the “productiveprocess”morethananITproblem.Accordingly,itcouldbeextremelyusefultohavesomethinglikeastructuredlanguageformetadatarepresentation.Another aspect of interest in ETL is cleaning, that is, the ability to check, filter, and correctmistakesorcorruptionthatcanbefoundinthesourcedata.Atypicalcaseinwhichacleaningprocessismandatoryisintheaddress(location)processing:“street,”“st,”“st.,”andsoforth;allindicatetheword“street”andanautomaticprocessmustbeabletorecognizeit.Forthisparticularpurpose,therearespecial-izedtoolsthatapplyad-hocalgorithmsandhavetheirowntopographicdatabasewheretostore/retrievethecorrectnameofeverystreet,andsoforth.Inthiscase,cleaning is a specific stage in the ETL process. Nevertheless,theproblemofassuringdatacorrectnessmaybeconsideredfromdifferentperspectives.Data sourcesdonothave the same risksoferrors:oneis a well defined and certified file produced by another system, another is data inserteddirectlybyusers,ordatasentviaanunstablelineorcomingfromunre-liablesystems,andsoforth.Theriskofdatacorruptionintheseexamplesisdif-ferent in quantity and quality; in the case of a certified file, one can process them withoutanycheck;Webformdatamustbecheckedandinterpretedaccordingto theapplicationlogic,while in thelastcase,wemustpayattentiontohard-warecorruption,loss/inconsistency/duplicationofsomeinformationandsoon.It is impossible to find a general rule for “cleaning” due to the wide spectrum of possible types of errors. Apart from specific cases where a dedicated processing phase is mandatory, is it better to process the files twice (a first scan for cleaning andasecondfortransforming)ortoincorporatetheoptimallevelofchecksinthetransformationphase?Inourexperience,withlargevolumesandstricttimeconstraints,thesecondsolutionisbetterbecauseitsavescomputationalandI/Otime,however,loosingintheimplementationconceptualseparationbetweenthecleaningandtransformprocesses.

Page 120: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Physical Database Design

ManyimportantworksrelatedtothedatabasemodelinganddesignforDWareavail-ableinKimballetal.(1998);inthischapter,wefocusonphysicaldatabasedesignandcorrelatedtechniquesbecausethisaspectiscrucialforthewholeETLprocess;apowerfultransformationengineworkingonanot-wellstructureddatabasemaybeacauseofproblemsfortheentireETLprocess.Inthischapter,wewilldescribesomeimportantissuesinphysicaldatabasedesign,inparticular,therelevanceofpartitioning(range,hash,composite)formanaginghistoryandforperformanceis-suesthatmustbetakenintoaccountinbuildingaDW/ETLproject.Partitioningisaveryimportantissueinadatabasedesign,inOLTPandDWforscalabilityreasonsand,inthecaseofDW,formanaginghistory.Partitioningistheabilitytodivide/organizedatainseparatesubsets,forexample,theabilitytosplitatableintoseveralonesstillviewingitasawhole.Whenwehavemorethanonedatabaseindifferentlocations,wehavedonesomekindofpartitioning,whenweusedifferenttablestocontainthesametypesofdata.Inallthesecases,thereispartition-ing,anditdoesnotmatterifweuseordonotusethepartitioningconstructions.ModernDBMSsupportsomekindofpartitioningwithuniquetechniquesandcon-structions. The first way to achieve partitions in the Oracle DBMS was with the use of views; a partitioned table was defined as a view of many tables with the same layoutconnectedtogether in“unionall.”Partitioningpruning, theabilityof thequeryoptimizertoinvolveonlythefewnecessarypartitionsinaqueryinsteadoftheallpartitions,wasachievedviaaninitializationparameter.StartingwithOracle8and further releases, partitioning constructions were introduced in SQL as specific “partitioningclauses.”Eachpartitioncanhaveitsstorageattributeslikedistincttables, and there is information stored in the dictionary that permits a unified view ofthem.Nowadays,intheOracleDBMStherearethreetypesofpartitions:range,hash,andlist,withthepossibilityofsubpartitioningbyhashorlist.PartitioningisafundamentalissueintheDWandETLdesignbecausethistechniquepermitsaneasymanagementofhistory,loading,andqueryperformance.EachrowinaDWfacttablehascolumnsnamed“date-of-fact”or“loading-date”;whenonewantstomaintaindataforacertainperiodoftime(onemonth,oneyear,etc.),onemustlabeltherowswithadate(date-of-fact)andthen,viamanagementoperationontablesateveryloadingcycle,deleteoldrows,makingspaceforthenewrecords.The“SQLdelete”operation,wheninvolvingmanythousandsormillionsofrows,isveryexpensiveintermsoftimeanddiskspace(rowsmustbesavedinbefore-imagespaceanddestroyedonlyaftercommit)butalsoinvolveheavyindexesreorgani-zation.Supposethatafacttablehas1billionrowsanda10-dayhistory;deletingtherowsrelatedto1day(100million)isjustheavy,butthisisnothingcomparedto the job of rearranging five to six indexes that own 1 billion rows. Without parti-tions(orwithoutsomesurrogatetechniques),itispracticallyimpossibletomanage

Page 121: Data Warehouses and OLAP - Concepts Architectures and Solutions

�4 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

largeandverylargefacttables,especiallyduetotheindexreorganizationcosts.Enlarginghistoryinvolvesincreasingthesizeofglobalindexesandsoincreasing,inanonlinearway,thecostofitsaccess/reorganization.Thelocalindexesresolvethisproblemmaintainingconstantindexreorganizationcostsatthelevelofasinglepartitioncost(accessingtheentiretableviaalocalindexhasindeedalinearcost).Inthisway,itispossibletoenlargethehistoryatthecostofincreaseddiskstoragerequirement.Inthefollowingsection,wewillseethedifferenttypesofpartitioningandhowtheyaresuitedforhistorymanagementandforperformance.ThemaintypeofpartitioningusedinDWdesignisrangepartition;atableisusu-allypartitionedonadatecolumn(partitionkey)andeachpartitioncontainsrowsthatfallinarangeexpressedbyastart_dateandend_date.Asmentionedprevi-ously, one can partition by “date-of-fact” or by “loading-date”: partitioning bydate-of-factiswellsuitedforanalysis,inthattheoptimizercanmakeaneffectivepartitionpruningwhenthequeries(asusual)havea“whereclause”onthedate-of-fact;partitionby“loading-date”isbestsuitedfortheETLapplication,butcanlimit the benefit of partition pruning. In any case, a table partitioned by date is optimalforhistorymanagement.Ateveryloadingcycle,(whennecessary)anewpartitionisaddedandtheoldestoneisdroppedwithaSQLoperationthatisveryfastandguaranteestransactionconsistency(thedropoperationwaitsforin-courseselectiononpartition).The hash partitioning means that data are split over a specified number of partitions onthebaseofthevalueofacolumnandisusefulforperformancereasons(stripeddata across multiple files/disks/devices allow parallelization and then improve per-formance).Compositepartitionrange-hashmeansthatthesinglepartitionswillbefurthersplitonhashbase(notcontrolledbyapplication)oronlistbase(controlledbyapplication)inrange-listpartitioning.Whenthevolumesarehigh,splittingasinglepartitionbyhashorlistisveryusefulalsowithrespecttobetterdisksutili-zation(Figure2).Here,wehavearange(logical)partitionthatisstripedoverntablespaces,eachofthemcontainingonesubpartitionofeveryrangepartition;thisorganization(whentablespacesareallocatedondifferentvolumes)givesgoodperformanceandeasymanageability.Performanceimprovesduetosubpartitions(betterI/Oparalleliza-tion).Manageabilityissimplerbecausewehavea1:nrelationbetweentablespaceandpartitions,sospaceallocationconstraintsarerelaxed.1

AsFigure2shows,indexesarepartitionedinthesamewayasthetable.Partitionedorlocalindexes(anindexthatisinrelation1:1withitspartition)arethenormalityinDWbecausetheycanbedropped/addedastablepartition,thusavoidingindexrebuilding. Different kinds of indexes (B*Tree and bitmap) can be defined as lo-cal,butnotalltypesarewellsuitedforDW;inparticular,bitmapindexesareonlyusefulwithlowcardinalityandread-onlyaccess.

Page 122: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Figure 2. Subpartitioning schema

Whenwehavetobuildindexes,shoulditbedoneafterloadorduringload?Inthecaseofhighvolumes,itisalwayspreferabletobuildindexesafterload(betterper-formance);forsmall/mediumvolumes,loadingwithactiveindexesisthesimplestway. Depending on the DBMS used, one can find some problems to build indexes leavingthetablealwaysaccessible(thisisaproblemonlyinNRT),soonemustusesomework-around,butwhenthevolumesarehigh,loadingdatawithactiveindexesisimpossible(directpath,orsimilar,andbitmapindexescannotbeused).Asimplework-aroundtoloadalargevolumeofdataistouseatemporarytable.Onemustaddanewpartitiononthefacttableandcreateatemporarytable,with-outindexes,withthesamelayoutofthetargettableandlayingonthesametablespace.Thenonecanloaditinthedirectpath,createtheindexesonthistemporarily,and then exchange it, without validation, with the empty partition, and finally drop theemptytable.Attheend,onehasanewpartitionfullwithitsvalidindexes.Theexchangeoperationmentionedcanbedonewithorwithoutvalidation,inthesensethat DBMS verifies or not if the data in the table to swap are correct according to thepartitionbound.InDW,wheretheloadofdataismanagedbyanapplication,furthervalidationsarenotnecessary;thisistrueforparticularoperationslike“exchangepartition,”butalsoforprimarykey,foreignkey,check,andsoforth.Thesechecksandconstraintsthatguarantee the “data integrity and consistency,” must exist and must be verified, but insidetheapplication,beforetheloadoperationsoccur,andnotattheDBMSlevel.ThechoicebetweenvalidatingtheintegritycheckinapplicationorinDBMSdoesnotexistinpracticebecause,usually,thefastproceduresforloadingmassivedatadonotsupportacheckofanytype.Then,facttablesmustbefreeofprimarykeyandotherheavyconstraints;insomecases,itisonlyusefultodeclarereferentialintegritycheckmerelyonbehalfofoptimizer(withnovalidateorsimilarclauses).

Tbs_01 Tbs_02 Tbs_03 Tbs_n

Ix_Tbs_01 Ix_Tbs_02 Ix_Tbs_03 Ix_Tbs_n

Range.Part_02

Ix range Part_02

Hashsubpart01_n

Page 123: Data Warehouses and OLAP - Concepts Architectures and Solutions

�6 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

IntheNRTcontextwhentheloadingfrequencyishighandhistoryisdeep,creat-inganewpartitioneverycycleimpliesatotalnumberofpartitionswhichDBMS,in general, does not support. If volumes are not so high, then it is possible to define partitionsthatspanmanyloadingcycles(e.g.,apartitionperday),butinthesecasesfastloadingtechniquescannotbeused.Ifvolumesarehigh,andhencetheuseoffastloadingismandatory,thensomead-hoctechniquesmustbe“invented”(Figure3).Ourfacttableconsistsoftwopartitionedtablesnamed“thin”and“fat”mergedbyaviewin“unionall.”Thethintableispartitionedinacoherentwaywithloadingcycle,whilethefatonehasalowergranularitypartitioning.Thethintableismas-sively loadedwith thementionedmethodof the temporary tableexchangeand,periodically,thethinpartitionswillbecompactedtogetherinanewpartitionofthefattable.Withthismethod,complexonlyinappearance,wecancontainthenumberof partitions to a reasonable value, loading data with the most efficient techniques, anddeferthetime-consumingcompactoperationstotheoptimaltimewindow.Alltheseoperationscanbedonewhilequeryingthedata;theviewensuresthetrans-actionalconsistency.

Pipelining.and.Parallelism.................for.Performance.

PerformanceisoneofthemostimportantissuesinETLprocessing.Duetoahighvolumeofdata,NRTtimeconstraints,orhardwarelimits(noteventhebudgetfor

Figure 3. Thin-fat partitioning schema

FAT

THIN

p� < �0 apr

p2 <�� may

p2 <� junp� <� jun

TABLE (v�ew)

p� < �0 jun

p�� < � jul

TEMP

Page 124: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

a DW project is large enough), it is always necessary to pay attention to the effi-ciencyofcode.LoadingrecordsintoaDBMSwithsometransformationsisnotacomplexjob;complexityresultsfromaverygreatnumberoftimesthatthesesimpleoperationsmustberepeated.Dividingajobintomanysequentialstages(eachwithitsinputand output on disk) is a good technique that simplifies the coding and debugging, butreadingandwritingthesamedatamanytimesisveryexpensive.Processingmany files (or extracting) sequentially is the simplest way but does not permit a goodutilizationofcomputationalresources.Toachievehighperformance,thereareonlytwoways:

• executetheminimumnumberofmachineinstructionsandavoiduselessI/O• donotwastethewaittimethatoccursinI/Ooperations

Theseelementaryrulesimplyanotalwayssimplebalancebetweenthereadabilityandmaintainability, on one hand, and an efficient but complex coding, on the other.Toavoidreadingandwritingthesamedatamanytimes,splitworkloadinconformitytotheapplicationlogictoexploitparallelfeaturesofthemachines.UsepipeliningandparallelismasthemainobjectiveinETL.Parallelismistheabilitytosplitworkloadinmanytasksthatworkconcurrentlyandsynchronizeeachother.Splitworkloadisobviouslyusefulwhenwehavemorethanoneprocessor,butisevenusefulinasingleprocessormachine;inthelattercase,wecanutilizetheI/Oidletime(ordersofmagnitudeofCPUtime)todootheruse-fuljobs.InETL,parallelismprimarilymeansthefullutilizationofmultiprocessormachinesandminimizationofwasteoftimecorrelatedtoI/Ooperations.Pipelining, in theprocessors technology, is theability toexecutean instructionwhilefetchingthenext;inthiscontext,wemeanpassinganoutputstreamtothenextstagewithoutintermediatesteps(involvinguselesswriteandreadoperations)andwithoutwaitingforthecompletionofanystage.Thisisanothercomplementarywaytosavetimeandbetterutilizeprocessingpower.

Infrastructure-Based.ETL

TherearetwomainapproachestoETL:toresolveitimplementingasetofscriptsand ad-hoc programs or to buy a commercial ETL tool that simplifies the job of proposing a methodology, a graphical interface, and a language to solve specific problems.Inthemarket,manyofthesetoolsexist,withdifferentlevelsintermsof

Page 125: Data Warehouses and OLAP - Concepts Architectures and Solutions

�8 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

performance(someofthemareinterpretedengines,somecompiledandparallel),completeness,usability,and,ofcourse,differentcosts.Inourexperience,wehaveanalyzedtheseproductsandsomeofthemalmostseemedto be quite adequate for our needs. Quite but not completely, some specific aspects werenotcovered,toolmethodologyimposedsomeworkaround,orthetoolwastoocomplex/expensiveforapplication,andsoforth.TheproblemisthatETLscenariosare so heterogeneous, so case-by-case specific, without any general rule, that it is not possible to comprise them into one well-defined scheme. It is impossibletorecognizealanguageforETLandbuildsoftwareasaconsequence(e.g.,forSQL);itisalways(oralmost)necessarytowritefromscratchthecodethatperformsthatextractionandthat transformation. Only in the loading phase (for a specific target DBMS), itispossibletoestablishsomerules.Ontheotherhand,ad-hocscripts/programshave poor flexibility, reusability, and maintainability. An infrastructure suited for the specific business/application context seems to us the best solution. Theinfrastructureisnotatool;itisasetoffunctionalitiesorservicesthatexperiencehasprovedtobeusefulandwidespreadenoughintheETLscenario,andonecanbuildtheapplicationontopofthemthussavingcodinganddebuggingtime.Theinfrastructurelayerimplements,forexample,anAPItoaccessDBMSandmanagepartitions, functions for lookup operations, file acquisition, parallel read/write, and soonasshowninFigure4.Then,ontopofthisinfrastructurallayer,onecanwritesimpler and more readable code that implements the application specific logic, resolvingeachpossibletricknotcoveredbythelowerlayer.Theinfrastructureis,infact,alibrary,soonecanpickonlywhatisneeded;someconstraintsonhowtoorganizetheapplicationmayexistornot,butingeneralthesearenotsostrictasawell-structuredtoolimposes.Thisweak modelgivesonemajorchancestoachievea good solution suited for the specific case. Withtheseconceptsinmind,wedevelopedaninfrastructurewritteninCforthebestperformance,usingOCI2 to access Oracle for flexibility and OS API Posix3for

Figure 4. ETL infrastructure modules

operat�ng system

DBMS

OS access layer DBMS access layer

l�sten�ng funct�ons

�n-memory lookup funct�ons

transform&load funct�ons

modular�zat�on/ worflow management

aggregat�on funct�ons

operat�on & ma�ntenance support

other

appl�cat�on code

�nfrastructure modules

OS layer

DBMS

appl�cat�on code

Page 126: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes ��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

portability.Wealsodecidedtogiveamodularstructureandutilize,wherepossible,adeclarativeapproach.Fromthedesignpointofview,whateverinfrastructureortoolusedisgenerallybetterthanafullyprogrammaticapproach,inthatitconstrainstoprovidedguidelinesorformalisms.

Modularization and Workflow Management

AtypicalETLapplicationmaybedecomposedinmanycorrelatedjobs;someofthemneedtobeexecutedsequentiallyandothersmaybeparallelized.Incertaincases,ajobcanstartonlyonacertaincondition,andsoforth.Theabilitytopack-agejobsandsynchronizethemisfundamentalforanETLinfrastructureforbothperformanceandrecoveryreasons.We have chosen to define the “processUnit” as an elementary piece of code that can be implemented both as thread or process in the specified number of in-stances,withoutformalparameters,butwithanexitcode.TheprocessUnitisthebasicelementofsynchronizationgraph;eachprocessUnithasadependencelistbasedonitsexitcode.TheseprocessUnitsanddependencesarealldeclared(viaa simple API) in a main module called “master” and these definitions are then stored(atstartup)inamemorysegmentsharedacrossalljobs(processes/threads)thatconstitutetheapplication.Themastersupervisesallapplicationactivitiesandforks theprocesses/threadswhennecessaryaccordingto thegraphmaintainedinthesharedmemorysegment.EachprocessUnitregistersitsstatusintheap-propriatestructure;themaster,atpollinginterval,checksthem,andverifyingthedependences,startsorcancelstheappropriateprocessUnitsandsoonuptothecompletion of the execution of defined graph. For recovery reasons, as detailed intheOperationandMaintenanceIssuessection,theprocessUnitstatusisalsoregisteredonDBMS.Wheneveritispossible,useful,andquitesimple,wehaveadopteda“declarativeapproach” for implementing the defined functionality. We have a set of declarative functionsthatcanbeseenasasortoflanguagethatdescribesthedataof the problemandacontrol function,theengine,thatappliescertainrulesonthesedata.This modularization concisely fits the demand of parallelism (a logical operation in more threads, and correlated operation managed in parallel) and a fine-grained applicationdesign.But,generallyspeaking,formedium-largeapplications,orga-nizingthecodeinsmallunitsmayinvolveagreatnumberofthem(processUnit)andadependencygraphtoocomplextomaintainandevolve.Toovercometheseproblems,weimplementedtheconceptof“component.”ThecomponentsarelogicalstructuresembeddingoneormoreprocessUnitswiththeirdependences,butatahigherlevelofgranularity.Theconceptofcomponentad-dresses a top-down approach to the problem; first, one can individuate the logical

Page 127: Data Warehouses and OLAP - Concepts Architectures and Solutions

�00 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

blocks (components) and the relation between them (dependences), then “drilldown” designing and organizing the specific problem in detail using the thin, more flexible, and near implementationprocessUnits.Asanexample,thewholestructureoftheapplication(processUnit,component,dependence)consistsofasetoffunctionsasshowninthefollowingfragmentofcode:

...SYNCComponentDefine(“comp�”, <compAttr>); SYNCComponentDefine(“comp2”, <compAttr>);... ...SYNCCompDependenceDefine(“comp2”,”comp�”);...SYNCProcessUnitDefine(“comp�”,”pU0”,<pUAattr>);SYNCProcessUnitDefine(“comp�”,”pU�”,<pUAattr>);SYNCProcessUnitDefine(“comp�”,”pU2”,<pUAattr>);SYNCDependenceDefine(“pU0”,NULL,NULL,NULL);SYNCDependenceDefine(“pU�”,”pU0”,SUCCESS,NULL);SYNCDependenceDefine(“pU2”,”pU0”,FAILURE,NULL);

SYNCProcessUnitDefine(«comp2»,»pUc2»,<pUAattr>);SYNCDependenceDefine(«pUc2»,NULL,NULL,NULL);... ...SYNCControl();

The functions “*Define” describe the problem (storing the data in memory). The function “*Control” loops on these data applying predefined semantic rules; in this caseitstartsaprocessUnitwhentheeventdeclared(terminationofanotherpro-cessUnitwithacertainstate)occurs.Thisapproach,hereseenforsynchronizationmodule,isthesameforacquire,transformandloadhub,aggregationfunction,andsoforth.Thisdeclarativeapproachhasbeenpreferredtoothers,inthatitallowssyntheticandclearapplicationcodeandsomestandardizationindevelopingseveralinfrastructuralmodules.StructuringthecodeincomponentsandprocessUnitsisawaytoimplementasuf-ficiently clear workflow. The “master” module provides the overall structure of thewholeapplicationgivingevidencetothelogicaltasksinvolvedandhowthesecorrelate toeachother.Theapplicationis therefore logicallystructuredincom-ponents,andsinglecomponentsarethenorganized/implementedinprocessUnits.Thistwo-levelmodularizationisalsousefulforoperationsandmaintenanceissuesasdescribedlater.

Page 128: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Main-Memory.Support

InanyETLapplication,amain-memorysupportisessentialbecauseoflookupop-erations.Inafacttable,therearealwayssomeforeignkeys,andthesemustbesetintheloadingphasewiththecorrespondingvalueinthedimensionaltable.Thisoperationisverysimpleandlookslike“selectkeyfromtabwherevalue=…”butmustberepeatedmany,manytimes:10foreignkeyand10millionsrowstoloadimplies100millionsof“select.”ItisclearthattheseoperationscannotbeperformedonDBMS.Thesolutionistobringthedimensionaltablesintomemory,indexingthem(withsimplehashstructureorbinarysearch)andsoperformthelookupop-erationwithoutinvolvingDBMS.Thesemain-memoryfunctionsareadequateforsimplecases,butoftenamoreso-phisticatedsupportshouldbeuseful.Sometimesadimensionaltablemustbeup-datedinconsequenceofinformationcontainedinfactrecords;thesamedimensionaltablesarebiganditwouldbeusefultomanagetheminmemory;theapplicationlogicimposessomeprocessingoftemporarydatainmemory,andsoon.Tocoverthesecasesingreatmeasurethemain-memorysupportmustberead/write(withaminimalbuteffectiveconcurrencycontrol)andsupportnotonly“select”butalso“insert,”“delete,”and“update.”Thisdoesnotmeanthatmain-memorysupportforETLpurposesmustbeacommercialmain-memorydatabase.AnSQLinterface,ACIDproperties,fulldatatypeset,andsofortharerarelyusefulinourcontextandareexpensive;anad-hocmain-memorysupportoftenperformsbetterthanawell-structuredmain-memoryDBMS.Inadatawarehouse,thefacttablesarebig(oftenmillionsorbillionsofrecords)becausetheycontaindetailrecords;considerthesinglecarton,cannedfoods,andsoforthboughtatthesupermarket,whichareusefulforcertaintypesofanalysis(basketanalysisinthiscase)butuselessforothers.Itcouldbetooexpensivetoac-cessthefacttableeverytime,soweneedsomeformofsummaryoraggregation.TheseaggregationsarethedatasetresultingfromaSQL“groupby”performedonthefacttable.ThesimplestwaytodothisistorunaSQLattheendoftheloadingphase,butthisapproachimpliesaserializationandadoublescanofthedata(thefirst read for loading, the second for aggregation). How can one avoid it? In the loadingphase,whenoneprocessesarecordandthecorrespondingaggregaterowinmemorydoesnotexist,onecancreateanewoneandcopytherecorddataintoit;otherwise,onehastoupdatetheexistentaggregaterowwithitscalculation(sum,count, etc.). This is exactly a “group by” operation, but performed on the fly. Theaggregationoperationisconceptuallysimple,butverycomplexinpractice;memoryallocationandindexing,forexample,arenotatallprosaicwhenthevolumegrowsandwithcompoundaggregationkeys.Buildingacompletesetoffunctionsto perform these operations with the necessary flexibility is hard and expensive comparedwiththefacilityoftheSQL“groupby”clause.Thisisgenerallytruein

Page 129: Data Warehouses and OLAP - Concepts Architectures and Solutions

�02 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

batchsystemswheretheloadingphaseoccursinthenighthours,andspendingoneortwohourstoperformalltherequiredaggregationisacceptable.However,innearrealtimecontexts,wehavesmallvolumebutstricttimingconstraints;further,itisalsonecessarytomanagealarmtablesthatoftenrequiresomeaggregation.Inthisarea, a set of functions to perform simple aggregation on the fly can be useful and nottoohardtoimplement.Savingupsomequeries(aftertheloading)andavoidnguseless read/write can give significant advantage in NRT where ETL processing hasatime-slotof5-10minutes.

Acquire, Transform, and Load Hub

The core of every ETL system is the engine that brings together various data flows, makesthetransformations,andloadsthemintoDBMS.Inoursolution,allofthisisdoneina“hub”withtheintenttominimizeandparallelizeI/O,savingelapsedtimeandresourceusageasmuchaspossible.However,beforedealingwiththeissue in the whole (the hub), let us look at the several specific aspects: acquisition scenarioandloadingtechniques.

Acquisition.Scenario

We can acquire data from files, directly from DBMS, or listening to incoming mes-sages,butthislasteventualityismoretypicalinmediationsystemsthaninETL.InthescholasticETLexamples,thereisalwaysasourcedb,atargetdb,andinthemiddle,theETLprocesses.Inourexperience,weneverhadtheopportunitytoacquirethedataweneededdirectlyfromthesourceDBMS.Itispoliticallyhardobtainingaccesstoasystemownedbyanotherdivision,groupordepartment,andthisisthetypicalorganizationalscenarioinaDWproject.Itshouldnotbeveryreasonableforasystemmanagertoopenasystemtoothersandallowtheinstal-lationofforeignagentsformanyunderstandablereasons.Abetterandmoreusualway is to define (the owner of data defines) an interface in order to decouple the source from the target system. The simplest method to do that is the use of flat files. DirectextractionfromsourceDBMSoftenisnotpossible;itdoesnotpermitde-couplingsystems,DBMSmaybedifferent(e.g.,DB2andOracle),thedataalmostalwaysneedtransformationsandmustbestoredinastagingtable,butstoringdatain a table is more expensive than storing them in files. Another important issue is thatdatasometimescomefromaDBMS,butsometimesdonot,orcomefromaclosedsystemwhereinterfacetypes,emissioncriterion,namingrules,andsoonare predefined and typically not negotiated.An ETL acquisition process, even if limited to file acquisition, must be able to manage a great variety of situations, for example, a big file one time a day (zipped,

Page 130: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

compressed, or none) or many little files every few minutes. Some types of files are positional, other CSV, or coded in XML; sometimes they are plan files or in master-detailfashion,inASCIIorbinaryformat.Namingandlocationruleshavealimitonlyinthehumanimagination.It is very difficult to achieve a context formalization/generalization useful to closely define a model for data acquisition in ETL, but one can define a loose schematization asabaseforapplicationsoftware.AsonecanseeinFigure5,thehighestentityisthe flow, a set of logically correlated data; an application may need more than one flow. Many source-to-target mappings may refer to a flow; in other words, a logi-cal flow may comprise files coming from several distinct systems. In each source-to-target mapping there can reside several types of files, each of them identifiable with a selection criterion (usually Unix-like selection but also others specific for the application). These files may need or not need some preprocessing actions like uncompress, split in smaller chunks, merge, and other application specific action. Then, these files must be delivered to their destination (another stage of the process). For each selection at least one termination criterion must be defined; examples of thesecriteriamaybe“tryselectiononce,”“repeatselectionuntilcondition,”or“othercriterion.”Asonecansee,thismodelcomprises,ineveryentity,anescape“other”inordertoleavethepossibilitytoinsertad-hoccodewhennecessary.Inourinfrastructure,we used this schematization to build a set of functions to manage file acquisition. Inanalogywithsynchronizationfunctions,eveninthiscase,wehaveadoptedthepreviouslydescribeddeclarativeapproach.

Loading.Techniques

Every DBMS has its own proprietary techniques for massive loading; here we briefly treatOracle,sinceitisoneofthemostwidespreadindustrialDBMS.Oracleoffers

Figure 5. Entity schema for data acquisition

FLOW

SOURCE_TARGET

SELECTION

TERM_CRITERION

DESTINATIONPRE_PROCESSING

FLOW

SOURCE_TARGET

SELECTION

TERM_CRITERION

DESTINATIONPRE_PROCESSING

Page 131: Data Warehouses and OLAP - Concepts Architectures and Solutions

�04 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

twomethodstoprogrammaticallyinteractwithaserver:Pro*C/Fortran/Cobolandso forth, which are a set of precompilers in order to embed SQL into the specific languageandOCIwhichareanAPIcallablefromC/C++.Pro*Cisquiteeasytousebut has several limitations (e.g., massive loading) while the OCI is more difficult (or better speaking, prolix) to use, but constitutes a flexible and complete interface.LoadingdatainOracle,alsoinmassiveparallelmode,canbesimplydonewiththeutilitySQLldr which takes a file as input (or many files in parallel mode) and loads them into specified tables. Another more elegant way to do the same thing is to use theexternal tables; thismethodissubstantiallyanalogoustoSQLldrwiththedif-ferencemanagedinSQL.UsingthesesimpletechniquesinETLhasthedrawbackto add the cost to write a file and to read and parse it by SQLldr.Whendatasumtodozensofgigabytes,itbecomesconvenienttouseDirectpathOCI4toloaddatadirectly into the database avoiding useless write and read to file. AsthewholeOCI,thesesetsoffunctionsfordirectpatharetoocomplex/prolixtobeutilizeddirectlyinthecode.AcommonwaytosolvethisproblemistouseanOCIwrapper,inotherwords,tobuildasetoffunctionssuitedforitsownpurposesovertheOCIlayer(somewrappersarealsoavailableviatheInternet).Massiveloadingintoadatabasemayimposeheavyconstraints;indexesmustbeinactive,referentialconstraintscannotbeused,particularcriterioninextentsallo-cationoccurs,andsoforth.NotalltheselimitscanbeescapedbecausetheuseoftraditionalSQLinsertisnotsuitedformassiveloading(millionsofrowsandmore).InETL,onecanuseSQLonlyformanagingdimensionorloadingfactinNRTwithsmallvolumes.Massiveloadingdoesnotgenerallysupportcommit/rollbackstatements,sooneneedstobuildone’sownerrorchecksandperformrollbackby hand.Howtomanageandrecovererrors,inloading,buteveninothercases,willbediscussedinthe“OperationandMaintenanceIssue”section.

Transform and Load Hub

Acquisition,especiallytransformandload,areoperationsthatinvolveI/OandCPU-boundoperationstightlycorrelatedwitheachotherandsotheyarewellsuitedtobeparallelizedforperformance.Onlyinveryspecialcases,thedatamustbeprocessedinsequentialorder;normally,recordsneedtobetransformedandloadedinrelationaltablesinanindependentway.Thisassumptionmakesasinglerowparallelizationpossible;eachrowcanbeacquired,transformed,andloadedindependently,havingmanypipelinesinparallel.This“rowpipelined”model,verycleanintheory,hasadrawbackinimplementation;passingrowsthroughmanystagesinvolvesalotofsynchronizationthatcanbecomerelevantcomparedwiththecostofsinglestageitself.Abettersolutionistoextendthe“rowpipeline”modeltoa“blockpipeline”one,where singleblockscontaina certainnumberof rows. In thismanner,wemaintainparallelism/pipelinemechanismreducingtheweightofsynchronization,

Page 132: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

memorypassing,androutinesinvocationtimes.Workingwithblocksofdatamore-overpavesthewayfortreatingmaster-detailandotherstrangeformatsinwhichrecordsarecorrelated.Insummary,theblockpipelinemodelcontainsthecostofsynchronization,preservesageneralparallel/pipelinemechanism,andleavesthepossibilitytomanagesomeformofsequentialorder.Transforming a record essentially means working with strings and performinglookupoperationsinmemory(foreignkeysvalorization).Onecanusethewell-known string functions available in Unix, but a more efficient way is to write ad-hocsimplemacrosthatcopytokensfrominputtooutputbuffer,saveitinlocalvariables,padtheoutputstringwithblanks,andsoon,thusincreasingtheseteverytimeoneneedssomenewbasicfunctionality.Workingwithblocksofdataimpliesthatthetransformationcodemustbestructuredinnestedloops(anouter“while<incoming_blocks>”andaninner“while<records_in_block>”),insidewhichthetransformationmacroscantakeplace.Themainimplementationproblemis,how-ever,howtopassablockofdatafromonestagetothenextandhowtoexploitthewaitingtimecorrelatedtoI/Ooperations.InFigure6wedepictthebasicschemeweadoptedinourinfrastructure.Wehavetwopoolsofbuffers:oneforinputdataandoneforoutputdata.Apoolofthread readers fill the input buffers; a pool of processUnits pick the filled buffers, transform, and write them into the output buffers; and finally another pool of thread writers downloads the filled buffers into database or flat files.Asidefromimplementationdetailsconcerningthemultibufferpool, there is thecapability to linkone input channel tomanyoutput channels, thepossibility to

Figure 6. Schema of the transformation hub

thread pool reader

input buffer pools

output buffer poolsinput data (from LSN, other)

elab processUnit

Loader module

thread pool writer

�0 DBMS, flat-file, etc.

Page 133: Data Warehouses and OLAP - Concepts Architectures and Solutions

�06 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

integrateinthisschemethelisteningfunctionalities,andsoforth.Thecoreofthissolutionistheuseofconditionvariablestomanagesynchronization.AsonecanseeinFigure7,pseudocode,thesynchronizationscheme,isquitesimple.Thismechanismgivesonecompleteparallelisminreading/elab/writing(read-aheadandwrite-behind)usingsimpleread()andwrite()functions.This approach gives a clear definition of the data flow, where these come from, wheretheirtransformationcoderesides,andwhattheirtargetis.Allthetransfor-mationcodeiscontainedinaprocessUnit(“elab()”intheschemaabove)wheretheincomingdata,atapplicationlevel,areviewedrecordbyrecord,butinternallyprocessedblockbyblockforperformancereasons.Wehavespokenabouta“hub”becausethisarchitecturewithseveralbufferpools,several groups of specialized threads (for reading from file or another database, for writing in direct path or SQL or to file, etc.), several groups of transformation threads(inwhichapplicationcoderesides)iswellsuitedtobeviewedasahub,inwhich many flows converge and other data flows are delivered to different DBMS tablesorotherdestinations.

Operation.and.Maintenance.Issues

OneofthemostcriticalaspectsinaDWprojectis“operationandmaintenance”(O&M).EventhebestETLapplicationcanfailformanyreasons,sometimesdue

Figure 7. An example of pseudocode for the transformation hub

Page 134: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

toaDBMSproblem,analwayspossibleapplicationbug,orahardwarefailure;butaboveall,aloadingprocesscanfailduetoanexternalproblem:absenceorcor-ruptionofdata,unavailabilityofsomesourcesystems,andsoforth.Inanycase,afailureanywhereintheprocesscausesacorruption,datainconsistency,ordataloss.Butwehavetobestraight;sometimesalossofdataisallowed,sometimesnot.Sometimesonecanskipaloadingphaseandretryitlater,andsometimesdatamustbeloadedwithout“holes.”DWrequirements,eveninthisperspective,arewide-ranging,soonesystemcanmeetitsrequirementsalmostignoringtheO&Missues,andforanotherstabilityand“fault-tolerance”aremandatory.Eveninaquietscenariolikeapopulationinnightlywindow,wheninthemorn-ingoneseesthatafailurehasoccurred,itisreallyhardtodetectthebug,localizethecorruptedorincompletedata,cleanthem,andrestarttheapplicationattheoldpoint-in-time.Itishardbecauseoneisunderstress,thetimeinhandisconstrained,andtheusersclaimtoaccesstheDW.InanETLapplicationthatdoesnotconsiderthe aspects of efficient managing, the interrupted DW loads cannot be defined as “robust.”SomeworksintheliteraturediscusstheproblemsrelatedtoresumptionofinterruptedDWloads(Labio,Wiener,Garcia-Molina,&Gorelik,2000).Thesimplestwaytoguaranteethedataconsistencyincaseoffailureistomanageaglobal rollback involving all loaded and modified data, quite easy for loaded data (all the loaded partitions need to be truncated), a bit more difficult for the modi-fied data (tables must be restored with the previously saved data). This approach isfunctionalincaseofseriousandcomplexfailures,butwhenaprobleminvolvesonlythedataportionoftheETLprocess(e.g.,anupdatingofadimensionaltable),itcouldbeunacceptabletothrowoutalljobsjustdone,especiallywhentheentireprocessrequireshours.AbetterwaytomanagepartialfailuresistoorganizetheETLprocessinfunctionalcomponents (even useful for documentation/modularization purposes) that canbe individually recovered.Previously,wedescribedprocessUnits (small blocksof code) and the synchronization engine that starts them according to predefined rules. This modularization is too fine-grained for recovery purposes (how can one recoverfromafailureofasingleprocessUnitinstance),sowebuiltoverthemalogicalcontainerofprocessUnitcalledcomponent.ThesecomponentslooklikeaprocessUnit,butonahigherleveltheyhaveaterminationstatus;theirdependencyrulesarestructuredinsimpletreesandnotingraphs.EachcomponentcanthenhaveanassociatedrecoveryProcessUnit,socalledbecauseitkeepstheundocode(e.g.,truncatepartition).Thesynchronizationenginekeepstrack(ontheDBMS)oftheterminationstatusofasingleprocessUnit,sotheenginecanevaluatethestatusofeachcomponentandoftheentireETLprocessitself.Attheend,wehaveastatustablethatsaysifsomefailurehasoccurred(theprocessneedsrecovery)andwhichcomponenthasfailed.Withthisinformation,wecanrecoveronlythefailedcomponentsand,whichis

Page 135: Data Warehouses and OLAP - Concepts Architectures and Solutions

�08 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

important,inanautomaticway.Simplifying,thesynchronizationengine,runninginrecoverymode,hastodoareversalofthecomponentstatusandthenstartonlythefailedcomponents(ortobemoreprecise,theprocessUnitsofthefailedcompo-nents).Inpractice,therearesomefurthercomplications;acomponentinrecoverymodecandependonapreviousonethathasnotfailedbutmustbererunbecauseitdoesaninitializationjob(andsowehaveintroducedtheonRecoverydependence);thentheprocessrunninginrecoverymodemustalwaysuseapoint-in-timedateandsoonwithotherlittlecomplications.The technique briefly depicted above fits in the batch scenario; a population oc-curs atnight, in themorningO&Moperators see theerrors, remove thecause,andreruntheapplicationinrecoverymode.AlltheundooperationsarecodedintherecoveryProcessUnit,and,ifthecausesoffailureweretransientorhavebeenremoved,thesystemcanrecoverthefailedportionoftheETLjobwithouthumaninterventiononDBMS.IntheNRTcontext,whereapopulationcycleoccurseveryhourorless, there-coveryprocessneeds tobemanaged inanautomaticwayasmuchaspossible.AnH24operatorcanhardlychecktheresultofeverycycle;thesolutionistouseastandbyrecoveryapplication.Therefore, thereare tworunningapplications:aprimaryapplicationinstancethatdoesitsjobatscheduledintervalsandarecovery applicationinstancethatchecksthestatusoftheprimaryand,ifrequired,performstherecovery,otherwisesleepsuntilnextcheck.Therecoverymechanismandthestatustablearethesameaswehaveseenbefore.Obviously,duetotheabsenceofhumanintervention,thismechanismcanrecoveronlytransienterrors(e.g.,alackinthenetwork).

Future.Trends.and.Conclusion

Asthecomputationalpoweroftoday’sequipmentsgrows,theperformanceconstraintsbecomelessstrong.ThatisclearevidenceinthewholecomputersciencealsovalidforETL.Inthenearfuture,itmaybepossibletoseeETLtools/systemwritteninJavawithsophisticatedmetadatasupportthatworkswellinanapplicationcontextwheretodaywehavecrypticCprograms.But,ifitistruethatmachinesrunfasterandfaster,eventhevolumesofdatagrow,sothattherewillalwaysbethe“borderline”applicationswheretheperformanceconstraintsareagainstrong.Withregardtothepossiblespreadofsomekindofintersystemscommunicationstandards/guidelines,wearealittlemoreskeptical;theseformsofstandardizationdonothaveastrongeconomicboost,involvedelicateinternalorganizationbal-ance,andarereallyatoocomplexjob.Inouropinion,theETLcomplexityisalsodirectlycorrelated tohighvolumes, timingconstraints, reliability requirements,

Page 136: Data Warehouses and OLAP - Concepts Architectures and Solutions

Extraction, Transformation, and Loading Processes �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

andsoforththatneedverysophisticatedtechniques.OneofthemaincriticalitiesinfacinganETLprojectconsistsinevaluatingtheimpactofdifferentchoicesinordertoweightheircostsindifferentperspectives(performance,etc.),andmakingdecisionsrespectingthebalanceofthesysteminitswholeness.Inthischapter,wehaveproposedaninfrastructuralapproachtoETLasanoptimalsolution for a specific class of problems in large DW; we have given some practical suggestionsinordertoaddresstypicalimplementationissues,leavingotheraspectsandpointsofviewinthebackground.

References

Adzic, J.,&Fiore,V. (2003,September).Datawarehousepopulationplatform.InProceedings of the International Workshop on Design and Management of Data Warehouses (DMDW03).Berlin,German.RetrievedMay27,2006,from http://ftp.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-77/08_Adzic.pdf

Gartner.(2005,May).ETL Magic Quadrant update.RetrievedMay25,2006,fromhttp://www.gartner.com/displaydocument?doc_cd=127170

Golfarelli,M.,&Rizzi,S.(1998,November).Methodological framework for data warehouse design.PaperpresentedattheACMFirstInternationalWorkshoponDataWarehousingandOLAP(DOLAP’98),Bethesda,Maryland.

Husemann,B.,Lechtenborger,J.,&Vossen,G.(2000).Conceptualdatawarehousemodeling.InProceedings of the 2nd International Workshop on Design and Management of Data Warehouses (DMDW00),Stockholm,Sweden.

IBM.(2005).IBM Data Warehouse Manager overview.RetrievedMay27,2006,fromhttp://www-306.ibm.com/software/data/db2/datawarehouse/

Informatica.(2005).PowerCenter 6. RetrievedMay27,2006,fromhttp://www.informatica.com/products/powercenter/default.htm

Kimball,R.,&Caserta,J.(2004).The data warehouse ETL toolkit: Practical tech-niques for extracting, cleaning, conforming, and delivering data warehouse.NewYork:JohnWiley&Sons.

Kimball,R.,Reeves,L.,Ross,M.,&Thornthwaite,W.(1998).The data warehouse lifecycle toolkit: Expert methods for designing, developing, and deploying data warehouses.NewYork:JohnWiley&Sons.

Labio, W., Wiener, J. L., Garcia-Molina, H., & Gorelik, V. (2000). Efficient re-sumptionofinterruptedwarehouseloads.InProceedings of the SIGMOD’00,Texas(pp.46-57).

Page 137: Data Warehouses and OLAP - Concepts Architectures and Solutions

��0 Adzic, Fiore, & Sisto

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

MicrosoftCorp.(2005).SQL Server 2005: Data management and analysis solution. RetrievedMay27,2006,fromhttp://www.microsoft.com/sql/default.mspx

OracleCorp.(2005).Oracle Warehouse Builder 10G.RetrievedMay27,2006,fromhttp://www.oracle.com/technology/products/warehouse/index.html

Tryfona,N.,Busborg,F.,&Christiansen,J.G.B.(1999,November6).starER:Aconceptualmodelfordatawarehousedesign.InProceedings of the ACM Sec-ond International Workshop on Data Warehousing and OLAP (DOLAP’99),Missouri(pp.3-8).

Vassiliadis,P.,Simitsis,A.,Georgantas,P.,&Terrovitis,M.(2003,June).A frame-work for the design of ETL scenarios.Paperpresentedatthe15thConferenceonAdvanced Information Systems Engineering (CAiSE ’03), Klagenfurt,Austria.

Vassiliadis,P.,Simitsis,A.,&Skiadopoulos,S.(2002).ModelingETLactivitiesasgraphs.InProceedings of the Design and Management of Data Warehouses (DMDW’2002) 4th International Workshop in conjunction with CAiSE’02,Toronto,Canada(pp.52-61).

Vassiliadis,P., Simitsis,A.,&Skiadopoulos,S. (2002,November).ConceptualmodelingforETLprocesses.InProceedings of the Data Warehousing and OLAP (DOLAP2002) ACM 5th International Workshop in conjunction with CIKM’02,McLean,VA.

Endnotes

1 Iftherelationshipbetweenpartitionsandtablespaceis1:1,thenonemustdimensionallthetablespacestobelargeenoughtocontainthebiggestparti-tion; in the proposed configuration many partitions share the same table space andsoitmustbedimensionedtocontain“n”averageweightpartitions.

2 OracleCall Interface: a setof low level functions (API) to accessDBMSfunctionality.

3 OSAPIPosix:PosixisafamilyofopenstandardsbasedonUnix;followingPosixmodelguaranteesportabilityespeciallyinthecaseofthreadAPI(SUN,forexample,besidesPosix,hasaproprietarythreadingmodel).

4 DirectpathOCIareanAPIallowingmassiveloadinginOracleinthesamewayasSQLldr.

Page 138: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.V

Data.Warehouse.Refreshment

Alkis SimitisisNational Technical University of Athens, Greece

Panos VassiliadisUniversity of Ioannina, Greece

Spiros SkiadopoulosUniversity of Peloponnese, Greece

Timos SellisNational Technical University of Athens, Greece

Abstract

In the early stages of a data warehouse project, the designers/administrators have to come up with a decision concerning the design and deployment of the backstage architecture. The possible options are (a) the usage of a commercial ETL tool or (b) the development of an in-house ETL prototype. Both cases have advantages and disadvantages. However, in both cases the design and modeling of the ETL work-flows have the same characteristics. The scope of this chapter is to indicate the main challenges, issues, and problems concerning the manufacturing of ETL workflows, in order to assist the designers/administrators to decide which solution suits their data warehouse project better and to help them construct an efficient, robust, and evolvable ETL workflow that implements the refreshment of their warehouse.

Page 139: Data Warehouses and OLAP - Concepts Architectures and Solutions

��2 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction

In the past, research has treateddatawarehouses as collections ofmaterializedviews. Although this abstraction is elegant and possibly sufficient for the purpose of examining alternative strategies for view maintenance, it is sufficient enough todescribethestructureandcontentsofadatawarehouseinreal-worldsettings.Vassiliadis,Quix,Vassiliou,andJarke(2001)bringuptheissueofdata warehouse operational processes and deduce the definition of a table in the data warehouse as theoutcomeofthecombinationoftheprocessesthatpopulateit.Thisnewkindofdefinition complements existing approaches, since it provides the operational seman-tics for the content of a data warehouse table, whereas the existing definitions give anabstractionofitsintentionalsemantics.Indeed,inatypicalmediationschemeonewouldposeaquerytoa“virtual”datawarehouse,dispatchittothesources,answerpartsofitthere,andthencollecttheanswers.Onthecontrary,inthecaseofdatawarehouseoperationalprocesses,theobjectiveistocarrydatafromasetofsourcerelationsandeventuallyloadtheminatarget(datawarehouse)relation.Toachieve this goal, we have to (a) specify data transformations as a workflow and (b) optimize and execute the workflow.Data warehouse operational processes normally compose a labor intensive workflow andconstituteanintegralpartofthebackstageofdatawarehousearchitectures.Todeal with this workflow and in order to facilitate and manage the data warehouse operational processes, specialized workflows are used under the general title ex-tractiontransformationloading(ETL) workflows. ETL workflows are responsible fortheextractionofdatafromseveralsources,theircleansing,theircustomizationand transformation, and finally, their loading into a data warehouse. ETL workflows represent an important part of data warehousing, as they represent themeansbywhichdataactuallygetloadedintothewarehouse.Togiveageneralidea of the functionality of these workflows we mention their most prominent tasks, whichinclude:

• Theidentificationofrelevantinformationatthesourceside• Theextractionofthisinformation• ThetransportationofthisinformationtotheDSA• The transformation(i.e.,customizationandintegration)oftheinformation

comingfrommultiplesourcesintoacommonformat• Thecleaningoftheresultingdataset,onthebasisofdatabaseandbusiness

rules• Thepropagationandloadingofthedatatothedatawarehouseandtherefresh-

mentofdatamarts

Page 140: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Inthesequel,wewilladoptthegeneralacronymETLforallkindsofin-houseorcommercialtools,andalltheaforementionedcategoriesoftasks/processes.InFigure1,weabstractlydescribethegeneralframeworkforETLprocesses.Ontheleftside,wecanobservetheoriginaldatastores(sources)thatareinvolvedinthe overall process. Typically, data sources are relational databases and files. The datafromthesesourcesareextractedbyspecializedroutinesortools,whichprovideeithercompletesnapshotsordifferentialsofthedatasources.Then,thesedataarepropagatedtothedatastagingarea(DSA)wheretheyaretransformedandcleanedbeforebeingloadedintothedatawarehouse.Intermediateresults,againintheformof (mostly) files or relational tables are part of the data staging area. The data ware-house(DW)isdepictedintherightpartofFigure1andcomprisesthetargetdatastores,thatis,facttablesforthestorageofinformationanddimensiontableswiththedescriptionandthemultidimensionalrolluphierarchiesofthestoredfacts.Theloadingofthecentralwarehouseisperformedfromtheloadingactivitiesdepictedintherightsidebeforethedatawarehousedatastore.Despitetheplethoraofcommercialsolutionsthatofferad-hoccapabilitiesforthecreationofanETLscenario,adesigner/administratorneedsaconcretemethodtodevelop an efficient, robust, and evolvable ETL workflow. Therefore, this chapter intendstopointoutthemainchallengesandissuesconcerningthegenericconstruc-tion of ETL workflows. As an outline, in the rest of the chapter, we proceed with abriefpresentationaboutthestateoftheartinETLtechnology.Afterwards,wediscuss why the modeling of ETL workflows is important and we indicate the main problemsthatariseduringallthephasesofanETLprocess.Moreover,wepresenta modeling approach for the construction of ETL workflows, which is based on thelifecycleofthedatawarehouse,alongwithanexemplaryresearchframeworknamedArktosII.Finally,welistseveralopenresearchchallengesthatproclaimETLasacommodityoffutureresearch.

Figure 1. The environment of extraction-transformation-loading processes (Sim-itsis, 2004)

Sources

Extract Transform.&.Clean

DW

Load

DSA

Page 141: Data Warehouses and OLAP - Concepts Architectures and Solutions

��4 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Background

Inthissection,wepresentETLmethodologiesthatareproposedby(a)commercialstudiesandtoolsand(b)theresearchcommunity.Then,wepresentthereasonsandthemotivesthatsignifytheresearchonETLprocessesisavalidresearchgoal.

State.of.the.Art

• Commercial.studies.and.tools:Intermsoftechnologicalaspects,themaincharacteristicoftheareaistheinvolvementoftraditionaldatabasevendorswithETLsolutionsbuiltintheDBMS.ThethreemajordatabasevendorsthatpracticallyshipETLsolutions“atnoextracharge”arepinpointed:OraclewithOracleWarehouseBuilder(Oracle,2001),MicrosoftwithDataTransformationServices(Microsoft,2003),andIBMwiththeDataWarehouseCenter(IBM,2003).Still,themajorvendorsintheareaareInformatica’sPowercenter(In-formatica,2003)andAscential’sDataStagesuites(Ascential,2003)(thelatterpartoftheIBMrecommendationsforETLsolutions).Asageneralcomment,we emphasize the fact that the former three have the benefit of the minimum cost,becausetheyareshippedwiththedatabase,whilethelattertwohavethebenefit to aim at complex and deep solutions not envisioned by the generic products.Theaforementioneddiscussionissupportedfromasecondrecentstudy(Gartner,2003),wheretheauthorsnotethedeclineinlicenserevenueforpureETLtools,mainlyduetothecrisisofITspendingandtheappearanceofETLsolutionsfromtraditionaldatabaseandbusinessintelligencevendors.TheGartnerstudydiscussestheroleofthethreemajordatabasevendors(IBM,Microsoft,Oracle)andpointsoutthattheyslowlystarttotakeaportionoftheETLmarketthroughtheirDBMS-built-insolutions.

• Research focused specifically on ETL: TheAJAXsystem(Galhardas,Flo-rescu,Shasha&Simon,2000) isadatacleaningtooldevelopedatINRIAFrance.Itdealswithtypicaldataqualityproblems,suchasthe object identity problem (Cohen, 1999), errors due to mistyping, anddata inconsistenciesbetweenmatchingrecords.AJAXprovidesaframeworkwhereinthelogicofadatacleaningprogramismodeledasadirectedgraphofdatatransforma-tionsthatstartfromsomeinputsourcedata.AJAXalsoprovidesadeclarativelanguageforspecifyingdatacleaningprograms,whichconsistsofSQLstate-ments enriched with a set of specific primitives to express mapping, matching, clustering,andmergingtransformations.Finally,ainteractiveenvironmentissuppliedtotheuserinordertoresolveerrorsandinconsistenciesthatcannotbe automatically handled and support a stepwise refinement design of data cleaningprograms.ThetheoreticfoundationsofthistoolcanbefoundinGal-hardas,Florescu,Shasha,andSimon(1999),whereapartfromthepresentation

Page 142: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

of a general framework for the data cleaning process, specific optimization techniquestailoredfordatacleaningapplicationsarediscussed.

ThePotter’s Wheelsystem(Raman&Hellerstein,2001),istargetedtopro-videinteractivedatacleaningtoitsusers.Thesystemoffersthepossibilityofperformingseveralalgebraicoperationsoveranunderlyingdataset.Opti-mizationalgorithmsarealsoprovidedfortheCPUusageforcertainclassesofoperators.ThegeneralideabehindPotter’sWheelisthatusersbuilddatatransformationsiniterativeandinteractiveways.Inthebackground,Potter’sWheel automatically infers structures for data values in terms of user-defined domains,andaccordinglychecksforconstraintviolations.Usersgraduallybuildtransformationstocleanthedatabyaddingorundoingtransformsonaspreadsheet-likeinterface;theeffectofatransformisshownatonceonrecordsvisible on screen. These transforms are specified either through simple graphi-caloperations,orbyshowingthedesiredeffectsonexampledatavalues.

• Data.quality.and.cleaning:Jarke,List,andKoller(2000)presentanexten-sivereviewofdataqualityproblemsandrelatedliterature,alongwithqualitymanagement methodologies. Rundensteiner (1999) offers a discussion onvariousaspectsondatatransformations.Sarawagi(2000)presentsasimilarcollection of papers in the field of data cleaning including a survey (Rahm & Hai Do, 2000) that provides an extensive overview of the field, along with re-search issues and a review of some commercial tools and solutions on specific problems(Borkar,Deshmuk,&Sarawagi,2000;Monge,2000).Inarelatedbutdifferentcontext,wewouldliketomentiontheIBIStool(Calì,Calvanese,DeGiacomo,Lenzerini,Naggar,&Vernacotola,2003).IBISisanintegrationtoolfollowingtheglobal-as-viewapproachtoanswerqueriesinamediatedsystem.Departingfromthetraditionaldataintegrationliteraturethough,IBISbringstheissueofdataqualityintotheintegrationprocess.Thesystemtakesadvantage of the definition of constraints at the intentional level (e.g., foreign key constraints) and tries to provide answers that resolve semantic conflicts (e.g.,theviolationofaforeignkeyconstraint).

• Workflow and process models: In general, research on workflows is focused aroundthefollowingreoccurringthemes:(a)modeling(Eder&Gruber,2002;Kiepuszewski,terHofstede,&Bussler,2000;Sadiq&Orlowska,2000;Vander Aalst, ter Hofstede, Kiepuszewski, & Barros, 2000; Workflow Manage-mentCoalition,1998),wheretheauthorsareprimarilyconcernedinprovid-ing a metamodel for workflows; (b) correctness issues (Eder & Gruber, 2002; Kiepuszewskietal.,2000;Sadiq&Orlowska,2000),wherecriteriaarees-tablished to determine whether a workflow is well formed, and (c) workflow transformations(Eder&Gruber,2002;Kiepuszewskietal.,2000;Sadiq&Orlowska,2000)wheretheauthorsareconcernedwithcorrectnessissuesinthe evolution of the workflow from a certain plan to another.

Page 143: Data Warehouses and OLAP - Concepts Architectures and Solutions

��6 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Applications of ETL workflows in data warehouses: Finally,theliteraturereportsseveralefforts(bothresearchandindustrial)forthemanagementofprocesses and workflows that operate on data warehouse systems. Jarke, Quix,Blees,Lehmann,Michalk,andStierl(1999)describeanindustrialef-fortwherethecleaningmechanismsofthedatawarehouseareemployedinorder to avoid the population of the sources with problematic data in the first place. The described solution is based on a workflow which employs tech-niques from the field of view maintenance. Schafer, Becker, and Jarke (2000) describeanindustrialeffortatDeutcheBank, involvingtheimport/export,transformationandcleaning,andstorageofdatainaterabyte-sizedataware-house.Theauthorsexplainalsotheusageofmetadatamanagementtechniques,whichinvolvesabroadspectrumofapplications,fromtheimportofdatatothemanagementofdimensionaldataandmoreimportantlyforthequeryingofthedatawarehouse.Jarkeetal.(2000)presentaresearcheffort(anditsapplicationinanindustrialapplication)fortheintegrationandcentralman-agementoftheprocessesthatliearoundaninformationsystem.Ametadatamanagementrepositoryisemployedtostorethedifferentactivitiesofalargeworkflow, along with important data these processes employ.

Motivation.

Allengineeringdisciplinesemployblueprintsduringthedesignoftheirengineeringartifacts.Modelinginthisfashionisnotataskwithavalue,perse;asBooch,Rum-baugh,andJacobson(1998)mention“webuildmodelstocommunicatethedesiredstructureandbehaviorofoursystem…tovisualizeandcontrolthesystem’sarchi-tecture…tobetterunderstandthesystemwearebuilding…tomanagerisk.”Discussing the modeling of ETL workflows is important for several reasons. First, thedataextraction,transformation,integration,andloadingprocessisakeypartofadatawarehouse.ThecommercialETLtoolsthatareavailableonthemarketthelastfewyearsincreasedtheirsalesfromUS$101milliondollarsin1998toUS$210milliondollarsin2002,havingasteadyincreaserateofapproximately20.1%eachyear(Jarke,Lenzerini,Vassiliou,&Vassiliadis,2003).ThesamesurveyindicatesthatETLtoolsareinthethirdplaceoftheannualsalesoftheoverallcomponentsof a data warehouse with the RDBMS sales for data warehouses in the first place (40%eachyearsince1998)anddatamarts(25%)inthesecondplace.Also,ETLprocessesconstitutethemajorpartofadatawarehouseenvironment,resultinginthecorrespondingdevelopmenteffortandcost.Datawarehouseopera-tionalprocessesarecostlyandcriticalforthesuccessofadatawarehouseproject,andtheirdesignandimplementationhasbeencharacterizedasalabor-intensiveand lengthyprocedure (Demarest, 1999;Shilakes&Tylman, 1998;Vassiliadis,2000).Severalreportsmentionthatmostoftheseprocessesareconstructedthrough

Page 144: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

anin-housedevelopmentprocedurethatcanconsumeupto70%oftheresourcesforadatawarehouseproject(Giga,2002;Strange,2002).Complementaryreports(Friedman, 2002; Strange, 2002a) address the factors that influence the cost of its implementation and support: (a) staff (development, application support teams,on-goingsupportandmaintenance,andoperations);(b)computing resources(dedi-cated ETL server, disk storage for “temporary” or staging files, CPU use of servers hostingsourcedata,andannualmaintenanceandsupport); (c) tools acquisition(annualmaintenancesupportandtraining);(d)latency(timelinessofthedeliveryofdatatothetargetenvironmentimpactstheoveralleffectivenessofBI);and(e)quality (flaws in data distilled from ETL processes can severely limit BI adoption). Each of these components directly influences the total cost of ownership of a data warehouseimplementationandoperation.Forexample,Strange(2002)mentionsthedevelopmentofadatawarehouserealizedin the Fortune 500 financial institution. This development included the support of thedatawarehouseforapplicationstoperformcustomerretentionanalysis,bankloanriskmanagement,customercontacthistory,andmanyotherapplications.Therewere100peopleonthedatawarehouseteam(approximately8.5%oftheoverallITstaff)—55fromETL,fourdatabaseadministrators,fourarchitects,foursystemsadministrators, nine BI competency center workers (assisting end users), five report writers,ninemanagers,andninehardware,operatingsystem,andoperationssupportstaffmembers.These55individualswereresponsibleforbuildingandmaintain-ingtheETLprocess,whichincludes46differentsourcesystems.Responsibilitiesincludeupdatesofdatamartsonaweeklyandmonthlybasis.ThisdoesnotincludestafffromoperationstosupporttheexecutionoftheETLprocesses.Theyusedalargeparallelserverplatformthatisconsistedofmultiplesilvernodes(fourpro-cessorspernode)andfourterabytesormoreofdiskstorage,atanacquisitioncostoverthreeyearsofUS$5million.ThecostoftheETLtoolusedwasUS$1million,excludingtheyearlymaintenanceandsupportcosts.Moreover,theseprocessesareimportant forthecorrectness,completeness,andfresh-nessofdatawarehousecontents,sincenotonlydotheyfacilitatethepopulationofthewarehousewithup-to-datedata,buttheyarealsoresponsibleforhomogenizingtheirstructureandblockingthepropagationoferroneousorinconsistententries.In addition, these data intensive workflows are quite complexinnature,involvingdozensofsources,cleaningand transformationactivities,and loadingfacilities.Bouzeghoub,Fabret,andMatulovic(1999)mentionthatthedatawarehousere-freshmentprocesscanconsistofmanydifferentsubprocesses,likedatacleaning,archiving, transformations,andaggregations, interconnected throughacomplexschedule.Forinstance,AdzicandFiore(2003)reportacasestudyformobilenetworktraffic data, involving around 30 data flows and 10 sources, while the volume of data risestoabout2TB,withthemainfacttablecontainingabout3billionrecords.Thethroughputofthe(traditional)populationsystemis80millionrecordsperhourforthe entire process (compression, FTP of files, decompression, transformation, and

Page 145: Data Warehouses and OLAP - Concepts Architectures and Solutions

��8 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

loading),onadailybasis,withaloadingwindowofonly4hours.Therequestforperformanceissopressingthatthereareprocesseshard-codedinlowlevelDBMScalls to avoid the extra step of storing data to a target file to be loaded to the data warehousethroughtheDBMSloader.Ingeneral,Strange(2002a)notesthatthecomplexity of the ETL process, as well as the staffing required to implement it, de-pendsmainlyonthefollowingvariables:(a)thenumberandvarietyofdatasources;(b)thecomplexityoftransformation;(c)thecomplexityofintegration;and(d)theavailabilityofskillsets.Also,thesamereportsuggestsconsidering“onepersonpersource”asaguidetoaccomplishingtheETLimplementationeffectively.Basedonthepreviousdiscussion,wecanidentifykeyfactorsunderlyingthemainproblems of ETL workflows:

• Vastnessofthedatavolumes• Qualityproblems,sincedataarenotalwayscleanandhavetobecleansed• Performance, since the whole process has to take place within a specific time

windowanditisnecessarytooptimizeitsexecutiontime• Evolutionofthesourcesandthedatawarehousecaneventuallyleadtodaily

maintenanceoperations

Visualizingandunderstandingthiskindofsystemisanotherissue.Infact,tradi-tionalmodelingapproachesneedtobereconsidered:weneedinteractive,multiv-iewmodelingframeworksthatabstractthecomplexityofthesystemandprovidecomplementaryviewsofthesystem’sstructuretothedesigner(apartfromsimplyprovidingthebigpicture,likethetraditionalER/DFDapproachesdid).Moreover,weneedtobeabletomanageriskthroughourmodelingartifacts.Forexample,wewouldliketoanswerquestionslike:

• Whichattributes/tablesareinvolvedinthepopulationofacertainattribute?• Whatpartofthescenarioisaffectedifwedeleteanattribute?• How good is the design of my ETL workflow? • IsvariantAbetterthanvariantB?

Main.Thrust. of. the.Chapter

Inthissection,weidentifythemainproblemsthatariseduringallthephasesofanETLprocess.Then,weproposeamodelingapproachfortheconstructionofETLworkflows, which is based on the life cycle of the ETL processes.

Page 146: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Problems and Issues of DW Refreshment

InallthephasesofanETLprocess(extractionandtransportation,transformationandcleaning,andloading),individualissuesarise,makingdatawarehouserefresh-mentaverytroublesometask.Inthesequel,inordertoclarifythecomplexityandthe special characteristics of the ETL processes, we briefly review several issues, problems,andconstraintsthatturnupineachphaseseparately.

• Global problems and constraints:Scalzo(2003)mentionsthat90%oftheproblemsindatawarehousesariseduringtheloadingofthedataatthenightlybatchcycles.Atthisperiod,theadministratorshavetodealwithproblemssuch as (a) efficient data loading and (b) concurrent job mixture and depen-dencies.Moreover,ETLprocesseshaveglobaltimeconstraintsincludingtheinitiationtimeandtheircompletiondeadlines.Infact,inmostcases,thereisatight“timewindow”inthenightthatcanbeexploitedfortherefreshmentofthedatawarehouse,sincethesourcesystemisoff-lineornotheavilyusedduringthisperiod.

Consequently,amajorproblemariseswiththeschedulingoftheoverallproc-ess. The administrator has to find the right execution order for dependent jobs andjobsetsontheexistinghardwareforthepermittedtimeschedule.Ontheotherhand,iftheOLTPapplicationscannotproducethenecessarysourcedataintimeforprocessingbeforethedatawarehousecomesonline,theinforma-tioninthedatawarehousewillbeoutofdate.Still,sincedatawarehousesareusedforstrategicpurposes,thisproblemcansometimesbeafforded,duetothefactthatlong-termreporting/planningisnotseverelyaffectedbythistypeoffailures.

• Extraction.and.transportation:.During the ETL process, one of the very first tasksthatmustbeperformedistheextractionoftherelevantinformationthathastobefurtherpropagatedtothewarehouse(Theodoratos,Ligoudistianos,&Sellis,2001).Inordertominimizetheoverallprocessingtime,thisinvolvesonlyafractionofthesourcedatathathaschangedsincethepreviousexecutionoftheETLprocess,mainlyconcerningthenewlyinsertedandpossiblyupdatedrecords.Usually,changedetectionisphysicallyperformedbythecomparisonoftwosnapshots(onecorrespondingtothepreviousextractionandtheotherto the current one). Efficient algorithms exist for this task, like the snapshot differentialalgorithmspresentedbyLabioandGarcia-Molina(1996).Anothertechnique is log “sniffing,” that is, the scanning of the log file in order to “re-construct”thechangesperformedsincethelastscan.Inrarecases,changedetectioncanbefacilitatedbytheuseoftriggers.However,thissolutionistechnicallyimpossibleformanyofthesourcesthatarelegacysystems(sucha technique adds an enormous load to the source systems) or plain flat files.

Page 147: Data Warehouses and OLAP - Concepts Architectures and Solutions

�20 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Innumerousothercases,whererelationalsystemsareusedatthesourceside,theusageoftriggersisalsoprohibitivebothduetotheperformancedegrada-tionthattheirusageincursandtheneedtointerveneinthestructureofthedatabase.Moreover,anothercrucialissueconcernsthetransportationofdataaftertheextraction,wheretaskslikeFTP,encryption-decryption,compres-sion-decompression,andsoforth,canpossiblytakeplace.

• Transformation.and.cleaning:ItispossibletodeterminetypicaltasksthattakeplaceduringthetransformationandcleaningphaseofanETLprocess.RahmandHaiDo(2000)furtherdetailthisphaseinthefollowingtasks:(a)data analysis; (b) definition of transformation workflow and mapping rules; (c) verification; (d) transformation; and (e) backflow of cleaned data. In terms of thetransformationtasks,wedistinguishtwomainclassesofproblems(Len-zerini, 2002): (a) conflicts and problems at the schema level(e.g.,namingandstructural conflicts) and (b) data level transformations(i.e.,at the instancelevel).Themainproblemswithrespecttotheschemalevelare(a)naming conflicts,wherethesamenameisusedfordifferentobjects(homonyms)ordifferentnamesareusedforthesameobject(synonyms)and(b)structural conflicts,whereonemustdealwithdifferentrepresentationsofthesameob-jectindifferentsources.Inaddition,therearealotofvariationsofdata-levelconflicts across sources: duplicated or contradicting records, different value representations(e.g.,formaritalstatus),differentinterpretationofthevalues(e.g.,measurementunitsdollarvs.euro),differentaggregationlevels(e.g.,salesperproductvs.salesperproductgroup),orreferencetodifferentpointsintime(e.g.,currentsalesasofyesterdayforacertainsourcevs.asoflastweekforanothersource).Thelistisenrichedbylow-leveltechnicalproblemslikedata type conversions, applying format masks, assigning fields to a sequence number,substitutingconstants,settingvaluestoNULLorDEFAULTbasedonacondition,orusingsimpleSQLoperators,forinstance,UPPER,TRUNC,SUB-STR.Theintegrationandtransformationprogramsperformawidevarietyoffunctions,suchasreformatting,recalculating,modifyingkeystructures,add-inganelementoftime,identifyingdefaultvalues,supplyinglogictochoosebetweenmultiplesources,summarizing,mergingdatafrommultiplesources,andsoforth.

• Loading:.The final loading of the data warehouse has its own technical chal-lenges.Amajorproblemistheabilitytodiscriminatebetweennewandexist-ingdataatloadingtime.Thisproblemariseswhenasetofrecordshastobeclassified to (a) the new rows that need to be appended to the warehouse and (b)rowsthatalreadyexistinthedatawarehouse,buttheirvaluehaschangedandmustbeupdated(e.g.,withanUPDATEcommand).ModernETLtoolsalreadyprovidemechanismstowardsthisproblem,mostlythroughlanguagepredicates, forexample,Oracle’sMERGEcommand(Oracle,2002).Also,

Page 148: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment �2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

simple SQL commands are not sufficient since the open-loop-fetch technique, whererecordsareinsertedonebyone,isextremelyslowforthevastvolumeofdatatobeloadedinthewarehouse.Anextraproblemisthesimultaneoususage of the rollback segments and log files during the loading process. The optiontoturnthemoffcontainssomeriskinthecaseofaloadingfailure.Sofar,thebesttechniqueseemstobetheusageofthebatchloadingtoolsofferedbymostRDBMSthatavoidstheseproblems.Othertechniquesthatfacilitatetheloadingtaskinvolvethecreationoftablesatthesametimewiththecre-ationoftherespectiveindexes,theminimizationofinterprocesswaitstates,andthemaximizationofconcurrentCPUusage.

Research Problems and Challenges

The previous discussion demonstrates the problem of designing an efficient, robust, and evolvable ETL workflow is relevant and pressing. To be more specific and un-derstandtherequirementsofthedesignandevolutionofadatawarehouse,wehaveto clarify how ETL workflows fit in the data warehouse life cycle. AswecanseeinFigure2,thelifecycleofadatawarehousebeginswithaninitialreverseengineeringandrequirementscollectionphasewherethedatasourcesareanalyzedinordertocomprehendtheirstructureandcontents.Atthesametime,anyrequirementsonthepartoftheusers(normallyafewpowerusers)arealsocol-lected.Thedeliverableofthisstageisaconceptualmodelforthedatastoresandtheprocessesinvolved.Inasecondstage,namelythelogicaldesignofthewarehouse,thelogicalschemaforthewarehouseandtheprocessesareconstructed.Third,thelogical design of the schema and processes are optimized and refined to the choice

Conceptual Model for DW, Sources & Processes

Logical.DesignTuning.–..Full.Activity.Description

Software.Construction

Administration.of.DW

Reverse. Engineering.of.Sources.&.Requirements.Collection

Software & SW Metrics

Physical Model for DW, Sources & Processes

Logical Model for DW, Sources& Processes

Metrics

Figure 2. The life cycle of a data warehouse and its ETL processes (Vassiliadis, Simitsis, & Skiadopoulos, 2002a)

Page 149: Data Warehouses and OLAP - Concepts Architectures and Solutions

�22 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

of specific physical structures in the warehouse (e.g., indexes) and environment-specific execution parameters for the operational processes. We call this stage tun-inganditsdeliverableisthephysicalmodeloftheenvironment.Inafourthstage,software construction, the software is constructed, tested, evaluated, and a first version of the warehouse is deployed. This process is guided through specific soft-waremetrics.Then,thecyclestartsagain,sincedatasources,userrequirements,andthedatawarehousestateareundercontinuousevolution.Anextrafeaturethatcomesintothesceneafterthedeploymentofthewarehouseistheadministrationtask, which also needs specific metrics for the maintenance and monitoring of the datawarehouse.Consequently,inordertoachieveourgoalwehavetodealwiththephasesofthelifecycleofadatawarehouse.

• Conceptual.model:.AconceptualmodelforETLprocessesdealswiththeearlieststagesofthedatawarehousedesign.Duringthisperiod,thedataware-housedesignerisconcernedwithtwotaskswhicharepracticallyexecutedinparallel:(a)thecollectionofrequirementsfromthepartoftheusers,and(b)theanalysisofthestructureandcontentoftheexistingdatasourcesandtheirintentionalmapping to thecommondatawarehousemodel.ThedesignofanETLprocessaimsattheproductionofacrucialdeliverable:themappingoftheattributesofthedatasourcestotheattributesofthedatawarehousetablesthroughtheappropriateintermediatetransformations.Theproductionofthisdeliverableinvolvesseveralinterviewsthatresultintherevisionandredefinition of original assumptions and mappings; thus it is imperative that a simpleconceptualmodelshouldbeemployedinordertofacilitatethesmoothredefinition and revision efforts and to serve as the means of communication withtherestoftheinvolvedparties.

Fromourpointofview,aconceptualmodelforETLprocessesshallnotbeanother process/workflow model for the population of the data warehouse. Therearetwobasicreasonsforthisapproach.First,intheconceptualmodelforETLprocesses,thefocusisondocumenting/formalizingtheparticularitiesofthedatasourceswithrespecttothedatawarehouseandnotinprovidingatechnicalsolutionfortheimplementationoftheprocess.Second,theETLconceptualmodel is constructed in theearly stagesof thedatawarehouseprojectduringwhichthetimeconstraintsoftheprojectrequireaquickdocu-mentationoftheinvolveddatastoresandtheirrelationships,ratherthananin-depth description of a composite workflow.

• Logical.model:.Inthelogicalperspective,weclassifythedesignartifactsthatdescribe an abstraction of the workflow environment. First, the designer is responsible for defining an Execution Plan for the scenario. The definition of anexecutionplancanbeseenfromvariousviews.TheExecutionSequenceinvolves the specification of (a) which process runs first, second, and so on;

Page 150: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment �2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

(b) which processes run in parallel; or (c) when a semaphore is defined so that severalprocessesaresynchronizedatarendezvouspoint.ETLprocessesnor-mallyruninbatches,sothedesignerneedstospecifyanExecutionSchedule,that is, the time points or events that trigger the execution of the workflow as awhole.Finally,duetosystemcrashes,itisimperativethatarecoveryplanexists,specifyingthesequenceofstepstobetakeninthecaseoffailureforacertainprocess(e.g.,retrytoexecutetheprocess,orundoanyintermedi-ateresultsproducedsofar).IntheETLcase,duetothedatacentricnatureoftheprocess,thedesignermustdealwiththerelationshipoftheinvolvedprocesses with the underlying data. This involves the definition of a primary data flow that describes the route of data from the sources towards their fi-naldestinationinthedatawarehouse,astheypassthroughtheprocessesofthe workflow. Also, due to possible quality problems of the processed data, the designer is obliged to define a data flow for logical exceptions, which is responsible for the flow of the problematic data, that is, the rows that violate integrityorbusinessrules.Moreover,averycrucialtopicisthesemanticsofthe ETL workflow. These semantics are generated by the combination of the data flow and the execution sequence: the data flow defines what each process does and the execution plan defines in which order and combination.

• Mapping.conceptual.to.logical.models:Anotherissuethathastobesolvedis the transition between the aforementioned phases (i.e., conceptual andlogical)ofthedatawarehouselifecycle.Ononehand,thereexistsasimplemodel, sufficient for the early stages of the data warehouse design. On the otherhand,thereexistsalogicalmodelthatoffersformalandsemanticallyfoundedconceptstocapturetheparticularitiesofanETLprocess.

Thegoalofthistransitionshouldbetofacilitatetheintegrationoftheresultsaccumulatedintheearlyphasesofadatawarehouseprojectintothelogicalmodel,suchasthecollectionofrequirementsfromthepartoftheusers,theanalysisofthestructureandcontentoftheexistingdatasources,alongwiththeirintentionalmappingtothecommondatawarehousemodel.Thedeliv-erableofthistransitionisnotexpectedtobealwaysacompleteandaccuratelogicaldesign.Thedesigner/administratorinthelogicallevelshouldexamine,complement,orchangetheoutcomeofthismethodology,inordertoachievethegoals.

In the context of finding an automatic transition from one model to the other, thereareseveralproblemsthatshouldbeaddressed.Sincetheconceptualmodelisconstructedinamoregenericandhigh-levelmanner,eachconceptualentityhasamappingtoalogicalentity.Thus,thereisaneedforthedeterminationofthesemappings.Moreover,wehavestressedthattheconceptualmodelisnot a workflow as it simply identifies the transformations needed in an ETL process.Therefore,itdoesnotdirectlyspecifytheexecutionorderofthese

Page 151: Data Warehouses and OLAP - Concepts Architectures and Solutions

�24 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

transformations.Ontheotherhand,theexecutionorderisaveryimportantproperty of the logical model. So, there is a necessity for finding a way to specifytheexecutionorderofthetransformationsinanETLprocessduringthetransitionbetweenthetwomodels.

• Optimization of ETL workflows: In order to design an efficient, robust, and evolvable ETL workflow, we have to optimize its execution plan. In other words,wehavetooptimizethesequenceoftheETLoperationsinvolvedintheoverallprocess.

Uptonow,theresearchcommunityhasconfrontedtheproblemoftheop-timization of data warehouse refreshment as a problem of finding the opti-mal strategy for view maintenance. But this is not sufficient with respect to mechanismsthatareemployedinreal-worldsettings.Infact,inreal-worlddatawarehouseenvironments,thisproceduredifferstothepointthattheexecu-tionofoperationalprocesses(whichisemployedinordertoexportdatafromoperationaldatasources,transformthemintotheformatofthetargettables,and finally, load them to the data warehouse) does not like as a “big” query; ratheritismorerealistictobeconsideredacomplextransaction.Thus,thereisanecessitytodealwiththisproblemforadifferentperspectivebytakingintoconsiderationthecharacteristicsofanETLprocesspresentedintheprevioussubsection.OnecouldarguethatwecanpossiblyexpressallETLoperationsintermsofrelationalalgebraandthenoptimizetheresultingexpressionasusual.But, the traditional logic-basedalgebraicqueryoptimizationcanbeblocked,basicallyduetotheexistenceofdatamanipulationfunctions.

However, if we study the problem of the optimization of ETL workflows from itslogicalpointofview,wecanidentifyseveralinterestingresearchproblemsand optimization opportunities. At first, there is a necessity for a framework thatwillallowtheapplicationofseveralwell-knownqueryoptimizationtech-niques to the optimization of ETL workflows. For example, it is desirable to pushselectionsallthewaytothesources,inordertoavoidprocessingun-necessaryrows.Moreover,itisdesirabletodetermineappropriatetechniquesand requirements, so that an ETL transformation (e.g., a filter) can be pushed beforeorafteranothertransformationinvolvingafunction.Additionally,thereisaneedtotackletheproblemofhomonyms.Forexample,assumethecaseof two attributes with the same name, COST, where the first one has values inEuropeancurrency,whiletheothercontainsvaluesinAmericancurrency.Clearly, in this case it is not obvious if a transformation that involves the first attribute (e.g., a transformation thatconverts thevalues fromAmerican toEuropeancurrency)canbepushedbeforeorafteranothertransformationthatinvolves the second attribute (e.g., a transformation that filters the values over acertainthreshold).

Page 152: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment �2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Software.construction:ToconcludethediscussionaboutthelifecycleofthedatawarehousepresentedinFigure2,oneanticipatesthattheoutcomeoftheaforementionedanalysisshouldbeusedfortheconstructionofasoft-wareprototype.Thisconstructionphaseincludesthedevelopment,testing,and deployment of a first version of the data warehouse. This process has to be guided through specific metrics for the maintenance and monitoring of the datawarehouse.

A Roadmap for a Data Warehouse Designer/Administrator

Wesummarize thepreviouslymentioned issues inTable1,wherewepresentasetofstepsforthedatawarehousedesignerstowardsconstructingthebackstageofthedatawarehouse.Weorganizethetasksofthedesignersinfourphases(re-quirements,design,tuning,andimplementation)ofthesoftwareproject.Foreach

Extract Transform Load Deliverable

Phase.1a:.ReverseEngineeringofSources&RequirementsCollection

collectionofrequirementsfromthepartoftheusers

analysisofthestructureandcontentoftheexistingdatasourcesandtheirintentionalmappingtothecommondatawarehousemodel

mappingoftheattributesofthedatasourcestotheattributesofthedatawarehousetablesthroughtheappropriateintermediatetransformations

identification of datatargets

conceptualschema

Phase 1b:Define SourcesandProcesses

conceptsmaptologicalrecordsets

transformationsmaptologicalactivities

definition of a proper executionorder

conceptsmaptologicalrecordsets

ETLconstraintsmaptologicalactivities

asetofstepsforthetransitionofconceptualtologicalschemas

Phase.2:LogicalDesign

definition of a plan forthepopulationoftheDataStagingAreaw.r.t.schematamappings

choiceofextractionpolicy:incrementalorfullextraction

descriptionofETLactivitiesw.r.t.schematamappingsandinternalsemantics

identification of an optimalexecutionplan

appropriateschematamappings

logicalschema

Table 1. Typical tasks for a data warehouse designer/developer organized by phase and stage

Page 153: Data Warehouses and OLAP - Concepts Architectures and Solutions

�26 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

phase,wepresenttheissuesandthestepstofollowconcerningthemaintasksofthewarehousearchitecture(extraction,transformation,cleaning).Thefundamentaldeliverablethatguidesthisprocessisalsolisted.

Arktos.II:.A.Framework.towards.the.Modeling.and.the...Optimization of ETL Workflows

In this subsection, we present a framework for traditional data warehouse flows, namedArktosII,asanexemplaryETLmodelingmethodologythatfollowsthelifecycle of a data warehouse as we previously presented it. Below, we briefly pres-entthemaincontributionsofArktosII,groupedbythephasesofthelifecycleofadatawarehouse.ArktosII(Simitsis,Vassiliadis,&Sellis,2005a;Vassiliadis,Simitsis,Georgantas,Terrovitis,&Skiadopoulos,2005)isaframeworkthatstudiesthedesign,develop-ment, and optimization of ETL workflows. The uttermost goal of this framework istofacilitate,manage,andoptimizethedesignandimplementationoftheETLworkflows during the initial design and deployment stage and during the continuous evolutionofthedatawarehouse.Despitethefactthatitsprototypeisonlyadesignenvironment, at least for the moment, it benefits compared to the commercial ETL toolsduetothelogicalabstractionthatitoffers;onthecontrary,commercialtoolsareconcerneddirectlywiththephysicalperspectiveofanETLscenario(atleasttothebestofourknowledge).ArktosIIproposesanovelconceptualmodelfortheearlystagesofadatawarehouseproject(Vassiliadis,Simitsis,&Skiadopoulos,2002).Thismodelfocuseson(a)theinterrelationshipsofattributesandconceptsand(b)thenecessarytransforma-tionsthatneedtotakeplaceduringtheloadingofthewarehouse.Also,itisabletocaptureconstraintsandtransformationcomposition.Duetothenatureofthedesignprocess,thefeaturesoftheconceptualmodelarepresentedinasetofdesignstepsthatconstituteamethodologyforthedesignoftheconceptualpartoftheoverallETLprocess.Theconstructionofthemodelisrealizedinacustomizableandex-tensiblemanner,sothatthedesignercanenrichitwiththedesigner’sownreoccur-ringpatternsforETLtransformations.Furthermore,itisenrichedwitha“palette”offrequentlyusedETLtransformations,liketheassignmentofsurrogatekeys,thecheckfornullvalues,andsoon.Additionally,ArktosIIpresentsaformallogicalmodelfortheETLenvironmentthat concentrates on the flow of data from the sources towards the data warehouse throughthecompositionofactivitiesanddatastores(Vassiliadisetal.,2002).Theflow of data from producers towards their consumers is achieved through the usage ofproviderrelationshipsthatmaptheattributesoftheformertotherespectiveat-tributesofthelatter.AserializablecombinationofETLactivities,providerrelation-

Page 154: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment �2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ships, and data stores constitutes an ETL workflow. Also, a reusability framework thatcomplementsthegenericityandcustomizationofthemetamodelisprovided.Finally, Arktos II introduces techniques for the measurement of ETL workflows. Furthermore,Arktos II proposes a semiautomatic transition from conceptual tologicalmodelforETLprocesses(Simitsis,2005).Theconstituentsoftheconcep-tualmodelaremappedtotheirrespectiveconstituentsofthelogicalmodel.Also,itpresentsamethodforthedeterminationofacorrectexecutionorderoftheactivi-tiesinthelogicalmodel,whereverfeasible,bygroupingthetransformationsoftheconceptualdesignintostages.Moreover, Arktos II delves into the logical optimization of ETL workflows, having as its uttermost goal the finding of the optimal ETL workflow (Simitsis, Vassiliadis, &Sellis,2005).ThemethodproposedreducestheexecutioncostofanETLwork-flow, by changing either the total number or the execution order of the processes. Theproblemismodeledasastatespacesearchproblem,witheachstaterepresent-ing a particular design of the workflow as a graph. The tuning of an ETL workflow isrealizedthroughseveralalgorithmsfortheoptimizationoftheexecutionorderoftheactivities.Finally,toreplenishtheaforementionedissues,anETLtoolhasprototypicallybeenimplementedwiththegoaloffacilitatingthedesign,the(re)use,andtheoptimiza-tion of ETL workflows. The general architecture of Arktos II comprises a GUI, an ETLlibrary,ametadatarepository,andanoptimizerengine.TheGUIfacilitatesthe design of ETL workflows in both the conceptual and logical level, through a workflow editor and a template palette. The ETL library contains template code of built-in functions and maintains a template code of user-defined functions. After its creation, the ETL workflow is propagated to the optimizer in order to achieve a bet-terversionwithrespecttotheexecutiontime.Alltheaforementionedcomponentsarecommunicatingwitheachotherthroughthemetadatarepository.

Future.Trends

Inouropinion,thereareseveralissuesthataretechnologicallyopenandpresentinteresting topics of research for the future in the field of data integration in data warehouseenvironments.Thisopinionissupportedbytheresultsofarecentwork-shoplocatedinDagstuhl,GermanyintheSummerof2004(DagstuhlPerspectiveWorkshop,2004),whereseveralresearcherstriedtoarticulatethemostpressingissuesforthenextdirectionsofdatawarehousingresearch.Aresearchagendade-scribingopportunitiesandchallengesforpromisingnewareasindatawarehousingresearchwasproposedthatfocusesonarchitecture,processes,modelinganddesign,andnovelapplications.Outofthese,theparticipantsdiscussthefutureroleofETL

Page 155: Data Warehouses and OLAP - Concepts Architectures and Solutions

�28 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

inathreefoldcategorization:traditionalETL,streamETL,andon-demandETL.We adopt this classification, and for each one of these categories, we present a list ofseveralfuturedirections.

• Traditional.ETL: TraditionalETLprocessesareresponsiblefortheextrac-tionofdatafromseveralsources,theircleansing,customization,andinsertionintoadatawarehouse.Thesetasksarerepeatedonaregularbasis,andinmostcases,theyareasynchronous.Asresearchchallengesinthisarea,wementionthefollowingissues: AformaldescriptionofETLprocesseswithparticularemphasisonan

algebra(foroptimizationpurposes)andaformaldeclarativelanguage. The optimization ofETL processes on logical and physical levels.A

challengewillbeeithertheoptimizationofthewholeETLprocessorofanyindividualtransformation.ParallelprocessingofETLprocessesisofparticularimportance.

Thepropagationofchangesbacktothesources.Potentialqualityproblemsobservedattheend-userlevelcanleadtocleandatabeingpropagatedbacktothesources,inordertoavoidtherepetitionofseveraltasksinfutureapplicationoftheETLprocess.Clearly,thisideahasalreadybeenmentioned in the literature as “backflow of cleaned data” (Rahm & Hai Do,2000),buttheproblemisnotsolvedyet.

Theprovisionofstandard-basedmetadataforETLprocesses.TheredoesnotexistcommonmodelforthemetadataofETLprocesses.CWMisnot sufficient for this purpose and it is too complicated for real-world applications.

TheintegrationofETLwithXMLadapters,EAI(EnterpriseApplicationIntegration)tools(e.g.,MQ-Series),anddataqualitytools.

TheextensionoftheETLmechanismsfornontraditionaldata,likeXML/HTML,spatial,andbiomedicaldata.

ThetreatmentofsecurityissuesinETL;sourcedataanddataintransitaresecurityrisks(Friedman,2002a).

• Stream.ETL: Streams are sequences of data, continuously flowing from a data sourcewiththeparticularcharacteristicthat,duetotheirvolume,eachtupleisavailableonlyforalimitedtimewindowforquerying.StreamexampleswouldinvolvestockratesextractedfromtheWeb,packetsgoingthrougharouter,clickstreamsfromaWebsite,andso forth.StreamETLisanETLprocess involving the possible filtering, value conversion, and transforma-tionsofthisincominginformationinarelationalformat.Although,streamscannotbestored,somepatternsorsnapshotaggregatesofthemcanbestored

Page 156: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment �2�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

forsubsequentquerying.Asresearchchallengesinthisarea,wecanmentionthefollowingissues: ThenecessityofmaintainingdataintheDWasmuch“online”aswecan,

butwithoutaddinganextraloadtosourcesorDW. Theprovisionofcorrectnessguarantees. Thenecessityofcostmodelsforthetuningoftheincomingstreamwithin

specified time window. Theauditoftheincomingstreamdataforseveralconstraintsorbusiness

rules,alsowithrespecttostoreddata(e.g.,primarykeyviolations).• On-Demand.ETL:.AnETLprocessof thiskind isexecutedsporadically,

anditismanuallyinitiatedbysomeuserdemand.TheprocessisresponsibleforretrievingexternaldataandloadingthemintheDWaftertheappropriatetransformations.Forinstance,considerthecasethatsomeusersrequestdatatobebroughtinfromtheWeb.Theadministrator/programmerisassignedthetask of constructing an ETL process that extracts the dates from the specified sites,transformsthem,andultimatelystorestheminsome(possiblynovel)partofthewarehouse.Anytimetheuserneedsthisdata,thison-demandETLprocessbringsintherelevantinformation.Asresearchchallengesinthisarea,wementionthefollowingissues: Theneedforappropriateoperators,sincethisprocessismostlyfocused

towardsWebdata. Thecomputationofminimumeffort/time/resourcesfortheconstruction

oftheprocess. Theprovisionofaframeworkeasilyadaptabletothechangesoftheex-

ternaldata. The finding of efficient algorithms, due to the fact that this process is

initiatedbytheuser.

Conclusion

Inthischapter,wehavedelvedintoacrucialpartofthedatawarehousearchitecture:thebackstagearea.WehavepresentedthestateoftheartconcerningtheexistingETLtechnology.Inpractice,adesigner/administratorusesacommercialETLtoolor an in-house developed software artifact to create ad-hoc ETL workflows. We have stressed the fact that there is not a unified approach that concretely deals with the modeling and the optimization of ETL workflows.

Page 157: Data Warehouses and OLAP - Concepts Architectures and Solutions

��0 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Additionally,wehaveindicatedthemainchallengesandproblemsconcerningthemanufacturing of ETL workflows. In all the phases of an ETL process (extraction and transportation, transformation and cleaning, and loading) individual issuesarise,makingdatawarehouserefreshmentaverytroublesometask.Ingeneral,ETLworkflows are characterized as quite complex, costly, critical, and important for the successofadatawarehouseproject.Thekeyfactorsunderlyingthemainproblemsof ETL workflows are vastness of the data volumes, quality problems, performance, evolutionofthesources,andthedatawarehouse.Moreover,wehavepresentedamodelingapproachfor theconstructionofETLworkflows, which is based on the life cycle of the ETL processes. This life cycle consist of fourphases: reverse engineeringand requirements collection, logicaldesign,tuningandphysicaldesign,andsoftwareconstruction.Asaresult,inorderto construct an efficient, robust, and evolvable ETL workflow, we have to deal with allthephasesofthelifecycleofadatawarehouse.Finally,wehavepointedoutalistofopenresearchissuesarrangedinthreebasiccategories:traditionalETL,streamETL,andon-demandETL;andwehavepro-videdseveralfuturedirections.

References

Adzic,J.,&Fiore,V.(2003,September).Datawarehousepopulationplatform.InProceedings of 5th International Workshop on the Design and Management of Data Warehouses (DMDW’03),Berlin,Germany.

Ascential.(2003).Data warehousing technology.RetrievedMay27,2006,fromhttp://www.ascentialsoftware.com/products/datastage.html

Booch,G.,Rumbaugh,J.,&Jacobson,I.(1998).The unified modeling language user guide.Addison-Wesley.

Borkar,V.,Deshmuk,K.,&Sarawagi,S.(2000).Automaticallyextractingstruc-turefromfreetextaddresses.Bulletin of the Technical Committee on Data Engineering, 23(4).

Bouzeghoub,M.,Fabret,F.,&Matulovic,M.(1999).Modelingdatawarehousere-freshment process as a workflow application. In Proceedings of 1st International Workshop on the Design and Management of Data Warehouses (DMDW’99),Heidelberg,Germany.

Calì,A.,Calvanese,D.,DeGiacomo,G.,Lenzerini,M.,Naggar,P.,&Vernacoto-la,F.(2003).IBIS:Semanticdataintegrationatwork.InProceedings of the 15th International Conference on Advanced Information Systems Engineering (CAiSE 2003),Klangefurt,Austria(pp.79-94).

Page 158: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Cohen,W.(1999).SomepracticalobservationsonintegrationofWebinformation.InProceedings of SIGMOD Workshop on the Web and Databases (WebDB’99),Philadelphia,Pennsylvania.

Dagstuhl Perspective Workshop. (2004). Data warehousing at the crossroads.Dagstuhl,Germany.

Demarest,M.(1999).The politics of data warehousing.RetrievedMay27,2006,fromhttp://www.hevanet.com/demarest/marc/dwpol.html

Eder, J., & Gruber, W. (2002). A meta model for structured workflows supporting workflow transformations. In Proceedings of the 6th East European Conference on Advances in Databases and Information Systems (ADBIS’02),Bratislava,Slovakia(pp.326-339).

Friedman,T.(2002).Reducing the cost of ETL for the data warehouse (Tech.Rep.No.COM-16-8237).GartnerGroup.

Friedman,T.(2002a).Security issues in ETL for the data warehouse(Tech.Rep.No.COM-17-8459).GartnerGroup.

Galhardas,H.,Florescu,D.,Shasha,D.,&Simon,E.(1999).An extensible frame-work for data cleaning(Tech.Rep.No.INRIARR-3742).

Galhardas,H.,Florescu,D.,Shasha,D.,&Simon,E.(2000).Ajax:Anextensibledatacleaningtool.InProceedings of ACM International Conference on the Management of Data (SIGMOD’00),Dallas,Texas(p.590).

Gartner.(2003).ETL Magic Quadrant update: Market pressure increases(Gartner’sStrategicDataManagementResearchNoteM-19-1108).Author.

Giga.(2002).Market overview update: ETL (Tech.Rep.No.RPA-032002-00021).Author.

IBM.(2003).IBM Data Warehouse Manager.RetrievedMay27,2006,fromhttp://www-3.ibm.com/software/data/db2/datawarehouse

Informatica.(2003).PowerCenter.RetrievedMay27,2006,fromhttp://www.in-formatica.com/products/data+integration/powercenter/default.htm

Jarke,M.,Lenzerini,M.,Vassiliou,Y.,&Vassiliadis,P.(Eds.).(2003).Fundamen-tals of data warehouses(2nded.).Germany:Springer-Verlag.

Jarke,M.,List,T.,&Koller,J.(2000).Thechallengeofprocesswarehousing.InProceedings of the 26th International Conference on Very Large Databases (VLDB’00),Cairo,Egypt.

Jarke,M.,Quix,C.,Blees,G.,Lehmann,D.,Michalk,G.,&Stierl,S.(1999).Im-provingOLTPdataqualityusingdatawarehousemechanisms.InProceedings of ACM International Conference on Management of Data (SIGMOD’99),Philadelphia(pp.537-538).

Page 159: Data Warehouses and OLAP - Concepts Architectures and Solutions

��2 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Labio, W., & Garcia-Molina, H. (1996). Efficient snapshot differential algorithms fordatawarehousing.InProceedings of the 22nd International Conference on Very Large Data Bases (VLDB’96),Bombay,India(pp.63-74).

Kiepuszewski,B.,TerHofstede,A.H.M.,&Bussler,C. (2000).Onstructuredworkflow modeling. In Proceedings of the 12th International Conference on Advanced Information Systems Engineering (CAiSE’00),Stockholm,Sweden(pp.431-445).

Lenzerini.(2002).Dataintegration:Atheoreticalperspective.InProceedings of the 21st Symposium on Principles of Database Systems (PODS’02),Wiscon-sin(pp.233-246).

Microsoft.(2003).Data transformation services.RetrievedMay27,2006,fromhttp://www.microsoft.com

Monge,A.(2000).Matchingalgorithmswithinaduplicatedetectionsystem.Bul-letin of the Technical Committee on Data Engineering, 23(4).

Oracle.(2001).Oracle9i™WarehouseBuilderuser’sguide(Release9.0.2).RetrievedMay27,2006,fromhttp://otn.oracle.com/products/warehouse/content.html

Oracle.(2002).Oracle9i™ SQL reference(Release9.2,pp.17.77-17.80).Author.Rahm,E.,&HaiDo,H.(2000).Datacleaning:Problemsandcurrentapproaches.

Bulletin of the Technical Committee on Data Engineering, 23(4).Raman,V.,&Hellerstein,J.(2001).Potter’sWheel:Aninteractivedatacleaning

system.InProceedings of 27th International Conference on Very Large Data Bases (VLDB’01),Roma,Italy(pp.381-390).

Rundensteiner,E.(Ed.).(1999).Specialissueondatatransformations.Bulletin of the Technical Committee on Data Engineering, 22(1).

Sadiq,W.,&Orlowska,M.E.(2000).Onbusinessprocessmodeltransformations.InProceedings of the 19th International Conference on Conceptual Modeling (ER’00)(pp.267-280),SaltLakeCity,Utah.

Sarawagi, S. (2000,December). Special issue on data cleaning. Bulletin of the Technical Committee on Data Engineering, 23(4).

Scalzo,B.(2003).Oracle DBA guide to data warehousing and star schemas.Pren-ticeHall.

Schafer,E.,Becker,J.-D.,&Jarke,M.(2000).DB-Prism:Integrateddatawarehousesandknowledgenetworksforbankcontrolling.InProceedings of the 26th In-ternational Conference on Very Large Databases(VLDB’00), Cairo,Egypt.

Shilakes,C.,&Tylman,J.(1998).Enterpriseinformationportals.RetrievedMay27,2006,fromhttp://www.sagemaker.com/company/downloads/eip/indepth.pdf

Simitsis,A.(2004).Modeling and optimization of extraction-transformation-load-ing (ETL) processes in data warehouse environments.DoctoralThesis,NTUAthens,Greece.

Page 160: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Simitsis,A.(2005).MappingconceptualtologicalmodelsforETLprocesses.InProceedings of the 8th ACM International Workshop on Data Warehousing and OLAP (DOLAP ’05),Bremen,Germany.

Simitsis,A.,Vassiliadis,P.,&Sellis,T.(2005).OptimizingETLprocessesindatawarehouseenvironments.InProceedings of the 21st IEEE International Con-ference on Data Engineering (ICDE ’05),Tokyo,Japan.

Simitsis,A.,Vassiliadis,P.,&Sellis,T.(2005a).State-spaceoptimizationofETLworkflows. IEEE Transactions on Knowledge and Data Engineering, 17(10),1404-1419.

Strange,K.(2002).ETL was the key to this data warehouse’s success(Tech.Rep.No.CS-15-3143).GartnerGroup.

Strange,K.(2002a).Data warehouse TCO: Don’t underestimate the cost of ETL(Tech.Rep.No.DF-15-2007).GartnerGroup.

Theodoratos,D.,Ligoudistianos,S.,&Sellis,T. (2001).Viewselection forde-signingtheglobaldatawarehouse.Data & Knowledge Engineering, 39(3),219-240.

Trujillo,J.,&Luján-Mora,S.(2003).AUMLbasedapproachformodelingETLprocessesindatawarehouses.InProceedings of 22nd International Conference on Conceptual Modeling (ER 2003),Chicago(pp.307-320).LNCS,2813.

VanderAalst,W.M.P.,terHofstede,A.H.M.,Kiepuszewski,B.,&Barros,A.P.(2000).Workflow patterns(BETAWorkingPaperSeriesWP47).EindhovenUniversityofTechnology,Eindhoven.

Vassiliadis,P.(2000).Gulliverinthelandofdatawarehousing:Practicalexperi-encesandobservationsofaresearcher.InProceedings of 2nd International Workshop on Design and Management of Data Warehouses (DMDW’00),Stockholm,Sweden.

Vassiliadis,P.,Quix,C.,Vassiliou,Y.,&Jarke,M.(2001).Datawarehouseprocessmanagement.Information Systems, 26(3),205-236.

Vassiliadis,P.,Simitsis,A.,Georgantas,P.,Terrovitis,M.,&Skiadopoulos,S.(2005).AgenericandcustomizableframeworkforthedesignofETLscenarios.In-formation Systems, 30(7),492-525.

Vassiliadis,P.,Simitsis,A.,&Skiadopoulos,S.(2002).ConceptualmodelingforETLprocesses.InProceedings of the 5th ACM International Workshop on Data Warehousing and OLAP(DOLAP ’02),McLean,Virginia.

Vassiliadis,P.,Simitsis,A.,&Skiadopoulos,S.(2002a).ModelingETLactivitiesasgraphs.InProceedings of the 4th International Workshop on the Design and Management of Data Warehouses (DMDW ’02),Toronto,Canada(pp.52-61).

Page 161: Data Warehouses and OLAP - Concepts Architectures and Solutions

��4 Simitsis, Vassiliadis, Skiadopoulos, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Workflow Management Coalition. (1998). Interface 1: Process definition interchange process model(Doc.No.WfMCTC-1016-P).

Page 162: Data Warehouses and OLAP - Concepts Architectures and Solutions

Data Warehouse Refreshment ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Section III

Efficiency of AnalyticalProcessing

Page 163: Data Warehouses and OLAP - Concepts Architectures and Solutions

��6 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.VI

Advanced.Ad.Hoc.Star.Query.Processing

Nikos KarayannidisNational Technical University of Athens, Greece

Aris TsoisNational Technical University of Athens, Greece

Timos SellisNational Technical University of Athens, Greece

Abstract

Star queries are the most prevalent kind of queries in data warehousing, online analytical processing (OLAP), and business intelligence applications. Thus, there is an imperative need for efficiently processing star queries. To this end, a new class of fact table organizations has emerged that exploits path-based surrogate keys in order to hierarchically cluster the fact table data of a star schema. In the context of these new organizations, star query processing changes radically. In this chap-ter, we present a complete abstract processing plan that captures all the necessary steps in evaluating such queries over hierarchically clustered fact tables. Further-more, we realize the abstract operations in terms of physical operations over the CUBE File data structure. Finally we discuss star query optimization issues over the presented abstract plan.

Page 164: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction.

Starqueriesare themostprevalentkindofqueries indatawarehousing,onlineanalyticalprocessing(OLAP),andbusinessintelligenceapplications.Starqueriesimpose restrictions on the dimension tables that are used for selecting specific factsfromthefacttable;thesefactsarefurthergroupedandaggregatedaccord-ingtotheuserdemands.Furthermore,advanceddecisionsupportcallsforad hoc analysis, in contrast to using predefined reports that are constructed periodically, orhavealreadybeenprecomputed.Thefoundationforthiskindofanalysisisthesupportofad hoc star queries, which comprise the real essence of OLAP. Efficient processing of ad hoc star queries is a very difficult task considering, on one hand, thenativecomplexityoftypicalOLAPqueries,whichpotentiallycombinehugeamountsofdata,andontheother,thefactthatnoaprioriknowledgeforthequeryexists and thus no precomputation of results or other query-specific tuning can be exploited.Theonlywaytoevaluatethesequeriesistoaccessdirectlythebasedatain an efficient way. Traditionally,themajorbottleneckinevaluatingstarquerieshasbeenthejoinofthecentral(andusuallyverylarge)facttablewiththesurroundingdimensiontables(alsoknownasastar join).Tocopewiththisproblemvariousindexingschemeshavebeendeveloped(Chan&Ioannidis,1998;O’Neil&Grafe,1995;O’Neil&Quass,1997;Sarawagi,1997;Wu&Buchmann,1998).Alsoprecomputationofaggregationresultshasbeenstudiedextensively—mainlyasaviewmaintenanceproblem—andisusedasameansofacceleratingqueryperformanceindataware-houses(Roussopoulos,1998;Srivastava,Dar,Jagadish&Levy,1996).However,foradhocstarqueriestheusageofprecomputedaggregationresultsisextremelylimitedorevenimpossibleinsomecases.Evenwhenelaborateindexesareused,duetothearbitraryorderingofthefacttabletuples,theremightbeasmanydiskpageaccessesasarethetuplesresultingfromthefacttable.Theonlyalternativeonecanhaveforsuchqueriesisagoodphysicalclusteringofthedata,anditisexactlyforthisreasonthatanewclassofprimaryorganizationsforthefacttablehasemerged(Karayannidis,Sellis,&Kouvaras,2004;Markl,Ramsak,&Bayern,1999).Theseorganizationsexploitaspecialkindofkeythatisbasedonthehierarchypathsofthedimensions,inordertoachievehierarchicalclusteringofthefacts.ThisphysicalclusteringresultsinareducedI/Ocostforthemajorityofstarqueries,whicharebasedonthedimensionhierarchies.Moreover,inadimen-sionaldatawarehouseitisnaturaltoexploitamultidimensionalindexforstoringthetuples.Atypicalstar joinis transformedthenintoamultidimensionalrangequery, which is very efficiently computed using the underlying multidimensional datastructures.Thecombinationofthetwo:hierarchicalclusteringofdataandamultidimensionalstructureforaccessingthefacttabletuplesresultsinaveryef-ficient method for ad hoc star query processing.

Page 165: Data Warehouses and OLAP - Concepts Architectures and Solutions

��8 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Inthischapter,wediscusstheprocessingofadhocstarqueriesoverhierarchicallyclusteredfacttables.Inparticular,wepresentacompleteabstractprocessingplanthatcoversallthenecessarystepsforansweringsuchqueries.Thisplandirectlyexploits the benefits of hierarchically clustered fact tables and opens the road for newoptimizationchallenges.Thenweproceedinrealizingthisabstractplanforthecaseofamultidimensionalstoragestructurethatachieveshierarchicalclustering,namelytheCUBE File.Wecontinuewithadiscussiononstarqueryoptimizationforthepresentedabstractplanandpresentthehierarchical pregrouping transfor-mation.This is averyelegant transformation that exploitsdimensionhierarchysemantics to speed up query processing significantly. Finally, we conclude with a discussiononmainconclusionsofthepresentedmethods,andfuturetrendsinstarqueryprocessing.

Background.

Preliminary.Concepts..

InarelationalOLAP(ROLAP)implementation,adimensionisstoredintooneormoredimension tables, eachhavingasetofattributes.Dimensionattributesusuallyform one or more classification hierarchies. For example, the h1 attribute is classified bytheh2 attribute, which is further classified by the h3attribute,andsoforth.Wecalltheattributesh1,h2,h3,…hierarchical attributesbecausetheyparticipateinthedefinition of the hierarchy. For example, day,month,andyearcanbeahierarchicalclassification in the DATEdimension.Forthepurposesofthischapterwewillas-sumeasinglehierarchyforeachdimension.1Adimensiontablemayalsocontainoneormorefeature attributes f. Featureattributescontainadditionalinformationaboutanumberofhierarchicalattributesandarealwaysfunctionallydependentonone(ormore)hierarchicalattribute.Forexample,populationcouldbeafeatureat-tributedependentontheregionattributeofdimensionLOCATION.Measures(orfacts)arestoredinfact tables.Afacttablemaycontainoneormoremeasureattributesandisalwayslinked(byforeignkeyattributes)tosomedimen-siontables.Thislogicalorganizationconsistingofacentraltable(thefacttable)andsurroundingtables(thedimensiontables)thatlinktoitthrough1:Nrelationshipsisknownasthestar schema(Chaudhuri&Dayal,1997).Inatypicalscenario,thehierarchicalattributerepresentingthemostdetailedlevelwillbetheprimarykeyoftherespectivedimension.Eachsuchattributewillhaveacorrespondingforeignkeyinthefacttable.In Figure 1(a) we depict an example schema of a simplified data warehouse. The datawarehousestoressales transactionsrecordedper item,store,customer,and

Page 166: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

date.ItcontainsonefacttableSALES_FACT, which is defined over the dimensions: PRODUCT,CUSTOMER,DATE,andLOCATIONwiththeobviousmeanings.ThesinglemeasureofSALES_FACTissalesrepresentingthesalesvalueforanitembought by a customer at a store on a specific day. The dimension hierarchies are depictedinFigure1(b).ThedimensionDATEisorganizedinthreelevels:Day-Month-Year.Hence,ithasthreehierarchicalattributes(Day, Month, Year).ThePRODUCTdimensionisor-ganizedintothreelevels(Item-Class-Category)withthreehierarchicalattributesandonefeatureattribute(Brand).ThedimensionCUSTOMERisorganizedinonlytwolevels(Customer-Profession)withtwohierarchicalattributesandtwofeatureattributes(Name, Address).TheLOCATIONdimensionisorganizedintothreelev-els:store-area-region,meaningthatstoresaregroupedintogeographicalareasandtheareasaregroupedintoregions.Foreacharea,thepopulationisstoredasfeatureattribute.Therefore,thedimensionhasthreehierarchicalattributes(Store_id, Area, Region)andonefeatureattribute(Population)thatisassignedtotheArealevel.Note that the key attributes of the dimension tables are Customer_id, Item_id,Store_id,andDayandthecorrespondingforeignkeys(Customer_id, Product_id, Store_id, Day) define the fact table’s primary key.Inordertocreateafacttablethatisclusteredaccordingtothedimensionhierar-chies we first need to apply a hierarchical encoding(HE)oneachdimensiontable.Toachievethisweusethehierarchical surrogate key(orh-surrogate)attribute,aspecial attribute which is defined for each dimension table. The value of this attri-buteiscomputedbasedonthevalueofthehierarchicalattributesofthedimension.Theh-surrogateencodesnotonlythevaluesofthehierarchicalattributesbutalsothe hierarchical relationships defined among the levels of the dimension. Although there are several equivalent ways to define such an encoding, it is sufficient to pres-entonlyonesuchtechniqueforthereadertounderstandhowh-surrogatesareused.Allthequeryprocessingandoptimizationtechniquespresentedinthischapterworkregardlessoftheparticularencodingtechniqueused.

Customer_�d (FK)Product_�d (FK)Store_id (FK)Day (FK)______________sales

SALES_FACTCustomer_�dProfessionNameAddress

CUSTOMER

DayMonthyear

DATE

Item_�dClassCategoryBrand

PRODUCT

Store_idAreaRegionPopulat�on

LOCATION

(a) (b)

Year

Month

Day

DATE

Profession

Customer

CUSTOMER

Region

Area

Store

LOCATION

Category

Class

Product

PRODUCT

Figure 1. (a) The schema of the data warehouse; (b) the dimension hierarchies of the example

Page 167: Data Warehouses and OLAP - Concepts Architectures and Solutions

�40 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Definition 1 (Hierarchical Surrogate Key).AssumeadimensiontableDcontainingthehierarchicalattributeshm,hm-1,…,h1(hmthemostaggregatedlevelandh1themostdetailedone).EachtupletofDassignsthevaluest.vm,t.vm-1,…,t.v1tothecorrespondinghierarchicalattributes.Let{oci}beasetofmbijectivefunctionssothatoci: Vi {0,…,|Vi|-1},where1 ≤ i ≤ mandViisthesetofvaluesofthehierarchicalattributehiand|Vi|isthetotalnumberofvaluesinthisset.Thehierarchical surrogate key(orh-surrogate)ofDisacomputedattributeofDsothatforeachtupletofDthevalueoftheh-surrogateishsk=ocm(t.vm). ocm-1(t.vm-1). …. oc1(t. v1).

Thevalueassignedbyaocifunctiontoahierarchicalattributevalueiscalledanorder-codeandsincethesefunctionsare1-1theorder-codesuniquelyidentifyahierarchicalattributevalue.InFigure2(b)wedepictthehierarchy-treeformedfromthevaluesofthehierarchyattributes(equivalentlylevels)ofdimensionLOCATION.Below each value appears in parentheses its assigned order-code. In the same figure wedepicttheh-surrogatevaluefortheleaf-value“storeC.”Notethatanh-surro-gate conveys all the hierarchical semantics (i.e., the genealogy) of a specific value. Moreoveritisindeedanalternatekey,sinceitdeterminesallhierarchicalattributes,whichinturnfunctionallydetermineallfeatureattributes.Notealsothatleaf-valuesunder the same parent have a common h-surrogate prefix. For example the prefix “0.1” in Figure 2(b) is the same for the two stores in “AreaB” and the prefix “0.” is commontoallstoresin“RegionA.”Weusethenotationhsk:L to refer to the prefix oftheh-surrogatethatcorrespondstothelevelLofthehierarchy.

Figure 2. (a) The schema of the data warehouse enhanced with h-surrogates; (b) each value of a hierarchical attribute is assigned an order-code, which preserves hierarchical proximity.

Note: An h-surrogate is essentially a path of order-codes in the hierarchy tree.

Customer_�d (FK)Product_�d (FK)Store_id (FK)Day (FK)______________Cust_hsk (FK)Prod_hsk (FK)Loc_hsk (FK)Date_hsk (FK)______________sales

SALES_FACTCustomer_�dProfessionNameAddress______________Cust_hsk

CUSTOMER

DayMonthYear______________Date_hsk

DATE

Item_�dClassCategoryBrand______________Prod_hsk

PRODUCT

Store_idAreaRegionPopulat�on______________Loc_hsk

LOCATION

(a) (b)

RegionA(0)

AreaA(0)

AreaB(�)

storeA(0)

storeB(�)

storeC(�)

storeD(�)

hsk(storeC)= 0.�.2

Page 168: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing �4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Eachh-surrogatecan trigger thecreationofaforeignkey in thefact table.Theconcatenationofalltheseforeignkeysproducesthefacttable’sprimarykey.ThisisdepictedinFigure2(a).Notethatforthefacttablewehavetwoalternativecom-positekeys:(a)(Customer_id, Product_id, Store_id, Day)thatlinkstothecorre-spondinglowesthierarchicalattributeofeachdimensionand(b)(Cust_hsk, Prod_ hsk, Loc_hsk , Date_ hsk)thatlinkstothecorrespondingh-surrogateattribute.Notethattheformerisnotnecessarytoachievehierarchicalclusteringofthedata,andthuscouldbeomitted,inordertoreducestorageoverhead.The h-surrogates play a central role in processing ad hoc star queries, first because theyenabletheclusteringofthefacttableaccordingtothedimensionhierarchies,andsecondbecausetheycanbeexploitedtooptimizethequeryevaluationplans.ExperimentsinKarayannidisetal.(2002)haveshownspeed-upsuptoafactorof20,overthestateoftheartbitmap-basedstarjoinprocessing(seesectiononothermethodsforstarqueryprocessing).Evenmoreinterestingly,thisfactordoubledwhenqueryoptimizationtechniquesthatarediscussedlaterinthischapterwereexploited.Theh-surrogatesshouldbesystemassignedandmaintainedattributes,andtypicallytheyshouldbemadetransparenttotheuser.Theactualimplementationoftheh-sur-rogatesdependsheavilyontheunderlyingphysicalorganizationofthefacttable.Proposalsforphysicalorganizations(Karayannidisetal.,2004;Markletal.,1999)exploitsuchpath-basedsurrogatekeys,inordertoachievehierarchicalclusteringofthefacttabledata.Inthischapter,weadoptadenormalizedapproachforthedesignofadimension;thatis,werepresenteachdimensionwithonlyonetable.Thehierarchicalattributes(h1,h2,…,hm),thefeatureattributes(f1,f2,…,fk),aswellasthehierarchicalsur-rogatekeyhskofthedimensionarestoredinauniquedimensiontable.However,thepresentedmethodsarefullyapplicabletonormalizedschemata(i.e.,snowflaked schemata)aswell,withtheonlydifferencethatextrajoinsbetweentheseveraldi-mensiontables(correspondingtoseparatehierarchylevels)mustbeincludedintheplan.Inaddition,weassumeaspecialphysicalorganizationforthefacttable.ThefacttableisstoredhierarchicallyclusteredinamultidimensionaldatastructuresuchastheCUBEFile(Karayannidisetal.,2004)ortheUB-tree(Markletal.,1999).Theindexattributesofthesestructuresaretheh-surrogates.

Star.Queries

OLAPqueriestypicallyincluderestrictionsonmultipledimensiontablesthattrig-gerrestrictions(viatheforeignkeyrelationships)onthe(usuallyverylarge)facttable.Thisisknownasastar join (O’Neil&Grafe,1995).Weusethetermstar query to refer to flat SQL queries, defined over a single star schema, that include a starjoin.StarqueriesrepresentthemajorityofOLAPqueries.Inparticular,weare

Page 169: Data Warehouses and OLAP - Concepts Architectures and Solutions

�42 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

interestedinad hoc OLAPstarqueries.Withtheterm“adhoc”werefertoqueriesthatarenotknowninadvanceandthereforetheadministratorcannotoptimizetheDBMS specifically for these.InFigure3wedepicttheSQLquerytemplatefortheadhocstarqueriesconsidered.The template defines the most complex query structure supported and uses abstract termsthatactasplaceholders.NotethatqueriesconformingtothistemplatehaveastructurethatisasubsetofthetemplateinFigure3andinstantiateallabstractterms.ThetermsD1,D2,…,DkarethedimensiontablesofthestarjoinandLP1,LP2,..,LPkarethecorrespondinglocal predicates.Thus,thetermLPiisalocal predicateonthedimensiontableDi.Thecharacterization“local”isbecausethispredicateincludesrestrictionsonlyonDiandnotonotherdimensiontablesorthefacttable.Thispredicate isvery important for theh-surrogateprocessingphaseexplainedlater,andisusedtoproducethenecessaryh-surrogate specificationaccessingthefacttablediscussedlater.ThevastmajorityofOLAPqueriescontainsanequalityrestrictiononanumberofhierarchicalattributesandmorecommonlyonhierarchicalattributesthatformacompletepathinthehierarchy(i.e.,startingfromthemostaggregatedleveltosomelowerlevelwithout“gaps”inbetween).Forexample,thequery“showmesalesforareaAinregionBforeachmonthof1999”containstwowhole-pathrestrictions,oneforadimensionLOCATIONandoneforaDATE:(a)LOCATION.Region = ‘A’ ANDLOCATION.Area = ‘B’ and (b) DATE.Year=1999.Thisisreasonablesincethecoreofanalysisisconductedalongthehierarchies.Wecallthiskindofrestric-tionhierarchical prefix path(HPP)restrictions.Notealsothatevenifweimposearestrictionsolelyonanintermediatelevelhierarchicalattribute,wecanstillhaveanHPPrestriction,aslongashierarchicalattributesfunctionallydeterminehigherlevelones.Forexample,therestrictionMonth = ‘AUG-99’impliesalsothatYear = 1999.Let us now define an example query on the schema of Figure 1: We want to see the sumofsalesbyareaandmonthforareaswithpopulationmorethan1million,for

SELECT <grouping attributes and/or aggregation functions>FROM <fact table>, D�, D�, …, DkWHERE <star join conditions: equalities on key-f.key> AND LP� AND LP� AND … AND LPk AND <restrictions on attributes of the fact table>GROUP BY <grouping attributes>HAVING <group selection predicate>ORDER BY <sorting attributes>

Figure 3. The ad hoc star query template

Page 170: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing �4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

themonthsoftheyear1999andforproductsthatbelongtothecategory“aircon-dition.”Figure4showsthecorrespondingSQLexpressionofthisquery.OnecaneasilyseethatthequeryisaninstanceofthequerytemplateofFigure3.

Star.Query.Processing.

Methods.of.Ad-Hoc.Star.Query.Processing.

Themostwellknowntechniqueforstar-queryprocessingisbasedonastar-joinviabitmapindexintersections.Starjoinprocessinghasbeenstudiedextensivelyand specific solutions have been implemented in commercial products. See also ChaudhuriandDayal(1997)foranoverview.Thestandardqueryprocessingalgorithmforastarjoinovern dimensions first evalu-ates the predicates on the dimension tables, either on a normalized (snowflake) or adenormalized(star)schema,resultinginasetRiofnituplesofdimensionDi (1 ≤ i ≤ n).ItthenbuildsaCartesian productofthedimensionresulttuples(R1×R2×…×Rn).ThecardinalityoftheCartesianproductisn1 · n2 ·…· nnforthenrestricteddimensions.WiththeseCartesianproducttuples,weperformadirectindexaccessonthecompositeindexbuiltonthefacttable.Fornonsparsefacttablesandque-riesthatrestrictmostdimensionsofthecompositeindexintheorderoftheindexattributes,theaccesstothefacttuplesisquitefast.However,forlargesparsefacttables and high dimensionality, such a query processing plan does not work effi-cientlyenough.ThecardinalityoftheCartesianproductresultingfromthedimen-sionpredicatesgrowsveryfast,whereasthenumberofaffectedtuplesinthefacttablemayberelativelysmall.Thisisthepointwhereacallismadeforspecializedindexingorclusteringmethods.Bitmappedjoinindices(O’Neil&Graefe,1995;O’Neil&Quass,1997)areoftenusedtospeeduptheaccesstothefacttable.Thistypeofstar-joinevaluationhasalsobeenincorporatedintoapopularcommercialsystem(Oracle,2005).Theso-

SELECT L.area, D.month, SUM(F.sales)FROM SALES_FACT F, LOCATION L, DATE D, PRODUCT PWHERE F.day = D.day AND F.store_id = L.store_id AND F.product_id = P.item_id AND D.year = ���� AND L.population>�000000 AND P.category = “air condition”GROUP BY L.area, D.month

Figure 4. Example query

Page 171: Data Warehouses and OLAP - Concepts Architectures and Solutions

�44 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

calledstar transformation rewritesastar-joinsoasthedimensionrestrictionsareexpressedasdirectrestrictionsonthefacttablecolumn.Forexample,followingquerycontainingastar-join:

SELECT dim2.dim2_attr, dim�.dim�_attr, dim�.dim�_attr, fact.fact�FROM fact, dim2, dim�, dim�WHERE fact.dim2_key = dim2.dim2_key /* joins */AND fact.dim�_key = dim�.dim�_keyAND fact.dim�_key = dim�.dim�_keyAND dim2.dim2_attr IN (’c’,’d’) /* dimension restrictions */AND dim�.dim�_attr IN (’e’,’f’)AND dim�.dim�_attr IN (’l’,’m’)is rewritten in the following form:SELECT … FROM factWHERE fact.dim2_key IN (SELECT dim2.dim2_key FROM dim2 WHERE dim2.dim2_attr IN (‘c’,’d’))AND fact.dim�_key IN (SELECT dim�.dim�_key FROM dim� WHERE dim�.dim�_attr IN (‘e’,’f’))AND fact.dim�_key IN (SELECT dim�.dim�_key FROM dim� WHERE AND dim�.dim�_attr (‘l’,’m’))

Inthisway,theevaluationoftheindividualdimensionrestrictionstakesplaceinthebeginning,asifthesewereseparatequeries.Fromthisevaluationonly the dimension keysofthequalifyingtuplesareextracted;andforlargedimensions,theresultsaresavedintotemporarytables.Inthemeantime,aseparatebitmapindexhasbeencreatedoneachfacttableattributethatisaforeignkeyreferencingadimensiontablekey.Then,theextractedlistofqualifyingdimensionkeys,foreachdimension,isusedtoaccessthebitmapindexonthecorrespondingfacttablecolumn.Thecre-ated bitmaps are merged (i.e., ANDed) and a final bitmap, indicating the qualifying fact table tuples, is produced. Next, bits set on the final bitmap are converted to the correspondingrowidsandthefacttabletuplesareretrieved.Finally,thesetupleshavetobejoinedtothedimensiontablesinordertoretrievethedimensionattributevalues required in the final result.Themainadvantageofthismethodisthatthebitmapoperationscanbeexecutedvery efficiently. However, the lack of appropriate data clustering might lead to a significant number of I/Os. When the query selectivity is high (small output), then only a few bits in the final bitmap are set. If there is no particular order among thefacttabletuples,wecanexpecteachbittocorrespondtoatupleonadiffer-entpage.Thus,therewillbeasmanyI/Osastherearebitsset.Moreover,bitmapindexes become inefficient if the number of distinct values for a column is large (O’Neil&Quass,1997).Inthiscasethe“bitmapdensity”(i.e.,thenumberofbits

Page 172: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing �4�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

set per bitmap) becomes low and the storage overhead is significantly increased. Therefore, compression techniques have to be used that will reduce the efficiency ofthebitmapoperations.

An Abstract Plan for Star Query Processing

Inthissection,wewilldescribethemajorprocessingstepsentailedwhenwewanttoanswerstarqueriesoverahierarchicallyclusteredfacttable.

• Step 1. Identifying relevant fact table data: Theprocessingbeginswiththeevaluationoftherestrictionsontheindividualdimensiontables,thatis,theevaluationofthelocalpredicates(operationsCreate_RangeinFigure5(a)).Thisstepperformedonahierarchicallyencodeddimensiontablewillresultinasetofh-surrogatevaluesthatwillbeusedinordertoaccessthecorrespond-ingfacttabledata.Duetothehierarchicalnatureoftheh-surrogate,thissetcanberepresentedbyanumberofh-surrogateintervalscalledtheh-surrogate specification.Using thenotationofKarayannidisetal. (2004),an intervalwillhavetheform1999.*.*fortherestrictionontheDATEdimensioninourrunningexample.Thisdenotesthatweneedtoaccessallvaluesunder1999attheMonthlevelandallvaluesofeachsuchmonthattheDaylevel.

Once the h-surrogate specifications are determined for alldimensions, theevaluationofthestarjoinfollows.Inhierarchicallyclusteredfacttables,thistranslatestooneormoresimplemultidimensionalrangequeriesontheunderly-ingmultidimensionalstructurethatisusedtostorethefacttabledata(operatorMD_Range_AccessinFigure5(a)).Moreover,sincedataarephysicallyclus-teredaccordingtothehierarchiesandtherangesoriginatefromhierarchicalrestrictions,thiswillresultinalow-I/Oevaluationoftherangeselection.

• Step 2. Computing necessary joins: Thetuplesresultingfromthefacttablecontain theh-surrogatevaluesandthemeasurevalues.At thisstage, theremightbeaneedforjoiningthesetupleswithanumberofdimensiontablesinordertoretrievecertainhierarchicalorfeatureattributesthattheuserwantstohave in the final result and might also be needed for the grouping operation. Wecallthesejoinsresidual joins.Notethatallthesejoinoperations(theRe-sidual_JoinnodesinFigure5(a))areequi-joinsonkey-foreignkeyattributesandthereforeeachfacttabletupleisjoinedwithexactly onedimensiontabletuple.

• Step 3. Performing grouping, filtering, and ordering: Finally,theresult-ing tuples may be grouped and aggregated and the groups further filtered and orderedfordelivering the result to theuser.TheGroup_Selectoperator inFigure5(a)performstheseactions.

Page 173: Data Warehouses and OLAP - Concepts Architectures and Solutions

�46 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

TheabstractprocessingplancomprisingofthephasesisillustratedinFigure5(a)andcanbeusedtoanswerthestarqueriesthatbelongtothequerytemplateofFigure3. This plan is abstract in the sense that it does not determine specific algorithms for each processing step; it just defines the processing that needs to be done. That is whyitisexpressedintermsofabstractoperators(orlogical operators),whichinturncanbemappedtoanumberofalternativephysical operatorsthatcorrespondto specific implementations. AnexampleabstractprocessingplanisshowninFigure5(b)anditcorrespondstothequeryofFigure4.HavingdescribedtheframeworkforqueryprocessingofOLAPqueries,wemovenexttodiscusshowthiscanbematerializedonahierarchicalclustering-preservingdatastructure,namelytheCUBEFile.

Figure 5. (a) The abstract processing plan; (b) the abstract processing plan for the example query

MD_Range_AccessDATE

Residual_Jo�n(Day)

LOCATION

Group_Select(area, month)

Main execution phase

DATE PRODUCT LOCATION

Create_Range(Year=����)

Create_Range(Category=”a�r

cond�t�on”)

Create_Range(Populat�on >

�000000)

SALES_FACT

Residual_Jo�n(Store_id)

h-surrogate processing

MD_Range_Access

Residual_Jo�n

Group_Select

Main execution phase

D� Dj

Create_RangeFT

h-surrogate processing

Create_Range

D�

Dj

Order_By

Residual_Jo�n

...

...

(a)

(b)

Page 174: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing 147

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Processing Star Queries over CUBE File Organized Fact Tables

The CUBE File (Karayannidis et al., 2004) is a multidimensional data structure for storing the most detailed data of a fact table. Thus it could be exploited as an alter-native primary organization to heap files for fact tables. It provides fast indexing on data, when these are accessed via restrictions on the hierarchies. Moreover, it physically clusters data w.r.t. dimension hierarchies (i.e., hierarchical clustering), which reduces significantly the I/O cost for star query evaluation.The CUBE File partitions the multilevel-multidimensional data space of an OLAP cube in disjoint subspaces, called chunks, which are formed by all hierarchy value combinations per hierarchy-level. This process is called hierarchical chunking (Fig-ure 6(a)) and results in a chunk-tree representation of the cube (Figure 6(b)). Note that prior to applying hierarchical chunking all hierarchies have to be normalized to the same length with the insertion of pseudo-levels to the shorter ones. The main advantage of hierarchical chunking is that it results in a structure that is highly adap-tive to the cube’s inherent extreme sparseness. The intuition is that the underlying data clusters are located naturally during the chunking process, exactly because hierarchy value combinations form the dense and sparse data areas. For example, a

Figure 6. (a) A cube hierarchically chunked; (b) the whole subtree up to the data chunks under chunk 0|0 (corresponding to the grayed cells on the left figure)

Page 175: Data Warehouses and OLAP - Concepts Architectures and Solutions

�48 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

sparseareawouldbeformedina3-dimenisonalcube,alongthesubspace(Sept00-Dec00,Books,Italy)ifwedidnotsellanybooksduringSept00-Dec00inItaly.Asubtreeatchunking-depth D correspondstoa“family”(i.e.,asubspace)ofhier-archy-relateddatapoints.Infactthetallerthissubtreeis(i.e.,thesmallerDis),thelargeristhesubspaceofhierarchy-relateddatapointsthatit“covers.”Basedonthisobservation,theCUBEFileconstructionalgorithmtriesto“pack”intobuckets(i.e.,diskpages)wholesubtreesofthesmallerpossibledepth.ThisisthebasicheuristicexploitedbytheCUBEFileforachievinghierarchicalclusteringofthedata.Notethatthepackingofchunksintobuckets,soastopreservehierarchicalclustering,isanNP-Hardproblem(Karayannidis,2003).In Figure 7 we depict such an allocation of chunks into buckets. In this figure we depict an arbitrary chunk-tree, where subtrees appear as triangles and specific nodes (i.e.,chunks)assquares.Thenumberwithinatriangledenotesthesizeofthecor-respondingsubtree.Thenumberwithinasquaredenotesthesizeofallsubtreesunder this node, plus the size of the node itself. In the figure, we have assumed a bucketsizeof30storageunits.ThelowestdepthsubtreethathasbeenstoredinabucketcorrespondstodepthD = 1(seebucketB1).Thisbuckethasthemaximumhierarchical clustering degree among all buckets of the specific chunk-to-bucket allocation.EssentiallythismeansthatHPPqueriesthatneedtoaccessB1willhavereducedI/Ocost,sincethisbuckethasstoredalargersubspace.

Figure 7. The chunk-to-bucket allocation for a chunk-tree where the size of a bucket is SB = 30 units of storage

6�

40 ��

�0

20

� �

D = 0

D MAX = �

D = �

SB = 30

B�

B�

B�

Page 176: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing 149

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Note that the upper nodes (including the root node) that “fail” to be allocated to some bucket comprise the root-directory of the CUBE File. The root-directory is usually cached in main memory or it is further allocated into buckets as if it is a chunk-tree on its own.The CUBE File requires the assignment of h-surrogates to the dimension values. Moreover, for each cell of a chunk, the interleaving of the corresponding h-surro-gates yields a path-based key called the chunk-id, which is a unique identifier of a data point in the multilevel multidimensional data space of a cube. For example, 0|0.0|0 is the chunk-id of the low-left cell of the chunk at depth D = 1 in Figure 6(b) (in the figure, it is depicted as a label on the corresponding chunk). “P” in a chunk-id denotes a pseudo-level.In Figure 8(a), we depict the abstract processing plan of Figure 5(b) as a physical execution plan over a CUBE File organized fact table. We can see the evaluation of the local predicate on the DATE dimension consisting of an HPP restriction solely

Figure 8. (a) The abstract processing plan of our running example expressed as a physical execution plan over a CUBE File organized fact table; (b) the optimized abstract plan

Page 177: Data Warehouses and OLAP - Concepts Architectures and Solutions

��0 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

on the HPP-Index (a B-tree index defined on the hierarchy attributes of a dimen-sion)withouttheneedtoaccessthebasetable(i.e.,theDATE dimensiontable).TherestrictionYear = 1999 has been translated to the h-surrogate specification 0.*.*(assumingthattheorder-codeof1999is0). Note that only the first matching index-tuple(correspondingtotheDay level) suffices for generating the corresponding h-surrogate specification, since all days of 1999 have the same h-surrogate prefix: 0..Thissingleindex-tupleretrievalisanextremelyfastimplementationoftheCre-ate_RangeabstractoperationofFigure5(a).ThesameholdsforthePRODUCT dimensionalso,sinceanotherHPPrestrictionis imposed there. The corresponding h-surrogate specification for the restriction Category = ‘Air Condition’is3.*.* (assuming that the order-code of the ‘Air Con-dition’valueis3).FordimensionLOCATIONthingsareabitdifferentsincewehavetoperformafulltablescandirectlyonthebasetableandthenselectthetuplesthatmatchtherestrictiononthefeatureattributePopulation,whichisfunctionallydependentonthehierarchicalattributeArea.Thecorrespondingh-surrogatespeci-fication is 2.6.*assumingthatonlyonearea(withorder-code6)inasingleregion(withorder-code2) satisfies the restriction on the Populationfeatureattribute.As soon as the h-surrogate specifications are extracted from each dimension, they are combined into a singlechunk expression (CX) that ispassedas input to anMDRangeSelect operator.Achunkexpressionisessentiallyanaccesspatternde-scribingthecellsthatmustbeaccessedineachdepthofthechunk-treeandexploitsthechunk-idnotation.Thechunkexpressioniscreatedfromtheinterleavingoftheh-surrogate specifications. The depicted chunk expression 0|3|2|*.*|*|6|P.*|*|*|*is built from the interleaving of the aforementioned h-surrogate specifications, plus the h-surrogate specification for the CUSTOMERdimension,whichis*.P.*,sincethisdimensionisleftunrestrictedinthequeryofFigure4(“P”denotesapseudo-level).TheinterleavingorderisDATE, PRODUCT, LOCATION, and CUSTOMERandwaschosenarbitrarily.TheMDRangeSelect will access the CUBE File in order to efficiently retrieve the relevantdetaileddata(describedintheCX).Eachsalesvalueretrievedwillbeaug-mentedwithtwoh-surrogates,onecorrespondingtotheDATE dimensionandtheothertoLOCATION,whicharedynamicallycomputedfromthecorrespondingdatacellchunk-id(whichisnotstoredalongwiththemeasurevalues,sincethechunksareessentiallymultidimensionalarrays,butretrievedfromthecurrentposition/datapointinthecube’sdataspace).Thisprovidesthe“impression”oftuplescomingoutoftheMDRangeSelectoperator.Furthermore,thesetupleswillneedtobejoinedwiththeDATE dimensioninordertoretrievetheMonth values required in the final result. This join is implemented byaphysicaloperatornamed IndexResJoin in the figure. Essentially, this is an index-basedjointhatutilizestheprimaryorganizationofthedimensiontablestoefficiently retrieve the singlejointuplefromthedimensionside.Adimensiontable

Page 178: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

isorganizedasaB+treewiththeh-surrogateattributeasthesearchkey.EachtuplecomingfromtheCUBEFilesidecontainsanhsk attribute(i.e.,anh-surrogate)correspondingtotheDATE dimension.WeusethisvalueasakeyforaccessingdirectlytheDATE dimensionandretrievingthesingletuplethatmatches.Indeed,sincehskisaprimarykeyofthedimensiontable,therewillbeonlyasingletuplematch.Therefore,thenumberoftuplesintheoutputoftheIndexResJoinoperatoristhesameastheoneintheinput.Similarly,foreachhskvaluecorrespondingtodimensionLOCATIONweaccessthecorrespondingtupleandretrievetheappropriateAreavalue.Finally,thegroupingandaggregationhastotakeplace.Wedepictahash-groupoperatorthatgroupstheincomingtuplesbyAreaandMonth.

Star Query Optimization

Aninterestingfeatureofthedatabaseschemaisthehierarchicalstructureoftheh-surrogateattributesandthefactthattheyencodeallthehierarchicalattributesof thedimensions.Therefore, anumberof functionaldependencies exist in theschema, along with inclusion dependencies defined through the key-foreign key relationships.Thesefunctionalandinclusiondependenciescanbecombinedandusedfortheoptimizationofthegroupingandjoinoperations.Thecomplexoptimi-zationtechniquethatexploitstheseexistingintegrityconstraintsisthehierarchi-cal pregrouping anditispresentednext.ExperimentalresultshaveshownthatthistechniquecandrasticallyreducetheexecutiontimeoftheexaminedOLAPqueries(Pieringeretal.,2003).OtheroptimizationopportunitiesexistandpertaintotheCreate_Rangeoperationoftheabstractprocessingplan(Figure5(a)),ortheexploitationofthesort-orderofthetuplescomingfromthefacttable(MD_Range_Accessoperation).Duetolackofspace, these techniqueswillnotbedescribedhere.The interestedreadercanfind details in Karayannidis et al. (2002), Tsois and Sellis (2003), Pieringer et al. (2003),andTsois(2005)fortheformerandinTheodoratosandTsois(2003)andTsois(2005)forthelatter.TheHierarchicalPregroupingtechniqueisbasedonthepropertiesofthejoinandgroupingoperations.Thegroupingoperationusesthevaluesofthegroupingattri-butesonlytogrouptuplesthathavethesamevalue.However,theactualvalueofagroupingattributeisnotimportant.Therefore,anattributeXthatisusedonlyinagroupingoperation,likeGroup_Select,canbereplacedwithanyotherattributeYwhenthereisabijective(1-1andonto)mappingamongthevaluesofXandY.Therefore,onecanusethefunctional(andinclusion)dependenciesinordertore-placegroupingattributes.Inasimilarmannerfunctionalandinclusiondependencies

Page 179: Data Warehouses and OLAP - Concepts Architectures and Solutions

��2 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

allow the modification of join conditions, as explained in detail by Tsois (2005) and TsoisandSellis(2003).Byreplacinggroupingattributesandjoinconditions,thehierarchical pregrouping technique can group the fact table tuples very efficiently beforetheresidualjoinoperations,itcanpushjoinoperationsabovethegroupingoperationsanditcanevenremovecompletelysomeofthejoinoperations.Thekey ideaused in thehierarchicalpregrouping transformation is the follow-ing:ifahierarchicalattributehkofadimensionDiisusedinthequeryevaluationplanjustforgroupingorjustforanequi-joinoperation,thenthisattributecanbereplacedbyitsencodedformwhichexists within (as a prefix) the corresponding h-surrogate. Ifhski is thecorrespondingh-surrogate, theencodedvalueofhk isdenotedashski:hk.Forexample,fortheLOCATIONdimensioninourrunningexampleofFigure4,we can use the prefix part of the h-surrogate to group on the Areaattribute,insteadofusingtheactualAreaattribute.ThisisbecausealltuplesofLOCATIONwiththesamevaluesintheRegion andArea attributes will have the same prefix in the h-surrogatevalue.Furthermore,sincetheforeignkeyloc_hskexistsinthefacttablewecangroupthefacttabletuplesaccordingtotheAreaattributewithouthavingtojointhemwiththeLOCATIONdimensiontable.LetsseehowthistransformationaffectstheabstractplanshowninFigure5(b)forourexamplequeryofFigure4.Thehierarchicalpregroupingtransformationmodi-fies this initial plan by changing the grouping attributes and pushing both residual joinoperationsaftertheGroup_Selectoperation.Thisispossiblebecausegroup-ingisdoneonhierarchicalattributesonly(attributesAreaandMonth)thathaveacorrespondingencodedformintheh-surrogatesfoundinthefacttable(loc_hsk:area,date_hsk:month). The residual join operations are modified so that each tuple intheoutputoftheGroup_SelectoperationisjoinedwithonlyonetuplefromtheDATEdimensionandonetuplefromtheLOCATIONdimension.TheresultingplanisshowninFigure8(b).Byexploitingtheabovepropertiesoftheh-surrogatesthehierarchicalpregroupingtransformation can achieve three different types of modifications to the proposed abstractprocessingplanforstarqueries(Figure5(a)):

1. Itcaneliminatearesidualjoinoperationcompletely.Thiscasehappenswhentheremoveddimensiontablewasjoinedonlytoobtainaccesstohierarchicalattributesthatwherethenusedonlyforthegroupingoperation.

2. Itcansplitthegroupingoperationoftheinitialplanintotwostages:inthefirst stage, a pregrouping of the fact table tuples is performed before invoking theminresidualjoinoperations.Thegroupingisperformedusingtheh-surro-gatescontainedinthefacttable(theforeignkeys).Inthesecondstage,whichisexecutedafterperformingtherequiredresidualjoins,thetuplesareonceagaingroupedtoobtaintherequiredresult.Thissecondgroupingoperation

Page 180: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

usessomeoftheattributesthatwhereacquiredwiththeresidualjoinopera-tionsperformed.Thistransformationreducesdrasticallythenumberoftuplesinvolved in the residual join operations and therefore it reduces significantly thecostofthequeryevaluationplan.

3. Itcanpushjoinoperationsabovethegroupingoperationbycarefullymodifyingthegroupingattributesandthejoincondition.Theresultofthistransformationissimilartothepreviousone:itreducesthenumberoftuplesinvolvedintheaffectedresidualjoinoperationsandthereforeitimprovestheoverallcostoftheevaluationplan.

Notethatinordertopusharesidualjoinoperationaboveagroupingoperationthejoin must be carefully modified. This can be done either by grouping the dimension tableandmodifyingthejoinconditionorbyusingspecialjoinalgorithmsthatjoineach fact table tuple with only one tuple (the first matching tuple) from the dimension table.Thisisbecauseallinitialresidualjoinsareequi-joinsonthekeyattribute.The details of the hierarchical pregrouping transformation and its definition as analgorithmappearinKarayannidisetal.(2002)andTsois(2005).Atheoreticalanalysisofthetransformation,itsgeneralizationaswellasaproofofcorrectnesscanbefoundinTsois(2005)andTsoisandSellis(2003).

Future.Trends

Speculatingaboutthefuturetrendsindatawarehousequeryprocessingingeneral,webelievethattherearetwomainfactorsthatwilldrivetheprocessingrequire-mentsinthenearfuture:

1. Continuouslyincreasingdatavolumesthatoneneedstoanalyze.2. Continuouslyincreasingratesbywhichdataforanalysisaregeneratedonthe

onehandandincreasingneedforuptodateinformationontheother.

The first factor calls for extremely scalable storage organizations that exploit a plethoraofsuccessfultechniquessuchassemanticbasedphysicaldataclustering,precomputationofaggregates,andfastindexing.Italsorequiresevenmoreelaboratesemantic-basedoptimizationtransformationsthatwillreducetheamountofdataprocessedateachstep.Thesecondcallsforstoragestructuresthatareextremelyadaptive to updates, and for processing techniques “borrowed” from the field of datastreamprocessing.

Page 181: Data Warehouses and OLAP - Concepts Architectures and Solutions

��4 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Conclusion.

Inthischapter,wediscussedtheprocessingofadhocstarqueriesoverhierarchicallyclusteredfacttables.Wepresentedacompleteabstractprocessingplanthatcoversallthenecessarystepsforansweringsuchqueries.Thisplandirectlyexploitsthebenefits of hierarchically clustered fact tables and opens the road for new optimiza-tionchallenges.Weshowedhowthisabstractplancanbe“materialized”forthecaseofamultidimensionalstoragestructurethatachieveshierarchicalclustering,namelytheCUBE File.Finally,wepresentedthehierarchicalpregroupingtransformationasapowerfuloptimizationtechniqueforthistypeofqueryprocessing.Clearly, star query processing over hierarchically clustered fact tables is signifi-cantlydifferentfromotherapproaches.Themostremarkabledifferenceisthatthefacttableaccessistransformedtoamultidimensionalrangequerythroughtheuseofh-surrogates(i.e.,surrogatekeyswithhierarchysemantics).Moreover,facttablephysicalorganizationssuchastheCUBEFileexploith-surrogatestoprovidephysi-caldataclusteringw.r.tthedimensionhierarchies,resultinginareducedI/Ofacttableaccess.Finally,theexploitationofthehierarchysemanticsthath-surrogatesconvey can lead to efficient query optimization techniques such as the hierarchical pregroupingtransformation.TheabstractprocessingplancanbeeasilyincorporatedinaDBMSprovidedthatahierarchicalclustering-preservingfacttableorganizationissupported.Forexamplethemethodsintroducedinthischapterhavebeenfullyimplementedinthecom-mercialrelationalDBMSTransBaseHyperCube®(TransBaseHyperCube®,2005),whichutilizestheUB-tree(Bayer,1997)asafacttableprimaryorganization.

References

Bayer,R. (1997).TheuniversalB-treeformulti-dimensional indexing:Generalconcepts. Proceedings of the Worldwide Computing and Its Applications, International Conference, Tsukuba,Japan(pp.198-209).

Chan,C.Y.,&Ioannidis,Y.(1998).Bitmapindexdesignandevaluation.Proceed-ings of the ACM SIGMOD International Conference on Management of Data, Seattle,WA(pp.355-366).

Chaudhuri,S.,&Dayal,U.(1997).AnoverviewofdatawarehousingandOLAPtechnology.SIGMOD Record, 26(1),65-74.

Karayannidis,N.(2003).Storage structures, query processing, and implementation of on-line analytical processing systems.PhDdoctoralthesis,National Techni-

Page 182: Data Warehouses and OLAP - Concepts Architectures and Solutions

Advanced Ad Hoc Star Query Processing ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

cal University of Athens. (2003).RetrievedMay29,2006,fromhttp://www.dblab.ece.ntua.gr/~nikos/thesis/PhD_thesis_en.pdf

Karayannidis, N., Sellis, T., & Kouvaras, Y. (2004, March 14-18). CUBE file: A file structureforhierarchicallyclusteredOLAPcubes.InProceedings of the 9th International Conference on Extending Database Technology(pp.621-638),Heraklion,Crete,Greece.EDBT.

Karayannidis,N.,Tsois,A.,Sellis,T.Pieringer,R.,Markl,V.Ramsak,F.,etal.(2002).Processingstar-queriesonhierarchically-clusteredfact-tables.Proceedings of the 28th International Conference on Very Large Data Bases (VLDB), HongKong(pp.730-741).

Markl,V.,Ramsak,F.,&Bayern,R. (1999). ImprovingOLAPperformancebymultidimensional hierarchical clustering. Proceedings of the International Database Engineering and Applications Symposium, Montreal,Canada(pp.165-177).

O’Neil,P.E.,&Graefe,G.(1995).Multi-tablejoinsthroughbitmappedjoinindices.SIGMOD Record, 24(3),8-11.

O’Neil,P.E.,&Quass,D.(1997).Improvedqueryperformancewithvariantindexes.Proceedings of the ACM SIGMOD International Conference on Management of Data, Tucson,AZ(pp.38-49).

Oracle®10g.(2005).Documentation.Pieringer,R.,Elhardt,K.Ramsak,F.,Markl,V.,Fenk,R.,Bayer,R.,etal.(2003).

Combininghierarchyencodingandpre-grouping:Intelligentgroupinginstarjoinprocessing.Proceedings of the 19th International Conference on Data Engineering (ICDE), Bangalore,India(pp.329-340).

Roussopoulos,N.(1998).Materializedviewsanddatawarehouses.SIGMOD Re-cord, 27(1),21-26.

Sarawagi,S.(1997).IndexingOLAPdata.Data Engineering Bulletin, 20(1),36-43.

Sarawagi, S., & Stonebraker, M. (1994, February 14-18). Efficient organization of largemultidimensionalarrays.InProceedings of the 11th International Con-ference on Data Engineering, Houston,Texas(pp.326-336).

Srivastava,D.,Dar,S.,Jagadish,H.V.,&Levy,A.Y.(1996).Answering queries with aggregation using views.PaperpresentedattheVLDBConference1996(pp.318-329).

Theodoratos,D.,&Tsois,A.(2003,May).ProcessingOLAPqueriesinhierarchi-callyclustereddatabases.Data & Knowledge Engineering, 45(2),205-224.

TransBase HyperCube® Relational Database System.(2005).RetrievedMay29,2006,fromhttp://www.transaction.de

Page 183: Data Warehouses and OLAP - Concepts Architectures and Solutions

��6 Karayannidis, Tsois, & Sellis

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Tsois,A.(2005).Optimization of on-line analytical processing systems: Concep-tual data modeling and query processing techniques.Unpublisheddoctoraldissertation,NationalTechnicalUniversityOfAthens.

Tsois,A.,&Sellis,T.(2003).The generalized pre-grouping transformation: Ag-gregate-query optimization in the presence of dependencies(Tech.Rep.No.TR-2003-4). Retrieved May 29, 2006, from http://www.dbnet.ece.ntua.gr/pubs/uploads/TR-2003-4.pdf

Weber,R.,Schek,H.-J.,&Blott,S.(1998).Aquantitativeanalysisandperformancestudyforsimilarity-searchmethodsinhigh-dimensionalspaces.VLDB,194-205.

Wu,M.C.,&Buchmann,A.P.(1998).Encodedbitmapindexingfordataware-houses.ICDE,220-230.

Yan,W.P.,&Larson,P.-A.(1995).Eageraggregationandlazyaggregation.VLDB,345-357.

Endnote

1 Naturally,theonlywaytofavormorethanonehierarchy(perdimension)inclusteringistomaintainredundantcopiesofthecube(Sarawagi&Stonebraker,1994),or to treatdifferenthierarchypathsas separatedimensions (Markl,1999).Thelatterresultsinanincreaseofthecubedimensionality,renderingclustering even more difficult (Weber, 1998).

Page 184: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.VII

Bitmap.Indices.for.Data.Warehouses

Kurt StockingerLawrence Berkeley National Laboratory, University of California, USA

Kesheng WuLawrence Berkeley National Laboratory, University of California, USA

Abstract

In this chapter we discuss various bitmap index technologies for efficient query processing in data warehousing applications. We review the existing literature and organize the technology into three categories, namely bitmap encoding, compres-sion, and binning. We introduce an efficient bitmap compression algorithm and examine the space and time complexity of the compressed bitmap index on large datasets from real applications. According to the conventional wisdom, bitmap indices are only efficient for low-cardinality attributes. However, we show that the compressed bitmap indices are also efficient for high-cardinality attributes. Timing results demonstrate that the bitmap indices significantly outperform the projection index, which is often considered to be the most efficient access method for multidi-mensional queries. Finally, we review the bitmap index technology currently sup-ported by commonly used commercial database systems and discuss open issues for future research and development.

Page 185: Data Warehouses and OLAP - Concepts Architectures and Solutions

158 Stockinger & Wu

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Introduction

Querying large datasets to locate some selected records is a common task in data warehousing applications. However, answering these queries efficiently is often difficult due to the complex nature of both the data and the queries. The most straightforward way of evaluating a query is to sequentially scan all data records to determine whether each record satisfies the specified conditions. A typical query condition is as follows: “Count the number of cars sold by producer P in the time interval T”. This search procedure could usually be accelerated by indices, such as variations of B-Trees or kd-Trees (Comer, 1979; Gaede & Guenther, 1998). Gen-erally, as the number of attributes in a dataset increases, the number of possible indexing combinations increases as well. To answer multidimensional queries effi-ciently, one faces a difficult choice. One possibility is to construct a separate index for each combination of attributes, which requires an impractical amount of space. Another possibility is to choose one of the multidimensional indices, which is only efficient for some of the queries. In the literature, this dilemma is often referred to as the curse of dimensionality (Berchtold, Boehm, & Kriegl, 1998; Keim & Hin-neburg, 1999).In this chapter we discuss an indexing technology that holds a great promise in breaking the curse of dimensionality for data warehousing applications, namely the bitmap index. A very noticeable character of a bitmap index is that its primary solution to a query is a bitmap. One way to break the curse of dimensionality is to build a bitmap index for each attribute of the dataset. To resolve a query involving conditions on multiple attributes, we first resolve the conditions on each attribute using the corresponding bitmap index, and obtain a solution for each condition as a bitmap. We then obtain the answer to the overall query by combining these bitmaps. Because the operations on bitmaps are well supported by computer hardware, the bitmaps can be combined easily and efficiently. Overall, we expect the total query response time to scale linearly in the number of attributes involved in the query, rather than exponentially in the number of dimensions (attributes) of the dataset, thus breaking the curse of dimensionality.These statements omitted many technical details that we will elaborate in this chap-ter. In the next section we give a broad overview of the bitmap index and its relative strengths and weaknesses to other common indexing methods. We then describe the basic bitmap index and define the terms used in the discussions. We devote a large portion of this chapter to review the three orthogonal sets of strategies to improve the basic bitmap index. After reviewing these strategies, we give a more in-depth discussion on how the word-aligned-hybrid (WAH) bitmap compression technique reduces the bitmap index sizes. We will also present some timing results to dem-onstrate the effectiveness of the WAH compressed bitmap indices for two different application datasets. Our performance evaluation is deliberately based on datasets

Page 186: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

withhigh-cardinalityattributes,sinceforlow-cardinalityattributestheperformanceadvantageofbitmapindicesiswellknown.WeconcludewithashortreviewofbitmapindicesavailableincommercialDBMSproductsanddiscusshowtomakebitmapindicesbettersupportedinthesecommercialproducts.

Background

Byfar themostcommonlyusedindexingmethodis theB-Tree(Comer,1979).Almosteverydatabaseproducthasaversionthereofsinceitisveryeffectiveforonlinetransactionprocessing(OLTP).Thistypeoftree-basedindexingmethodhasnearlythesameoperationalcomplexitiesforsearchingandupdatingtheindices.ThisparityisimportantforOLTPbecausesearchingandupdatingareperformedwithnearlythesamefrequencies.However,formostdatawarehousingapplicationssuchasonlineanalyticalprocessing(OLAP),thesearchingoperationsaretypicallyperformedwithamuchhigherfrequencythanthatofupdatingoperations(Chaudhuri&Dayal,1997;Chaudhuri,Dayal,&Ganti,2001).ThissuggeststhattheindexingmethodsforOLAPmustputmoreemphasisonsearchingthanonupdating.Amongtheindexingmethodsknownintheliterature,thebitmapindexhasthebestbalancebetweensearchingandupdatingforOLAPoperations.Frequently,inOLAPoperationseachqueryinvolvesanumberofattributes.Further-more,eachnewqueryofteninvolvesadifferentsetofattributesthanthepreviousone.Usingatypicalmultidimensionalindexingmethod,aseparateindexisrequiredfornearlyeverycombinationofattributes(Gaede&Guenther,1998).Itiseasytoseethatthenumberofindicesgrowsexponentiallywiththenumberofattributesinadataset.Intheliteraturethisissometimescalledthecurseofdimensionality(Berchtoldetal.,1998;Keim&Hinneburg,1999).Fordatasetswithamoderatenumberofdimensions,acommonwaytocurethisproblemistouseoneofthemultidimensionalindexingmethods,suchasR-Treesorkd-trees.Theseapproacheshavetwonotableshortcomings.Firstly,theyareeffectiveonlyfordatasetswithamodest number of dimensions, say, < 15. Secondly, they are only efficient for queries involvingallindexedattributes.However,inmanyapplicationsonlysomeoftheattributesareusedinthequeries.Inthesecases,theconventionalindexingmeth-ods are often not efficient. For ad hoc range queries, most of the known indexing methodsdonotperformbetterthantheprojectionindex(O’Neil&Quass,1997),whichcanbeviewedasonewaytoorganizethebase.Thebitmapindex,ontheotherhand,hasexcellentperformancecharacteristicsonthesequeries.Asshownwith both theoretical analyses and timing measurements, a compressed bitmapindex can be very efficient in answering one-dimensional range queries (Stock-inger,Wu,&Shoshani,2002;Wu,Otoo,&Shoshani,2004,2006).Sinceanswersto one-dimensional range queries can be efficiently combined to answer arbitrary

Page 187: Data Warehouses and OLAP - Concepts Architectures and Solutions

�60 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

multidimensional range queries, compressed bitmap indices are efficient for any rangequery.Intermsofcomputationalcomplexity,onetypeofcompressedbitmapindexwasshowntobetheoreticallyoptimalforone-dimensionalrangequeries.Thereasonforthetheoreticallyprovenoptimalityisthatthequeryresponsetimeisalinearfunctionofthenumberofhits,thatis,thesizeoftheresultset.Thereareanumberofindexingmethods,includingB*-treeandB+-tree(Comer,1979),thataretheoreticallyoptimalforone-dimensionalrangequeries,butmostofthemcannotbe used to efficiently answer arbitrary multidimensional range queries.Thebitmapindexinitsvariousformswasusedalongtimebeforerelationaldatabasesystemsordatawarehousingsystemsweredeveloped.Earlieron,thebitmapindexwas regarded as a special form of inverted files (Knuth, 1998). The bit-transposed file (Wong, Liu, Olken, Rotem, & Wong, 1985) is very close to the bitmap index currentlyinuse.ThenamebitmapindexwaspopularizedbyO’Neilandcolleagues(O’Neil,1987;O’Neil&Quass,1997).Followingtheexamplesetinthedescrip-tion of Model 204, the first commercial implementation of bitmap indices (O’Neil, 1987),manyresearchersdescribebitmapindicesasavariationoftheB-treeindex.To respect its earlier incarnation as inverted files, we regard a bitmap index as a datastructureconsistingofkeysandbitmaps.Moreover,weregardtheB-treeasaway to layout the keys and bitmaps in files. Since most commercial implementa-tionsofbitmapindicescomeaftertheproductalreadycontainsanimplementationofaB-tree,itisonlynaturalforthoseproductstotakeadvantageoftheexistingB-treesoftware.Fornewdevelopmentsandexperimentalorresearchcodes,thereisnoneedtocoupleabitmapindexwithaB-tree.Forexample,inaresearchpro-gramthatimplementsmanyofthebitmapindexingmethodsdiscussedlaterinthischapter(FastBit,2005),thekeysandthebitmapsareorganizedassimplearraysina binary file. This arrangement was found to be more efficient than implementing bitmapindicesinB-treesoraslayersontopofaDBMS(Stockingeretal.,2002;Wuetal.,2002).Thebasicbitmapindexuseseachdistinctvalueoftheindexedattributeasakey,andgeneratesonebitmapcontainingasmanybitsasthenumberofrecordsinthedatasetforeachkey(O’Neil,1987).Lettheattributecardinalitybethenumberofdistinctvaluespresentinadataset.Thesizeofabasicbitmapindexisrelativelysmallforlow-cardinalityattributes,suchas“gender,”“typesofcarssoldpermonth,”or“airplanemodelsproducedbyAirbusandBoeing.”However,forhigh-cardinalityattributessuchas“temperaturevaluesinasupernovaexplosion,”theindexsizesmaybetoolargetobeofanypracticaluse.Intheliterature,therearethreebasicstrategiestoreducethesizesofbitmapindices:(1)usingmorecomplexbitmapencoding methods to reduce the number of bitmaps or improve query efficiency, (2)compressingeachindividualbitmap,and(3)usingbinningorothermappingstrategiestoreducethenumberofkeys.Intheremainingdiscussions,werefertothesethreestrategiesasencoding,compression,andbinning,forshort.

Page 188: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses �6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Bitmap. Index.Design

Basic.Bitmap.Index

Bitmap indices are one of the most efficient indexing methods available for speed-ingupmultidimensionalrangequeriesforread-onlyorread-mostlydata(O’Neil,1987;Rotem,Stockinger&Wu,2005b;Wuetal.,2006).Thequeriesareevaluatedwithbitwiselogicaloperationsthatarewellsupportedbycomputerhardware.Foranattributewithcdistinctvalues,thebasicbitmapindexgeneratescbitmapswithNbitseach,whereNisthenumberofrecords(rows)inthedataset.Eachbitinabitmap is set to “1” if the attribute in the record is of a specific value; otherwise thebitissetto“0”.Figure1showsasimplebitmapindexwithsixbitmaps.Eachbitmaprepresentsadistinctattributevalue.Forinstance,theattributevalue3ishighlightedtodemonstratetheencoding.Inthiscase,bitmap3issetto“1”,allotherbitsonthesamehorizontalpositionaresetto“0”.

Encoding

Thebasicbitmapindexintroducedisalsocalledequality-encodedbitmapindexsinceeachbitmap indicateswhetherornotanattributevalueequals to thekey.This strategy is the most efficient for equality queries such as “temperature = 100.” ChanandIoannidis(1998,1999)developedtwootherencodingstrategiesthatarecalledrangeencodingandintervalencoding.Thesebitmapindicesareoptimizedforone-sidedandtwo-sidedrangequeries,respectively.Anexampleofaone-sidedrangequeryis“pressure<56.7”.Atwo-sidedrangequery,forinstance,is“35.8<pressure<56.7”.

Figure 1. Simple bitmap index with six bitmaps to represent six distinct attribute values

Page 189: Data Warehouses and OLAP - Concepts Architectures and Solutions

�62 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Acomparisonofanequality-encodedandrange-encodedbitmapindexisgiveninFigure2(basedonChan&Ioannidis,1999).Letuslookattheencodingofvalue2, which is highlighted in the figure. For equality encoding, the third bitmap is set to“1”(E2),whereasallotherbitsonthesamehorizontallinearesetto“0”.Fortherange-encodedbitmapindex,allbitsbetweenbitmapR2andR8aresetto“1”,theremaining bits are set to “0”. This encoding is very efficient for evaluating range queries.Consider,forinstance,thequery“A<=4”.Inthiscase,atmostonebitmap,namelybitmapR4,hastobeaccessed(scanned)forprocessingthequery.Allbitsthat are set to “1” in this bitmap fulfill the query constraint. On the other hand, for theequality-encodedbitmapindex,thebitmapsE0toE4havetobeORedtogether(viatheBooleanoperatorOR).Thismeansthat5bitmapshavetobeaccessed,asopposedtoonly1bitmapforthecaseofrangeencoding.Inshort,rangeencodingrequiresatmostonebitmapscanforevaluatingrangequeries,whereasequalityencodingrequiresintheworstcasec/2bitmapscans,whereccorrespondstothenumberofbitmaps.Sinceonebitmapinrangeencodingcontainsonly“1”s,thisbitmapisusuallynotstored.Therefore,thereareonlyc-1bitmapsinarange-en-codedindex. Assuming each attribute value fits in a 32-bit machine word, the basic bitmap index foranattributewithcardinality32takesasmuchspaceasthebasedata(knownasuserdataororiginaldata).SinceaB-treeindexfora32-bitattributeisoftenobservedtousethreeorfourtimesthespaceasthebasedata,manyusersconsideronlyattributeswithcardinalitieslessthan100tobesuitableforusingbitmapin-dices.Clearly,controllingthesizeofthebitmapindicesiscrucialtomakebitmapindicespracticallyusefulforhighercardinalityattributes.Theinterval-encodingscheme(Chan&Ioannidis,1999)reducesthenumberofbitmapsonlybyafac-tor2.Thus,othertechniquesareneededtomakebitmapindicespracticalforhighcardinalityattributes.

Figure 2. Equality-encoded bitmap index (b) compared with range-encoded bitmap index (c). The leftmost column shows the row ids (RID) for the data values repre-sented by the projection index shown in (a).

Page 190: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses �6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

TheencodingmethodthatproducestheleastnumberofbitmapsisbinaryencodingintroducedbyWongetal.(1985).Binaryencodingwaslaterusedbyvariousauthors(O’Neil&Quass,1997;Wu&Buchmann,1998)inthecontextofbitmapindices.Thisencodingmethodusesonlyratherthanc/2bitmaps,wherecistheattributecardinality.Foranintegerattributeintherangeof0andc-1,eachbitmapinthebitmapindexisaconcatenationofoneofthebinarydigitsforeveryrecord.Foranattributewithc=1000,itonlyneeds10bitmaps.Theadvantageofthisencodingisthatitrequiresmuchfewerbitmapsthanintervalencoding.However,toanswerarangequery,usingintervalencodingonehastoaccessonlytwobitmapswhereasusingbinaryencodingoneusuallyhastoaccessallbitmaps.A number of authors have proposed strategies to find the balance between the space and time requirements (Chan&Ioannidis,1999;Wongetal.,1985).AmethodproposedbyChanandIoannidis(1999)calledmulticomponentencodingcanbethoughtofasageneralizationofbinaryencoding. In thebinaryencoding,eachbitmaprepresentsabinarydigitoftheattributevalues;themulticomponentencod-ingbreaksthevaluesinamoregeneralway,whereeachcomponentcouldhaveadifferentsize.Consideranintegerattributewithvaluesrangingfrom0toc-1.Letb1andb2bethesizesoftwocomponentsc1andc2,whereb1*b2>=c.Anyvaluev can be expressed as v = c1*b2+c2, where c1 = v / b2 and c2 = v % b2, where ‘/’ denotes the integer division and ‘%’ denotes the modulus operation. One can use a simplebitmapencodingmethodtoencodethevaluesofc1andc2separately.Next,we give a more specific example to illustrate the multicomponent encoding.Figure3illustratesa2-componentencodedbitmapindexforanattributewithcar-dinalityc=1000.Inourexample,thetwocomponentshavebasesizesofb1=25andb2=40.Assumetheattributevaluesareinthedomainof[0;999].Anattributevaluevisdecomposedintotwocomponentswithc1=v/40andc2=v%40.Thecomponentc1canbetreatedasanintegerattributeintherangeof0and24;thecomponentc2canbeviewedasanintegerattributeintherangeof0and39.Twobitmapindicescanbebuilt,oneforeachcomponent,forexample,c1withtheequalityencodingandc2withrangeencoding.Ifrangeencodingisusedforbothcomponents,ituses24bitmapsforComponent1,and39bitmapsforComponent2.Inthiscase,the2-componentencodinguses63bitmaps,whichismorethanthe10bitmapsusedbybinaryencoding.Toanswerthesamequery“v<105”usingthe2-componentindex,thequeryiseffectivelytranslatedto“c1<2OR(c1=2AND

Component1b1=25

c1 <=0

c1 <=1

c1 <=2

… c1 <=23

Component2b2=40

c2 <=0

c2 <=1

c2 <=2

… c2 <=38

Figure 3. An illustration of a 2-component bitmap index

Page 191: Data Warehouses and OLAP - Concepts Architectures and Solutions

�64 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

c2<25).”Evaluatingthisexpressionrequiresthreebitmapsrepresenting“c1<=1,”“c1<=2,” and“c2<=24.” In contrast, using thebinary encodedbitmap index toevaluatethesamequery,all10bitmapsareneeded.Usingmorecomponentscanreducethenumberofbitmapsandthereforereducesthetotalindexsize.However,usingmorecomponentswillalsoincreasethenumberofbitmapsaccessedinordertoansweraquery,henceincreasingthequeryresponsetime.Clearly,thereisatrade-offbetweentheindexsizeandthequeryresponsetime.Withoutconsideringcompression,ChanandIoannidis(1999)haveanalyzedthis space-time trade-off. They suggested that the inflection point of the trade-off curveisattwocomponents.Theyfurthersuggestedthatthetwocomponentsshouldhavenearlythesamebasesizestoreducetheindexsize.

Binning

Thesimplestformofbitmapindicesworkswellforlow-cardinalityattributes,suchas“gender,”“typesofcarssoldpermonth,”or“airplanemodelsproducedbyAirbusandBoeing.”However,forhigh-cardinalityattributessuchas“distincttemperaturevalues in a supernovaexplosion,” simplebitmap indices are impracticaldue tolargestorageandcomputationalcomplexities.Wehavejustdiscussedhowdifferentencodingmethodscouldreducetheindexsizeandimprovequeryresponsetime.Next,wedescribeastrategycalledbinningtoreducethenumberofbitmaps.Sincetheencodingmethodsdescribedbeforeonlytakecertainintegervaluesasinput,wemayalsoviewbinningasawaytoproducetheseintegervalues(binnumbers)fortheencodingstrategies.Thebasicideaofbinningistobuildabitmapforabinratherthaneachdistinctat-tributevalue.Thisstrategydisassociatesthenumberofbitmapsfromtheattributecardinalityandallowsonetobuildabitmapindexofaprescribedsize,nomatterhowlargetheattributecardinalityis.Aclearadvantageofthisapproachisthatitallowsonetocontroltheindexsize.However,italsointroducessomeuncertaintyintheanswersifoneonlyusestheindex.Togeneratepreciseanswers,onemayneed to examine the original data records (candidates) to verify that the user-specified conditions are satisfied. The process of reading the base data to verify the queryconditionsiscalledcandidatecheck(Rotemetal.,2005b;Stockinger,Wu,&Shoshani,2004).Asmall exampleofanequality-encodedbitmap indexwithbinning isgiven inFigure4.InthisexampleweassumethatanattributeAhasvaluesbetween0and100.ThevaluesoftheattributeAaregiveninthesecondleftmostcolumn.Therange of possible values of A is partitioned into five bins [0, 20), [20, 40).... A “1-bit” indicates that the attribute value falls into a specific bin. On the contrary, a “0-bit” indicates that the attribute value does not fall into the specific bin. Take the exampleofevaluatingthequery“Countthenumberofrowswhere37<=A<63.”

Page 192: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses �6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Thecorrectresultshouldbe2(rows5and7).Weseethattherangeinthequeryoverlapswithbins1,2,and3.Weknowforsurethatallrowsthatfallintobin2definitely qualify (i.e., they are hits). On the other hand, rows that fall into bins 1 and 3 possibly qualify and need further verification. In this case, we call bins 1 and 3edgebins.Therows(records)thatfallintoedgebinsarecandidatesandneedtobecheckedagainstthequeryconstraint.Inourexample,therearefourcandidates,namelyrows1and3frombin1,androws5and6frombin3.Thecandidatecheckprocessneedstoreadthesefourrowsfromdisk and examine their values to see whether or not they satisfy the user-specified conditions.Onalargedataset,acandidatecheckmayneedtoreadmanypagesandmaydominatetheoverallqueryresponsetime(Rotemetal.,2005b).Thereareanumberofstrategiestominimizethetimerequiredforthecandidatecheck(Koudas,2000;Rotemetal.,2005a,2005b;Stockingeretal.,2004).Kou-das (2000) considered the problem of finding the optimal binning for a given set of equality queries. Rotem et al. (2005a, 2005b) considered the problem of finding the optimalbinningforrangequeries.Theirapproachesarebasedondynamicprogram-ming.Sincethetimerequiredbythedynamicprogramminggrowsquadraticwiththe problem size, these approaches are only efficient for attributes with relatively smallattributecardinalities(Koudas,2000)orwithrelativelysmallsetsofknownqueries(Stockingeretal.,2004).Stockingeretal.(2004)consideredtheproblemofoptimizingtheorderofevaluatingmultidimensionalrangequeries.Thekeyideaistousemoreoperationsonbitmapstoreducethenumberofcandidateschecked.Thisapproachusuallyreducesthetotalqueryresponsetime.Furtherimprovementsto this approach are to consider the attribute distribution and other factors that influ-encetheactualtimerequiredforthecandidatecheck.

Figure 4. Range query “37 <= A < 63” on a bitmap index with binning

Page 193: Data Warehouses and OLAP - Concepts Architectures and Solutions

�66 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Tominimizenumberofdiskpageaccessesduringthecandidatecheck,itisnecessarytoclustertheattributevalues.Acommonlyusedclustering(datalayout)techniqueiscalledtheverticalpartitionorotherwiseknownasprojectionindex.Ingeneral,thevertical data layout is more efficient for searching, while the horizontal organization (commonly used in DBMS) is more efficient for updating. To make the candidate check more efficient, we recommend the vertical data organization.

Compression

Compressionisthethirdstrategytoreducethesizeofbitmapindices.Sinceeachbitmapofthebitmapindexmaybeusedseparatelyfromothers,compressionistypicallyappliedoneachindividualbitmap.Compressionisawell-researchedtopicand efficient compression software packages are widely available. Even though thesegeneral-purposecompressionmethodsareeffectiveinreducingthesizeofbitmaps,query-processingoperationsoncompressedbitmapsareoftenslowerthanonuncompressedbitmaps(Johnson,1999).Thismotivatedanumberofresearchersto improve the efficiency of compressed bitmap indices. Two of the most notable compressionmethodsarebyte-alignedbitmapcode(BBC)(Antoshenkov,1994;Antoshenkov&Ziauddin,1996)andword-alignedhybrid(WAH)code(Wuetal.,2004,2006).BitmapscompressedwithBBCareslightlylargerinsizethanthosecompressedwiththebestavailablegeneral-purposecompressionmethods.However,operationsonBBCcompressedbitmapsareusuallyfaster(Johnson,1999).Clearly,thereisaworthwhilespace-timetrade-off.TheWAHcompressiontakesthisspace-time trade-off one step further. More specifically, WAH compressed bitmaps are largerthanBBCcompressedones,butoperationsonWAHcompressedbitmapsaremuchfasterthanonBBCcompressedones.Therefore,WAHcompressedbitmapindicescananswerqueriesmuchfasterasdemonstratedinanumberofdifferentexperiments(Stockingeretal.,2002;Wuetal.,2006).InthenextsectionweprovideadetaileddescriptionoftheWAHcompression.FormoreinformationonBBC,wereferthereadertoAntoshenkov(1994)andAntoshenkov&Ziauddin(1996).

WAH.Bitmap.Compression

TheWAHbitmapcompressionisbasedonrun-lengthencoding,whereconsecutiveidenticalbitsarerepresentedwiththeirbitvalue(0or1)andacount(lengthoftherun). In WAH each such run consists of a fill and a tail. A fill is a set of consecu-tiveidenticalbitsthatisrepresentedasacountplustheirbitvalue.Atailisasetofmixed0sand1sthatisrepresentedliterallywithoutcompression.Onekeyideaof

Page 194: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses �6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

WAH is to define the fills and tails so that they can be stored in words – the small-estoperationalunitofmoderncomputerhardware.TheWAHcompressionisillustratedinFigure5.Assumingthatamachinewordis32bitslong,theexampleshowshowasequenceof5456bits(seeFigure5(a))isbrokenintotworunsandencodedasthreewords.Conceptually,thebitsequenceis first broken into groups of 31 bits each (see Figure 5(b)). Next, the neighbor-inggroupswithidenticalbitsaremerged(Figure5(c)).Finally,thesethreegroupsare encoded as 32-bit machine words (Figure 5(d)). The first run contains a fill of length 0 and a tail. There is no fill word but only a literal word representing the 31 tail bits for this run. Since a literal word has 32 bits, we use the first bit to indicate itisaliteralword,andtheresttostorethe31tailbits.Thesecondruncontainsafill of length 174 (and thus represents 174 groups of 31 bits each) plus a tail. This run requires a fill word and a tail word. As illustrated, the first bit of a fill word indicates that it is a fill word, the second bit stores the bit value of the fill, which is 0 in this example. The remaining 30 bits store the binary version of the fill length, whichis10101110(174)inthisexample.

Figure 5. An example of WAH encoding of a sequence of 5456 bits on a 32-bit machine

.

10000000000000000000011100000000000000000000000……………….0000000000000001111111111111111111111111

a) Input bitmap with 5456 bits

01000

B it 0 indicates “tail” word

100…010101110 001…11

b) G roup bits into 176 31-bit groups

d) E ncode each group us ing one word

31 bits 174*31 bits 31 bits

31 bits 31 bits … 31 bits

c) Merge neighboring groups with identical bits

31literalbitsrunlengthis174

Run1 Run2

B it 0 indicates “tail” word

31literalbitsFillbit0

Page 195: Data Warehouses and OLAP - Concepts Architectures and Solutions

�68 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Intheoreticalanalysis,thequeryresponsetimeonone-dimensionalrangequeriesusingWAHcompressedindiceswasshowntogrowlinearlyinthenumberofhits.Thistimecomplexityisoptimalforanysearchingalgorithmsinceonehastoreturnat least the hits, which takes Ω(h) time (where h is the number of hits). A variety of well-knownindexingmethodssuchasB+-treesandB*-treeshavethesameoptimalscalingproperty.However,compressedbitmapindiceshavetheuniqueadvantagethattheycanbeeasilycombinedtoanswermultidimensionaladhocrangequeries,while B+-trees or B*-trees cannot be combined nearly as efficiently.Ingeneral, thequeryresponsetimecanbebrokenintoI/OtimeandCPUtime.SinceWAHcompressedbitmapsarelargerinsizethanBBCcompressedbitmaps,wewouldexpectthatWAHrequiremoreI/Otimetoreadcompressedbitmaps.Formanydatabaseoperations,theCPUtimeisnegligiblecomparedwiththeI/Otime.Itturnsoutthatthisisnotthecasewhenansweringquerieswithcompressedbit-mapindices.InaperformanceexperimentStockingeretal.(2002)comparedWAHcompressed indiceswith two independent implementationsofBBCcompressedindices,onebasedonJohnson’s(1999)codeandtheotherbyWuetal.(2002).TheresultsshowedthatthetotalqueryresponsetimewassmallerwithWAHcompressedbitmapindicesthanwithBBCcompressedbitmaps,evenonarelativelyslowdisksystem that can only sustain 5 MB/s for reading files from disk. On faster disk sys-tems,theperformanceadvantageofWAHcompressedbitmapindicesisevenmorepronounced.UsingWAHcouldbe10timesfasterthanusingBBC.

Bitmap. Index.Tuning

Unlessoneusesbinaryencoding,itisimportanttocompressthebitmapindices.Tobuild an efficient compressed bitmap index, the three main parameters to consider are:(1)encoding,(2)numberofbins,and(3)binningstrategy.Inthefollowingwepresentarule-of-thumbforchoosingthesethreeparameters.Theoptimalbitmapencodingtechniquedependsonthekindofqueriesthatareevaluated.ChanandIoannidis(1999)showedthatrangeencodingisthebestbitmapencodingtechniqueforrange-queries.However,rangeencodingmightnotalwaysbepracticalforhigh-cardinalityattributesorforalargenumberofbins.Aswewillshowinthenextsection,range-encodedbitmapindicesdonotcompressaswellasequality-encodedbitmapindices.Thegeneralruleforchoosingthenumberofbinsisasfollows:Themorebins,thelessworkduringthecandidatecheck.Thereasonisfairlystraightforward.Ingen-eral,asthenumberofbinsincreases,thenumberofcandidatesperbindecreases.Letusconsiderthefollowingexample.Assumethebasedatafollowsauniformrandomdistribution.Withatypicalpagesizeof8KB,usingtheprojectionindex,

Page 196: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses �6�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

apagecouldhold20484-bytewords.Ifonein1000wordsisaccessedduringthecandidatecheck,itislikelythateverypagecontainingtheattributevalueswouldbetouched(Stockingeretal.,2004).We,thus,suggestusing1000binsormore.Forequalityencodingthereisanadditionaltrade-off,namelyusingmorebinsmayalsoincreasethecostoftheindexscan.Forrangeencodingthecostoftheindexscanis not significantly affected by the number of bins because one needs to access no morethantwobitmapstoevaluatearangequery(Chan&Ioannidis,1999).Withoutcompression,onewouldclearlyfavorrangeencoding.However,withcompression,therelativestrengthisnotasobvious.WithaWAHcompressedequality-encodedindex,itwasshownthatthecostoftheindexscanisproportionaltothenumberofhits,independentofthenumberofbitmapsinvolved(Wuetal.,2006).Becausetheequality-encodedindicesaremucheasiertocompress,thiscouldmaketheWAHcompressedequality-encodedindexapreferredchoice.Finally,thebinningstrategyhasanimpactonthecandidatecheck.Thesimplestkindofbinning,calledequi-widthbinning,partitionsthedomainoftheindexedattributeintobinsofequalsize.Asaresult,eachbinmighthaveadifferentnumberofentries.Equi-depthbinning,ontheotherhand,distributesthenumberofentriesequallyamongthebins.Thistechniquehasabetterworst-casebehaviorthanequi-widthbinningbutismorecostlytobuildbecauseonetypicallyhastoscanthedatafirst to generate the exact histogram before starting with the binning. Oneapproachtoreducethecostofbuildingasetofequi-depthbinsis touseasampled histogram instead of the exact histogram. Another approach is to first buildanequi-widthbinnedindexwithmorebinsthandesired,andthencombinetheneighboringbinstoformapproximateequi-depthbins.However,thesecondapproachmightnotproducewell-balancedbins.Forexample,theattributemassfractionfromasupernovasimulationisexpectedtobeintherangeof0and1.If,forsomereason,themassfractionisnotknown,scientiststypicallyenterthevalue-999torepresentabadormissingvalue.Inthisexample,equi-widthbinningwouldproducebinsstartingfrom-999.Thisresultsintoomanyemptybinsandthuscannotbecombinedtoproducewell-balancedequi-depthbins.Incontrast,theapproachofsampledhistogramsisgenerallymorereliableindetectingthistypeofunusualoutliersandtypicallyproduceswell-balancedbins.

Space.Complexity:.........................Sizes of Compressed Bitmap Indices

ThespacecomplexityofuncompressedbitmapindiceswasstudiedinChanandIoannidis(1998,1999).Inthissection,weanalyzethesizeofcompressedbitmapindices.OurdiscussionmainlyfocusesontheWAHcompressionmethodsinceBBC

Page 197: Data Warehouses and OLAP - Concepts Architectures and Solutions

��0 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

compressionwasextensivelystudiedinJohnson(1999).Wegiveanupperboundoftheworst-casesizeandprovideanexperimentalstudyofcompressedbitmapindicesforvariousapplicationdatasets.

Index Size: Worst-Case Behavior

In the previous section we defined a WAH run to be a fill followed by a tail. To makethediscussionmoreconcrete,letusassumethatamachinewordis32bits.Inthiscase,aWAHtailcontainsexactly31bitsfromtheinputbitmapandaWAHfill contains a multiple of 31 bits that are all the same (either 0 or 1). Because the bitmap index is known to be efficient for low cardinality attributes, we further re-strictourdiscussiontohighcardinalityattributesonly,say,c>100.Inanequality-encodedbitmapindex,thereareckeys(distinctvaluesoftheattribute)andthuscbitmaps.Wedonotknowexactlyhowmanybitsaresetto1ineachindividualbitmap.However,weknowthatthetotalnumberofbitsthatare1isexactlyN(thenumberofrowsinthedataset).Intheworstcase,thereare(N+c)WAHrunsinthebitmaps,whereNreferstomaximumnumberoftailwords(eachcontainingasinglebitsetto1)andcreferstothemaximumnumberofrunsattheendofeachbitmapthatarenotterminatedwithatailword.EachWAHrunisencodedbytwomachinewords.Therefore,weneedatotalof2(N+c)wordstorepresentthebitmaps.Assum-ingeachkeyisencodedbyonewordalongwithoneadditionalwordtoassociatethekeywiththebitmap,thetotalindexsizeis2N+4cwords.Inmostcases,theat-tributecardinalitycismuchsmallerthanN.Inthesecases,theWAHcompressedequality-encodedbitmapindexsizeisatworst2Nwords.Withbinning,onemay

Figure 6. Size of base data compared with bitmap indices

Note: EE = equality encoding; RE = range encoding; lit = literal (no compression); comp = with compression

�.E+0�

�.E+08

�.E+0�

�.E+�0

base data EE-�000-lit EE-�000-comp

RE-�00-lit RE-�00-comp

Base data and indices for combustion data set

Size

[byt

es]

Page 198: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

usemanythousandsofbinsandthemaximumindexsizewouldstillbenomorethan2N.SinceanumberofcommercialimplementationsofB-treesareobservedtouse3Nto4Nwords,themaximumsizeofcompressedbitmapindicesisrelativelymodest.Aswewillshowforrealapplicationdata,theWAHcompressedindexisoftenmuchsmallerthanthepredictedworst-casesizes.ForWAHcompression,intheworstcase,about90%ofthebitmapsinarange-encodedbitmapindexwillnotbecompressible(Wuetal.,2006).Unlessonecantolerateverylargeindicesoroneknowsbeforehandthatcompressionwouldbeeffective,wegenerallyrecommendusingnomorethan100binsforrange-encodebitmapindices.ThisguaranteesthatthesizeofthebitmapindexisatworstthesizeofaB-tree.

Index Size for Real Application Datasets

Wewillnowanalyzeexperimentally the sizeofcompressedbitmap indices forvariousapplicationdatasets.

Combustion Dataset

The combustion dataset is from a simulation of the auto-ignition of turbulentHydrogen-airmixturefromtheTeraScaleHigh-FidelitySimulationofTurbulentCombustionwithDetailedChemistry(TeraScaleCombustion,2005).Thedatasetconsistsof24million recordswith16attributeseach.For thisdatasetwebuiltequality-encodedandrange-encodedbitmapindiceswithvariousnumbersofequi-depthbins.Figure6showstheaveragesizeofthecompressedbitmapindicesperattribute.Wecanseethatequality-encodedbitmapindiceswith1000binsandtherange-encodedbitmapindiceswith100binshaveaboutthesamesizeasthebasedata.Notethatthesizeofanuncompressedbitmapindexwith100binsisabout3timesaslargeasthebasedata.With1000bins,thesizeoftheuncompressedbitmapindexisabout30timeslarger.ThisshowsthattheWAHcompressionalgorithmworkswellonthisdataset.

High-Energy Physics Dataset

Ourseconddatasetisfromahigh-energyphysicsexperimentattheStanfordLin-earAcceleratorCenter.Itconsistsof7.6millionrecordswith10attributes.Figure7showsthesizeofthecompressedbitmapindices.Wenoticethatthesizeoftherange-encodedbitmapindexwith100binsisabouttwiceaslargeasthebasedata.Theequality-encodedbitmapindexwith1000binsisabout30%smallerthanthe

Page 199: Data Warehouses and OLAP - Concepts Architectures and Solutions

��2 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

basedata.Typically,therecordsfromthesehigh-energyphysicsexperimentsarenotcorrelatedwitheachother.Thus,itisgenerallyhardfortherun-lengthencodingtobeeffective.Thisiswhytheindexsizesforrangeencodingarerelativelylargecomparedwiththepreviousdatasets.However,equalityencodingcompressesverywellforthisphysicsdataset.Overall,weseethattheactualbitmapindexsizesareconsiderablysmallerthanthebasedatasizesandlessthanthesizesoftypicalcommercialimplementationsofB-trees(thatareoftenthreetofourtimesthesizeofthebasedata).

Time.Complexity:.Query.Response.Time

Inthissectionwearefocusingonthetwobasicencodingmethods,namelyequalityencodingandrangeencoding.Wehavechosenthesetwoencodingmethodsforthefollowing reason. Equality encoding showed to be the most space efficient method. Range encoding, on the other hand, is the most time efficient method for one-sided rangequeries(Chan&Ioannidis,1998)thatweuseinourexperiments.Analyseshaveshownthat theworstcasequeryresponse timetoansweraone-dimensionalrangequeryusingaWAHcompressedbasicbitmapindex(equality-encodedwithoutbinning)isalinearfunctionofthenumberhits(Wuetal.,2006).Theanalysesalsoindicatethattheworst-casebehaviorisforattributesfollowing

�.E+0�

�.E+08

�.E+0�

Base data EE-�000-lit EE-�000-comp

RE-�00-lit RE-�00-comp

Base data and indices for high-energy physics data set

Size

[byt

es]

Note: For an explanation of the legend, see Figure 6.

Figure 7. Size of base data compared with bitmap indices

Page 200: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

auniformrandomdistribution.Figure8plotsthequeryresponsetimeagainstthenumberofhitsforasetofqueriesontwoattributeswithdifferentattributecardinali-ties.Thedatavaluesforthetwoattributesarerandomlydistributedintherangeof[0;100]and[0;10,000]respectively.Weseethatinbothcasesthetimingmeasure-mentsfollowstraightlines,whichistheoreticallyoptimal.Intheremainderofthissectionwepresentmoretimingmeasurementstocomparethequeryresponsetimeofequality-encodedandrange-encodedbitmapindices.AllindicesarecompressedwithWAHcompression.Sincetheresultsforthetwodatasetsaresimilar,weonlyreportonthemeasurementsbasedonthelargerandthusmorechallengingcombustiondataset.Weusetheprojectionindexasthebaselineforallthecomparisons.Wenotethatthisisagoodbaselinesincetheprojec-tionindexisknownforoutperformingmanymultidimensionalindices.Inthenextsetofexperimentswemeasurethequerysizewiththequeryboxsize.Aqueryboxisahypercubeformedbytheboundariesoftherangeconditionsintheattributedomains.Wemeasurethequeryboxsizeasthefractionofthequeryboxvolumetothetotalvolumeoftheattributedomains.Ifallattributeshaveuniformdistribution,thenaqueryboxsizeof0.01indicatesthatthequerywouldselect1%ofthedataset.Wesayaqueryismoreselectiveifthequeryboxsizeissmaller.Figure9showstheresponsetime(inseconds)for2-and10-dimensionalquerieswithvariousqueryboxsizes.Forallexperimentsthequeryboxsizewaschosenrandomlyandcoversthewholedomainrange.Ingeneral,weseethatthequeryprocessingtimeforthebitmapindicesdecreasesasthequeriesbecomemoreselective.Onthe

Figure 8. Time (in seconds) to answer a one-dimensional range query using a WAH compressed bitmap index is a linear function of the number of hits

Page 201: Data Warehouses and OLAP - Concepts Architectures and Solutions

��4 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

otherhand,thequeryprocessingtimefortheprojectionindexstaysconstantastheselectivitychanges.Forallquerydimensionstherange-encodedbitmapindexwith100binsshowsthebestperformancecharacteristics,however,sometimesatthecostofalargerindex.Incasethestoragespaceisalimitingfactor,itisbettertochooseequality-encodedbitmapindiceswith1000bins(seeFigure7).AswecanseeinFigure9,theperformanceofequality-encoded bitmap indices is not significantly differentfromtheperformanceofrange-encodedbitmapindices.

Key Features in Commercial Products

Duetotheconsiderableamountofworkinvolvedinproducingandmaintainingarobust commercial software system, only the most efficient and proven indexing

Figure 9. Multidimensional queries with various bitmap indices. EE-1000: equality encoding with 1000 bins, RE-100: range encoding with 100 bins

0.�

�0

0.� 0.� 0.0� 0.00� 0.000� 0.0000�

a) Query box size of 2D queries

Tim

e [s

ec]

Project�on Index EE-�000 RE-�00

0.�

�0

�00

0.� 0.� 0.0� 0.00� 0.000� 0.0000�

b) Query box size of 10D queries

Tim

e [s

ec]

Project�on Index EE-�000 RE-�00

Page 202: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

technologiesmaketheirwayintoacommercialDBMS.Inthissection,wegiveashortreviewofthekeybitmapindexingtechnologiescurrentlyusedbyvariouswell-knowncommercialproducts.Thisisnotmeanttobeanexhaustivesurvey.Ourmaininterestistoseewhatkindofbitmapindexingtechnologyismissingandwhichtechnologymaylikelymakeanimpactoncommercialproducts.The first commercial product to use the name bitmap index is Model 204. O’Neil (1987)haspublishedadescriptionoftheindexingmethod.Model204implementsthebasicbitmapindex.Ithasnobinningorcompression.Currently,Model204ismarketedbyComputerCorporationofAmerica.Oraclehasaversionofcompressedbitmap indices in its flagship product since version 7.3. They implemented a pro-prietarycompressionmethod.Basedontheobservedperformancecharacteristics,itappearstouseequalityencodingwithoutbinning.SybaseIQimplementsthebit-slicedindex(O’Neil&Quass,1997).Usingtheter-minology defined in the second and third sections, Sybase IQ supports unbinned, binaryencoded,uncompressedbitmap indices. Inaddition, italsohas thebasicbitmapindexforlow-cardinalityattributes.IBMDB2implementsavariationofthebinaryencodedbitmapindexcalledEncodeVectorIndex.IBMInformixproductsalsocontainsomeversionsofbitmapindicesforqueriesinvolvingoneormoretables. These indices are specifically designed to speed up join-operations and are commonlyreferredtoasjoinindices(O’Neil&Quass,1997).InterSystemsCorp’sCachealsohasbitmapindexsupportsinceversion5.0.Eventhoughwedonothavetechnicaldetailsonmostofthesecommercialprod-ucts,itisgenerallyclearthattheytendtouseeitherthebasicbitmapindexorthebit-slicedindex.Strategieslikebinningandmulticomponentencodingarenotusedpartlybecausethereisnorobuststrategytoselectparameterslikethenumberofbinsorthenumberofcomponentsthatsuitsdifferentapplications.

Summary and Open Problems

Inthischapter,wereviewedanumberofrecentdevelopmentsintheareaofbitmapindexingtechnology.Weorganizedmuchoftheresearchworkunderthethreeor-thogonalcategoriesofencoding,compression,andbinning.Wealsoprovidedabriefoverviewofcommercialbitmapindeximplementationsbymajorvendors.Most of the indexing methods reviewed were designed to efficiently answer mul-tidimensional range queries. However, they are also efficient for other types of queries,suchasjoinsonforeignkeysandcomputationsofaggregates(O’Neil&Quass,1997).Despitethesuccessofbitmapindices,thereareanumberofimportantquestionsthatremain to be addressed. For example, is there an efficient bitmap index for similar-

Page 203: Data Warehouses and OLAP - Concepts Architectures and Solutions

��6 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ityqueries?Howcanweautomaticallyselectthebestcombinationofencoding,compressionandbinningtechniques?Howcanweusebitmapindicestoanswermoregeneraljoinqueries?Researchworkonbitmapindicessofarhasconcentratedonansweringqueriesef-ficiently, but has often neglected the issue of updating the indices. Clearly, there is a need to update the indices as new records are added. Efficient solutions to this issuecouldbethekeytogainawideradaptationofbitmapindicesincommercialapplications.

References

Antoshenkov,G.(1994).Byte-aligned bitmap compression (Tech.Rep.,U.S.Patentnumber5,363,098).OracleCorp.

Antoshenkov,G.,&Ziauddin,M.(1996).QueryprocessingandoptimizationinORACLERDB.VLDB Journal, 5,229-237.

Berchtold,S.,Boehm,C.,&Kriegl,H.-P.(1998).Thepyramid-technique:Towardsbreakingthecurseofdimensionality.SIGMOD Record, 27(2),142-153.

Chan,C.-Y.,&Ioannidis,Y.E.(1998,June).Bitmapindexdesignandevaluation.International Conference on Management of Data, SIGMOD,Seattle,Wash-ington(pp.355-366).ACMPress.

Chan, C.-Y., & Ioannidis, Y. E. (1999, June). An efficient bitmap encoding scheme forselectionqueries.International Conference on Management of Data, SIG-MOD,Philadelphia(pp.215-226).ACMPress.

Chaudhuri,S.,&Dayal,U.(1997).AnoverviewofdatawarehousingandOLAPtechnology.ACM SIGMOD Record, 26(1),65-74.

Chaudhuri,S.,Dayal,U.,&Ganti,V.(2001).Databasetechnologyfordecisionsupportsystems.Computer, 34(12),48-55.

Comer,D.(1979).TheubiquitousB-tree.Computing Surveys, 11(2),121-137.FastBit.(2005).RetrievedMay31,2006,fromhttp://sdm.lbl.gov/fastbitGaede,V.,&Guenther,O.(1998).Multidimensionalaccessmethods.ACM Com-

puting Surveys, 30(2),170-231.Johnson,T.(1999,September).Performancemeasurementsofcompressedbitmap

indices.InInternational Conference on Very Large Data Bases (VLDB),Ed-inburgh,Scotland(pp.278-289).MorganKaufmann.

Keim,D.,&Hinneburg,A.(1999,September).Optimalgrid-clustering:Towardsbreakingthecurseofdimensionalityinhigh-dimensionalclustering.InPro-

Page 204: Data Warehouses and OLAP - Concepts Architectures and Solutions

Bitmap Indices for Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ceedings of the International Conference on Very Large Data Bases (VLDB), SanFrancisco(pp.506-517).MorganKaufmann.

Kiyoki,Y.,Tanaka,K.,Aiso,H.,&Kamibayashi,N.(1981,May).Designandevalu-ationofarelationaldatabasemachineemployingadvanceddatastructuresandalgorithms.PaperpresentedattheSymposium on Computer Architecture,LosAlamitos,California(pp.407-423).IEEEComputerSocietyPress.

Knuth,D.E.(1998).The art of computer programming(vol.3).Addison-Wesley.Koudas, N. (2000, November). Space efficient bitmap indexing. In Proceedings of

the Conference on Information and Knowledge Management (CIKM),McLean,Virginia(pp.194-201).ACMPress.

O’Neil,P.(1987,September).Model204architectureandperformance.Workshop in High Performance Transaction Systems,Asilomar,California(pp.40-59).Springer-Verlag.

O’Neil,P.(1997).Informixindexingsupportfordatawarehouses.Database Pro-gramming and Design, 10(2),38-43.

O’Neil,P.,&Quass,D.(1997,May).Improvedqueryperformancewithvariantindexes.InProceedings of the International Conference on Management of Data (SIGMOD 1997),Tucson,Arizona(pp.38-49).ACMPress.

Rotem,D.,Stockinger,K.,&Wu,K.(2005a,September).OptimizingI/Ocostsofmultidimensionalqueriesusingbitmapindices.InProceedings of the Inter-national Conference on Database and Expert Systems Applications (DEXA),Copenhagen,Denmark(pp.220-229).SpringerVerlag.

Rotem,D.,Stockinger,K.,&Wu,K.(2005b,November).Optimizingcandidatecheckcostsforbitmapindices.InProceedings of the Conference on Informa-tion and Knowledge Management (CIKM),Bremen,Germany(pp.648-655).ACMPress.

Stockinger,K.,Shalf,J.,Bethel,W.,&Wu,K.(2005,June).DEX:Increasingthecapability of scientific data analysis pipelines by using efficient bitmap indices to accelerate scientific visualization. In Proceedings of the International Con-ference on Scientific and Statistical Database Management (SSDBM), SantaBarbara,California(pp.35-44).IEEEComputerSocietyPress.

Stockinger,K.,Wu,K.,&Shoshani,A.(2002).Strategiesforprocessingadhocqueriesonlargedatasets.InProceedings of the International Workshop on Data Warehousing and OLAP (DOLAP), McLean,Virginia(pp.72-79).

Stockinger,K.,Wu,K.,&Shoshani,A.(2004).Evaluationstrategiesforbitmapindiceswithbinning.InProceedings of the International Conference on Da-tabase and Expert Systems Applications (DEXA),Zaragoza,Spain(pp.120-129).Springer-Verlag.

Page 205: Data Warehouses and OLAP - Concepts Architectures and Solutions

��8 Stockinger & Wu

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

TeraScaleCombustion.(2005).TeraScale High-fidelity simulation of turbulent com-bustion with detailed chemistry.RetrievedMay31,2006,fromhttp://www.scidac.psc.edu

Wong,H.K.T.,Liu,H.-F.,Olken,F.,Rotem,D.,&Wong,L.(1985,August).Bittransposed files. In Proceedings of the International Conference on Very Large Databases (VLDB),Stockholm,Sweden(pp.448-457).MorganKaufmann.

Wu,K.,Otoo,E.J.,&Shoshani,A.(2002,July).Compressingbitmapindexesforfastersearchoperations.InProceedings of the International Conference on Scientific and Statistical Database Management (SSDBM),Edinburgh,Scot-land(pp.99-108).ComputerSocietyPress.

Wu,K.,Otoo,E.J.,&Shoshani,A.(2004,September).Ontheperformanceofbitmapindicesforhighcardinalityattributes.InProceedings of the Interna-tional Conference on Very Large Data Bases (VLDB),Toronto,Canada(pp.24-35).MorganKaufmann.

Wu,K.,Otoo,E.,&Shoshani,A. (2006).An efficient compression scheme for bitmap indices(Tech.Rep.LBNL-49626).ACMTransactionsonDatabaseSystems(TODS).

Wu,M.-C.,&Buchmann,A.P.(1998,February).Encodedbitmapindexingfordatawarehouses.InProceedings of the International Conference on Data Engineer-ing (ICDE),Orlando,Florida(pp.220-230).IEEEComputerSocietyPress.

Page 206: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.VIII

Indexing.in.Data.Warehouses:

Bitmaps.and.BeyondKaren C. Davis

University of Cincinnati, USA

Ashima GuptaUniversity of Cincinnati, USA

Abstract

Bitmap indexes (BIs) allow fast access to individual attribute values that are needed to answer a query by storing a bit for each distinct value and tuple. A BI is defined for a single attribute and the encodings are based solely on data values; the property map (PMap) is a multidimensional indexing technique that precomputes attribute expressions for each tuple and stores the results as bit strings. In order to deter-mine whether the PMap is competitive with BIs, we conduct a performance study of the PMap with the range encoded bit sliced index (REBSI) using cost models to simulate storage and query processing costs for different kinds of query types. We identify parameters that have significant effect on index performance and determine situations in which either index is more suitable. These results could be useful for improving the performance of an analytical decision making system.

Page 207: Data Warehouses and OLAP - Concepts Architectures and Solutions

�80 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction

Adatawarehouseisarepositoryofinformationcollectedfromdifferentsources.Queryingofdatawarehousesfordecision-makinginareassuchassalesandmar-ketingplanningisreferredtoasonlineanalyticalprocessing(OLAP).Inthewrite-once-read-manyenvironmentofOLAPapplications,multidimensionaldataanalysisisnowincreasinglyusedfordecisionsupportsystems(DSS).ComplexDSSqueriesareoftensubmittedinteractivelyandreducingtheirresponsetimeisacriticalissueinthedatawarehousingenvironment(Vanichayobon&Gruenwald,1999;Jurgens&Lenz,2001).Bitmapindexesarewidelyusedforindexingwarehousedata.Abitmapindex(BI)allowsfastaccesstotuplesbasedonvaluesofattributes.Bitmapindexesconsumeonlyafractionofthesizeoftheindexeddataandprovidedramaticperformancegains.BooleanoperationssuchasAND,ORandNOTareextremelyfastforbitmapvectors,alsocalledbitmapsorbit-vectors(O’Neil&Quass,1997).Bitmapsindicatewhetheranattributeinatupleisequalto,greaterthanorlessthan(depending upon the type of BI) a specific value or not. The length of a bit-vector isequaltothecardinalityoftheindexedtable.Thepositionofabitinabit-vectordenotesthepositionofatupleinthetable.Forexample,asimplebitmapindex(SBI)onanattributestatus,withdomain{backorder,shipped},resultsintwobitmapvectors,sayBbandBs.ForBb,thebitissetto1ifthecorrespondingtuplehasthevalue“backorder”fortheattributestatus,otherwisethebitissetto0.SimilarlyforBs,thebitissetto1iftheassociatedtuplehasthevalue“shipped”fortheattributestatus,otherwisethebitissetto0.Foranotherattribute,sayproduct-categoryhavingvalues from 1-5, there is a bitmap vector corresponding to each of the five values, sayB1-B5.Tuplesthathaveproduct-categoryvalueas1havethebitcorrespondingtobit-vectorB1set;therestofthebitsforthattupleare0.Table1showsanSBIonstatus and product-category for 5 tuples with two bitmap vectors for status and five forproduct-category.Theseindexescanbeinterpretedasfollows:tuplenumber2

Table 1. Example of two simple bitmap indexes

statusproduct-category Tuple Bs Bb B1 B2 B3 B4 B5

1 1 0 0 1 0 0 02 1 0 0 0 0 0 13 1 0 0 0 0 1 04 0 1 1 0 0 0 05 1 0 0 0 1 0 0

Page 208: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses �8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

correspondstoashippedorder(Bsisset)withproduct-category5(B5isset).ToillustratequeryprocessingwithanSBI,considerasimpleSQLquerythatretrievesalltuplescorrespondingtoshippedordersforproductcategory5:

SELECT*FROMInventoryWHEREstatus=“shipped”ANDproduct-category=“5”

InordertoevaluatethisqueryusingtheexampleSBIs,aqueryoptimizertakesthebitmapsfor“status=shipped”and“product-category=5”andperformsalogicalANDoperation.Tuple2inTable1istheonlytupleinthequeryanswer.Wesurveybitmap indexing techniques in thenextsection. Thenweproposeanovelmultidimensionalindexingtechniquethatprecomputesattributeexpressionsfordataitemsandstorestheresultsasbitstrings.Westudyperformanceissuesforthistechniqueandacomparablebitmapindexandrecommendscenarioswhereonemaybepreferabletotheother.Weconcludewithguidelinesforimprovingqueryprocessingperformanceforcomplexrangequeries.

Background

Bitmapindexesaredesignedfordifferentquerytypesincludingrange,aggregationandjoinqueries.Figure1showstreediagramsofbitmapindexes,whichweclas-sifyintothreecategoriesbasedontheirmainfeatures.Figure1(a)showsbitmapindexingmethodsthatusethesimplebitmapindex(SBI)representationdescribedintheprevioussection.Thetechniquesthatuseclusteringofattributevaluesare

Figure 1. Classification of bitmap indexing techniques

Range-basedBI(RBBI)

SimpleBI(SBI)

Applications

DynamicBI(DBI)

Clustering

KoudasBI(KEBI)

BitmapJoinIndex(BJI)

(a)

Bit-SlicedIndex(BSI)(UniformorNon-UniformBase)

EqualityEncoded(EEBSI)

RangeEncoded(REBSI)

(c)

EncodedBI(EBI)Total-OrderPreserving

Encoding(TOPE)Range-based

Encoding(RE)(b)

HierarchyEncoding(HE)

Groupset(GI)

Page 209: Data Warehouses and OLAP - Concepts Architectures and Solutions

�82 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

groupedinonecategory.Theothercategoryconsistsoftechniquesthatarebasi-callyapplicationsofSBI.Figure1(b)showsencodedbitmapindex(EBI)techniquesthatusebinaryencodingalongwithamappingtableandretrievalfunctions.EachattributeisencodedinsuchawaythatthenumberofbitmapvectorsretrievedtoansweraqueryisreducedcomparedtotheSBI.Bit-slicedindextechniquesareshowninFigure1(c).Theyarebasedontheideaofattributevaluedecomposition,thatis,decompositionofanattributevalueindigitsaccordingtosomebase,eitheruniformornon-uniform.Theycanbeeitherrangeorequalityencoded.BIscomparabletothenoveltechniqueintroducedinthethirdsectionarediscussedinfurtherdetailbelow.Weselectonetechniqueforcomparisoninthefourthsectionbasedonthreecriteria:suitabilityforprocessingrangequeries,publisheddesignalgorithmsfortheindex,andresearchresultsindicatingthatthetechniqueiscom-petitivewithotherknowntechniques.Notethatbitmapcompressiontechniquesarenotconsideredhere;theyarediscussedinthefutureworksection.

Simple.Bitmap.Index

Thebasicideaofasimplebitmapindex(alsocalledPureBI)(O’Neil&Quass,1997)istouseabit(0or1)toindicatewhetheranattributeinatupleisequaltoa specific value or not. The sparsity of the bit-vectors increases with increasing cardinalityoftheindexedattributeandnumberoftuplesinthedatabase,resultinginpoorspaceutilizationandhighprocessingcost.Hence,asthecardinalityoftheindexedattributeandthedatabasesizeincreases,bothtimeandspacecomplexityofbuildingandmaintaininganSBIrapidlybecomeshigher (Wu&Buchmann,1998).Thus,anSBIisbestfordatabasetableswithasmallnumberofrecordsandsmallcardinalityattributes.Forthesereasons,SBIsarenotconsideredinourper-formancecomparison.

Applications.of.Bitmap.Indexes

Wedescribetwotechniques,dynamicbitmapindexesandbitmapjoinindexes,thatarereferredtoasbitmapindexesintheliteraturebutarereallyapplicationsofBIs.TheycanusetheSBIoranyotherkindofBIthatwepresentinthischapter;wediscussthemhereforthesakeofcompleteness.Thedynamicbitmapindex(DBI)(Sarawagi,1997)isatemporarystructurethatisbuiltfromapermanentindexasneededbyaqueryoptimizertoincludeoreliminaterecordsforselection. It isconstructeddynamicallyfromaverticallypartitionedtableinwhicheachcolumnstoresacompressedrepresentationofthevaluesinthe

Page 210: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses �8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

correspondingattributecolumn.Forexample,iftherearendifferentvaluesofanattribute,theyaremappedtocontinuousintegersandeachvalueisrepresentedbylognbits,whichrepresentsitsintegermap.Whenapredicaterequiresasubsetofvaluesinthatcolumn,therequiredvaluesareconvertedtotheirintegermapsandrepresentedinanin-memoryarrayorhashtable.Thecolumnpartitionisscannedandforeachvalue,thein-memoryarrayisprobed.Dependingonwhetheramatchisfoundornot,a1ora0isstoredatthecorrespondingrowpositionofabitmap.Thisprocessisrepeatedforpredicatesonothercolumns.Attheendofscanningallqueriedcolumns,individualbitmapsareobtained,whichcanbeANDedorORedresultinginabitmapwith1atrowpositionsthatsatisfyallpredicates.Tuplescor-respondingtotheserowpositionscanberetrieved.Abitmapjoinindex(BJI)(Vanichayobon&Gruenwald,1999)isbuiltbycreatingabitmapindexonatableTbasedonasinglecolumnAoftableS,whereAisajoinattribute;hence,theactualjoinneednotbeperformed.Itisusuallyusedwithlowcardinalitydata.

Koudas’ Encoded Bitmap Index

Koudas(2000)proposesatechniquetoindexlargecardinalityattributesusinglessstoragespacecomparedtoSBIs,takingintoaccountboththequeryanddatadis-tributionoftheattributeinstances.WecallthistechniqueKoudas’encodedbitmapindex(KEBI).Theideaistoencodesequencesofattributevaluestogetherinthebitmapindex,asopposedtocreatingonebitmapperattributevalue.Theinformationreturnedfromthebitmapmaybeasupersetofaqueryanswer.Table2showsanexampleofthisapproach.TheattributeWorkYears has five distinct values. If they are encoded separately as in an SBI, it results in five bitmaps. By encoding more thanonevalueinabitmap,thenumberofvectorsisreducedtotwo.Attributeval-ues{1,2}and{3,4,5}arejointlyencoded.Aqueryreferencingattributevalue2retrievestupleshavingtheattributevalue1alongwiththeoneshavingthevalue2.Therefore,itisvitaltominimizethenumberoffalsehitsthateachbitmapreturns,since these tuples have to be retrieved and filtered out in a post-processing phase. TheessentialideaisthesameastheSBIinthatabit(1or0)isusedtoindicate

Table 2. Koudas’ encoded bitmap index

A {1,2}

{3,4,5}

2 0 14 0 11 1 05 0 13 1 0

Page 211: Data Warehouses and OLAP - Concepts Architectures and Solutions

�84 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

whether an attribute in a tuple is equal to a specific value (here, a set of values) or not.Thechoiceofattributevaluestojointlyencodedependsonthefrequencyofaccessofeachattributevalueaswellasthefrequencyofoccurrenceofthevalueintheattributeinstances.Themutuallyexclusiverangeofconsecutiveattributevaluesencodedtogetherinthesamebitmapiscalledtherangeofthatbitmap.TheauthorcomparesKEBIwithastrategyinwhichtheattributevaluesaredividedintoapproximatelyequallengthranges.ThenumberoffalsehitsislargeforKEBIunderuniformdatadistribution,butreducessharplyastheskewindatadistributionincreases.AscomparedtotheSBI,KEBIsavesindexstoragespace,reducingthenumber of index pages retrieved, although filtering excess tuples requires additional processingtimeandcouldincreasethenumberofdatapagesretrieved.WedonotconsiderKEBIforcomparisonhereasithasonlybeenstudiedforequalityorpointqueriesandDSSqueriestypicallyincludecomplexrangequeries.

Range-Based.Bitmap.Indexing

SBIs can cause significant storage overhead if the attributes to be indexed have highcardinality.Thisisthemotivationforrange-basedbitmapindexing(RBBI)(Wu&Yu,1998).InRBBI,theattributevaluesarepartitionedintoasmallnumberofrangesandabitmapvectorisconstructedtorepresenteachrangeandnoteachdistinctvalue.Abit(1or0)isusedtoindicatewhetheranattributeinatupleiswithin a specific range or not. Unlessthedistributionoftheattributevaluesisknown,rangescanbeunevenlypopulated resulting inhighlyunbalancedquery access times.RBBIutilizes thedistributionofattributevaluesinthedatatoconstructarange-basedbitmapindexforhighcardinalityattributeswithskew.Itusesadynamicbucketexpansionandcontraction approach in which data are first scanned into the buffer to construct the

Table 3. Range-based bitmap indexing

BucketNumber

RangesonAge

NumberofPersons Tuple [1,16) [16,28) [28,40) [40,60) [60,65)

1 [1,16) 21 1 1 0 0 0 0

2 [16,28) 22 2 0 0 0 1 0

3 [28,40) 21 3 0 0 1 0 0

4 [40,60) 22 4 0 1 0 0 0

5 [60,65) 23 5 0 0 0 0 1

(a)PopulationofEachBucket (b)BitmapRepresentationofExampleTuples

Page 212: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses �8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

bucketrangesbycountingthedatapointsfallingintoeachbucket.Ifthebucketgrowsbeyondathreshold,itisexpandedintosmaller-rangebuckets.Adjacentbucketsare then combined into the final required number of buckets that are approximately balanced.Thebitmapvectorsarebuiltwithanotherscanofthedata.Table 3(a) shows five nearly-equally populated bucket ranges on the attribute Age, constructed by the RBBI technique. The range-based bitmap index for the first 5 tuplesofadatabasewith109tuplesisshowninTable3(b).Notethattherecordsarenearlyevenlydistributedinthe5buckets.Therangesarecontinuous-valuedintervalsandmutuallyexclusive.Thus,RBBIcaneffectivelyanswerrangeandpointqueries,thoughitresultsinretrievalofexcesstuplessinceallthetupleswithinthequeriedrangeareretrievedandtheexcesshasto be filtered out. While RBBI is designed for range queries, it is not chosen for the performancestudydiscussedinthischapter;wechooseaBSItechniquebecauseitsdevelopersgivecompellingresultsregardingitscompetitiveperformance.

Encoded.Bitmap.Index

Theencodedbitmapindex(EBI)(Wu&Buchmann,1998)hasbeenproposedtoindex large cardinality domains since they are not efficiently indexed by SBI. The basicideaistoencodeeachvalueoftheattributedomainasabinarynumber,ratherthanhaveabit-vectorforeachvalueasinanSBI.Eachdistinctvalueofanattributeisencodedusinganumberofbits,eachofwhichisstoredinabitmapvector.Forexample,ifattributeAhas12,000differentvalues,thenanSBIhas12,000bitmapvectors.Encodedbitmapindexingusesonlylog212000,i.e.,14bitmapvectorsandamappingtable.AlookuptablestoresthemappingbetweenAanditsencodedrepresentation.CasesforNULLvaluesornon-existingtuplesareencodedtogetherwithotherdomainvaluessoseparateexistencevectorsarenotrequired,asinthecaseofSBIs.AnEBIonacolumnAoftableTconsistsofasetofbitmapvectors,

Table 4. Encoded bitmap indexing

A B2 B1 B0 NULL 000 fa B2’B1B0’

b 0 1 1 NotExist 001 fb B2’B1B0

a 0 1 0 a 010 fc B2B1’B0’

d 1 0 1 b 011 fd B2B1’B0

c 1 0 0 c 100

NULL 0 0 0 d 101

(a)Bitmapvector (b)MappingtableforA (c)Retrievalfunctions

Page 213: Data Warehouses and OLAP - Concepts Architectures and Solutions

�86 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

aone-to-onemappingandasetofretrievalBooleanfunctions.Table4showsanEBIforanattributeAwithdomain{a,b,c,d}.NULLandnon-existingvaluesareencodedwiththedomain,sothatthetotalnumberofdomainvaluesis6(NotExist,NULL,a,b,c,andd.)Thenumberofbit-vectorsrequiredislog26=3.To retrieve data, a Boolean function is defined for each value. If a value v with a domainofsizekisencodedasb1b0(bi{0,1},i=0tolog2k -1),thentheretrievalfunction for v is defined as x1x0,wherexi=Biifbi=1,otherwisexiisequaltothenegationofBi,i.e.,xi=Bi’.Thenumberofbitmapvectorsaccessedisminimizedas a result of a well-defined encoding.ComparedtoSBI,theEBIimprovesspaceutilizationandsolvessparsityproblems.It performs efficiently with wide-range queries. In an environment where selection patterns can be pre-defined, the main idea of EBI is to establish a well-defined en-coding so that time efficiency can be improved without sacrificing space efficiency. EncodingschemesarecrucialsinceBooleanoperationscanbeperformedontheretrievalfunctionsbeforeretrievingthedata,reducingthetotalnumberofopera-tions performed and bitmap vectors accessed. Defining a good encoding scheme is a difficult and open problem. In addition, EBI performance degrades for equality queriessinceallthebitmapvectorshavetobesearched.Duetothesedrawbacks,wedo not consider EBI for further comparison here. Variations of the EBI for specific scenarios are given by Wu and Buchmann (1998) and listed in our classification in Figure1underEBItechniques.

Bit-Sliced.Index

Abit-slicedindex(BSI)(O’Neil&Quass,1997;Chan&Ioannidis,1998)isasetofbitwiseprojectionsofanattribute.BSIsaretotal-orderpreserving,hencetheyare suitable for representing numeric (fixed-point) or ordinal types of attributes, andareespeciallygoodforwide-rangesearches.ThedesignspaceofaBSIisde-fined by two factors, attribute value decomposition and encoding scheme (Chan & Ioannidis,1998).The first factor, attribute value decomposition (AVD), defines the arithmetic to representthevaluesofanattribute.Itisthedecompositionofanattribute’svaluesindigitsaccordingtoachosenbase.Forexample,124canbedecomposedinto<1, 2, 4> according to base <10, 10, 10>. The second factor that defines a BSI is theencodingscheme.Considertheithcomponentofanindexwithabasevaluebi.Therearetwoschemestodirectlyencodethecorrespondingvaluesvi(0<=vi<=bi–1)inbits,equalityencodingandrangeencoding.Inequalityencoding,thebitin a component is set if equality condition is satisfied and there are bibits,oneforeachpossiblevalue.Therepresentationofvaluevihasallbitssetto0,exceptfor

Page 214: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses �8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thebitcorrespondingtovi,whichissetto1.Thus,anequalityencodedbit-slicedindex(EEBSI)componentwithbasebiconsistsofbibitmaps.Inrange-encoding,therearebibits(oneforeachpossiblevalue)setsoastosatisfyaninequalityconditionbetweenthevaluerepresentedbythemandthedecomposedattributevalueofthecorrespondingrecordforthatcomponent.Therepresentationofvaluevihasthevirightmost(orleftmost)bitssetto0andtheremainingbits(startingfromtheonecorrespondingtovi,andtotheleft(orright))aresetto1.IntheexampleshowninTable5,thebitmapsarelessthanorequaltoencoded.Fortheattributevalue124,1isrepresentedbycomponent3,2bycomponent2and4bycomponent1.Therepresentationof1hasonerightmostbitsetto0andtherestsetto1,therepresentationof2hastworightmostbitssetto0andtherestsetto1,andsoon.Intuitively,eachbitmapBivihas1inalltherecordswhoseithcomponentvalueislessthanorequaltovi.SincethebitmapBibi–1hasallbitssetto1,itdoesnotneed tobe stored, so a range-encodedbit-sliced index (REBSI) componentconsistsof(bi–1)bitmaps.Forthedecimalbasealldigitsarelessthanorequalto9,thusbit9ofallcomponentsissetandcanbeignored,asshowninTable5.Non-binary, uniform base BSIs are often less efficient in both space and time than non-uniformbaseBSIswiththesamenumberofcomponents(Chan&Ioannidis,1998).ForBSIswithauniformbase,asthemagnitudeofthebaseincreases,theindexrequiresmorespacebutperformsbetter.Theeffortofperformingrangere-trievalcanbereducedifalargernumberofbitmapsarestored,forexample,base10insteadofbase2.Weconsider range-encodednon-uniformbasebit-sliced index (REBSI) for ourperformance comparison, as it is one of the most efficient indexes to answer range as well as equality queries and has clearly defined design algorithms (Chan & Ioan-nidis,1998).Itsperformancehasbeencomparedwiththatoftree-basedindexesandisshowntobebettersuitedforadatawarehousingenvironment(Jurgens&Lenz,2001). It is more efficient than the equality-encoded BSI in the case of range as well asequalityqueries(Chan&Ioannidis,1998).SincerangeselectionsareacommonclassofqueriesinOLAP,wechoosethistechniqueforourperformancestudy.

Table 5. A range-encoded decimal (base-10) bit-sliced index

A B� B� B� B� B0 B� B� B� B� B� B0 B� … B� B� B� B� B� B0

124 1 1 … 1 1 0 1 1 … 1 1 0 0 1 … 1 1 0 0 0 0

Component3 Component2 Component1

Page 215: Data Warehouses and OLAP - Concepts Architectures and Solutions

�88 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Beyond.Bitmaps:.The.Property.Map

Therearetwocharacteristicsofbitmapindexesthatwemodifyinordertoconsideranewkindofbitmap.Oneisthatbitmapindexesgenerallycreateencodingsbasedonvaluesonly;weproposeencodingsbasedonvaluesanddrivenbyapplicationknowledge,e.g.,queries.Inthisrespect,ourtechniqueissimilartoEBI(Wu&Bu-chmann,1998),however,howtodesigntheencodingofanEBIisanopenquestion.Thesecondisthatbitmapindexesaregenerallysingleattribute-only;weproposeasolutionthatsupportsmulti-attributequeriesdirectly.RBBI(Wu&Yu,1998)hasasimilarnotionofrange-encoding,butourtechniquesupportsadditionalencodingschemes.ThenoveltechniqueintroducedhereiscalledaPropertyMap.Thebasicconcept is defined and illustrated below and then its performance is compared to theREBSItechniqueinthefollowingsection.Apropertymap(PMap) defines properties on each attribute depending on knowl-edgeoftheapplication,suchasaknownsetofqueries.Thevalueofeachpropertyiscomputedasabitstringforeachdatainstance,andtheseareconcatenatedtoformapstring.ToillustrateaPMap,consideranexamplerelationInventorywithattributesquantity,status,andproduct-categorywithaPMaphavingthefollowingproperties:

• Property.1:..Rangeonquantity;containsrangeintervalsonthequantityat-tributefrom20-29,30-39,40-49,and49-59.Eachintervalisrepresentedbyabitstring.Forexample,theinterval20-29isrepresentedby00,30-39by01,40-49by10,and50-59by11.Thus,Property1requires2bits.

• Property.2:Enumeratedonproduct-category;hastheenumeratedvaluesoftheproduct-categoryattribute(1,2,3,4and5).Abitstringrepresentseachvalue.Therefore,1isrepresented000,2by001,3by010,4by011,and5by100.Therefore,thispropertyrequires3bits.

• Property.3:.Booleanonstatus=“shipped,”propertyvalueistrue(or1)whenarecord’sattributestatusis“shipped”andfalse(or0)otherwise.Thispropertyrequires1bit.

Thepstringsforthisexampleare6bitslong;twobitsforProperty1,threebitsforProperty2,andonebitforProperty3.Table6shows5recordsofanInventorytablewiththecorrespondingvaluesforeachpropertyandtheresultingpstring.Theproper-tiesareconstructedbasedonsomeknowledgeabouttheapplication(e.g.,frequentlyexecutedqueries),andcanbeusedtoanswermulti-attributequeriesdirectly.TheexamplePMapgivenhereishandcraftedinordertoillustrateterminologyandconcepts. In practice, designing an efficient PMap is not a trivial task. We have

Page 216: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses �8�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

proposedalgorithmsthatrelyonheuristicstoreducethedesignspaceandcreateefficient PMaps and are currently implementing them in an automated design tool (Dariraetal.,2006).Oneexampleofadesignheuristicishowwedeterminethedetailsofrangeproperties.Wegroupallofthepredicatesoverasingleattributeinafrequentquerysettogetherandcreaterangeintervalsbasedonnumericconstantsthatappearininequalitycomparisons.WecreateBooleanpropertiesonequalitypredicatesandforattributeexpressionsthatdonotevaluatetonumericvalues.Enu-meratedpropertiesarecreatedforattributeswherethenumberofbitstorepresentrangesovertheattributeexceedslog2ofthenumberofvaluesinthedomain(sincethisisthesizeofanenumeratedpropertypstring.)Combinationsofpropertiesandtheirorderingareevaluatedbasedonreducingthenumberofexcesstuplesthatwouldberetrievedwhenevaluatingthequeryset.InordertoillustratehowPMapsareusedforqueryevaluation,considerthequeryusedearlier:

SELECT*FROMInventoryWHEREstatus=“shipped”ANDproduct-category=“5”

Thequeryprocessordeterminesthepmask,whichisobtainedbysettingthebitscorrespondingtothepropertiescoveringthequerypredicatesto1(statusandprod-uct-category)andsettingallotherbitsto0(quantity),yieldingthepmask001111in this case. The pfilter is obtained by setting all bits corresponding to properties coveringthequerypredicatetothedesiredvalue,andsettingallotherbitsto0.The pfilter here is 001001, since the queried product-category value is equal to 5 (propertyvalue100)andstatusvalueisequalto“shipped”(propertyvalue1.)Thetuples for which the filter formula “pstring AND pmask = pfilter” is TRUE are in the result set. For tuple 2 in Table 6, the filter formula evaluates to TRUE since the pstring (001001) ANDed with 001111 (pmask) is equal to 001001 (pfilter). Since no other tuple in this example satisfies the filter formula, only tuple 2 is in the result set.Toanswerarangequerysuchas“product-category>5,”theequalssigninthefilter formula is changed to greater than.

Tuple.ID (qty,.prod-cat,.status) Property.1 Property.2 Property.3 pstring

1 (49,2,s) 01 001 1 010011

2 (24,5,s) 00 100 1 001001

3 (52,4,s) 11 011 1 110111

4 (37,1,b) 01 000 0 010000

5 (28,3,s) 00 010 1 000101

Table 6. Example of property strings (pstrings)

Page 217: Data Warehouses and OLAP - Concepts Architectures and Solutions

��0 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Detailed definitions, algorithms, and cost models for storage and query process-ingareintroducedforPMaps(Guptaetal.,2002)andREBSI(Chan&Ioannidis,1998;Jurgens&Lenz,2001).Thenextsectiondiscussessimulationstocompareperformanceandtheirresults.Observationsandanalysisoftheperformancere-sultsfollow.

Performance.Study

Inthissection,themethodologyforconductingsimulationsandperforminganaly-sisisdescribed,followedbyadiscussionofsomerepresentativeresults.Generalobservationsoverallofthesimulationresultsareofferedinconclusion.

Methodology

Thesimulationmethodologyincludesasyntheticquerybenchmarkthatformsthebasisofourinvestigationalongwithparametersthatarevariedtostudytheimpactofdifferentdatabaseenvironments.Theanalysisisbasedonobservationsofindexpageretrievalsandrelativeperformanceforeachsetofqueriesderivedfromthebenchmark.Componentsofthemethodologyaredescribedinthethreesectionsbelow.

1. Queries:.Thesetquerybenchmark(Gray,1993)isdesignedtomeasuretheperformanceofsystemsthatstrategicallyanalyzedatarepositoriesincommer-cialenterprises.Computerresourceusagebysuchqueriescanbeextremelyhigh,andhenceweusethisbenchmarktocomparetheperformanceofPMapindexingandREBSI.Thesetquerybenchmarkhasthefollowingkeychar-acteristics.• The queries for the benchmark are specified in SQL, and the data used is

representativeofrealapplications.• Thesequeriesarechosentospanthetasksperformedbydifferentstrategic

dataapplications(e.g.,documentsearch,directmarketing,anddecisionsupport).

• The benchmark specifies measurements for a wide range of selectivity valueswithineachquerytype.

ThedatabasehasasingletablecalledBENCHthatcontains1millionrowsof200byteseach(224withoverhead).Besidesusingthegivensizetomeasureperformanceforlargedatabases,wealsouseasizeof50,000rowstomea-

Page 218: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

suretheperformanceforasmallerdatabasesize.Eachofthe13attributeshasintegervaluesrangingfrom1toitscardinality,whichisrepresentedintheattributename.ThusK2has2values:1and2,K4has4values:1,2,3and4,K100khas100,000values:1,2,…,100,000.Oneindexedattribute,KSEQ,isaclusteredprimarykey,withvalues:1,2,…,1,000,000.Theremainingtwelveattributesareunorderedandoutofthese,wedonotconsiderK40,K250kandK500kinourselectedqueriestolimitthenumberofqueries.Theattributesincluded for each query set are sufficient to provide a variety of cardinality andselectivityvaluesforthatset,limitingthenumberofexperimentsatthesametime.Inoursimulations,weassumeuniformdatadistributionandthisisconsistentwith theBENCHtable.Weidentifyasubsetof thesetquerybenchmarkthatconsistsofdocumentsearchanddirectmarketingqueries.Weomitthemanagementreportingqueriesaswedonottakeintoconsiderationaggregationandjoinqueriesinourstudy.Theperformancestudyherefocusesonselectioncostsandwesimulatetheselectionconditions(SQLWHEREclause)ineachchosenquery.

Thetotalnumberofqueriesthatweconsideris43,andfromthesewecreatesubsetsbasedondifferentcriteria,suchascardinalityofattributesandqueryselectivities.Thesixquerysetsarebasedonqueriesembodyinghighcardinal-ityattributes,veryhighcardinalityattributes, lowcardinalityattributes, lowselectivity,highselectivity,andmixedqueries.Foreachofthesequerysets,wevary input parameters to study their impact, while we fix other factors to limit thenumberofsimulations.ThevaluesofparametersaregiveninTable7.

Apart from data and system specific parameters, we define a parameter called scalingfactor(sf),tofacilitatethecomparisonbetweenPMapandREBSI.WeconsiderREBSIsthataretime-optimalunderagivenspaceconstraint(Chan&Ioannidis,1998).REBSIsoccupyalargeamountofdiskspacebecauseaseparateREBSIhastobecreatedforeachattributetobeindexed,somorespaceisallottedtoitthanspaceoccupiedbythecorrespondingPMap.ThespaceconstraintforREBSIisequaltothespaceoccupiedbythecorrespond-ingPMapmultipliedbyascalingfactor.Forexample,ascalingfactorof2meansthatthebitmapindexoccupiestwicethespaceusedbythePMap.TheminimumscalingfactoristhesmallestvalueforwhichaREBSIcorrespond-ingtothePMapcanbeconstructed.WevaryscalingfactorstocomparePMapperformancewithfasterREBSIs;greaterstorageallocationreducesthenumberofbitmapsthatneedtobescannedtoansweraquery.Apartfromtheminimumscalingfactor(sf_min)neededtocreateaREBSI,weconsideroneortwoothersuitablesfvaluestocreateREBSIwithincreasedspaceconsumptionbutfasterperformance.Inotherwords,tocreateaREBSIwiththesameattributesasthePMaprequiresfourtimesthespace(sf=4)ofthePMap.SincethatisthebaselineperformanceforREBSI,wealsocreateaREBSIthatis10timesthe

Page 219: Data Warehouses and OLAP - Concepts Architectures and Solutions

��2 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

size of our PMap to investigate how the PMap competes with a more efficient REBSI.

2. Measuring.PMap.performance:.ThepstringsofaPMaparestoredinaB+tree for efficient searching. A query with multiple predicates can be rewritten indisjunctivenormalformandprocessedasseparatequerieswhoseresultsareOR’dtogethertoobtainthequeryanswer(wecallthisstrategyA)orprocessedas a single query (strategy B). In either case, multiple pfilters are generated; we call the one with the lowest value pfilter low (pfilterl)andtheonewiththehighest value pfilter high (pfilterh). Only the pstrings with values between pfilterland pfilterhneedtobesearchedintheB+tree.Forourperformancestudy,themore efficient strategy is chosen in each individual case. A minimum number ofrecordpointerstoansweraqueryiscomputedbasedontheutilizationofapstring;forexample,arangepropertymayonlyutilize20differentvalueseventhough32havetobeallocatedtostoreit(5bits).Amaximumnumberofrecordpointersiscomputedbasedonthenumberofleaflevelblocksthatappear between the lower and upper pfilters. The minimum represents best caseperformanceandthemaximumisworstcaseperformance.Sincetherealperformanceliesinbetween,wealsocomputeanaverageofthetwo.

3. Simulation. framework:Our experiments study the impact of parameterssuchasblocksize,databasesize,scalingfactor,queryselectivity,andattributecardinalitythataffectindexperformance.Foreachofthequerysets,wecreatePMapsandREBSIsandmeasuretheirperformanceintermsofthenumber

Table 7. Parameter values

DataSpecific

VAR DESCRIPTION TYPE VALUES

d dimensionalityofindex integer Numberofuniqueattributes

referencedinthequeryset

t numberoftuples integer 50,000and1,000,000

c attributecardinality integer n,whereKnistheattribute

SREC sizeofadatarecord bytes 224

SystemSpecific

SB blocksize bytes 2048,4096and8192

ws wordsize bits 16and32

UserDefined sf scalingfactor integer

minimumsf(sf_min)dependinguponthecorrespondingPMap,upto10

Page 220: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ofindexpagesretrieved.APMapiscreatedusingheuristicdesignalgorithms(Dariraetal.,2006).Asaresultof thedesignheuristics,PMaprangesaredesignedtoexactlycover thequerypredicatesandhencenoexcess tuplesareretrieved.WecalculatethePMapstoragerequirementsandindexpagesretrievedforeachofthequeries,forthisqueryset.Inotherwords,foreachofthetwopstringsizes(ws)foraqueryset,wevarythenumberoftuples(t)andblocksize(Sb)andcalculatethespaceoccupiedbythecorrespondingPMapandtheminimumandmaximumnumberofindexpagesretrievedtoanswerthequeriesinthisset.Foreachdatabasesizeandblocksizecombi-nation corresponding to a PMap, we find 3 different REBSIs by varying the scaling factor and using algorithms FindSmallestN and RefineIndex (Chan & Ioannidis,1998).IntheREBSIforaqueryset,aseparateREBSIiscreatedforeveryattributethatispresentinthequerysettobeabletoanswereachquerycompletely.ThenwedeterminetheindexpagesretrievedusingeachofthesebitmapsfortheparticularquerysetusingtheTimeformula(Chan&Ioannidis,1998).Thus,theinputstotheREBSIstorageandperformancemeasurementsimulatoraretuplesize,blocksizeandthescalingfactorwithrespecttothecor-respondingPMap.TheresultsoftheseexperimentsforthePMapandREBSItechniqueswithonequeryset(veryhighcardinalityattributes)arepresentedandanalyzedheretoillustratethemethodologyanddevelopintuitionforthegeneralobservationsweoffer.Costmodelsandresultsfordifferentquerysetsaredetailedelsewhere(Guptaetal.,2002).

Very High Cardinality Attribute Query Set

Theveryhighcardinalityattributequeryset(VHCAQS)consistsofhighcardinalityattributequeries(Guptaetal.,2002)alongwiththequeriescontainingtheattributeKSEQ,inwhichcasewesubstituteonlythehighcardinalityattributesforKNsothatthesequeriescontainonlyhighcardinalityattributes.EventhoughtheHCAQSisasubsetofVHCAQS,adifferentPMapisobtainedhereastheadditionalattri-buteKSEQisincluded.ThenumberofbitsallottedtoeachpropertyinthepstringisdifferentfromthePMapgeneratedfortheHCAQS,asisthespaceconsumption.Table8showsthe12queriesinVHCAQS.

Property.Map

The PMap for this set of queries constitutes five properties on the five attributes accessedinthequeries.Inthisexample,thedimensionalityofthePMapindexis5and pstring size is 11. For each query, the pmask, pfilterl, and pfilterhareshowninTable9.ThepropertiesintheVHCAQSPMapareasfollows:

Page 221: Data Warehouses and OLAP - Concepts Architectures and Solutions

��4 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Property.1:RangepropertyonK100kutilizing2bits:[0,2),[2,3),[3,4)and[4,100000],

• Property.2:.RangepropertyonK10kutilizing2bits:[0,2),[2,3),[3,4)and[4,10000],

• Property.3:.RangepropertyonK1kutilizing2bits:[0,2),[2,3),[3,4)and[4,1000],

• Property 4:Booleanpropertyon“K2=2”utilizing1bit,and• Property.5:.RangepropertyonKSEQutilizing4bits:[0,2),[2,3),[3,4),[4,

400000),[400000,410001),[410001,420000),[420000,430001),[430001,440000),[440000,450001),[450001,460000),[460000,470001),[470001,480000),[480000,490001),[490001,500001)and[500001,1000001).

ID Query

HC1 K1k=2

HC2 K10k=2

HC3 K100k=2

HC7 KSEQ=2

HC4 K2=2ANDK1k=3

HC5 K2=2ANDK10k=3

HC6 K2=2ANDK100k=3

HC8 K2=2ANDKSEQ=3

HC9 KSEQ>=400000ANDKSEQ<=500000ANDK10k=3

HC10 KSEQ>=400000ANDKSEQ<=500000ANDK100k=3

HC11

KSEQ>=400000ANDKSEQ<=410000ORKSEQ>=420000ANDKSEQ<=430000ORKSEQ>=440000ANDKSEQ<=450000ORKSEQ>=460000ANDKSEQ<=470000ORKSEQ>=480000ANDKSEQ<=500000ANDK10k=3

HC12

KSEQ>=400000ANDKSEQ<=410000ORKSEQ>=420000ANDKSEQ<=430000ORKSEQ>=440000ANDKSEQ<=450000ORKSEQ>=460000ANDKSEQ<=470000ORKSEQ>=480000ANDKSEQ<=500000ANDK100k=3

Table 8. Very high cardinality attribute query set

Page 222: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Range-Encoded.Bit-Sliced.Index

AseparateREBSIiscreatedforeachattributereferencedinthequeryset,i.e.,forK2,K1k,K10k,K100kandKSEQ;thedimensionalityofthebit-slicedindexis5.InordertocreateaREBSIwiththesameattributesasthePMap,fourtimesthespaceisrequired(min_sf=4).Table10showstheaveragenumberofbitmapscansforeachattributeforbothdatabasesizes,withthemin_sfand8Kblocksize.Thesizeofeachbitmapinblocks(z)isalsogivenforbothcases.

Observations

Figure2showsaperformancecomparisongraphforthetwotechniquesandtheVHCAQSforthedatabasesizeof1,000,000tuplesand8Kblocksize.Thex-axisshowsthequeriesandthey-axisshowstheindexpagesretrievedforeachquery.Thequeriesareorderedindecreasingorderofthedifferencebetweentheaveragenumberof indexpages retrievedby thePMap(PAvg)and thenumberofpagesretrievedbytheREBSIwiththesmallestscalingfactor(min_sf),i.e.,occupyingthe minimal required space. To simplify the figure, performance results for HC11 andHC12arenotshown.Inbothcases,thenumberofindexblocksexceeds3,000forthesmallerREBSI(sf=4)and1,000forthelargerREBSI(sf=10);thePMapaveragenumberofblocksis36and113,respectively.

Table 9a. pmasks for queries in the VHCAQS

ID K100k K10k K1k K2 KSEQ

HC1 0 0 0 0 1 1 0 0 0 0 0

HC2 0 0 1 1 0 0 0 0 0 0 0

HC3 1 1 0 0 0 0 0 0 0 0 0

HC7 0 0 0 0 0 0 0 1 1 1 1

HC4 0 0 0 0 1 1 1 0 0 0 0

HC5 0 0 1 1 0 0 1 0 0 0 0

HC6 1 1 0 0 0 0 1 0 0 0 0

HC8 0 0 0 0 0 0 1 1 1 1 1

HC9 0 0 1 1 0 0 0 0 0 0 0

HC10 1 1 0 0 0 0 0 1 1 1 1

HC11 0 0 1 1 0 0 0 1 1 1 1

HC12 1 1 0 0 0 0 0 1 1 1 1

Page 223: Data Warehouses and OLAP - Concepts Architectures and Solutions

��6 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

We offer three specific observations pertaining to the VHCAQS:

1. Relative.performance.per.query:TheperformanceofPMapandREBSIinthecaseofK1kqueries(HC2andHC5)issimilarforbothdatabasesizes.Querieswithhighercardinalityattributes(KSEQ,K100k)havebetteraveragePMapperformanceinallcasesfortheVHCAQS.Inthecaseofdatabasesizeof1,000,000tupleswithablocksizeof8K(Figure2),theleastspacethattheREBSIrequirestobeabletocreatebitmapsforalltheattributesis4timesthespacerequiredbythePMap(min_sf=4).For themin_sf, theaverage

Table 9b. pfilters for queries in the VHCAQS

ID K100k K10k K1k K2 KSEQ K100k K10k K1k K2 KSEQ

HC1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1

HC2 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1

HC3 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1

HC7 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1

HC4 0 0 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1

HC5 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 1 1 1 1 1 1

HC6 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1

HC8 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 0 1 0

HC9 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1

HC10 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1

HC11 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1

HC12 1 0 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1

Table 10. Number of bitmap scans for attributes in VHCAQS

Attribute 1,000,000tuples(min_sf=4,z=16)

50,000tuples(min_sf=5,z=1)

K2 1 1

K1k 9 8

K10k 12 11

K100k 15 14

KSEQ 18 17

Page 224: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

PMapperformanceisbetterthanREBSIformostofthequeriesinthisset,andcomparablefortheremainingtwo.FortheREBSIoccupying10timesthespaceofthePMap,theaverageperformanceofthePMapisbetterineightofthequeries,comparableintwo(HC5andHC2)andworseinthecaseoftwoqueries,HC4andHC1.Theminimumnumberofpages(PMin)retrievedby

Figure 2. PMap and REBSI performance comparison: VHCAQS

1,00

0,00

0 tu

ples

; 8K

blo

cksi

ze

0

�00

200

�00

400

�00

600

�00

800

�00

HC�0

HC�

HC�

HC�

HC�

HC�

HC�

HC�

HC�

HC�

Que

ries

Index Blocks

BI s

f 4B

I sf �

0P

Avg

Page 225: Data Warehouses and OLAP - Concepts Architectures and Solutions

��8 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thePMap(notshownhere)islessthanthenumberofpagesretrievedbyanyoftheREBSIs.

2. Impact.of.cardinality:.ForthequerieswithattributeKSEQandK100k,thePMapperformanceisbetterforbothdatabasesizesandallscalingfactors.QuerieswithK1k(HC1andHC4)showsimilarperformanceforbothdatabasesizes.Astheattributecardinalitydecreases,REBSIperformanceimproves.ForthePMap,performanceforsimilarqueriesvariesaccordingtotheposi-tionofattributepropertiesinthepstringratherthanattributecardinalities,asinthecaseofHCAQS(Guptaetal.,2002).ThoughKSEQhascardinality10timesthatofK100k,thesavingsinthecaseofqueriesaccessingK100k(HC3andHC6)comparedtosimilarqueriesaccessingKSEQ(HC7andHC8)aregreater.Thisisbecauseoftherelativepositionsofthepropertiescoveringtheseattributes in the pstring. The difference between pfilterh and pfilterlisthemaincontributingfactortothecostofindexpageretrievalintheworstcase,i.e.,PMax. The relative position of properties in the pstring has significant impact onperformanceofaPMap.

3. Multi-attribute queries:ForeachhighcardinalityattributeKN,thePMapretrievesfewerthanorthesamenumberofpagesforqueriesoftheformK2ANDKNastheoneswithonlyKN.Multipleconditionsincreasethenumberof bits that are set in the pfilterl, which reduces the difference between pfil-terh and pfilterl,resultinginfewerpagesretrieved.FortheREBSIs,ahighernumberofattributesresultsinmorepagesretrievedasthenumberofscansincreases.Thus,PMapsperformbetterthanREBSIformulti-attributequeriesfortheVHCAQS.

Analysis

Ingeneral,weconcludethefollowingbasedonoursimulationsandanalysisoverall6querysets.

1. ThestoragecostofREBSIishigherthanthatofPMapbecauseseparateREB-SIshavetobecreatedforeachoftheattributesaccessedinthefrequentlyusedqueries.Duetothetrade-offbetweenspaceandtime,thescalingfactor(sf)hasapredictableimpactontheperformanceofaREBSI.REBSIperformanceincreasesproportionallytoincreasedspaceallocation.

2. The position of a property covering a predicate in the pstring significantly affectsthenumberofpagesretrievedforaqueryaccessingthatpredicate.The closer the property to the beginning of the pstring, the higher the pfilterlvalue,whichreducesthePMaxvalue,i.e.,thenumberofpagesretrieved

Page 226: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

bythePMapintheworstcase.Thisisillustratedinallquerysetobserva-tions.

3. PMap performance is not significantly affected by attribute cardinality or query selectivity.

4. REBSI retrievalcost increasesas thenumberofattributesaccessed in thequeryincreases,evenforaverysmallcardinalityattributelikeK2.Ontheotherhand,PMapretrievalcostremainsthesameordecreaseswithmulti-at-tributequeries,astheadditionalattributeslimitthepstringsearchbychangingpfilterl and pfilterhvalues.

5. Asthedatabasesizedecreases,REBSIperformancebecomesbetterandtherelativesavingsofthePMaparereduced.Thisisintuitivesincethenumberoftuplesdirectlyimpactsbit-vectorlengthandthenumberofblockstoreadone bitmap decreases significantly. Savings for PMaps over REBSI are higher forthelargerdatabasesizesandhighcardinalityattributes,essentiallysincetheREBSIperformancedeterioratesinthesecases.

6. Weidentifytwostrategiestoevaluateadisjunctivequery,i.e.,aquerywithoneormoreORoperators.StrategyAsplitsahighlevelqueryintotwoormoreseparatequeriesbyrewritingitindisjunctivenormalformandprocess-ingeachdisjunctasaseparatequery,takingtheunionoftheresultsetasthefinal answer. These disjuncts are processed individually and the results for both constitutetheanswertothequery.StrategyBprocessesahighlevelqueryasa single query using multiple pfilters, without separating the disjuncts. We ex-perimentwithbothstrategiesforallthequerysetshavingdisjunctivequeries(VHCAQS,LCAQS,HSQSandMQS)andchoosethebeststrategyineachcaseinourperformancestudies.StrategyAperformsbetteringeneral,exceptforthequeriesHC11andHC12intheVHCAQS.ThesequerieshavemultipleconditionsontheattributeKSEQandStrategyBperformsmuchbetterforthem.

Conclusion

Inthissectionwepresenttechniquesandenhancementsthatemergefromanalyz-ingqueryprocessingperformanceofPMaps.Further studyof these techniquescouldresultinimprovedPMapsandguidelinesforusingdifferentPMapcreationtechniques andqueryprocessing strategies indifferent scenarios. Basedonallobservationsandanalyses,wegive thefollowinggeneralguidelinesfor theuseofPMapsandapplicationswheretheymaybeusefulandprovideextrasavingsinqueryprocessing.

Page 227: Data Warehouses and OLAP - Concepts Architectures and Solutions

200 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Fromouranalysis,welearnthatPMapperformanceisnotaffectedbyattri-bute cardinality; however the property position in the pstring is a significant factor. Since performance for most other indexing techniques deterioratesfor high cardinality attributes, we can achieve significant savings for these bycreatingPMapsonhighandveryhighcardinalityattributes.Thepropertyorderingshouldbeindecreasingorderofsavingsdesiredfortheattributes.Thus,theattributesforwhichwedesiremaximumsavingshavepropertiesatthebeginningofthepstring.

• PMaps are beneficial when there is limited space for index creation, as they occupymuchlessspacecomparedtobitmapsindexingthesamesetofattri-butes.

• PMapsperformwellformulti-attributequeries,evenbetterthansingleattri-butequeries,unlikeREBSIsandmanyotherknowntechniques.Hence,itisusefultocreatePMapsforfrequentlyusedmulti-attributequeries.

• PMapsavingsincreaseinthecaseoflargedatabases.Therefore,PMapscouldbe created for very large databases where SBIs are inefficient. PMap savings alsoincreaseforlargerblocksizeswhenthedatabasesizeislarge.

• PMapsperformverywellinthecaseofinequalityqueriesorhighselectivityqueries. This result could be used to create PMaps for specific applications.

Extensionstotheresearchreportedherearesummarizedasfollows:

• Currently, PMaps are not designed to represent aggregation and groupingqueries.Groupingattributesareusuallylowcardinalityattributes,andcanbecoveredbyenumeratedpropertiesinaPMap.AfterprocessingtheWHEREclause,thepstringsofthetuplesintheintermediateresultneedtobescannedfortheonessatisfyingthegroupingproperty.FutureresearchcouldextendthePMaptosolveaggregationandgroupingqueries.

• Indexmaintenance,includingdeletionsandupdates,isanareaforfuturein-vestigation.

• A solution to the problem of finding a well-defined encoding discussed by Wu and Buchmann (1998) can be used to make PMaps more efficient. Bit stringrepresentationsofpropertiesandtheirorderingcanbedecidedusinga well-defined encoding so that fewer pstrings have to be searched. Vertical partitioningofpstringsmaybeanotherwaytoimprovePMapperformance.

• Althoughusefulforourstudyoftheimpactofparametersonperformance,thedatabasesizesusedherearesmallcomparedtorealdatawarehouseapplica-tions.FurtherinvestigationintothescalabilityofPMapsisatopicforfuturestudy.

Page 228: Data Warehouses and OLAP - Concepts Architectures and Solutions

Indexing in Data Warehouses 20�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• Techniques for compressing bitmap indexes (Wu et al., 2006) increase effi-ciencyofin-memorylogicaloperations.TheimpactofthesetechniquesonqueryprocessingwithPMapsisanopenquestion.

References

Chan,C.Y.,&Ioannidis,Y.(1998).Bitmapindexdesignandevaluation.Proceedings of the ACM SIGMOD International Conference, Seattle,WA(pp.355-366).

Darira,R.,Davis,K.C.,&Grommon-Litton,J.(2006).Heuristicdesignofprop-ertymaps.Proceedings of the 9th ACM Workshop on Data Warehousing and On-Line Analytical Processing, McLean,VA.

Gray,J.(1993).The benchmark handbook for database and transaction processing systems. MorganKaufmannPublishers.

Gupta,A.,Davis,K.C.,&Grommon-Litton,J.(2002).Aperformancecomparisonofpropertymapandbitmapindexing.Proceedings of the Fifth ACM Work-shop on Data Warehousing and On-Line Analytical Processing, McLean,VA(pp.65-71).

Jurgens,M.,&Lenz,H.J.(2001).Treebasedindexesvs.bitmapindexes:Aper-formancestudy.International Journal of Cooperative Information Systems. 10(3),355-376.

Koudas, N. (2000). Space efficient bitmap indexing. Proceedings of the 9th Inter-national Conference on Information and Knowledge Management, McLean,Virginia(pp.194-201).

O’Neil,P.,&Quass,D.(1997).Improvedqueryperformancewithvariantindexes.Proceedings of the ACM SIGMOD Conference, Tucson,AZ(pp.38-49).

Sarawagi,S.(1997).IndexingOLAPData.Data Engineering Bulletin, 20(1),36-43.

Vanichayobon, S., & Gruenwald, L. (1999). Indexing techniques for data warehouses’queries.TheUniversityofOklahoma,SchoolofComputerSci-ence,TechnicalReport.

Wu, K., Otoo, E., & Shoshani, A. (2005). An efficient compression scheme for bit-mapindices.ACM Transactions on Database Systems, 31(1),1-38.

Wu,K.L.,&Yu,P.S.(1998).Range-basedbitmapindexingforhighcardinalityattributeswithskew.Proceedings of the 22nd International Computer Software and Application Conference, Vienna,Austria (pp.61-67.

Page 229: Data Warehouses and OLAP - Concepts Architectures and Solutions

202 Davis & Gupta

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Wu,M.C.,&Buchmann,A.(1998).Encodedbitmapindexingfordatawarehouses.Proceedings of the 14th International Conference on Data Engineering, Or-lando,FL(pp.220-230).

Page 230: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 20�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.IX

Efficient and Robust Node-Partitioned Data.Warehouses

Pedro FurtadoUniversidade de Coimbra, Portugal

Abstract

Running large data warehouses (DWs) efficiently over low cost platforms places special requirements on the design of system architecture. The idea is to have the DW on a set of low-cost nodes in a nondedicated local area network (LAN). Nodes can run any relational database engine, and the system relies on a partitioning strategy and query processing middle layer. These characteristics are in contrast with typical parallel database systems, which rely on fast dedicated interconnects and hardware, as well as a specialized parallel query optimizer for a specific data-base engine. This chapter describes the architecture of the node-partitioned data warehouse (NPDW), designed to run on the low cost environment, focusing on the design for partitioning, efficient parallel join and query transformations. Given the low reliability of the target environment, we also show how replicas are incor-porated in the design of a robust NPDW strategy with availability guarantees and how the replicas are used for always-on, always efficient behavior in the presence of periodic load and maintenance tasks.

Page 231: Data Warehouses and OLAP - Concepts Architectures and Solutions

204 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction

Datawarehouses(DWs)arespecializeddatabasesstoringhistoricaldatapertainingtoanorganization.Theobjectiveistoallowbusinessanalysisonvariedperspec-tives.Theyhavebeenappliedinmanycontexts,forinstance,insurancecompanieskeepingtrackofindividualeventsoninsurancepolicies,telecomcompanieswithterabytesofdatatrackingindividualphonecallsorindividualmachineeventsinproductionfactories,generatinggigabytesofdetaileddataperday.Thedegreeofdetailoverwhichthedataisstoredinthedatawarehousecanvary,butfromtheexamplesgiven,itiseasytoseethatdatawarehousescanbecomeextremelylarge.Assuch,multipleperformanceoptimizationstrategiescanbesoughtafter,rangingfromspecializedindexing,materializedviewsforfastercomputationoverpredictedquerypatterns,toparallelarchitecturesandparallelprocessing.Paralleldatabasesystemsareimplementedononeofthealternativeparallelarchitectures:shared-memory,shared-disk,sharednothing,hierarchical,orNUMA(Valduriez&Ozsu,1999),whichhaveimplicationsonparallelqueryprocessingalgorithms,datapar-titioning,andplacement.Inpractice,parallelenvironmentsinvolveseveralextraoverheadsrelatedtodataandcontrolexchangesbetweenprocessingunitsandalsoconcerningstorage,sothatallcomponentsofthesystemneedtobedesignedtoavoid bottlenecks that would compromise the whole processing efficiency. Some parts of the system have to account for the aggregate flow into/from all units. For instance,inshared-disksystemsthestoragedevicesandinterconnectionsshouldbesufficiently fast to handle the aggregate of all accesses without becoming a signifi-cant bottleneck. To handle these requirements, a significant initial and continuous investmentisnecessaryinspecialized,fast,andfully-dedicatedhardware.Anat-tractivealternativeistouseanumberoflow-costcomputernodesinashared-noth-ingenvironment,possiblyinanondedicatedlocalnetwork.Theonlyrequirementisthateachnodehassomedatabaseengineandconnectivity,whileamiddlelayerprovidesparallelprocessing.Thissystemmusttakeintoconsiderationpartitioningandprocessing,asthecomputernodesandinterconnectsarenotspeciallydesignedtothatend.Thenode-partitioneddatawarehouse(NPDW)isagenericarchitectureforpartitioningandprocessingoverthedatawarehouseinsuchanenvironment.Theobjectiveofthischapteristodiscussandanalyzepartitioning,processing,andavailabilityissuesinthedesignoftheNPDW.

Background

Typicaldatawarehouseschemashavesomedistinctiveproperties:theyaremostlyread-only,withperiodic loads.This characteristicminimizes consistency issues

Page 232: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 20�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

whichareamajorconcernregardingtheparallelizationoftransactionalschemasandworkloads;datawarehouseschemasusuallyhavemultidimensionalcharac-teristics(Kimball,Reeves,Ross,&Thornthwaite,1998),with largecentral factrelationscontainingseveralmeasurements(e.g., theamountofsales)andasizeofuptohundredsor thousandsofgigabytes,anddimensions(e.g.,shop,client,product,supplier).Eachmeasurementisrecordedforeachindividualcombinationofdimensionvalues(e.g.,salesofaproductfromasupplier,inoneshopandforan individual client). While there are specific analysis-oriented data marts stored andanalyzedusingsomenonrelationalmultidimensionalengine(Kimball,Reeves,Ross,&Thornthwaite,1998),ourfocusisonthelargecentralrepositorywarehousesstoredinarelationalengine;warehousesareusedforonlineanalyticalprocessing(OLAP),includingreportingandad-hocanalysispatterns.OLAPinvolvescom-plexquerypatterns,withjoinsinvolvingmultiplerelationsandaggregations.Thesequery patterns can pose difficulties to the performance of shared-nothing partitioned environments,especiallywhennodesneedtoexchangemassivequantitiesofdata.Whileverysmalldimensionscanbereplicatedintoeverynodeandkeptinmemorytospeedupjoinsinvolvingthem,muchmoresevereperformanceproblemsappearwhenmanylargerelationsneedtobejoinedandprocessedtoproduceananswer.WeusetheschemaandquerysetofthedecisionsupportperformancebenchmarkTPC-H(TPC)asanexampleofsuchacomplexschemaandqueryworkloadandalsoasourexperimentaltestbed.Performanceandavailabilityarerelevantissuesin data warehouses in general and pose specific challenges in the NPDW context (standardcomputernodesandnonspecializedinterconnects).Someresearchinrecentyearshasfocusedonad-hocstarjoinprocessingindatawarehouses.Specializedstructuressuchasmaterializedviews(Rousopoulos,1998)andspecializedindexes(Chan&Ioannidis,1998;O’Neil&Graefe,1995)havebeenproposedtoimproveresponsetime.Althoughmaterializedviewsareusefulinacontextinwhichqueriesareknowninadvance,thisisnotthecasewhenad-hocqueriesareposed.Parallelapproachesarethereforeimportantastheycanbeusedalone or in conjunction with specialized structures to provide efficient processing foranyquerypatternatanytime.Inthepast,therehasalsobeenalotofworkonimplementingdatabase systemsover conventional shared-nothing architectures,asreviewedinDeWittandGray(1992).Ashared-nothingarchitectureconsistsofasetof independentcomputernodes thatareconnected throughsomenetwork.Eachnodehasitsownstoragedevicesandthereisnoexpensivelocalareastoragenetworkwithsharedstoragedevices.Additionally,theNPDWdoesnotassumeanyspecializedfastinterconnectsbetweennodes,asitshouldworkoveranondedicatedlocalareanetwork.Inthiscontext,performanceisverydependentonstrategiestopartitiondata intonodes’storagedevicesandprocessing intonodes’processingunits,respectively.Itisalsoverydependentonachievingabalancebetweendataexchangerequirementsandautonomousprocessingamongnodes.Thelackoffastspecializedhardwareandinterconnectsinthetargetenvironmentmeansthatthere

Page 233: Data Warehouses and OLAP - Concepts Architectures and Solutions

206 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

wouldbetoolargeapenaltyifrelationswerenotcarefullyplacedamongnodestoexploreparallelismpowerandreducebottlenecks.Thisisthereasonwhyoneofthemajorconcernsistodecidehowtopartitionorclusterrelationsintonodesbothoninitialplacementandsubsequentreorganizations.

Partitioning,.Parallel.Join,.and.Cost.Models

Several strategies have been proposed for efficient distributed placement and query processing.Thesemi-joinoperator(Bernstein&Chiu,1981)appliesselectionandprojectionoperationsbeforesendingdatathroughthenetwork.Otherproposedstrat-egies for efficient distributed query processing include placement dependency (Liu, Chen,&Krueger,1996),whichusesdependencyrelationshipsbetweenrelationstoco-locatefragmentsforfasterprocessing.ThisandotheralternativestrategiesarecomparedexperimentallyinLiuandYu(1993).Themostpromisingsolutionstoextrajoinoverheadsthatcharacterizemanysuccessfulparallelanddistributeddatabasesystemsinshared-nothingenvironmentsinvolvehash-partitioninglargerelationsintonodesinordertominimizedataexchangerequirements(DeWitt&Gerber,1985;Kitsuregawa,Tanaka,&Motooka,1983).Parallelhash-joinalgo-rithms,alsoreviewedinYuandMeng(1998),considerpartitioningandallocatinginterveningrelationfragmentsintoprocessorsorcomputernodesforfastjoinpro-cessing.Thesestrategiestypicallyallocateahashrangetoeachprocessor,whichbuildsahashtableandhashesrelationfragmentsaccordingly.Inashared-nothingenvironment,itoftenbecomesnecessarytoexchangedatabetweennodesinordertosendtuplesintothenodethathasbeenallocatedthecorrespondinghash-valuerangeforthejoinattribute.Thisprocessiscalledpartitioning,iftherelationisnotpartitionedyet,orrepartitioning,iftherelationisalreadypartitionedbutmustbereorganized.Bothoperationscanbecostlybecausetheymayrequireheavydataexchangeoverthenetworkconnectingthenodes.Inthisworkwewillrefertopar-titioning(andplacement)notastheoperationofpartitioningwhileprocessingajoinbutratherasaninitialplacementandsporadicreorganizationtaskthatdecideswhichrelationsaretobedividedorreplicatedintonodesandwhichpartitioningattributes are to be used. Williams and Zhou (1998) review five major data place-ment strategies (size-based, access frequency-based, and network traffic based) and concludeexperimentallythatthewaydataisplacedinashared-nothingenvironmentcanhaveconsiderableeffectonperformance.HuaandLee(1990)usevariablepar-titioning(sizeandaccessfrequency-based)andconcludethatpartitioningincreasesthroughputforshorttransactionsbutcomplextransactionsinvolvingseverallargejoinsresultinreducedthroughputwithincreasedpartitioning.Someofthemostpromisingpartitioningandplacementapproachesfocusonqueryworkload-basedpartitioningchoice(Rao,Zhang,&Megiddo,2002;Zilio,Jhingram,&Padmanabhan,1994).Thesestrategiesusethequeryworkloadtodeterminethe

Page 234: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 20�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

mostappropriatepartitioningattributes,whichshouldberelatedtotypicalqueryaccesspatterns.Butwhiletheyaretargetedatgenericparalleldatabasesandmayrequire tight integration with a specific cost predictor and optimizer (Rao et al., 2002), wediscussgenericdatapartitioningthatisindependentoftheunderlyingdatabaseserverandtargetedatnodepartitioneddatawarehouses(Furtado,2004a,b,c).Con-siderthequeryQ={R1.A2,R2.A4|R1.A1=R2.A1 Λ R2.A1=R3.A1 Λ R3.A2=R4.A2 Λ R3.A3=R5.A3},whereRiarerelationsandAiareattributes.ThejoingraphofFigure1aisagraphwhereverticescorrespondtoattributesR.Aparticipatinginequi-joinsandtheedgesdepictthesetofequi-joinsbetweenthoseattributes.Acomponentisasetofinterconnectedverticesanditsedges.Thejoingraphofthequeryworkload(JGQW)showninFigure1baddseveryjoinpatternoccurringintheworkload—thesetofhistoricalorexpectedqueries—withaweightoneachedgerepresentingthefrequencyofoccurrenceofthecorrespondingjoinonthequeryworkload(eitherapercentageornumberofoccurrences)(Furtado,2004a). Nodesofacomponentofajoingraphformasetofrelationsthatcanbejoinedwithoutrequiringrepartitioningandredistribution.Thefocusoftheworkload-basedalgorithmsinFurtado(2004a,2004b,2004c)istopartitionthewholerelationsinthejoingraphinawaythatresultsinreducedrepartitioningcostandredistributionrequirements.GiventhisJGQWgraph,asimplepartitioningalgorithmcanassignpartitioning attributes starting by the most frequent join (R3.A2, R2.A2 in the fig-

Figure 1. Join and query graphs for the example: (a) join graph and (b) join graph for query workload (JGQW)

R1.A1 R2.A1 R3.A1

R3.A2

R5.A3R3.A3

R4.A2

c1

c2

c3

R1.A1 R2.A1 R3.A1

R3.A2

R5.A3R3.A3

R4.A2

6

83

R2.A2 R3.A2

10

(a)

(b)

Page 235: Data Warehouses and OLAP - Concepts Architectures and Solutions

208 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ure),toreducetheamountofrepartitioning.Morecomplexalgorithmsmaysearchinthespaceofpossiblealternativeexecutionplans,evaluatingacostforeachpos-sibleplan(Kossman&Stocker,2000).Inadatawarehouse,thereareanadditionalsetofpatternsthatareimportanttoguidethepartitioningalgorithm.Datawarehouseshavefactsanddimensions,factsreferencedimensions,andqueriesalmostalwaysjoindimensionsbytheirprimarykey.Asaresult,thealgorithmweproposedinFurtado(2004c)partitionsdimensionsbyprimarykeys(exceptsmallones,whicharereplicated)andappliesworkload-basedpartitioningtofacts.Severalworksrefertothecostofprocessingqueriesoveradistributeddatabaseorqueryoptimization(queryplanselection)insuchcontext(Kossman&Stocker,2000;Sasha,Wang,&Tsong-Li,1991;Steinbrunn,Moerkotte,&Kemper,1997;Yu,Guh,Brill,&Chen,1989).Yuetal.(1989)considerpartitioning,localprocessing,anddatacommunicationcostsintheircostmodel,todeterminewhichrelationsshouldbepartitionedandreplicated,consideringthatnorelationisprepartitioned.Algorithmsandoptimiza-tionsforparallelprocessingofmultiwayjoinsoverhash-partitionedrelationsareconsideredbySashaetal.(1991).Theauthorsalsointroduceacostmodelandproposealgorithms to determine the most efficient join order for multiway joins over fully partitionedrelationsinashared-nothingcluster.Someworks(Kossman&Stocker,2000;Steinbrunnetal.,1997)considerheuristicsearchforthebestoverallexecutionplan,consideringthatthesearchfortheoptimalplanisanNP-hardproblem.

Low.Bandwidth.and.Early.Selection.

Another factor that affects the efficiency of partitioning schemes is the “available bandwidth.”Giventhatthenetworkinterconnectingthecomputernodesmaybeslow,nondedicated,orthesystemmayberunningseveralqueriessimultaneously,itisimportanttotakeintoaccountthepossibilityoflowavailablebandwidth.Thisisamotivationforalsoconsideringpartitioningschemesthatfavorreplicationsuchasstrategiesbasedonthepartitionandreplicatestrategy(PRS)ofYuetal.(1989),whichpartitionsasinglerelationandreplicatesallotherstoprocessjoinswithoutrepartitioningrequirements.Anotherrelevantapproachtoreduceboth theamountofrepartitioningandalsooflocalprocessingateachnodeistoapplyearly-selectionstrategies.Theseapplyselectionconditionsasearlyaspossibletodatasetssothatmuchlesstuplesneedtobeprocessedandexchanged.Abitmapindex(Chan&Ioannidis,1998)containsonebitmapperpossiblevalueofagivenattribute(oracodedbitmapwithbbitsfor2bpossiblevalues);thebitmapconsistsofonebit(orcode)perrowtoindicatewhetherornotthatrowmatchestherespectiveattributevalue.ChanandIoannidis

Page 236: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 20�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

(1998)describeandanalyzetheuseofbitmapindexes.Whenaccessingarelationtoansweraquery,bitmapsare readandbitwise-operated (e.g., logicalANDofbitmaps)todeterminewhichrelationtuplesqualifyforthequerybeforeevenread-ingtherelationitself.Allprocessinganddataexchangingisthenappliedtothisreducedsubsetoftuples.Bitmap join indexes (O’Neil & Graefe, 1995) are very efficient materialized struc-tures for avoidingcostly joins.Whenbitmap join indexesareapplied toadatawarehouseschema,eachbitmapindicateswhichfactrowscorrespondtoeachat-tributevalueofadimensiontable,representingtheprecomputedresultofajoinbetweenthefactandadimensiontable.Considerthesimpleexampleofa“Sales”fact,a“Product”dimension,anda“Brand”attributewithin“Product.”AbitmapforBrand“X”associatesabitwitheachrowoftheSalesfactwitha“1”bitifthatrowisasaleofBrand“X”anda“0”bitotherwise.Aqueryforsalesofbrand“X”mayscanthebitmapandthenreadonlyrowsofSalescorrespondingtothatBrand.Moreimportantly,italsoavoidstheneedtojoinSaleswithProductandthereforetheneed to repartitionPart if it ispartitionedandnotco-locatedwithSales. Insummary,theuseofearly-selectionandinparticularbitmapjoinindexesreducesthe amount of data that must be exchanged very significantly, as long as there are selectiveconditionsonthequerypatterns.Nextwereviewreplicationforavailabilityissues,asitisalsoamajorconcerninthelow-reliabilityenvironmentoftheNPDW.

Replication for Availability

Adiscussionofavailabilityfornode-partitioneddatawarehousesbringsupseveralissueslikenetworkfailures,dataloadingfailures,oravailabilitymonitoring.Eachof these issues requires specific solutions. For instance, network failures can be ac-commodatedusingbackupconnections.Weconcentrateonhandlingthepossibleunavailability of computing nodes, guaranteeing efficient availability, and promot-ingmanageability.Theobjectiveisthatthesystembealways-onandalwaysef-ficient even when nodes are unavailable or entire parts of it are taken off-line for maintenanceandmanagementfunctions,suchasloadingwithnewdataorotherDBA functionality. Efficient node availability can be achieved via the use of rep-licas.Areplicaisa“standby”copyofsomedatathatcanbeactivatedatanymo-mentincaseofunavailabilityorfailureofthenodeholdingthe“original,”sothatprocessingresumesasusual.Ifprocessingwithunavailablenodesisimplementedefficiently, unavailability becomes less onerous to the whole system and it becomes feasibletohavenodesunavailableortostopasetofnodesfordataloading,main-tenance,upgrading,orothermanagementactivitieswithoutanymajorrepercus-sionstoprocessing.Replicaplacementhasbeenstudiedindifferentcontexts,fromRAIDdisks(Patterson,Gibson,&Katz,1998)tothecontextofgenericparallel

Page 237: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�0 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

anddistributeddatabases.Replicationstrategiesforshared-nothingsystemsrangefrommirroreddiskdrives(Tandem,1987)tochaineddeclustering(Hsiao&De-Witt,1990a,b,1991)orinterleaveddeclustering(Teradata,1985).CopelandandKeller(1989)comparesomeofthesehigh-availabilitymediarecoverytechniques.Therearealsorecentworksonreplication(Coloun,Pacitti,&Valduriez,2004;Lin,Kemme,&Jimenez-Peris,2005;Pacitti,Özsu,&Coulon,2003),buttheemphasisisontransaction-relatedconsistencyissues.Ingeneral,mostworksfocusgenericreplicationstrategiesforavailabilityconsideringnonpartitionedrelationsandOLTPworkloads, while in this chapter we briefly discuss and evaluate replication on the specific node-partitioned data warehouse context. An extended discussion on the subjectisavailableinFurtado(2005c).

Partitioning.and.Processing..............over the NPDW

Inapartitioningscheme,eachrelationcaneitherbepartitioned(dividedintoparti-tionsorfragments),copiedinitsentirety,orplacedintoasinglenodeofagroupofnodes.Wesimplifythediscussionbyconsideringonlyonegroup(allnodes)andhomogeneitybetweennodes,inordertoconcentrateonthecorepartitioningandprocessingissues.Generically,ifarelationislargeorverylarge,partitioningisthechoicethatdrivesfasterprocessing.Ontheotherhand,verysmallrelationscanbereplicatedtoavoidtheneedtorepartitionotherverylargedatasetsthatmayneedtobejoinedwiththem.Inpracticethedecisiononreplicationvs.partitioningforeachrelationcanbetakenbyacost-basedoptimizerthatevaluatesalternativeexecutionplansandpartitioningscenariostodeterminethebestone.Horizontally-partitionedrelationscantypicallybedividedusingaround-robin,random,range,orhash-basedscheme.Weassumehorizontalhash-partitioning,asthisapproachfacilitateskey-basedtuplelocationforparalleloperation.Partitioningisintimatelyrelated to processing issues. Therefore, first we describe generic query processing overtheNPDW.Thenwefocusonparalleljoinandpartitioningalternatives.

Generic Processing over the NPDW

Queryprocessingoveraparallelshared-nothingdatabase,andinparticularovertheNPDW,followsroughlythestepsinFigure2(b).Figure2(a)illustratesasimplesumqueryexampleovertheNPDW.Inthisexamplethetaskisdividedintoallnodes,sothateachnodeneedstoapplyexactlythesameinitialqueryonitspartialdata,andtheresultsaremergedbyapplyingamergequeryagainatthemergingnodewiththepartialresultscomingfromtheprocessingnodes.Ifthedatasetscouldbe

Page 238: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

dividedintoNnodesandprocessedindependently,eachnodewouldprocessitspart(1/N)independentlywithaspeedupofapproximatelyN,andonlythemergepartofthequerywouldrepresentextraoverhead.Moregenerically, the typicalqueryprocessingcycle implementedby thequeryprocessingmiddlelayerisshowninFigure2(b)andanexampleisgiveninFig-ure3.Aqueryisexecutedinsteps.Step1“RewriteQuery”preparesthenodeandmergequerycomponentsfromtheoriginalsubmittedquery.Step2“SendQuery”forwardsthenodequeryintoallnodes,whichprocessthequerylocallyinstep3.Eachnodethensendsitspartialresultintothesubmitternode(step4),whichap-pliesthemergequeryinstep5.Step6redistributesresultsintoprocessingnodesifrequired(forsomequeriescontainingsubqueries,inwhichcasemorethanoneprocessingcyclemayberequired).Thequeryprocessingmiddlelayertransformsqueriesintonodequeriesandcontrolsrepartitioningrequirementsforprocessingoperationssuchasparalleljoin.Insteps1and2ofFigure3wecanseethatqueryaggregationexpressionsarere-placedbyaggregationprimitivestobecomputedateachnodeandmergedafterwardstoobtaintheresults.Themostcommonprimitivesare:Linearsum(LS=SUM(X));Sumofsquares(SS=SUM(X2));Numberofelements(N);andExtremes(MAXandMIN).AlthoughinFigure3everynodecomputespartialaggregationsforallaggregationgroups, aggregation can also be computed by assigning the computation of specific aggregation groups to specific nodes (Shatdal & Naughton, 1995). A detailed study andevaluationofqueryprocessing issues in theNPDWisavailable inFurtado(2005a).Therepartitioningoperationofstep3RinFigure2(b)isnecessarywheneveraparti-tioneddatasetneedstoparticipateinajoinbutisnotpartitionedbythejoinattribute.Eachnodeisassignedahashrangeforthejoinkey,andeverynodeneedstosendto

Figure 2. Query processing steps in NPDW: (a) example query (b) query process-ing steps

(a) (b)

Page 239: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�2 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

everyothernodethetuplesithasthatbelongtothehash-rangecorrespondingtothatnode. It should be implemented as efficiently as possible to minimize the cost. We assumeaswitchednetwork(thecostofrepartitioningwouldbelargeronashared-mediahub-basednetwork).Asimpleparallelrepartitioningalgorithmwouldbe:

NumbertheNnodessequentially;For(i=1;i<N;i++)Parallel:everynodejsendsdatatonode(j+i)modN;

Theobjectiveofthisalgorithmisfornodestoexchangedatainparallel,toreducetherepartitioningoverhead.Inpractice,thefactthatnodesandprocessingatnodesarenot homogeneous and that both switch andnodes’network interfacesoftenlimitfullduplexcapabilityandperformancemeansthatthedatacommunicationoverheadisusuallylargerthantheoptimalcase.Giventhegenericqueryprocess-ingarchitecture,wefocusnextonpartitioningalternatives.

Partitioning.vs..Replication in NPDW

ConsiderrelationsormoregenericallydatasetsR1andR2thatmustbejoinedbyanequi-joinkeyaspartoftheexecutionplan: 21 RAR .ConsideralsothatR1isfullyhorizontallypartitionedintoallnodesorintoanodegroup.EachnodeoutofNshouldprocessonly1/Nofthetotalworkinordertotakefulladvantageofparallelexecution.Ifbothrelationsarepartitionedbythesameequi-joinkey,thejoincanbeprocessedasa“Local.or.Co-located.Join”(LocalJ)andthisisthefastestalterna-

Figure 3. Basic aggregation query steps

0. Query submission:Selectsum(a),count(a),average(a),max(a),min(a),stddev(a),group_attributesFromfact,dimensions(join)Groupbygroup_attributes;

4. Results collecting:CreatecachedtablePRqueryX(node, suma, counta, ssuma, maxa,mina,group_attributes)as<insertreceivedresults>;

3. Nodes compute partial results:Selectsum(a),count(a),sum(axa),max(a),min(a),group_attributesFromfact,dimensions(join)Groupbygroup_attributes;

5..Results.merging:Selectsum(suma),sum(counta),sum(suma)/sum(counta),max(maxa),min(mina)(sum(ssuma)-sum(suma)2)/sum(counta), group_attributesFrom UNION_ALL(PRqueryX), dimensions(join)Groupbygroup_attributes;

Page 240: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

tive.Theexpression 21 RAR isprocessedas( 2111 RAR )U…U( nRAnR 21

),eachpartofthisexpressioninadifferentnode,becauseasthetworelationsarepartitionedbytheequi-joinkey,thejoinbetweentwofragmentsindifferentnodesisanemptyset(e.g., =2211 RAR ).Otherwise,atleastoneoftherelationsmustbemoved.Ifonlyoneoftherelationsorneitherispartitionedonthejoinkey,wecandynamicallyrepartitiononthesamejoinkeyandproceedwiththeparallelequi-join—thisisthe“Repartitioned.Join”(RpartJ).Therepartitioningisaccountedasanextraoverhead,whichincreasestotalworkandresponsetimeandisdependentondatabufferingandcommunication-relatedoverheads.Ontheotherhand,ifoneoftherelationsisreplicatedbyplacement,thejoincanproceedindependentlyatallnodesregardlessofthepartitioningkeyfortheotherrelation.Thisisthe“Repli-cated.Join”(ReplicaJ).Inareplicatedjoin,theexpression 21 RAR isprocessedas( 211 RR A

)U…U( 21 RR An ).LocalJrequiresthedatasetsinvolvedinthejointobeco-located.Whentryingtoco-locatepartitionsfrommultiplerelations,thepartitioningissuethatarisesisthatitisoftennecessarytochoosewhichjoinwillbeco-located.Forexample,considerthejoin 321 RRR BA

.InthiscaseR2willeitherbepartitionedonA,inwhichcaseitwillbeco-locatedwithR1,oronB,inwhichcaseitwillbeco-locatedwithR3(wecanalsopartitionR2bybothattributes,butthisdoesnotresultinco-location).Inmultidimensionalschemasofdatawarehouses,thepartitioningissueisraisedassomerelations(e.g.,facts)typicallyholdseveralforeignkeystootherrelations(e.g.,dimensions).Furtado(2004c)searchespartitioningkeysforfactsthatincreasetheamountofLocalJasopposedtoRpartJbylookingatthequeryworkload.Iftheinterconnectionsareslowortheavailablebandwidthissmall,areplicationstrategyusingReplicaJmaybepreferable,asitrequiresnoorlittledataexchangebetweennodes.Processingwith replicas follows the logicof the “partitionandreplicatestrategy”(PRS)(Yuetal.,1989),whereasinglerelationispartitionedandtheremainingonesreplicated.Theactualdecisiononwhethertopartitionorreplicaterelationsrequiresacostmodelthatwereviewlater.

Partitioning.Strategies

In this section we define a set of strategies that take into consideration partitioning andreplication.Inthefollowingsectionagenericcostmodelwillalsobepresented.ConsidertheTPC-HdatawarehouseschemaofFigure4fromTPC(1999).Itcon-tainsseverallargerelations,whicharefrequentlyinvolvedinjoins.Theschemarepresentsorderingandsellingactivity(LI-lineitem,O-orders,PS-partsupp,P-part,S-supplier,C-customer),whererelationssuchasLI,O,PS,andevenParequitelarge.Therearealsotwoverysmallrelations,NATIONandREGION,notdepictedin the figure as they are very small and can be readily replicated into all nodes.

Page 241: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�4 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Figure5(a)showsagenericqueryQa,andapossible“star-join”executionplanforthatqueryisshowninFigure5(b).Giventhisexampleschema,thechallengeishowtopartition,process,andprovideavailability to obtain an efficient low cost, platform-independent shared-nothing datawarehouse.Wewishtodeterminewhatwouldbeagoodpartitioningstrategytoprocessqueries,consideringthateachrelationcouldeitherbefullypartitionedorreplicated.In the next figures we represent the contents of each node: filled relation boxes rep-resent replicated relations and partially-filled ones represent partitioned relations. Thefollowingalternativeswillbeconsidered:

• Partition.and.replicate.strategy.(PRS):.Partitionthelargestrelation(LIinTPC-H)andreplicatealltheotherones,asshowninFigure6.Eachnodestores

GBLineitem(LI) 78Partsupp(PS) 7.5

Orders(O) 18Part(P) 2

Supplier(S) 0.1Customer(C) 1.5

Figure 4. Summary of TPC-H schema: (a) TPC-H schema and (b) relation sizes (100GB)

(a) (b)

Figure 5. Example query and possible execution plan (TPC-H): (a) generic query Qa and (b) part of execution plan for Qa

Select..sum(sales),sum(costs),sum(sales)-sum(cost),n_nation,o_yearFrom..part,supplier,lineitem,partsupp,orders,nationwhere..<joinconditions>andp_brand=xandn_namelikeyando_orderpriority=‘w’andps_availqty>zgroup.by n_nation,o_year;

(a) (b)

Page 242: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

onlyafractionofthelargestrelation(LI)andreplicasofallotherrelations.AllthejoinsareReplicaJinthiscase.Thisstrategyallowsjoinstobeprocessedwithoutanydataexchangebetweennodes,but theoverheadofprocessinglargereplicatedrelationscanbeprohibitive.

WithPRS,thejoinexecutionplanofFigure5(b)wouldbeexecutedwithoutanydataexchangebetweennodes,buteachnodewouldneedtoprocessfullOandPSrelations,whichare18and7.5GBinsizeconsideringTPC-Hwith100GB(scalefactor100).

In order to avoid replicating very large relations, a modified strategy is to rep-licatedimensionsandpartitioneveryfact,whilealsoco-locatingLIandO:

• Hash-partition.fact.and.replicate.dimensions.strategy.(PFRD-H):Partitionrelations identified as facts by the user (LI, O, and PS in TPC-H), co-locating LIandO.WithPFRD-H,theexecutionplanofFigure4brequiresrepartition-ingofonlytwodatasets:theintermediateresultLI-O-P-SandrelationPS.ThejoinbetweenLIandOisaLocalJ.

• Workload-based partitioning (WBP):A workload-based strategy wherehash-partitioningattributesaredeterminedbasedonschemaandworkloadcharacteristics.WeusethestrategyproposedinFurtado(2004c).Theparti-tioningalgorithmis:1. Dimensions:.Smalldimensionsarereplicatedintoeverynode(andop-

tionallycachedintomemory).Nonsmalldimensionscansimplybehash-partitionedbytheirprimarykey.Thisisbecausethatattributeisexpectedtobeusedineveryequi-joinwithfacts,asthereferencesfromfactstodimensionscorrespondtoforeignkeys.

Thedeterminationofwhetheradimensionissmallcanbecost-basedor,for simplicity, based on a user-defined threshold (e.g., every relation with

Figure 6. Node contents for PRS and PFRD-H partitioning strategies: (a) PRS partitioning, and (b) PFRD-H partitioning

(a) (b)

Page 243: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�6 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

lessthan250MBistobereplicatedandthosewithlessthan100MBaretobecachedintomemoryforfasteraccess).Forourexperimentswehaveusedthissimpleapproach,butwedescribeacostmodelanddiscussthesearchforoptimalpartitioninginthenextsection.

2. Facts: The objective is to find the hash-partitioning attribute that mini-mizesrepartitioningcosts.Areasonableapproximationtothisobjectiveistodeterminethemostfrequentequi-joinattributeusedbytherelation.Todothis,thepartitioningstrategylooksatthefrequencyofaccesstootherpartitionedrelationsandchoosesthemostfrequentequi-joinattri-butewiththoserelationsasthepartitioningattribute.Wehavedescribedthisprocessinthesecondsection.Amorecomplexapproachinvolvesthesearchforoptimalpartitioning,asdescribedinthenextsection.

Byco-locatingrelationfragmentsthatarefrequentequi-jointargets,thissimplestrategy reduces significantly repartitioning requirements (we have determined ex-perimentallythatWBPachievesanimproventofabout50%overstraightforwardprimary-keybasedpartitioning(PK)whenexecutingthequeryofFigure5underthesameconditionsdescribedlaterintheexperiments).Figure7showsthepartitioningthatresultedfromapplyingtheWBPstrategytoTPC-Hqueryset.ConcerningtheexecutionplanofFigure4b,thisstrategyallowsjoinsLItoOandLI-O-P-StoPStobeprocessedasLocalJ.Repartitioningisnec-essaryonlyforintermediatedatasetLI-O.

• WBP with bitmap join indexes (WBP+JB):Wehavematerializedjoinbitmapsineverynodeforattributes(p_brand,n_name,o_orderpriority,ps_availqty)tospeedupthequeryofFigure5.Forinstance,beforescanningtheLIrelation,theassociatedbitmapjoinindexessuchastheoneforBrandxisscanned.Thisway,onlytheLIrowsassociatedwithBrandxareprocessedanyfurther,includingrepartitioningdata.

Figure 7. WBP partitioning

Page 244: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Inthenextsectionwereviewagenericcostmodelforthestrategies,takingintoaccountfactorssuchasthenumberofnodesandnetworkbandwidth.

Cost.Model

Themainprocessingcosts(listednext)arerepartitioning,datacommunication,lo-calprocessing,andmerging:

a. Repartitioning.cost.(RC):Partitioningarelationconsistsofretrievingtherelation fromsecondarymemory,dividing it into fragmentsbyapplyingahashfunctiontoajoinattribute,andassigningbuffersforthedatatosendtoothernodes.Repartitioningissimilarbutinvolvesafragmentineachnode.Multiplenodescanrehashandexchangerelationfragmentssimultaneously.

b. Data.communication.cost.(DC):Thedatacommunicationcostismonotoni-callyincreasingwiththesizeofthedatatransferred.Weassumeaswitchednetwork,asthisallowsdifferentpairsofnodestosenddatasimultaneously(withnocollisions).This,inturn,allowstherepartitioningalgorithmtobeimplemented more efficiently.

c. Local.processing.cost.(LC):Thelocalprocessingcostforthejoinoperationtypicallydependsonwhetherthejoinissupportedbyfastaccesspathssuchasindexesandthesizeoftherelationsparticipatinginthejoin.Forsimplic-ity,weassumethesecostsalsoincreasemonotonicallyontherelationsizes,although,inpractice,thisdependsonseveralparameters,includingmemorybuffersize.

d. Merging.cost.(MC): The merging cost is related to applying a final query to thecollectedpartialresultsatthemergingnode.Wedonotconsiderthiscostasitissimilarineverycaseandindependentoftheotherones.

Giventheseitems,thenextobjectiveistorepresentthecostasanexpressionin-volving the localprocessingandrepartitioningcosts (hereweconsider thedatacommunication cost within the repartitioning cost). We define weighting parameters as in Sasha et al. (1991): a partitioning cost weight, β, and a local processing cost weight, α, so that β/α denotes the ratio of partitioning costs to local processing costs, forexample,~2(Sashaetal.,1991).Acost-basedoptimizerisusedtodeterminethemostappropriateexecutionplan(Kossman&Stocker,2000;Steinbrunnetal.,1997).Ajoinorderdeterminestheorderbywhichrelationsarejoined.Assumingthedatasetsarejoinedusinganalgorithmsuchasparallelhybridhash-join,ateachstepanadditionalrelationisjoinedtothecurrentintermediateresultsetIRi(selec-

Page 245: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�8 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

tionandprojectionoperatorsareappliedassoonaspossibletoreducethesizeofthedatasetsthatneedtobeprocessed).GiventheresultsetIRiandarelationRj,equations(1)and(2)representtheprocessingcostsforasingleserverandanode-partitionedsystemwhereRjisreplicatedintoallnodesandIRiispartitioned: one server system: ( )a× i jIR + R (1)

replicated join: a×

ij

IR + RN

(2)

Equations(3)and(4)representthelocalprocessingcost(LC)andrepartitioningcost(RC)whenbothdatasetsarepartitioned.TheRCcostin(4)isonlyincurredwhenthedatasetsarenotco-located.

LC for local join: a×

RjiIR +

N N (3)

RC non – colocated data sets: 2

β× −

IR IRi i

N N (4)

ThevalueIRi/Ninequation(4)isthefractionoftheIRithatisateachnodeandIRi/N

2isthefractionofthatquantitythatalreadyhasthecorrecthash-valueforthatnode,thereforerequiringnorepartitioning.Bysubtracting(3)from(2)wegettheadvantageofpartitioningoverreplicatingwhenbothdatasetsareco-located.However,ifthedatasetsarenotco-located,wemust subtract equation (4) from this value. If β is large (small available bandwidth), thisRCcostcanbecomedominantandreplicationbecomesthebestchoice.TheWBPstrategyimprovestheperformanceofthesystembymakingeachnodeprocess1/Nofrelationsandintermediateresultsasmuchaspossible(3)andsimul-taneouslyreducingrepartitioningrequirements(4)byplacingdatasetsbasedontheworkload.Ontheotherhand,PRSfocusesoneliminatingrepartitioningrequire-ments(4)tohandlecontextswithlowbandwidth,butontheotherhand,itneedstoprocesswholerelations(2).Finally,WBP-JBusesbitmapsoverthenodestoavoidtherepartitioningcost(4)(andsimultaneouslyalsoreducinglocalprocessingcosts).Givenacostmodel,acost-basedoptimizerevaluatesthecostofalternativeexecu-tionplans(includingjoinorders)foralternativepartitioningoptions(partitionorreplicaterelations).Inpractice,thiscostmodelisreplacedbyevaluatingthecostofoperationsasoursimulatordescribednextdoes.

Page 246: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Comparative.Analysis. of.................Partitioning.Alternatives

Thepartitioningstrategiesdescribedbeforecanbecharacterizedasmorereplica-tion-oriented (PRS, PFRD-H) and more partitioning-oriented (WBP,WBP+JB)ones. Partitioning-oriented strategies are very efficient in an environment with fast interconnectionsandavailablebandwidth,becauserepartitioningischeapinthoseenvironments.Ontheotherhand,theadvantageofPRS(andPFRD-H)isthatitplaceslowerrequirementsontheinterconnections,withfewerdataexchangere-quirements.However,thedrawbackisthesizeofreplicatedrelationsthatmustbeprocessedineverynode.Ourcomparativeanalysisisbasedbothonasimulatorenvironment, to test several possible configurations (e.g., number of nodes, avail-ablebandwidth)andactualexecutionstohelpvalidatetheresultsandanalyzethestrategiesforTPC-Hqueryset.Wehavebuiltadiscrete-eventsimulationenvironment,whichusesabasicsetofparameterslistedinFigure8.Thesimulatorestimatesthecostofindividualopera-tionsthatneedtobeperformedtoexecutethequery.Operationtasksaresubmittedasrequiredandresourceutilizationfordiskaccess,memoryandbus,processor,andnetworksend/receiveareusedtodeterminecompletiontimeforthosetasks.Forinstance,thecostofahybridhash-joinisrelatedtothecostofscanningtherela-tionsfromsecondarystorage,bucketizingthem,buildingahashtable,andprobingintothehashtable.Forinstance,thecosttojoinrelationsR1andR2consideringtheindividualscancostsisscanR1+scanR2+2(scanR1+scanR2)(1-q),whereqdenotes the fraction of R1 whose hash-table fits in memory (Steinbrunn et al., 1997). Diskaccessrates(measuredinMB/sec)arethenusedtocompletetheevaluationofthecost.Similarstrategiesareappliedtoevaluatetherepartitioningcost,whichinvolvesscanningthedatasets,operatingonthem,assigningbuffers,andsendingtodestinationnodes(withgivennetworkbandwidthinMB/sec).Atypicalnumberofinstructionsusedtoprocessdifferentlow-leveloperationsandtosendandreceivemessages(Network)wereincludedasaparametertothesimulator(Stöhr,Märtens&Rahm,2000).FortheseexperimentsweusedaTPC-Hwith100GBandgenericqueryQaofFigure5a,withdefaultselectivityforattributevalues(x,y,w,z)of(0.7,0.7,0.2,0.2)respectively.Figure9showstheresponsetime(a)andspeedup(b)vs.thenºofnodesforqueryQa.Theperformanceofreplica-basedstrategies(especiallyPRS)ismuchworsethanpartitioning-based ones (WBP,WBP+JB), because nodes have to process largereplicateddatasets.Additionally, (WBP+JB) improves response time further, asearly-selection functionality reduces theamountofdata thatmustbeprocessedandrepartitioned.Ofcoursebitmapjoinindexesmustbeavailableandtheiruseful-nessdependsontheselectivityofqueryselectconditions.Ontheotherhand,ifthe

Page 247: Data Warehouses and OLAP - Concepts Architectures and Solutions

220 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

availablenetworkbandwidthislow,strategiesusingreplicas(e.g.,PRS,PFRD-H)canexhibitbetterperformancerelativetothoserelyingonpartitioning(WBP),asshowninFigure10a.Still,early-selection(WBP+JB)wasthebeststrategybecauseitisnotverydependentonrepartitioning.Wealsosubjectedoursimulatortoconformancetests,toevaluatewhetheritssimu-lation is sufficiently accurate for our purposes. Figure 11 shows a result from those tests.WeranWBPandPRSonasystemwiththecharacteristics:TPC-H25GB;commercialDBMS;eachnodewith3GHzIntelPentium4processor;1GBmemory;200GBSATAIIdisk;1GB/snetwork;queryQa).Cost-basedoptimizationwasused,theschemaobjectswereanalyzedandthebestqueryplansuggestionwaschosen(thedefaultexecutionplanhadverybadperformanceforPRS).Theresultsshow

Disk Processing NºInstrs. Network

seektime 10ms readpage 3,000connectionspeed(default)

100MB/s

settletime+ctrllerdelay

peraccess3ms+1msperpage

processbitmappage

1,500 sendmessage 1,000+#Binstructions

Seq.transferrate/node 100MB/s

extract&hash/probetablerow

250 receivemessage 1,000+#Binstructions

CPU.speed 50MIPS messagesize(small) 128B

Memory.Buffer 500MB/node messagesize(large) 1page(4KB)

Figure 8. Basic parameters for simulation

Figure 9. Response time and speedup VS Nº of nodes (100 MB/s) (log-plots): (a) RT vs Nº of nodes and (b) speedup vs nº of nodes

�0

�00

�000

�0 2� �0 �� �00 2�0

nº of nodes

resp

onse

t�m

e (s

ecs)

�0

�00

�000

�0 2� �0 �� �00 2�0nº of nodes

Spee

dup

PRS

PFRD-H

WBP

WBP+JB

(a) (b)

Page 248: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 22�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thatthesimulatedresponsetimewasreasonablyaccurate.AlthoughitspredictionforPRSwasslightlyhigherthantheactualresponsetimeforanumberofnodesabove100,theadvantageofWBPisstillveryevidentfromtheseresults.Finally,wealsoranthewholeTPC-HquerysetagainstWBPandPRStocomparereplicationvs.partitioningonthefollowingsystem:25nodes;TPCH50GB;eachnodewithPentiumIII866MHzCPU;80GBIDEharddisks;512MBofRAM;100MB/sswitchednetwork).FortheseresultsweconsiderTPC-Hquerysetdividedintogroups(Figure12)accordingtosizesofreplicatedrelationsaccessedandpro-cessedbythejoins.GroupG1accessesonlyapartitionedrelation(LIorPS).Theothergroupsincludereferencestoreplicatedrelationswithsizesinthefollowingintervals:* Small: (0, 500MB); Medium: (500 MB, 5 GB); Large (5 GB, ∞). Thespeedupintervals(Tlines)ofFigure13aretherangeofspeedupvaluesconsid-eringallqueriesinagroup.Fromtheresultswecanseethatthelargerthereplicatedrelations,thesmallestthePRSspeedup(G2,G3,andG4),withalargepenaltyforprocessingheavyReplicaJ joins.WBPachievedanear-to-linearspeedupforallqueries,whilePRSrevealedverylowspeedupformostqueries.

Figure 10. RT vs. Mbps (100 nodes)

Figure 11. Simulation vs. real execution (25 GB, 1Gbps)

�0

�00

�000

�0000

� �0 �00 �000Mbps

resp

onse

t�m

e (s

ecs) PRS

PFRD-H

WBP

WBP+JB

0

200

400

600

800

�0 �0 �00 200nº of nodes

resp

onse

t t�m

e (s

ecs)

WBP-realPRS-realWBP-simulaPRS-simula

Page 249: Data Warehouses and OLAP - Concepts Architectures and Solutions

222 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Replication for Nonstop Availability on NPDW

In this section we discuss briefly alternative replication choices within the NPDW for always-on, always efficient processing and allowing multiple nodes off-line si-multaneouslyfordataloading,maintenance,andotherDBAfunctionality.Figure14showstheschemaofanodeXwithavailability-relatedreplicafromanothernodeY.Noticethatsomerelationsarealreadyreplicatedbyplacement(SandC).NodeXcannowreplacenodeYincaseofunavailabilityofYbysimplyincludingYpartitionsintheprocessing.Thesimplestreplicaplacementstrategyinvolvesreplicatingeachnode’sdataintoatleastoneothernode—fullreplicas(FRs).Incaseoffailureofonenode,anodecontainingthereplicaresumestheoperationofthefailednode.AsimpleplacementalgorithmconsideringRreplicasis:

Numbernodeslinearly;Foreachnodei

For(replica=1toR)datafornodeiisalsoplacedinnode(i+R)MODN;

G1 G2 G3 G4

Partitioned Partitioned+MediumReplicated Partitioned+LargeReplicated Partitioned+LargeReplicated+

MediumReplicated

Q1,Q6,Q15 Q11,Q14,Q19 Q3,Q5,Q7,Q9,Q10,Q12,Q16 Q4,Q8,Q13,Q22

Figure 12. Size and layout of relations involved in parallel join over PRS

Figure 13. Grouped speedup results for PRS and WBP over 25 nodes

0

�0

20

�0

40

G�:Part�t�oned G2:Part�t�oned +Medium

Replicated

G�:Part�t�oned +Large Replicated

G�:Part�t�oned +Large Replicated

+ MediumReplicated

Spee

dup

/ 25

PRS WBP

Page 250: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 22�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Thissimplestrategyallowsthesystemtoworkwithunavailablenodesanditispossibletotakemorethanonenodeoff-linesimultaneously.Themajordrawbackisprocessing efficiency when unavailability of a few nodes occur: consider a NPDW systemwithNhomogeneousnodes.Althoughnormallyeachnodecontainsandprocessesabout1/Nofthedata,ifonenodefails,thenodereplacingitwitharep-licawillhavetoprocesstwiceasmuchdata(2/N),eventhoughalltheothernodeswillprocessonly1/N.Thereplicaeffortisplacedonasinglenode,eventhoughothernodesarelessloaded.Analternativetofullreplicasistousefullypartitionedreplicas(FPR)—replicasarepartitionedintoasmanyslicesastherearenodesminusone.IfthereareNnodes,areplicaispartitionedintoN-1slicesandeachsliceisplacedinonenode.Therep-licaofnodeiisnowdispersedintoallnodesexceptnodei.InordertoallowuptoRnodestobecomeunavailable,theremustbeRnonoverlappingreplicaslicesets.Tworeplicasarenonoverlappediftheequivalentslicesofthetworeplicasarenotplacedinthesamenode.Thefollowingplacementalgorithmisused:

Numbernodeslinearly;ThecopyofthedataofnodeiispartitionedintoN-1numberedslices,startingat1.Forj=0toR:

For(slicexfrom1toN-1)Placeslicexinnode(i+j+x)MODN

This strategy is the most efficient because, considering N nodes, each replica slice has1/(N-1)ofthedataandeachnodehastoprocessonlythatfractioninexcessincaseofasinglenodebecomingunavailable.However,allnodesthatremainactiveareneededtoprocessaslicefromthereplica.InordertoallowuptoRnodestobecomeunavailable,theremustbeRnonoverlappingreplicaslicesets.Ifwedesireynodestobeabletobeoff-linesimultaneouslywhenasinglereplica

G1 G2 G3 G4

Partitioned Partitioned+MediumReplicated Partitioned+LargeReplicated Partitioned+LargeReplicated+

MediumReplicated

Q1,Q6,Q15 Q11,Q14,Q19 Q3,Q5,Q7,Q9,Q10,Q12,Q16 Q4,Q8,Q13,Q22

Figure 14. Schema in node X with replicated schema from node Y

Page 251: Data Warehouses and OLAP - Concepts Architectures and Solutions

224 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

isused,thentheynodesmustnotcontainreplicaslicesofeachother.Partitionedreplicas(PRs).guaranteethisbycreatinggroupsandplacingreplicaslicesfromonegroupinadifferentgroup.Thiswaywecantakeawholegroupoff-linesimultane-ouslyformaintenanceorotherfunctionality,becausethecompletesetofreplicaslicesareelsewhere.ThisstrategyisahybridbetweenFPRandFR.Ifreplicasarepartitionedintoxslices,wedenoteitbyPR(x).Ifx =N,wehaveafullypartitionedreplica.AverysimplealgorithmtogeneratelessthanNslicesis:

Numbernodeslinearly;ThedatafornodeiispartitionedintoXslicesstartingat1;Forslicesetj=0toR

For(slicexfrom1toX)Placeslicexinnode(i+j+x)MODN

Figure15comparestheresponsetime<min:sec>(line)forqueryTPC-HQ9andtheminimumnumberofreplicasneeded(bars)when5outof20nodesareoff-lineusingfullreplicas(FRs),fullypartitionedreplicas(FPRs),andpartitionedreplicas(PRs).Theseresultswereobtainedinasystemwiththecharacteristics:50GBTPC-H;20nodes,eachwith866MHzprocessor;512MBRAM).Thealternativescomparedare:online—everynodeisonline;FPR—fullypartitionedreplicas;PR(10)—par-titionedreplicaswithtwogroupsof10nodes;PR(5)—partitionedreplicaswith4groupsof5nodes.TheseresultsshowthemuchlargerpenaltyincurredbyFRandtheexcessivenumberofreplicasrequiredforFPRtoallow5nodesoff-linesimulta-neously.PR(10)(partitionedreplicaswithtwo10elementgroups)isagoodchoice,asitrequiresasinglereplicaandobtainsagoodresponsetimesimultaneously.Giventheseresults,weconcludethatreplicaspartitionedbygroupsarethemostadvantageous alternative for NPDW if we consider both performance and flexibil-ityinallowingmultiplenodestobetakenoff-linesimultaneouslyformaintenanceandloadingreasons.

Figure 15. Response time and replicas when 5 out of 20 nodes are off-line (aver-age over TPC-H)

0

onl�ne FPR PR(�0) PR(�) FR

nr o

f rep

licas

00:00

��:��

2�:0�

�4:��

resp

onse

t�m

e (m

�n:s

ec)

Nº of ReplicasResponse T�me (m�n:sec)

Page 252: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 22�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Future.Trends

TheNPDWisthebasicdesignfortheDataWarehouseParallelArchitectureProject(DWPA,2005),whichfocusesonarchitecturalcharacteristics,automaticreorga-nization,loadbalancing,responsetimeprediction,andautomaticadaptabilityforthelow-costnode-partitioneddatawarehouse.Theseareinlinewithcurrentandfuturetrendsondatabaseresearchinrelatedissues,whichincludedatabaseself-tuning and autoconfiguration (Chaudhuri & Weikum, 2002; Schiefer & Valentin, 1999; Weikum, Moenkeberg, Hasse, & Zabback, 2002). Runtime prediction isalsoanimportantobjectiveforcurrentandfutureresearchondatabaseengines.Thereareveryinterestingrecentworksonruntimeestimationandimprovement(Chaudhuri,Narasayya,&Ramamurthy,2004;Luo,Naughton,Ellmann,&Watz-ke,2004)thatcanbeusefullyadaptedtoparallelsettingsandinparticulartotheNPDWenvironment.Thereisnowadaysamarkettrendtowardsmoreandmoreopen-sourcesoftware,includingopen-sourcedatabaseenginesbeingdeployedinorganizationsandcost-consciousnessinbothhardwareandsoftwareplatformsisincreasinglyimportant.Inthiscontext,theDWPAconceptofanarchitecturethatcan run anywhere efficiently and adaptively also seems to be in line with current trends.Besides,manyoftheissuesdiscussedinthischaptercanalsobeappliedtootherparallelarchitecturesthatareincreasinglydeployed,inparticularsymmetricmultiprocessors(SMP)andclustersofSMPs.

Conclusion

Wehavediscusseddesignissuesforlow-costalternativestospecialized,fast,andfully-dedicatedparallelhardwaretohandlelargedatawarehouses.Theideaistodesignthesystemwithspecialcareconcerningpartitioningforplacementandre-organization and also concerning availability.Alternative partitioning strategieswereproposedandtheirperformancecompared.Wehavetestedreplica-basedandpartitioned-basedstrategiesandanalyzedtheirperformancevs.thenumberofnodesandavailablenetworkbandwidth.Wealsotestedtheuseofearlyselectionwithjoinbitmapsasanapproachtoovercomeextraoverheadsrelatedtorepartitioningandoverallprocessing.Weconcludedthatworkload-basedpartitioningisasuitablestrategy, and join bitmaps not only improve speedup but also prevent significant slowdownwhentheavailablenetworkbandwidthislow.Wehavealsodescribedreplication-based availability that allows always-on behavior and efficiency when multiplenodesaretakenoff-line.

Page 253: Data Warehouses and OLAP - Concepts Architectures and Solutions

226 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Acknowledgments

ThisworkwassupportedinpartbythePortuguese“Fundação paraaCiênciaeTecnologia,”underprojectPOSC/EIA/57974/2004.

References

Bernstein,P.A.,&Chiu,D.M.(1981).Usingsemi-joinstosolverelationalqueries. Journal of the ACM,28(1),25-40.

ChanC.-Y.,& Ioannidis,Y.E. (1998).Bitmap indexdesign and evaluation. InProceedings of the International Conference on the Management of Data(pp.355-366).

Chaudhuri,S.,Narasayya,V.,&Ramamurthy,R.(2004).EstimatingprogressofexecutionforSQLqueries.InProceedings of the ACM International Confer-ence on Data Management,Paris.

Chaudhuri,S.,&Weikum,G. (2002).Rethinkingdatabase systemarchitecture:Towardsaself-tuning,RISC-styledatabasesystem.InProceedings of Very Large Databases Conference.

Copeland,G.,&Keller,T. (1989).Acomparisonofhigh-availabilitymedia re-coverytechniques.InProceedings of the ACM International Conference on Management of Data.

Coulon,C.,Pacitti,E.,&Valduriez,P.(2004,June28-30).Scalingupthepreven-tivereplicationofautonomousdatabasesinclustersystems.InProceedings of the 6th International Vecpar Conference,Valencia,Spain.

DeWitt,D.,&Gray,J.(1992).Thefutureofhighperformancedatabaseprocessing.Communications of the ACM,35(6).

DWPA.(2005-2008).Fundação para a Ciência e a Tecnologia (ResearchandDe-velopmentProjectPOSI/EIA/57974/2004ofFCT),Portugal.

Furtado, P. (2004a, July). Hash-based placement and processing for efficient node partitionedquery-intensivedatabases.InProceedings of the Tenth Interna-tional Conference on Parallel and Distributed Systems(pp.127-134).NewportBeach,California.

Furtado,P. (2004b,September).Workload-basedplacementand joinprocessingin node-partitioned data warehouses. In Proceedings of the International Conference on Data Warehousing and Knowledge Discovery (pp. 38-47).Zaragoza,Spain.

Page 254: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 22�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Furtado,P. (2004c,November).Experimentalevidenceonpartitioninginparal-lel datawarehouses. InProceedings of the ACM DOLAP 04 Workshop of the International Conference on Information and Knowledge Management,Washington.

Furtado, P. (2005a, May). Efficiently processing query-intensive databases over a non-dedicatedlocalnetwork.InProceedings of the 19th International Parallel and Distributed Processing Symposium,Denver,Colorado.

Furtado,P. (2005b,April).The issueof large relations innode-partitioneddatawarehouses. In Proceedings of the International Conference on Database Systems for Advanced Applications,Beijing,China.

Furtado,P.(2005c,August).Replicationinnodepartitioneddatawarehouses.InProceedings of the VLDB Ws. on Design, Implementation, and Deployment of Database Replication,Trondheim,Norway.

Hsiao,H.,&DeWitt,D.(1990a).Chained declustering: A new availability strategy for multi-processor database machines.PaperpresentedattheInternationalConferenceonDataEngineering.

Hsiao,H.,&DeWitt,D. (1990b). Replicated data management in the Gamma Database Machine.PaperpresentedattheWorkshopontheManagementofReplicatedData.

Hsiao,H.,&DeWitt,D.J.(1991).Aperformancestudyofthreehighavailabilitydata replication strategies. In Proceedings of the Parallel and Distributed Systems.

Hua,K.A.,&Lee,C.(1990,August).Anadaptivedataplacementschemeforpar-alleldatabasecomputersystems.InProceedings of the Sixteenth Very Large Data Bases Conference(pp.493-506).Brisbane,Queensland,Australia.

Kimball,R.,Reeves,L.,Ross,M.,&Thornthwaite,W.(1998).The data warehouse life cycle toolkit.JohnWiley&Sons.

Kitsuregawa,M.,Tanaka,H.,&Motooka,T.(1983).Applicationofhashtodatabasemachineanditsarchitecture.New Generation Computing,1(1),63-74.

Lin,Y.,Kemme,B.,&Jimenez-Peris,R.(2005,August30-September2).Consistentdatareplication:IsitfeasibleinWANs?In Proceedings of the 11th International Europar Conference,Lisboa,Portugal.

Luo,G.,Naughton,J.F.,Ellmann,C.J.,&Watzke,M.W.(2004).Towardaprog-ressindicatorfordatabasequeries.InProceedings of the ACM International Conference on Data Management,Paris.

O’Neil,P.,&Graefe,G.(1995).Multi-tablejoinsthroughbitmappedjoinindices. SIGMOD Record, 24(3),8-11.

Page 255: Data Warehouses and OLAP - Concepts Architectures and Solutions

228 Furtado

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Pacitti,E.,Özsu,M.,&Coulon,C.(2003,August26-29).Preventivemulti-masterreplication inaclusterofautonomousdatabases. InProceedings of the 9th International Europar Conference,Klagenfurt,Austria.

Patterson,D.A.,Gibson,G.,&Katz,R.H.(1998,June).Acaseforredundantarraysofinexpensivedisks(raid).InProceedings of the International Conference on Management of Data(pp.109-116).Chicago.

Rao,J.,Zhang,C.,Megiddo,N.,&Lohman,G.(2002,June).Automatingphysicaldatabasedesigninaparalleldatabase.InProceedings of the ACM International Conference on Management of Data(pp.558-569).Madison.

Rousopoulos,R.(1998).Materializedviewsanddatawarehouses.SIGMOD Re-cord, 27(1),21-26.

Saborit, J. A., Mulero, V. M., & Pey, J. L. (2003). Pushing down bit filters in the pipelinedexecutionoflargequeries.InProceedings of theInternational Con-ference Europar(pp.328-337).

Schiefer,B.,&Valentin,G.(1999).DB2universaldatabaseperformancetuning.IEEE Data Engineering Bulletin, 22(2),12-19.

Shatdal,A.,&Naughton,J.(1995,May22-25).Adaptiveparallelaggregationalgo-rithms.InProceedings of the 1995 International Conference on Management of Data,SanJose,California(pp.104-114).

Stöhr,T.,Märtens,H.,&Rahm,E.(2000).Multi-dimensionaldatabaseallocationforparalleldatawarehouses.InProceedings of the 26th International Confer-ence on Very Large Databases (VLDB), Cairo,Egypt.

Tandem.(1987,September).NonStopSQL,adistributed,high-performance,high-reliabilityimplementationofSQL.PaperpresentedattheWorkshop on High Performance Transactional Systems,California.

Teradata.(1985,November).Teradata DBC/1012 Database Computer System Ma-nual 2.0, C10-0001-02.Author.

TPC.(1999,June).TPC Benchmark H, Transaction Processing Council.RetrievedJune13,2006,fromhttp://www.tpc.org/

Valduriez,P.,&Ozsu,M.(1999).Principles of parallel and distributed database systems(3rded.).PrenticeHall.

Weikum,G.,Moenkeberg,A.,Hasse,C.,&Zabback,P.(2002).Self-tuningdata-basetechnologyandinformationservices:Fromwishfulthinkingtoviableengineering.InProceedings of the Very Large Databases Conference.

Williams,M.,&Zhou,S. (1998).Dataplacement inparalleldatabasesystems:Paralleldatabasetechniques. IEEE Computer Society Press(pp.203-219).

Yu,C.T.,Guh,K.C.,Brill,D.,&Chen,A.L.P.(1989,June).Partitionstrategyfordistributedqueryprocessinginfastlocalnetworks.IEEE Transactions on Software Engineering, 15(6),780-793.

Page 256: Data Warehouses and OLAP - Concepts Architectures and Solutions

Efficient and Robust Node-Partitioned Data Warehouses 22�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Yu,C.T.,&Meng,W.(1998).Principles of database query processing for advanced applications.MorganKaufmann.

Zilio,D.C.,Jhingran,A.,&Padmanabhan,S.(1994).Partitioning key selection for a shared-nothing parallel database system(IBMResearchRep.No.RC19820(87739)).IBM.

Page 257: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�0 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.X

OLAP.with.a.Database Cluster

Uwe RöhmUniversity of Sydney, Australia

Abstract

This chapter presents a new approach to online decision support systems that is scalable, fast, and capable of analysing up-to-date data. It is based on a database cluster: a cluster of commercial off-the-shelf computers as hardware infrastructure and off-the-shelf database management systems as transactional storage managers. We focus on central architectural issues and on the performance implications of such a cluster-based decision support system. In the first half, we present a scal-able infrastructure and discuss physical data design alternatives for cluster-based online decision support systems. In the second half of the chapter, we discuss query routing algorithms and freshness-aware scheduling. This protocol enables users to seamlessly decide how fresh the data analysed should be by allowing for different degrees of freshness of the online analytical processing (OLAP) nodes. In particular it becomes then possible to trade freshness of data for query performance.

Page 258: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction

Onlineanalyticalprocessing(OLAP)systemsmustcopewithhugevolumesofdataandatthesametimemustallowforshortresponsetimestofacilitateinteractiveusage.Theymustalsobecapabletoscale,meaningtobeeasilyextensiblewiththeincreasingdatavolumesaccumulated.Furthermore,therequirementthatthedataanalysedshouldbeup-to-dateisbecomingmoreandmoreimportant.However,notonlyarethesecontraryrequirements,buttheyalsoruncountertotheperformanceneedsoftheday-to-daybusiness.MostOLAPsystemsnowadaysarekeptseparatedfrommissioncriticalsystems.Thismeansthattheyofferacompromisebetween“up-to-dateness,”thatis,fresh-ness(orcurrency)ofdata,andqueryresponsetimes.Thedataneededarepropa-gatedintotheOLAPsystemonaregularbasis,preferablywhennotslowingdownday-to-daybusiness,forexample,duringnightsorweekends.OLAPusershavenoalternativebuttoanalysestaledata.Butadecisionsupportsystemthatcouldprovidedecisionmakersinsightintoup-to-datedata“hotoffthepress”wouldopenexcitingnewpossibilities.Astockbroker,forexample,couldanalysecurrenttrendsinthemarketonline.Fore-commerce,thepersonalisationofWebshopscouldbemuchimprovedbymorecomplexanalysisofcurrentbrowsingbehaviour.Evenfortheso-called“oldeconomy,”newperspectivesopenup,becausetheupdatewindowhasalreadybecomedrasticallysmallina24/7settingofaworldwideoperatingcompany.However,uptonowthereisnosolutionthatmeetstheseperformanceandfreshnessrequirementsatthesametime.In this chapter, we present a new approach to online decision support systemsthatiscapableofanalysingup-to-datedata.Itisbasedonadatabasecluster:thisisaclusterofcommercialoff-the-shelfcomputersashardwareinfrastructureandoff-the-shelfdatabasemanagementsystemsastransactionalstoragemanagers.Acoordinationmiddlewareontophidesthedetailsandprovidesauniform,general-purposequeryinterface.Theresultisa“databaseofdatabases”followingthevi-sionofahyperdatabase(Schek,Böhm,Grabs,Röhm,Schuldt,&Weber,2000).Animportantdesignprincipleofadatabaseclusterisitscomponent-orientednature.Inparticular,wewanttobeabletoeasilyplugtogetherandtoexpandtheclusterusingstandardhardwareandsoftwarecomponentsonly.Thisresultsinahighlyscalablesystemarchitecture.Weconcentrateoncentralarchitecturalissuesandperformanceaspectsofdatabaseclustersforusageinadecisionsupportscenario.Theobjectiveistodevelopabasicinfrastructureforinteractivedecisionsupportsystemsthatarecapableofanalysingup-to-datedataandthatcangiveguaranteesonhowoutdateddataaccessedmightbe.Tobeabletodoso,weneeddifferentversionsofdatainthecluster,whichweachievebyreplicatingdatathroughoutthecluster.Replicationalsohelpstoavoidexpensivedistributedjoinsoverhugeamountsofdata;asalwaysseveralnodescan

Page 259: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�2 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

evaluateanOLAPquery.WewilldiscussqueryroutingstrategiesforanoptimalworkloaddistributionoflongrunningandI/OintensiveOLAPqueriesoverencap-sulatedstandardcomponentsofadatabasecluster.Furthermore,weexplicitlyallowthatnotallclusternodesareup-to-dateallthetime. This is reflected by the notion of freshness of data, which is a measure for thedeviationofacertaincomponentascomparedtoanup-to-datecomponent.Wepresentaninnovativeapproachtoreplicationmanagement,calledfreshness-awarescheduling(FAS).Theintentionoffreshness-awareschedulingistotradequeryperformanceforfreshnessofdata.Consequently,FASintroducesanewquality-of-serviceparameterthatallowsqueriestospecifyanexplicitfreshnesslimitforthedataaccessed.Ifsomequeriesagreetobeevaluatedonolderdata,updatepropa-gation can be interleaved with query processing more efficiently. This results in an overallbettersystemperformanceandonlyaminimalslowdownofbothqueriesandupdates.Inparticular,itenablesclientstorequestandaccessup-to-datedata.Theremainderofthischapterisorganisedasfollows:Inthenexttwosections,wewill first present a scalable infrastructure for an unified OLTP/OLAP database cluster anddiscussphysicaldatadesignalternativesforcluster-basedonlinedecisionsupportsystems.Thesubsequenttwosectionsintroducequeryroutingandfreshness-awarescheduling,andalsodiscussrelatedwork.BothtechniqueshavebeenprototypicallyimplementedaspartofthePowerDBprojectatETHZurichandintheEvaluationsection,wereportontheresultsofacomprehensiveperformanceevaluationwithourprototypesystem.Thelastsectionconcludesthechapter.

Towards an Unified Architecture for OLTP.and.OLAP

TheoverallgoalistoachievehighscalabilityandperformanceforOLAPqueriesandtoallowOLAPclientstoaccessup-to-datedataiftheyaskforit.Inordertoachievethis,wedropthestrictdistinctionbetweenoperationaldatabasesanddatawarehouses.InsteadofseparatingOLTPandOLAPworkloadsinspace,weproposetodeployamiddleware-baseddatabaseclusterforbothworkloadssimultaneouslyas illustrated in Figure 1. The ratio behind this unified architecture is to combine thescalabilityandperformanceofparalleldatabaseclusterswithqualityofserviceguaranteespossiblethroughacoordinationmiddleware.Databaseclustersarecomprisedofaclusterofcommoditycomputersashardwareinfrastructureandoff-the-shelfdatabasemanagementsystemsasa transactionalstoragelayer.SuchadatabaseclusterisanattractiveplatformforbothOLTPandOLAPwithregardtoperformance,scalability,faulttolerance,andcost/performanceratio.Severaltransactionscanruninparallelonseveralnodes.Whentheworkload

Page 260: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ortheamountofdataincreases,onecan“scaleout”theclusterbysimplyaddingnewcomponents(Gray,1999).Finally,faulttolerancecanbeachievedusingrep-licationofeitherhardwareordata.However,thechallengewithadatabaseclusteristobuilditinawaythatallthesepropertiesarepresentatthesametime.Tobeabletogiveclientsguaranteesonboththeconsistencyandthefreshnessofthedataaccessed,weneedsomesortofcoordinationbetweentheOLTPandOLAP.Forthisreason,weintroduceacoordinationmiddlewareontopoftheclusterthathascompleteknowledgeaboutthesystemstate.Inparticular,bothOLTPandOLAPrequestsarepassingthroughthiscoordinationmiddleware:updatesareexecutedimmediatelyononeormoredesignatedOLTPnodesandtheireffectislogged,whilequeriesareroutedtooneoftheOLAPnodes.ThesystemcanroutequeriestoonlyoneOLAPnodebecauseweassumethateachclusternodeholdsitsowncopyofthedatabase.Hence,weareabletoexecuteseveralOLAPrequestsinparallelondifferentnodeswithoutanyinternodecommunicationorexpensivedistributedjoins.Thecoordinatorfurtherallowsthosecopiestohavedifferentfreshness,thatis,torepresentdifferentdatabasesnapshots.ItusesthosedifferentdatabaseversionstoserveOLAPclientsfasterthatagreetoaccessolderdatabasesnapshots.

Example.1:OLAPwithaDatabaseCluster.Allclientrequests,thatisbothOLTPandOLAPworkloads,arepassingthecoordinationmiddle-ware.OLTPtransactionsareimmediatelyforwardedtotheOLTPnodes,andtheeffectsandtimestampsofsuccessfulupdatesarelogged.OLAPqueriesareroutedtooneof theOLAPnodesdependingontheirdatafreshnessrequirements.Thelowertheirrequirementsare,thehigheristhe probability that the coordinator finds a suitable OLAP node that (a) isfreshenoughand(b)isfreetoexecuteanotherquery.Ifsuchanodeexists,thequerywillbeimmediatelyroutedthereandstartexecuting.

Figure 1. Unified OLTP/OLAP cluster architecture

Clients

Coordination

Middleware

Database

Cluster

Page 261: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�4 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Otherwise, the query has to wait while the coordinator first updates an OLAPnodewithpreviouslyloggedupdatestomeetthereader’sfresh-nessrequirements,beforeitcanroutethequerythere.

Thereareanumberofproblemstosolvewithsuchasetting,forexample,whichnodestochoosetoevaluateanincomingOLAPquery.Butthecentralquestionishow to efficiently propagate updates into the cluster without sacrificing correct-nessorscalability.Onesolutionisfreshness-awarescheduling,whichallowsonetoseamlesslytradefreshnessofdataforqueryperformance.

System.Architecture

Inthefollowing,wegiveamorein-depthdiscussionofthesystemarchitectureasdevelopedinthePowerDBprojectatETHZurich(Röhm,2002;Scheketal.,2000).AdatabaseclusterconsistsofcommodityPCs,eachrunninganoff-the-shelfcom-mercialdatabasesystem(DBMS)asatransactionalstoragelayer.Forthesakeofsimplicityletusassumethatallclusternodesarehomogeneous,thatis,theyrunthesameDBMSwiththesamedatabaseschema.Eachnodeholdsafullcopyofthedatabase.WealsorefertoadatabaseattheclusternodesasacomponentDBMS.Wedistinguishbetweenoneormorededicatedmasternodesandnsecondarynodes.Thereisacoordinationmiddleware(alsoreferredtoascoordinator)thatadministersthecluster.Itisresponsibleforscheduling,routing,andloggingoftheincomingrequests.Exceptforthispurpose-builtcoordinator,theclusterconsistsofoff-the-shelfhardwareandsoftwarecomponents.Thecoordinationmiddlewarecomprisesaninputqueue,aschedulerwithaninputqueue,arouter,arefresher,andalogger(cf.Figure2).

Figure 2. System architecture details (Röhm, 2002)

updates query query query

InputQueue

master node node � node 2 node n

State InfoRefresher Scheduler

RouterLogger

CDBMS0CDBMS� CDBMS�

CDBMSn

EOTlog entry

Coordination Middleware

db db db dbrefreshlog

Cluster of Databases

global log

Page 262: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Clientssubmitread-onlyandupdatetransactionstothemiddleware.Themiddlewareschedulesandroutesupdatesandqueriestoclusternodes.Theschedulergeneratesacorrectinterleavedexecutionorder.Themasternodesserveasprimarynodeswhereall updates will first be executed. In the following discussion, we consider only a singlemasternode.However,themasternodecouldactuallybeclustereditself.Itsinternalorganisationisnotofinteresttothecoordinator.Itonlyneedstoknowtheserialisationorderandmaintainsahigh-levellog.Queries arrive at an input queue. The input queue is not processed in a “first-in-first-out”manner.Instead,theschedulerdecidesinwhichordertoprocesstheincomingrequests(awaitingtimelimitavoidsstarvation).Ingeneral,therecanbeseveralsecondarynodeswhereaqueryofareadtransactionmayexecute.Therouterchoosesoneofthesenodesforeachquery.Todoso,thecoordinationmiddlewaremaintainssomeglobalsystemstateinformation,forexample,theversionofeachnode.

Transaction.Model

With regard to transactions submittedbyclients, that is, client transactions,wedistinguish between read-only (OLAP) transactions and update transactions.Aread-onlytransactiononlyconsistsofqueries.Anupdatetransactioncomprisesatleastoneinsert,delete,orupdatestatement—shortlyreferredtoasupdates—nexttoarbitrarilymanyfurtherSQLstatements.Incaseofaread-onlytransaction,theclient specifies an explicit freshness limit for the data accessed. Furthermore, de-coupledrefreshtransactionspropagateupdatesthroughthecluster.Transactionmanagementbythecoordinationmiddlewareguaranteesglobalcorrect-ness and consistency. We deploy a simplified two-layered open-nested transaction model(Weikum&Schek,1992):Thequeriesofread-onlytransactionsassubmittedbyclientsareexecutedandcommittedasseparatesubtransactionsinthecompo-nentDBMSs.Thecoordinationmiddlewarealsocontainsagloballogger.Itkeepstrackoftheupdatesubtransactionsonthemasternodeandtheirdecoupledrefreshsubtransactionsonthesecondarynodes.Thelatterarecontrolledbytherefresher.Thisallowsbeinggloballycorrectwithoutdistributedcommitprocessingaswith,forexample,two-phase-commit(2PC).Avoidingdistributedcommitprocessingisespeciallyimportantforlargeclusters.

Physical.Design.Alternatives

AfundamentalproblemforOLAPwithadatabaseclusteristhephysicalorganisationofdatathatyieldsgoodperformancewithregardtoqueriesandupdates.Thetwo

Page 263: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�6 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

primitives for physical design of individual relations that are specific to distribution aredatapartitioninganddatareplication.Partitioning,thatis,datafromarelationgoestodifferentnodes,typicallyresultsinintraqueryparallelism.Replicationinturnleadstointerqueryparallelism,asdifferentnodescanevaluatequeriesinpar-allel.Usingthesedesignprimitives,wehavethefollowingbasicalternativesforphysicaldesigninadatabasecluster:• Data.partitioning: Themostcommonformofdatapartitioninginaparallel

databaseenvironmentishorizontalpartitioning.Withhorizontalpartitioning,thetuplesofarelationaredivided(ordeclustered)amongmanyorallnodesoftheclustersuchthateachtupleresidesononlyonenode.Thereareseveralpartitioningstrategiespossibleinordertodecidewhichtupleisstoredatwhatnode:roundrobinpartitioning,hashpartitioning,andrangepartitioning.Roundrobinpartitioningistheonlypartitioningstrategy,whichisnotbasedontheactualvaluesofthedata.Instead,assumingaclusterconsistingofnnodes,theithtupleissimplystoredonthe(imodn)-thnode.Incontrast,withtheotherpartitioningstrategiesoneormoreattributesfromthegivenrelationalschemaaredesignatedaspartitioningattributes.Hashpartitioninghasheseachtupleonthepartitioningattributesusingahashfunctionontherange[1,...,n].Rangepartitioningassignsvaluerangesofthepartitioningattributestocertainclusternodes. For efficiently evaluating queries that access or scan whole relations, roundrobinpartitioningisbestsuited.However,ifonlyasubsetofarelationisaccessed,hashorrangepartitioningarebetterthanroundrobinpartitioningbecausetheyallowaccessingonlythedataneeded(assumingthatthetuplesarepartitionedonthesameattributesusedintheselectioncondition).

• Data.replication:.Theotherbasicalternativeisfullreplication,thatis,eachclusternodeholdsacopyofthewholedatabase.Queriesareservedbyasingleclusternode;severalqueriescanbeevaluatedinparallelondifferentnodes.Abigadvantageisthatevenforcomplexmultijoinqueries,nocommunicationordatashippingbetweenclusternodesisneeded;thismightnotbeanissuewithOLTP,butitisamassiveproblemwithOLAPworkloads(Röhm,2000).However,fulldatareplicationlimitsthescalabilitywithlargedatasets,asthewholedatasetisstoredseveraltimes.Inspiteofthecapacityandthelowcostsoftoday’sharddisks,thismightnotbeaproblemstoragewise;butitprovidesnospeedupforlargerdatasets,butratherforhigherworkloads,anditinduceshighmaintenancecosts(updateshavetobeexecutedonseveralcopiesinsteadofjustonce).

• Hybrid designs: Warehouseschemataareoftenofaregularformwithacen-tralfacttable,whichisconnectedtoseveraldimensiontablesbyforeignkeyrelationships. Such a schema is also referred to as star or snowflake schema (Chaudhuri&Dayal,1997).Thisobservationmotivatesotheralternatives,

Page 264: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

subsequentlycalledhybriddesigns(Akal,Türker,Schek,Breitbart,Grabs,&Veen,2005;Baru,Fecteau,Goyal,Hsiao,Jhingran,Padmanabhan,Copeland,&Wilson,1995;Röhm,2000).Forexample,inRöhm(2000),thefactrelationispartitionedoverallnnodes,andeachnodeholdsacopyofalltheotherrela-tions.Previousworkonphysicalorganisationofindividualrelationsshowedthatpartitioningisofadvantageaslongaspartitionsdonotbecometoosmall(Metha&DeWitt,1997).Inotherwords,oneshouldpartitionthelargestrela-tiontoobtaintheoptimalspeedup.Theothermotivationistheheuristicthatfacttablesaresubjecttofrequentupdates.Withthishybriddesign,eachup-dateofthebigrelationgoestoonlyoneclusternode,asopposedtonclusternodesinthecaseoffullreplication.Anotherhybriddesignistoorganisetheclusterintosubclusters,ornodegroups,withthewholedatabasereplicatedateachsubcluster,butusingpartialdatapartitioningwithinthesubcluster(Akaletal.,2005).

• Discussion: Datapartitioningisaverypopularapproachtothephysicaldesignforparalleldatabases.Itprovidesaverygoodscalabilitywithlargerdatasets,especiallyifthepartitioningschemeisfreeofdataskew,thatisallpartitionsareaboutofthesamesize,andifallsubqueriesareevaluatedlocallyonjustonedatapartition.Otherwise,ifforexampletwopartitionedrelationsarejoinedonnoncollocatedjoin-attributes,largeamountsofdatamustbeshippedbe-tweentheclusternodes.ThismightnotbeanissueinanOLTPenvironment,butgiven thecomplexOLAPqueries that typicallyaccess largepartsofadatabaseitisimportanttoavoidanykindofnoncollocatedjoinprocessing.

Themainadvantageof replicationoverpartitioning is thatnodistributedqueryprocessingisnecessaryatall.Insteadofintraqueryparallelism,itoptimisesinter-queryparallelisminthatdifferentqueriescanbeevaluatedinparallelandwithoutinterferenceonseparateclusternodes.Thedisadvantagesof full replicationarethelimitedscalabilitywiththedatasizeandthemaintenancecosts.Updatesmustbepropagatedtoallreplicasinthecluster,whichgivesrisetoanumberofprob-lemswithregardtocorrectness,updateperformance,andscalability.Hence,thisistypicallytakenas“rule-out”argumentforreplication.Wewilldiscussapossiblesolutiontothisupdatepropagationprobleminalatersectionofthischapter.Thecentralideaistoallowandconsciouslymakeuseofmultiple(consistent)versionsofthedatabaseatdifferentclusternodes.Therationalebehindhybriddesignsistocombinetheadvantagesofbothdatapar-titioninganddatareplication.Considerforexampletheapproachtopartitiononlythefacttablewhilereplicatingthedimensiontables(Röhm,2000).Withregardtoqueryevaluation,thereisadistinctionbetweenqueriesthatrefertothepartitionedrelation and those that do not. In the first case, all cluster nodes process the original query,andthecoordinationmiddlewarecomputestheoverallresult.Ifthequery

Page 265: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�8 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

doesnotcontainaggregation,theoverallresultissimplythedisjointunionoftheintermediate results; computing the overall result in the other case is not difficult either.Ifthequerydoesnotrefertothepartitionedrelation,theirevaluationisaswithfullreplication.Whileliteraturehasproposedotherschemesforphysicalorganisationofdatabasesasawhole,forexample,collocatedjoins(Baruetal.,1995)ormultiattributedeclus-tering(Ghandeharizadeh,DeWitt,&Qureshi,1992),onecanseesuchtechniquesas refinements of the basic alternatives described previously. There are a variety of furtherphysicaldesignalternativesavailableforOLAP,forexample,materialisedviews(Gupta&Mumick,1995)ordatacubes.However,suchcanbeseensome-whatorthogonaltothisdiscussion.Thefundamentalproblemsaddressedheredonotchange.Ofcourse,combiningthesetechniquesisnaturalandwillleadtoevenbetterperformance.Butthegeneralstatementsaboutthedevelopedschedulingandroutingtechniqueswouldnotessentiallydiffer.Finally,researchershaveproposeddatacompressionschemesandapproximativequery-evaluationtechniques(e.g.,Chakrabarti,Garofalakis,Rastogi,&Shim,2000),includingtechniquesthatallowtotraderesultqualityforquery-answeringtime.Itshouldbenotedthattheyarealsoorthogonaltoourcurrentconcern,althoughtheycomplementeachotherverywell:differentclusternodescouldholddiffer-entcompressedversionsofthedatabase.Thecoordinationmiddlewarecouldthentakeintoaccountthatmoresophisticatedcompressionschemestypicallyinducehighermaintenancecosts.However,thosecombinationsarebeyondthescopeofthischapter.Sointhefollowingweassumethephysicaldesignonallclusternodestobeidentical.

Query.Routing

Forthefollowingsection,weconcentrateonaquery-onlyenvironment,andtosup-portthejoin-intensiveOLAPqueries,weassumefullreplicationasphysicaldesigninaclusterofdatabases.Asaconsequence,thereisnoneedfordistributedqueryprocessingbutinsteadeachnodeoftheclusteriscapableofevaluatinganyOLAPquerystand-aloneandinparalleltoothernodes.Thedecisiononwhichnodetoactuallyuseforqueryevaluationiscalledqueryrouting.Theobjectivesofqueryroutingaretobalancetheloadoftheclusternodesandtoreducequeryresponsetimes.Effectivequeryroutingrequiressomeknowledgeaboutthecurrentstateofthecluster.Inparticular,thiscomprisestheavailablenodesandthenumberofcurrentlyactivetransactionsateachnode.Inthefollowing,werefertothelatterastheloadofanode,alsoknownascurrentdegreeofmultiprogram-ming(Weikum&Vossen,2001).

Page 266: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Amiddleware-basedapproachhastheadvantagethatglobalknowledgeaboutthecurrentsystemstatecanalsobeeasilymaintainedifallclientsissuetheirqueriestothecoordinationmiddlewareofthedatabasecluster.Insuchamiddleware-basedarchitecture,queryroutingisactuallytwofold.Clientsplacetheirqueriesintotheinputqueueoftheclustercoordinator.Inourterminologynow,routingofa(single)query is thedecisiononwhichnodeof theclustershallexecuteaquery.Giventhis, routing of a set of queries consists of two steps: first, the scheduler decides in whichordertoroutethequeriesintheinputqueue.Second,itroutestheindividualqueriesinthisorder.

Classification of Query Routing Strategies

Wecanclassifyqueryroutingstrategiesalongsidethefollowingtwodimensions:

• Query-dependence:.As first classification, we can distinguish whether routing strategiesmaketheroutingdecisionquery-dependentor-independent.Manyconventionalroutingapproachesarequery-independent,whichmeansthatthequery to be routed does not influence the routing decision. In contrast, more sophisticatedapproachesbasetheroutingdecisiononthecurrentquerytoberouted.

• Previous.knowledge:.Routingstrategiescanbefurtherdistinguishedwithregard to flexibility whether the routing decision is done dynamically at run-time or based on precomputed data. Standard affinity-based routing is a good example for a routing algorithm using precomputed affinity data. In contrast, cacheapproximationroutingusesacompletelydynamicapproach.

Inthefollowing,wegiveanoverviewofexistingqueryroutingstrategiesandrelatethem to the presented classification scheme.

Conventional.Routing.Strategies

Traditionally,routingalgorithmsarepublishedunderthetermtransactionroutingthatcanbeconsideredequivalenttoqueryroutingastypicallyonlyreadtransac-tionsareconsidered.Conventional,query-independentroutingalgorithmsalwaysrouteasetofqueriesinthesameorderastheyarriveatthesystem.Inotherwords,they process the input queue according to a first-come-first-served policy. A typi-calexampleistheFCFFS(“First-Come-First-Free-Server”)strategythatassumesa multiprogramming level of one and routes each query to the first free server in a round-robinfashion.

Page 267: Data Warehouses and OLAP - Concepts Architectures and Solutions

240 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Carey,Livny,andLu(1985)andCareyandLu(1986)addressedtheproblemofdynamicallyassigningqueriestositesinadistributed(shared-nothing)databasesystemwithfullreplication.Theypresentedtwoquery-dependentalgorithmsthatare based on a classification of queries according to their I/O and CPU demands: BNQRD(“BalancetheNumberofQueriesbyResourceDemands”)routesqueriestothesitewiththesmallestnumberofqueriesofthesametype(i.e.,I/O-boundorCPU-bound),whileLERT(“LeastEstimatedResponseTime”)usestheI/OandCPUdemandinformationtorouteaquerytothesitewiththeleastestimatedre-sponsetime.Inasimulationstudy,BNQRDimprovedwaitingtimesofqueriesbyaround10%comparedtoasimplebalancingstrategy(BNQ—“BalancetheNumberofQueries”),whiletheLERTalgorithmperformedonlyabitbetterthanBNQRDinmostcases.Thomasian (1987) refined this approach. Queries are classified not only into CPU- or I/O-bound, but into a finite set of query types based on all their service demands (i.e.,CPU,memory,differentdisks).Threeroutingalgorithmshavebeencomparedinasimulationstudy.Theresultsagainshowedthatquery-dependentroutingbasedon query classification significantly improves the system performance. The article alsoconcludesthatanaccurateresponsetimepredictionalgorithmisquitecomplexand that the mapping of incoming queries into a fixed set of query types remains difficult to find and to achieve.

Affinity-Based Transaction.Routing

The idea behind affinity-based routing is to assign queries that access the same data tothesamecomponent.Thesearetypicallyquery-dependentstrategies.Forexample,Yu, Cornell, Dias, and Iyer (1987) presented an affinity-based approach to transaction routing that classified incoming transactions into affinity groups based on previous knowledgeofthedatabasecallreferencepattern.Thereferencepatternisretrievedfromtraceinformationofthetransactionworkload.Theproposedroutingschemeassigns a fixed destination system to each affinity group. In simulation study, the authors showed that affinity-based routing significantly reduced lock-contention and bufferI/O,andthereforeclearlyimprovedtheresponsetimesoftransactions.Anoverviewandframeworkforworkloadallocationindistributeddatabasesys-tems is presented in Rahm (1992). Approaches to affinity-based transaction routing typicallyconcentrateonOLTP-liketransactions.Inparticular,theyonlyconsiderthe data accessed by the queries to decide whether there is affinity between two givenqueries.Thenatureoftheaccessisnottakenintoaccount,thatis,“scan”vs.“randomaccess.”Astrongdisadvantageisthatsuchapproachesrelyonprecom-puteddatafromlow-leveltraceinformationofpreviousrunsoftheworkload.Thisneglectsthecomponent-orientednatureofadatabasecluster.

Page 268: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 24�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Cache.Approximation.Query.Routing

Theobjectiveofqueryrouting is toreducequeryresponse time.Theexecutiontimesofqueries—especiallyOLAPqueries—aredominatedbyI/Ocosts.Whilecachingplaysamajorroleforperformanceofqueryevaluation,allpreviousmen-tionedroutingalgorithmsdonottakecachingeffectsintoconsiderationatall.Incontrast, cache approximation routing estimates the benefit of a cache state for a query.Theideaisthattheexecutiontimeofaqueryisminimalattheclusternodewhosecachecontainsthelargestsubsetofdatathatwillbeaccessedbythequery(Röhm,Böhm,&Schek,2001).This also means that the scheduler no longer processes its input queue in a first-come-first-served manner. Instead, the scheduler reorders the queries in the input queue according to the estimated benefit values. The query for which the routing algorithm estimates the highest benefit is executed first. However, the scheduler hastoensurethatallqueriesarestillprocessed.Thatis,itmustavoidstarvationof queries with low benefit values. One approach is to tag queries with an age and reorder the input queue according to both benefit and age of the queries. Another oneistointroduceawaittimethresholdandtopreferablyroutequerieswhosewaittimeexceedsthisthreshold.Astraightforwardapproachtoapproximatethesetoftuplesaccessedbyaqueryis tokeep trackof the relationsaccessed.This is simplyachievedbyanalysingtheFROMclauseofthequery.Sucha“CacheApproximationbyFROMClause”(CAF)approximatesthestateofcomponentcachesbythesetofrelationsaccessedby the most recent n queries, and defines the benefit of the cache state of cluster nodeCforqueryQbythesizeoftheintersectionofthecachestateandtheFROMclauseofthequery.

Example.2:CacheApproximationRouting.Assumeasmallclusteroftwonodes,N1andN2,withtheapproximatedcachestatesCacheStateN1={Region,Customer,LineItem}andCacheStateN2={Orders,LineItem,Suppliers}.NowthefollowingqueryQxhastoberouted:

S E L E C T c o u n t ( * ) F R O M O r d e r s , L i n e I t e m W H E R E . . .

ItaccessesthetworelationsOrdersandLineItem.TheintersectionwiththeapproximatedcachestateofnodeN1is{LineItem},whichisacachingbenefit of 1; the intersection with the cache state of node N2 is {Orders, LineItem}, corresponding to a caching benefit of 2. Hence, CAF would routequeryQxtonodeN2,becauseitexpectsthereahighercachingbenefit.

Page 269: Data Warehouses and OLAP - Concepts Architectures and Solutions

242 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Thisapproachreliesonaveryroughapproximationofquerieddata.Itdoesnottakeintoaccountwhichportionsoftherelationsareactuallyaccessedbyaquery.Theseportionsaredescribedbyeachquerypredicate.However,quantifying theexactoverlap of the sets of tuples specified by two different predicates having common attributes is difficult. In Röhm et al. (2001), an interesting refinement based on bit stringshasbeenproposed.Theauthorsproposedtofurtherapproximatethesetoftuples specified by a predicate using bit string signatures. By doing so, one can reduce the calculation of benefits to bit string comparisons. This can be done efficiently.

Freshness-Aware.Scheduling

Thepreviousconsiderationshaveconcentratedonaquery-dominantenvironment.Wehaveseenthatreplicationisakeyfactorforqueryperformanceandhowqueryroutingcanoptimiseitsutilisation,forexample,byapproximatingthestateofthecaches of the cluster nodes. Until now, we have left aside the problem field of up-datingourdataset.Thismightbestate-of-the-artfordataintensiveapplicationslikeOLAPtostrictlydistinguishbetweenqueryandupdatephases.However,adatawarehouseofferingdata,whichisaweekold,willnotbeacceptablemuchlonger.Rather, the intentionshouldbe tobeable to runqueriesoverup-to-datedata ifneeded.Andactually,acluster-basedapproachtoOLAPcanprovidethis.Thesimultaneousadmissionofqueriesandupdatesinthepresenceofreplicationnecessitatesatransactionmanagementandreplicationcontrolcomponent.Trans-actionmanagementisresponsibleforacorrectinterleavedexecutionofconcurrentqueriesandupdates,whilereplicationmanagementassuresthatupdateseventuallyaffectallcopiesofthedata.

Replication.and.Correctness

Anaïveapproachtoglobalcorrectnesswouldusesynchronousreplicationwhereeachupdateimmediatelygoestoallreplicas,alsoreferredtoaseagerreplication.However,suchapproachesnecessitateadistributedatomiccommitprotocol,whichisnotfeasibleforlargenumberofnodes(Gray,Helland,O’Neil,&Shasha,1996).Thismeansthatinaclusterenvironment,onehastopropagateupdatesasynchro-nouslywithouttwo-phasecommitprotocol.Aninterestingapproachisusinggroupcommunicationprimitives(Kemme,2000;Wu&Kemme,2005):aclientsubmitsitsupdatetoonedatabaseserverwhichthenbroadcaststheupdatetoallotherclusternodesusinganatomicbroadcastprotocol.Theuseofappropriatenetworkprimitivesmakesaconcludingtwophasecommit

Page 270: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 24�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

unnecessary,becausethoseprotocolsguaranteetheordereddeliveryofthemes-sagessothattheglobalserialisationordercanbedeterminedlocallybyeachnode.However, group communication protocols must determine this global order first, andhenceaddarelativelyhighoverhead.ApproachessuchasbyWuandKemme(2005) furthermore require direct support by thedatabasemanagement system,whichviolatesthecomponent-orientednatureofaclusterofdatabases.Thereareavarietyofapproachestoasynchronousreplication.Mostrestricttrans-actions toaccessonlyasinglenode inorder tobeable toensureserialisabilityfor certain restricted cluster configurations (e.g., Breitbart, Komondoor, Rastogi, Seshadri,&Silberschatz,1999).Thelatteralternativehasalsonocontrolovertheemergingserialisationorder.Itcanonlyguaranteethatthetransactionsofaclientareserialisedcorrectlybetweenallothertransactions,butnotpreciselyinwhichorder. However, if we do not want to sacrifice correctness—that is the system shall guaranteeone-copyserialisability—thisisnotenough.Hence,letusinthefollowinglookatanalternativeapproachtoclusterreplica-tioncontrolthatcombinesthecorrectnessandup-to-dateguaranteesofdistributedtransactionswiththeperformanceofasynchronousupdatepropagation.Itisusingaprimary-copyreplicationschemewithdeferredrefreshment:Thecoordinationmiddleware executes updates first on the OLTP nodes (the number of update trans-actions thatrun inparallelon theOLTPnodeisnotrestricted).Afteranupdatetransaction finishes, as soon as a refresh is activated, the refresher propagates the changestotheremainingreplicasusingdecoupledrefreshtransactions.Inmoredetail,eachofthemrefreshesonenodeandisactivatedseparately.Eachnode guarantees locally sterilisable executions. In addition, we have to ensurereadconsistency:thismeanstopropagaterefreshtransactionsinawaythatquery-onlytransactionsalwaysseethesameversionduringtheirlifetime.Thishastobehandledwithcarebecauseaswediscussedintheprevioussection,theroutercansendeachqueryofaread-onlytransactiontoadifferentOLAPnode—routingofqueries of the same transaction to different cluster nodes is beneficial because of cachingeffects.Nexttoguaranteeingserialisability,OLAPsystemsaimforemostatimprovingqueryresponsetime.Theideaistointroducefreshnessofdataasanewquality-of-serviceparameterfortransactionprocessing.Thisshouldallowforexplicitlytradingfresh-nessofdataaccessedforqueryperformance.OLAPclientsspecifyalowerboundoffreshnessforthedataaccessedbyqueriesofthecurrenttransactiont,denotedbyft.Thefreshnesslimitisanadditionalconstraintforqueryrouting.Inthefollowing,weintroduceafreshness-of-data-drivenapproachtoreplicationmanagementinadatabasecluster:Freshness-awarescheduling(FAS).FAScom-prisesreplicationmanagementandmechanismsofmultiversionconcurrencycontrol.ThenotionoffreshnessofdataiscrucialinthecontextofFAS.Wewillpresentlydiscussfreshnessmetrics,beforeintroducingFASinmoredetail.

Page 271: Data Warehouses and OLAP - Concepts Architectures and Solutions

244 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Freshness.of.Data

Freshnessmeasuresarecloselyrelatedtothenotionofcoherencyforwhichseveralideashavebeenproposedintheliterature(e.g.,Alonso,Blott,Feßler,&Schek,1997;Pacitti&Simon,2000).Recently,thoseconceptshavebeenrevivedunderthetermsfreshnessofdata(Röhm,Böhm,Schek,&Schuldt,2002)orcurrency(Guo,Larson,Ramakrishnan,&Goldstein,2004).Withthoseapproaches,aso-calledfreshnessindexf(d)∈[0,...,1]measuresthefreshnessofsomedatad.Thisfreshness index reflects how much the data has deviated from the up-to-date ver-sion.Intuitively,afreshnessindexof1meansthedataisup-to-date,whileanindexof 0 would characterise the data as “infinitely” outdated. One can distinguish three basic approaches to define the freshness index: delay freshness, version freshness, anddatadeviation.

• Delay.freshness: A delay freshness index reflects how late a certain cluster nodeisascomparedtotheup-to-dateOLTPnode(Guoetal.,2004;Röhmetal.,2002).Itisbasedontheperiodoftimebetweenthelastpropagatedup-date and the most recent update on the up-to-date node. Let τ (c) denote the commit time of the last refresh subtransaction on an OLAP node c, and τ (c0)thecommittimeofthemostrecentupdatesubtransactionontheOLTPnode.Then the delay freshness index is defined as f (c) = τ (c) / τ (c0).Thisimpliesthatf∈[0,1].

• Version.freshness: Alternatively, one can base the freshness definition on the versiondifferencebetweenaclusternodeandtheup-to-datenodec0. We define theversionofaclusternodecasthenumberofcommittedupdatetransactions,denotedbyv(c).FollowingPacittiandSimon(2000),theversionfreshnessindex is then defined as f(c) = v(c) / v(c0);f∈[0,1].Notethataversioncanactuallybeseenasakindoflogicaltime.

• Freshness index by data deviation:Forthesakeofcompleteness,wealsowant to mention a definition of the freshness index based on data deviation (alsoknownasarithmeticornumericalcoherencycondition)(Gallersdörfer&Nicola, 1995). However, such a freshness index definition is only meaningful forsinglenumericaldataitems.Letd(x,c)denotethedatavalueofthereplicax stored at some node c. Then the data deviation freshness index is defined as f(x,c) := 1 - | (d(x,c) − d(x, c0))/d(x,c0)|.

Foramiddleware-basedarchitecturepursuingacomponent-orientedapproach,onlythe two first mentioned freshness indexes are feasible. The reason is that the coor-dinatorfollowsa“black-box”principlewhenmanagingtheclusternodes,whichmeansthatitdoesnothavedirectaccesstothecontentofthenodes.Hence,itcan-

Page 272: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 24�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

not base its freshness definition on concrete data values. Delay freshness offers the mostintuitiveandworkload-independentwayofspecifyingthefreshnessneedsofaclient(“atmost10minutesold”insteadof“atmost1000updatesbehind”).Hencewewillassumedelayfreshnessinthefollowingdiscussion.

Overview.of.FAS

Thebasicmechanismsforensuringserialisabilityandreadconsistencyareasfol-lows:FASusestheprimary-copyreplicationschemewithdeferredrefreshmentasdiscussed before and executes updates first on the OLTP node. After an update sub-transaction finishes, as soon as a refresh is activated, FAS propagates the changes totheremainingreplicasusingdecoupledrefreshsubtransactions.Inmoredetail,somevariantofmultiversionconcurrencycontrol(MVCC)isused.Freshness-awareschedulingdoesnotprovidejustanyversiontoaclientbutaver-sionwhichmeetsthegivenfreshnesslimit.Inotherwords,onlyclusternodeswithfreshnessabovethegivenlowerboundwillbeconsideredduringqueryrouting.Consequently, the higher the specified minimum freshness is, the smaller is the por-tionoftheclustertowhichthecorrespondingquerymayberouted.Intheworstcase,nonodeisavailablewiththerequesteddegreeoffreshness,andthecoordinationmiddleware must activate update propagation first. Hence, although FAS follows alazyprimary-copyreplicationapproachwithdeferredupdates,itneverthelessal-lowsqueriestoaccessthemostrecentdata.

Example.3: Freshness-AwareScheduling.Figure3showsthreequerieswith different freshness limits (Röhm et al., 2002). The first query asks for data with a degree of freshness of at least 0.9. Only the first OLAP nodehasafreshnessindexthatmeetsthislimitandhenceistheonlypossibletargetnode.Incontrast,Query2isaskingonlyfordatawithafreshnessofatleast0.5.Thisfreshnesslimitismetbyallclusternodes.

Figure 3. Principle of freshness-aware schedulingupdate� updatem

Query�

limit 0.�

Query�

limit 0.�

Query�

limit 0.��

freshness�.0

freshness0.��

freshness0.8

freshness0.�refresh

transactionsnode�

node� node�nodem

OLTP node OLAP nodes

Page 273: Data Warehouses and OLAP - Concepts Architectures and Solutions

246 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Hence,FASisfreetorouteQuery2toanyoftheOLAPnodes.InFigure,thelastnodeischosentoservethequery.Notethatitactuallycouldhavebeenevaluatedbyanynodeofthecluster.Query2seesindeedaclusterofsizen,whileforQuery1onlyonenodeisusable.

Theimplicationstocorrectnessarethatqueriescontendedwithstaledataareseri-alisedbeforeupdatetransactionswhichhavealreadycommittedbuthavenotbeenpropagatedtothequery’stargetnodesofar.Thisrequiresthatrefreshandread-onlytransactionsareinterleavedcorrectlyonthevariousnodes,andthatread-onlytransactionsaccessonlyoneversionofthedata.Toensurethisistheresponsibilityofthecoordinationmiddleware(Röhmetal.,2002).

Performance.Evaluation

Let us finally have a short look at the performance characteristics of the presented queryroutingandupdatepropagationalgorithms.Inthefollowing,wereportonresultsofanexperimentalevaluationofaprototypeimplementationaspartofthePowerDBprojectatETHZurichusingtheTPC-Rbenchmarkonalargeclusterof128nodes(Röhmetal.,2002).Weproceedasfollows:First,wequantifytheper-formanceimprovementonecanachievewithdifferentqueryroutingalgorithms.Then,weexploretheoverallperformanceandscalabilityofFAS.Weareespeciallyinterested in the influence of different freshness requirements on the query and up-dateperformanceinthecluster.

Evaluation.Setup

Theprototypecomprisesadatabasecluster,onedesignatedOLTPnode,thecoor-dinator,andaclientsimulator.Theevaluationhasbeenconductedonadatabaseclusterconsistingof128PCs(1GHzPentiumIII,256MBytesRAM,and2SCSIharddisks)eachrunningMicrosoftSQLServer2000underWindows2000Ad-vancedServer.Wegenerated thedatabasesaccording to theTPC-Rbenchmarkwithascalingfactor1(sizeincludingindexesabout2GB).Themasternode,theglobal log,andtheclientsimulatorarePentiumII400MHzmachineswith thesame software configuration. The coordinator runs on a separate PC with two 1 GHzPentiumIIIand512MBRAM.Allnodesareinterconnectedbyaswitched100MBitEthernet.

Page 274: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 24�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Comparison.of.Query.Routing.Algorithms

First,weareinterestedintheoverallperformanceofthedifferentqueryroutingstrategiesasdiscussedearlierinthischapterfordifferentclustersizes,thatis,theirscalability.Therefore,wemeasuredtheperformanceofthreedifferentvariantsofacacheapproximationrouterversusaconventionalrouterforclustersizesupto24nodes:

• FCFFS:.Conventional first-come-first-free-server routing which is query in-dependentandnotcache-aware.Itsperformanceservesasanorientationpointfortheotherstrategies.

• CAF:DynamiccacheapproximationroutingbasedontheFROMclauseofqueries.

• CAS:.Dynamiccacheapproximationroutingbasedonpredicatesignatures.• CASweighted: Like CAS, but with a refined benefit model using normalised

benefits.

TheresultsareshowninFigure4(Röhmetal.,2001).

Figure 4. Query routing performance and scalability: (a) throughput, (b) throughput scaled to FCFFS, (c) mean response time, and (d) MRT scaled to FCFFS

..

..

(a)

(c)

(b)

(d)

Page 275: Data Warehouses and OLAP - Concepts Architectures and Solutions

248 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Althoughthethroughputimprovesonlybylessthan10%withcacheapproximationrouting as compared to FCFFS routing, the mean response time can be significantly shortened.ThebestresultsachievedCAS-weightedrouting,whichoffersalmost20%fastermeanresponsetimesoverthewholeclustersize.Allfourinvestigatedroutingstrategiesalsoshowedaperfectlylinearscalabilityovertheclustersize.Forexample,thethroughputwitha24-nodeclusteris24timeshigherthanonasinglenode.

Performance.of.Freshness-Aware.Scheduling

Inthefollowing,weareinterestedintheperformancecharacteristicsofFAS.Wehaveusedadynamicworkloadoftenupdatestreamsconcurrentlyexecutedwithtwiceasmanyqueryingclientsastherearenodesinthecluster.Wefurthervariedthemeanfreshnessrequestedbyreadtransactionsfrom0.6upto1.TheresultsareshowninFigure5(Röhmetal.,2002).Thepresentedmiddleware-basedclusterarchitectureproved tobeveryscalableanditalsoshowsthatfreshness-awareschedulingeffectivelyallowsuserstotradefreshnessofdataforfasterqueryresponsetime.Weseethattheslowdownofque-riesbytheconcurrentupdatestreamforFASisaround10%upto60%withregardtomeanresponsetimeascomparedtotheno-updatecase.Ifclientsissuequerieswithmeanfreshnesslimit0.6(whichmeansatmost20minutesold),theyobtaintheresultsabout30%faster,comparedtoarequestedfreshnessof1.Thisisexactlytheeffectfreshness-awareschedulingistargetingon:tradingdata“up-to-dateness”forqueryperformance.Theresultsalsonicelyshowthatthereisnoslowdownwithincreasingclustersize,asitwouldbethecasewithsynchronousupdates:weweredoublingthenumberofclientsandtheclustersizeatthesametime,andmeanre-sponsetimedidnotchange,butquerythroughputdoubled.Thismeansthatatleast

Figure 5. Performance of FAS with varying freshness limits

(a) (b)

Page 276: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 24�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

upto128nodes,freshness-awareschedulingscaleslinearlywithincreasingclustersize.Atthesametime,thethroughputachievedby10concurrentupdatestreamsremainsconstant,evenwithalargeOLAPclusterofupto128nodes(notshowninthegraphs).Obviously,thecoordinationmiddlewarecankeepupwiththeupdatersandtheincreasingOLAPworkload(on128nodes,256querystreamsareactive)withoutaslowdownforeitherqueriesorupdates.Atthesametime,theCPUloadoftheschedulerwith128nodeswasonly30%onaverage.Inotherwords,theco-ordinationmiddlewareisnotbecomingabottleneck.

Summary

Onlineanalyticalprocessingmustcopewithhugevolumesofdataandatthesametimeallowforshortresponsetimestofacilitateinteractiveusage—andtherequire-mentthatthedataanalysedshouldbeup-to-dateisbecomingmoreandmoreim-portant.Thischapterhaspresenteddatabaseclustersasascalableinfrastructureforinteractivedecisionsupportsystemsthatarecapableofanalysingup-to-datedata.Wediscussedcentralarchitecturalissuesandperformanceaspects,suchasseveralphysicaldesignalternatives,possiblequeryroutingalgorithms,andinnovativeup-datepropagationprotocols.Mostdatawarehousesnowadaysofferacompromisebetweenfreshnessofdataandmaintenancecosts.ButrecentdevelopmentssuchasFAS(freshness-awareschedul-ing)orrelaxedcurrencyconstraintsallowtoexplicitlytradefreshnessofdataforquery performance, while at the same time not sacrificing correctness:

1. Therequestedfreshnesslimitofqueriesisalwaysmet;and2. Data accessedwithin a transaction is consistent, independent of its fresh-

ness.

Thepresentedmiddleware-basedclusterarchitectureproved tobeveryscalableanditalsoshowsthatfreshness-awareschedulingeffectivelyallowsuserstotradefreshnessofdataforfasterqueryresponsetime.ItmakesuseofthedifferentdegreesoffreshnessoftheOLAPnodesintheclusterinordertoservesuchqueries,whichagreetoaccesslessfreshdatasoonerthanqueriesaskingforthelatestdata.TheproposedarchitecturehasbeenimplementedaspartofthePowerDBprojectatETHZurich,andweconductedanextensiveperformanceevaluationusingtheTPC-Rbenchmark.Animportantresultisthatthesystemscaleslinearly,evenifprovidingclientsaccesstoup-to-datedatainadatabaseclusterwith128nodes.

Page 277: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�0 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

References

Akal,F.,Türker,C.,Schek,H.-J.,Breitbart,Y.,Grabs,T.,&Veen,L.(2005).Fine-grained replication and schedulingwith freshness and correctness guaran-tees.InProceedings of the 31st VLDB Conference on Very Large Databases, Trondheim, Norway.

Alonso,G.,Blott,S.,Feßler,A.,&Schek,H.-J.(1997,May12-14).Correctnessandparallelismofcompositesystems.InProceedings of the Sixteenth ACM SIGMOD Symposium on Principles of Database Systems (PODS),Tucson,Arizona(pp.197-208).ACMPress.

Baru,C.K.,Fecteau,G.,Goyal,A.,Hsiao,H., Jhingran,A.,Padmanabhan,S.,Copeland,G.P.,&Wilson,W.G.(1995).DB2paralleledition.IBM Systems Journal, 34(2),292-322.

Breitbart,Y.,Komondoor,R.,Rastogi,R.,Seshadri,S.,&Silberschatz,A.(1999,June1-3).Updatepropagationprotocolsforreplicateddatabases.InProceed-ings of the 1999 ACM SIGMOD International Conference on Management of Data,Philadelphia(pp.97-108).ACMPress.

Carey,M.J.,Livny,M.,&Lu,H.(1985,May13-17).Dynamictaskallocationinadistributeddatabasesystem.InProceedings of the Fifth International Con-ference on Distributed Computing Systems (ICDCS),Denver,Colorado(pp.282-291).IEEEComputerSociety.

Carey,M.J.,&Lu,H.(1986,May28-30).Loadbalancinginalocallydistributeddatabasesystem.InProceedings of the 1986 ACM SIGMOD International Conference on Management of Data, Washington,DC(pp.108-119).ACMPress.

Chakrabarti,K.,Garofalakis,M.N.,Rastogi,R.,&Shim,K.(2000,September10-14).Approximatequeryprocessingusingwavelets.InProceedings of the 26th International Conference on Very Large Data Bases (VLDB),Cairo,Egypt(pp.111-122).MorganKaufmannPublisher.

Chaudhuri,S.,&Dayal,U.(1997).AnoverviewofdatawarehousingandOLAPtechnology.SIGMOD Record, 26(1),65-74.

Gallersdörfer,R.,&Nicola,M.(1995,September11-15).Improvingperformanceinreplicateddatabasesthroughrelaxedcoherency.InProceedings of the 21st International Conference on Very Large Data Bases (VLDB),Zurich,Swit-zerland(pp.445-456).MorganKaufmannPublishers.

Ghandeharizadeh,S.,DeWitt,D.J.,&Qureshi,W.(1992,June2-5).Aperformanceanalysisofalternativemulti-attributedeclusteringstrategies.InProceedings of the 1992 ACM SIGMOD International Conference on Management of Data,SanDiego(pp.29-38)..ACMPress.

Page 278: Data Warehouses and OLAP - Concepts Architectures and Solutions

OLAP with a Database Cluster 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Gray,J.(1999).How high is high performance transaction processing?Paperpre-sentedatthe1999WorkshoponHighPerformanceTransactionProcessingSystems(HPTS),Asilomar,California.

Gray,J.,Helland,P.,O’Neil,P.E.,&Shasha,D.(1996,June4-6).Thedangersofreplicationandasolution.InProceedings of the 1996 ACM SIGMOD Confer-ence,Montreal,Quebec,Canada(pp.173-182).

Guo,H.,Larson,P.,Ramakrishnan,R.,&Goldstein,J.(2004,June13-18).Relaxedcurrencyandconsistency:Howtosay‚GoodEnough’inSQL.InProceedings of the 2004 ACM SIGMOD Conference,Paris.

Gupta,A.,&Mumick,I.S.(1995).Maintenanceofmaterializedviews:Problems,techniques, and applications. IEEE Database Engineering Bulletin, 18(2),3-18.

Kemme,B.(2000).Database replication for clusters of workstations.Doctoraldis-sertationETHNo.13864,ETHZurich,DepartementofComputerScience.

Mehta,M.,&DeWitt,D.J.(1997).Dataplacementinshared-nothingparallelda-tabasesystems.VLDB Journal, 6(1),53-72.

Pacitti,E.,&Simon,E.(2000).Updatepropagationstrategiestoimprovefreshnessinlazymasterreplicateddatabases.VLDB Journal, 8(3-4),305-318.

Rahm,E.(1992).Aframeworkforworkloadallocationindistributedtransactionprocessingsystems.Systems Software Journal, 18,171-190.

Röhm,U.(2002).Online Analytical Processing with a Cluster of Databases.Doc-toralthesis,DISDBIS80,AkaVerlag,Berlin.

Röhm,U.,Böhm,K.,&Schek,H.-J.(2000,March27-31).OLAPqueryroutingandphysicaldesigninadatabasecluster.InZanioloetal.(Ed.),Proceedings of the Sixth International Conference on Extending Database Technology(LNCS1777,pp.254-268).Konstanz,Germany:Springer-Verlag.

Röhm,U.,Böhm,K.,&Schek,H.-J.(2001,April2-6).Cache-awarequeryroutinginaclusterofdatabases.InProceedings of the 17th International Conference on Data Engineering (ICDE) (pp. 641-650). Heidelberg, Germany: IEEEComputerSociety.

Röhm,U.,Böhm,K.,Schek,H.-J.,&Schuldt,H.(2002,August20-23).FAS:Afreshness-sensitivecoordinationmiddlewareforaclusterofOLAPcomponents.InProceedings of the 28th International Conference on Very Large Data Bases (VLDB)(pp.754-765),HongKong,China:MorganKaufmannPublishers.

Schek,H.-J.,Böhm,K.,Grabs,T.,Röhm,U.,Schuldt,H.,&Weber,R.(2000,June19-21).Hyperdatabases.InProceedings of the First International Conference on Web Information System Engineering (WISE) (pp.14-25).HongKong,China:IEEECSPress.

Page 279: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�2 Röhm

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Thomasian,A.(1987,September).Aperformancestudyofdynamicloadbalancingindistributedsystems.InProceedings of the Seventh International Conference on Distributed Computing Systems (ICDCS)(pp.178-184).Berlin,Germany.IEEEComputerSociety.

Weikum,G.,&Schek,H.-J.(1992).Conceptsandapplicationsofmultileveltransac-tionsandopennestedtransactions.InA.K.Elmagarmid(Ed.),Database trans-action models for advanced applications(pp.515-553).MorganKaufmann.

Weikum,G.,&Vossen,G. (2001). Transactional information systems: Theory, algorithms, and the practice of concurrency control and recovery. MorganKaufmannPublishers.

Wu, S., & Kemme, B. (2005). Postgres-R(SI): Combining replica control withconcurrencycontrolbasedonsnapshotisolation.InProceedings of the 21st International Conference on Data Engineering (ICDE), Tokyo,Japan.

Yu, P. S., Cornell, D. W., Dias, D. M., & Iyer, B. R. (1987). Analysis of affinity based routinginmulti-systemdatasharing.Performance Evaluation, 7,87-109.

Page 280: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.XI

Toward.Integrating.Data.Warehousing.with.Data.Mining.

TechniquesRokia Missaoui

Université du Québec en Outaouais, Canada

Ganaël JatteauUniversité du Québec en Outaouais, Canada

Ameur BoujenouiUniversity of Ottawa, Canada

Sami NaoualiUniversité du Québec en Outaouais, Canada

Abstract

In this chapter, we present alternatives for coupling data warehousing and data mining techniques so that they can benefit from each other’s advances for the ul-timate objective of efficiently providing a flexible answer to data mining queries addressed either to a bidimensional (relational) or a multidimensional database. In particular, we investigate two techniques: (1) the first one exploits concept lattices for generating frequent closed itemsets, clusters and association rules from multi-dimensional data, and (2) the second one defines new operators similar in spirit to

Page 281: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�4 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

online analytical processing (OLAP) techniques to allow “data mining on demand” (i.e., data mining according to user’s needs and perspectives). The implementation of OLAP-like techniques relies on three operations on lattices, namely selection, projection and assembly. A detailed running example serves to illustrate the scope and benefits of the proposed techniques.

Introduction

Datamining(DM)istheprocessofdiscoveringhiddenknowledge(i.e.,patternsandassociations)fromlargedatasetswhiledatawarehousing(DW)aimsatintegratingandaggregatingdatafrommultipledatasourcesforfurtheranalysis(Chaudhuri&Dayal,1997;Han&Kamber,2000).Thetwotechnologiespresentsomecommonfeaturessuchas(1)information/knowledgeextractionfromverylargedatasets,(2)supportfordecisionmaking,(3)useofbackgroundknowledgeforadditionalinformation(knowledge)extraction,and(4)needforacarefulandgenerallytime-consumingdatapreprocessingstep.Therearemanytopicsthathaveattractedresearchersintheareaofdatawarehous-ing: data warehouse design and multidimensional modeling, efficient cube com-putation,queryoptimization,discovery-drivenexplorationofcubes,dataminingincubes,andsoon.Inordertoavoidcomputingawholedatacube,manystudieshavefocusedonicebergcubecalculation(Xin,Han,Li,&Wah,2003),semanticsummarizationofcubes(Lakshmanan,Pei,&Zhao,2002),andapproximationofcubecomputation(Shanmugasundaram,Fayyad,&Bradley,1999).Recently,thereisanincreasinginterestforapplying/adaptingdataminingtechniquesandadvancedstatisticalanalysis(e.g.,clusteranalysis,principalcomponentanalysis,log-linearmodeling)forknowledgediscovery(BenMessaoud,Boussaïd,&Rabaséda,2004;Lu,Feng,&Han,2000;Sarawagi,Agrawal,&Megiddo,1998)anddatacompres-sionorqueryapproximationpurposesindatacubes(Babcock,Chaudhuri,&Das,2003;Barbara&Wu,2001).Theobjectiveofthischapteristoproposetechniquesforreinforcingthecollabora-tionandlinkagebetweenDWandDMtechniquesbyusingformalconceptanalysisandconceptlattices(Ganter&Wille,1999)asasoundandtheoreticalframeworkfor data mining. More precisely, we first present our view of rule mining in data cubes.Then,weadapttheinteractiveexploratorymechanismsinherenttoonlineanalyticalprocessing(OLAP)techniquestotheframeworkofdataminingtoolsandtechniquesinordertohelptheuserselecttheappropriatesubsetofanalreadyexist-ing data mining output. To conduct the first task, we discuss association rule mining inmultidimensionaldataandshowhowcubeclusteringusingconceptlatticesandfrequentclosed itemsetscanbeexploitedforgeneratingmeaningfulassociation

Page 282: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

rules. For the second task, we provide a formal definition and an interpretation of OLAP operations for exploratory data mining by redefining key OLAP operations intheframeworkofconceptlatticesusingthreeoperations:selection,projection,andassemblyoflattices.Thechapterisorganizedasfollows.First,anillustrativeexampleaboutcorporategovernancequalityinCanadianorganizationsisdescribedinthenextsectionandwillservetoshowthepotentialoftheproposedsolution.Wethenprovidesomebackgroundaboutdatawarehousinganddataminingtechniquesandgiveanover-viewofrelatedwork.Oureffortstowardstheintegrationofthetwotechnologiesaredescribedlater,followedbyaconclusionandfurtherwork.

A.Running.Example

ThepresentrunningexamplewillbeusedthroughoutthischaptertoillustrateoursolutiontowardstheintegrationofDMandDWtechnologies.Itisbasedonastudyconductedonasampleof216CanadiancompanieslistedontheStockMarketandaimedatestablishinglinksbetweencorporategovernancepracticesandothervari-ablessuchastheshareholdingstructure.Inthecontextofthisstudy,governanceis defined as the means, practices and mechanisms put in place by organizations to ensurethatmanagersaredefendingshareholders’interests.Governancepracticesinclude,butarenotlimitedto,thesizeandthecompositionoftheboardofdirectors,thenumberofindependentdirectorsandwomensittingontheboardaswellasthedualitybetweenthepositionofCEOandthepositionofboardchairman.ThedatausedinthisstudyweremainlyderivedfromanarticlepublishedinOctober7,2002intheCanadianGlobe and Mailnewspaper,whichdiscussedthequalityofgovernancepracticesinasampleofcompanies.Moreprecisely,thementionedarticleprovidedaglobalevaluationofcorporategovernancepracticesineachcompanyand assessed five governance practices: the composition of the board of directors, theshareholdingsystem(orcontrolstructurewhichincludesinternalshareholders,blockholdersandinstitutionalinvestors),thecompensationstructureformanagers,theshareholdingrightsandtheinformationsharingsystem.Datarelatedtothetypesofshareholdingsystems,theassociatedpercentageofvot-ingrightsandthetotalassetsofeachcompanywereobtainedfromthe“StockGuide2002”database.Datarelatedtothesizeoftheboard,thenumberofindependentdirectorsandwomensittingontheboard,aswellasthedualitybetweenthepositionofCEOandthepositionofboardchairmanwereextractedfromthe“DirectoryofDirectors”oftheFinancialPostnewspaper.Basedonthecollecteddata,adatawarehousehasbeenconstructedwithsixteendimensionsandaninitialsetoffacttablesfordatacubedesignandexploration.

Page 283: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�6 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Theleft-handside(LHS)ofTable1isafacttablewhichprovidesthenumberofenterprises(NbEntr)accordingtothreedimensions:duality,internal,andgovern,whiletheright-handside(RHS)givesAvgAsset, a codification of the average com-panyassetaccordingtothesamesetofdimensions.ThevalueofAvgAssetis1whentheaverageassetislessthan1,000Kand2otherwise.WhenDualityissetto1,thismeansthattheCEOisalsotheboardchairman.DimensionInternalrepresentstheproportionofTopManagementsittingontheboard,anditspossiblevaluesare1 (proportion < 10%), 2 (≥ 10 and < 25%), and 3 (≥ 25%). Governexpressestheindexofcorporategovernancequality(orsimply qualityindex)andtakesoneofthe following values (from bad to good quality): 1 (quality < 40%), 2 (≥ 40 and < 70%), and 3 (≥ 70%).

Background

In this section, we first provide some background on data warehousing and OLAP techniques.Then,werecallbasicnotionsabouttheframeworkweusetoidentify

FactID Duality Internal Govern AvgAsset

1 0 1 2 2

2 0 1 3 2

3 0 2 1 1

4 0 2 2 2

5 0 2 3 2

6 0 3 2 1

7 0 3 3 1

8 1 1 2 2

9 1 1 3 2

10 1 2 1 1

11 1 2 2 2

12 1 2 3 2

13 1 3 1 1

14 1 3 2 2

15 1 3 3 1

FactID Duality Internal Govern NbEntr

1 0 1 2 23

2 0 1 3 20

3 0 2 1 1

4 0 2 2 50

5 0 2 3 23

6 0 3 2 16

7 0 3 3 3

8 1 1 2 4

9 1 1 3 4

10 1 2 1 1

11 1 2 2 32

12 1 2 3 3

13 1 3 1 2

14 1 3 2 30

15 1 3 3 4

Table 1. (a) Fact table with COUNT aggregate; (b) Fact table with AVG aggre-gate

(a) (b)

Page 284: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

clusters(groupings)andmineassociationrules.Finally,somerelatedstudiesaboutintegratingDWwithDMtechniqueswillbepresented.

Data.Warehousing

Adatawarehouseisanintegrationofconsolidatedandnonvolatiledatafrommul-tipleandpossiblyheterogeneousdatasourcesforthepurposeofdecisionsupportmaking.ItcontainsacollectionofdatacubeswhichcanbeexploitedviaOLAPtechniquessuchasdrill-downandrollupinordertosummarize,consolidate,andviewdataaccordingtodifferentdimensions(Chaudhuri&Dayal,1997).Inamul-tidimensionalcontextwithasetDofdimensions,adimension(e.g.,locationofacompany,time)isadescriptiveaxisfordatapresentationunderseveralperspectives.Adimensionhierarchycontainslevels,whichorganizedataintoalogicalstructure(e.g.,country,stateandcityforthelocationdimension).Afacttable(seeTable1)containsnumericalmeasuresandkeysrelatingfactstodimensiontables.AcubeC=<D,M>isavisualrepresentationofafacttable,whereDisasetofdimensionsofthecube(withassociatedhierarchies)andMitscorrespondingmeasures.

Data.Mining

Dataminingisacrucialstepintheprocessofknowledgediscoveryindatabases(KDD),whichaimsatdiscoveringhiddenpatternsandrelationshipsinadatacol-lectionforpredictionanddecision-makingpurposes.Majordataminingfunctionsinclude characterization, comparison, classification, association, prediction, cluster analysis,andtime-seriesanalysis(Han&Kamber,2000).AssociationruleminingisbyfarthemostfrequentlyusedDMtechnique.AspointedoutbyImielinskiandMannila(1996),aKDDsystemshouldoffertwomajorfunctionalities:generatingKDDobjects(i.e.,DMoutput)andretrievingtheonesthatwerealreadyextracted.Thisobservationcomesfromthefactthatinre-lationaldatabases,theoutputofaqueryisatablethatcanbequeriedlaterlikeanybasictable.Wefullyadheretothisopiniontoapplytheso-calledclosureprincipleto KDD systems, and we define a set of operations on data mining output.

Association Rule Mining

Miningassociationrulesfromagivendatabaseoftransactionsconsiststogenerateallassociation rules that have user-specified minimum support and confidence (Agrawal &Srikant,1994).LetI={i1, i2,..., im}beasetofmdistinctitems(e.g.,milk,bread).AtransactionT contains a set of items in I, and has an associated unique identifier

Page 285: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�8 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

calledTID.AsubsetYofIwherek=|Y|isreferredtoasak-itemset(orsimplyanitemset),andkiscalledthelengthofY.AtransactiondatabaseTDisthewholesetoftransactions.AsetX ⊆TDiscalledatidsetwhilethefractionoftransactionsinTDthatcontainsanitemsetYiscalledthesupportofYandisdenotedbysupp(Y).Thus,anitemsetisfrequent(orlarge)whensupp(Y)reachesatleastauser-speci-fied minimum threshold called minsupp.AnassociationrulerisanimplicationoftheformY1⇒ Y2,whereY1andY2aresubsetsofI,Y1∪Y2isafrequentitemset,andY1∩ Y2=∅.Thesupportoftherulerisequaltosupp(Y1∪Y2) while its confidence is computed as the ratio supp(Y1∪Y2)/supp(Y1).Inourrunningexample,anassociationrulecouldbethefollowing:

• Female=1andInternal=1⇒Govern=3[10%,52%].TherulemeansthatiftherearefemalesontheboardandiftheproportionofTopManagementsittingontheboardislessthan10%(i.e.,Internal=1),thenthequalityofgovernance is good (at least equal to 70%) with a confidence of 52%.

InApriori-likealgorithms(Agrawal&Srikant,1994),ruleminingisconductedasfollows.ForeveryfrequentitemsetY,allnonemptysubsetsofYareextracted.Then,foreverysubsetY1 ofY,aruleoftheformY1⇒ Y2 is generated if its confidence ≥ minconf (a user-defined threshold).SincetheintroductionofApriori,avarietyofapproachestotheproblemofasso-ciationrulemininghasbeenproposed.Themainobjectiveofmostofthemistoimprove the efficiency of the basic method, while the key difficulty is the poten-tiallylargenumberoffrequentitemsets(FIs).ToreducethesizeoftheFIset,somestudieswereconductedonfrequentcloseditemsetsFCIs(Pasquier,Taouil,Bastide,Stumme,&Lakhal,2005;Wang&Karypis,2003;Zaki&Hsiao,2002).AfrequentitemsetXisclosedifthereexistsnopropersupersetZofYwithsupp(Y)=supp(Z).Inotherwords,anyitemsethasthesamesupport(i.e.,isfrequent)asitsclosure.Inadualway,atidsetXisclosedifthereexistsnopropersupersetUofXsuchthatUandXhavethesamesetofitems.Inthecloseditemsetframework,somestudieswereconcernedwiththegenerationofnonredundantsetsofassociationrules(Pasquieretal.,2005;Pfaltz&Taylor,2002;Valtchev,2002b)whereY1isagenerator,thatis,aminimalsubsetofYsuchthatitsclosureisequaltoY.Thefollowingisasummaryofthekeyresultsfromconceptlatticetheory(Ganter&Wille,1999),whichprovidesthebasisofourapproachtowardsthegenerationoffrequentcloseditemsetsandassociationrulesaswellasmanipulationofDMoutputandvisualizationusinganestedstructure.

Page 286: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Concept Lattices

LetK =(O,A,R)beaformalcontext(seeTable2),whereO,A,andRareasetofobjects(e.g.,transactions),asetofattributesorproperties(e.g.,itemsinatransactiondatabase),andabinaryrelationbetweenOandA,respectively.TwofunctionsfandgsummarizethelinksbetweensubsetsofobjectsandsubsetsofattributesinducedbyR.Functionfmapsasetofobjectsintoasetofcommonattributes,whereasgisthedualforattributesets:

• f:P(O)→P (A), f(X)=X’={a ∈A|∀o ∈X,oRa},whereP(O) isthepowersetofO.

• g:P (A)→P (O),g(Y)=Y’={o ∈O|∀a ∈Y,oRa}.

Table2shows,forexample,thatf({2,6})={a, b}andg({a, c, d})={6,7,8}1.Furthermore,thecompoundoperatorsg°f(X)andf°g(Y)(denotedby'')areclosureoperatorsoverP(O)andP(A)respectively.Thismeans,inparticular,thatZ ⊆Z''and(Z'')''=Z''foranyZ∈P(A)orZ ∈P(O).Aformalconceptcisapairofsets(X,Y)whereX ∈P(O),Y ∈P(A),X=Y’andY=X’.Xiscalledtheextentofc(denotedbyExtent(c))andYrepresentsitsintent(denotedbyIntent(c)).Thenotionofconceptisthennothingbutaclustersinceitconsistsofobjectsgroupedtogetherbyproximityorsimilarity(here,accordingtoacommonintent).Inthecloseditemsetminingframework(Pasquieretal.,2005;Valtchevetal.,2002b;Zakietal.,2002),XandYcorrespondtothenotionofclosedtidsetandcloseditemsetrespectively.

Table 2. Context K = (O={1, 2,...,8}, A={a, b,..., h, i}, R)

A

A1 A2

Tid a b c d e f g h i

1 X X X

2 X X X X

3 X X X X X

4 X X X X X

5 X X X X

6 X X X X X

7 X X X X

8 X X X X

Page 287: Data Warehouses and OLAP - Concepts Architectures and Solutions

260 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ThesetGofallconceptsextractedfromthecontextKispartiallyorderedbyin-tent/extentinclusion:

(X1,Y1) ≤ (X2,Y2)⇔X1⊆X2,Y2⊆Y1.

Aconcept(Galois)latticeassociatedwithcontextKisthenacompletelatticeL=B(O,A,R)=⟨ G, ≤⟩,whereconceptsinGarelinkedaccordingtoapartialorder.TheHassediagramofthelatticeLdrawnfromTable2isshownonFigure1wheretidsetsanditemsetsareindicatedonbothsidesofnodes.Forexample,node#11representstheconcept(678,acd)whichmeansthattheitemsetacdisacloseditem-setwiththreesupportingobjects:6,7,and8.AsubsetBofconceptsinGisanorder filter(order ideal respectively)if∀a ∈G,b ∈B,b ≤ a ⇒a∈B(a ≤ b ⇒a ∈B respectively).ThesmallestidealthatcontainsagivenconceptbinGiscalledaprincipal ideal and is given by ↓b={cinG|c ≤ b}.Dually, ↑b denotes the principal filter for b.Forexample(seeFigure1),theprincipalidealforconcept#10containsconceptslabeledby#1,#3,#5,and#10,whileitscorresponding principal filter contains the set {#10, #15 , #17 , #19}.

Integrating.DM.with.DW.Techniques

Datawarehousinganddatamininghavebeengreatlyprogressinginanindependentway.However,manyresearchersandpractitionersrecognizetheneedforadeepintegrationofthetwotechnologies(Han,1998;Han&Kamber,2000).

Figure 1. The Hasse diagram of the lattice related to context K

Page 288: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 26�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Somestudieswereconductedtoeitheradaptmultidimensionaldatasothatclassicaldataminingtechniquescanbeused,oradaptdataminingalgorithmstothecontextof multidimensional data. The first solution consists for example to first flatten multidimensionaldatabeforeapplyingDMtechniques(Goil&Choudhary,2001)or to first map multidimensional data onto data sequences (Pinto et al., 2001). The secondsolutionaimstodevelopnewsolutionsorreviseexistingonestodirectlyminemultidimensionaldataas inDong,Han,Joyce,Pei,andWang(2001)andImielinski,Khachiyan,andAbdulghani(2002).Substantialworkhasbeenconductedondatamining indatawarehousesas re-portedinHanandKamber(2000).Thisincludes(butisnotlimitedto)exceptiondetectionindimensionaldatasets(Knorr,Ng,&Tucakov,2000),cubegradegen-eration(Imielinskietal.,2002),constrainedgradientanalysis(Dongetal.,2001),anddiscovery-drivenexaminationofcubes(Sarawagietal.,1998).Cubegradesareassociationruleswhichexpresstheimpactofcubechangesonasetofmeasures.In the context of the governance running example, cubegrades can help find (1) howtheaverageassetheldbyenterprisesisaffectedbythepresenceoffemaleson theboard,or (2)howtheenterpriseshavingagoodgovernance index(70%andmore)comparewithenterpriseswithalowergovernanceindexintermsoftheaverageamountofassets.InNaoualiandMissaoui(2005),anapproachtowardsapproximating the answer to OLAP queries and the identification of classification andcharacteristicrulesisproposedusingtheroughsettheory.

Data.Mining.Techniques. for............Data.Warehousing

Inthissectionwefocusonassociationruleminingfromdatacubes.

Rule Mining from Cubes

Associationrulemining(ARM)indatacubesisdifferentfromtheclassicalARMbecausemeasuresindatacubesareaggregatedvalueswhichdependintimatelyonthevaluetakenbyeachoneofthecubedimensions,whileeachitem(respectivelyattribute)intransactiondatabases(resp.relationaltables)exists(takesitsvalue)inanindependentwayfromtherestofitems(attributes).Basedonthatfact,werevisitthenotionofitemsetandassociationrulebyimposingadditionalconstraintsontheminordertomakethemmoremeaningfulinamultidimensionalcontext.Twocaseswillbeconsidered:

Page 289: Data Warehouses and OLAP - Concepts Architectures and Solutions

262 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

• ThecubeC=<D, M>hasauniquemeasureinM,whichcorrespondstoaCOUNTaggregatefunction

• ThecubehasatleastameasurerelatedtoanaggregatefunctionotherthanCOUNT

In the first case, ARM from a given cube CwhosedimensionsareinDamountstoARMfrom(apossiblysubsetof)therelationaltableTthatgeneratedC.However,support and confidence of rules need to rely on the support of each fact in C,thatis,thenumberofindividualrecordsinTthatsupportthefact.Inthesecondcase,we first need to impose constraints on the structure of frequent itemsets and rules sothatthedataminingoutputismeaningful.Then,acarefulevaluationandinter-pretationofsuchoutputisneededbecauseanyreferencetoagivenmeasurevaluemustbeexpressedintermsofallthedimensionsinvolvedinthecube.

Frequent Closed Itemsets

LetC=<D, M>beadatacube,whereDisasetofdimensionsinvolvedinC,andMasetofmeasuresassociatedwithD.WhenMisnotlimitedtoacount-basedmeasure, we define a frequent (closed) itemset YextractedfromCasmeaningfulifthefollowingconditionshold:(1)Y∩D≠∅,and(2)Y∩M1≠∅,whereM1 ⊂ Misthesetofnon-countbasedmeasures.Thetwoconditionsimposethepresenceofatleastonedimensionandonenon-countmeasure(e.g.,MIN).FromTable1(b),onecanextractthefrequent(support=41%)closeditemset{Du-ality=0,AvgAsset=2,Govern=2}whichismeaningfulsincetheseconditemrep-resentsarangevalueofthemeasurerelatedtotheaveragecompanyasset.Instead,{Internal=3,Govern=2}isnotameaningfulone.

Association Rules

Based on the observations made earlier in this section, we define two types of as-sociationrules:onewhichiscomputedfromadatacubewhoseuniquemeasurerepresentsaCOUNTaggregatefunction,andtheotheriscomputedfromadatacubeforwhichatleastameasurerepresentsanaggregatefunctionotherthanCOUNT(e.g,MIN,AVERAGE).Thesecondonemustbegeneratedfrommeaningfulfre-quentcloseditemsets.

Definition 1:LetY1andY2betwonon-emptysubsetsofmembersinD,whereDisadimensionsetincubeC = <D, M>andY1∩ Y2 = ∅,andletXbethesetoffactssupporting Y1 ∪Y2.AcouNt-bAseD multiDimeNsioNAl

Page 290: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 26�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

associationrule(CMAR)rdrawnfromCisanimplicationoftheformY1 ⇒ Y2.Thesupportofruleris:

1 2

1

( ) ∈

=

=∑∑

jf x jn

j

msupp Y Y

mj ,

wherenisthetotalnumberoffacts,andmjisacountvalueassociatedwithfactfjinX. The confidence of riscomputedastheratiosupp(Y1∪Y2)/supp(Y1),where:

11

1

( ) ∈

=

=∑∑

jf Y jn

j

msupp Y

mj forallfactsfjsupportingY1.

Definition 2: A NoN-couNt-bAseD multiDimeNsioNAl association rule(NCMAR)rgeneratedfromacubeC = <D, M>isanimplicationoftheformY1 ⇒ Y2,whereY1∪ Y2isameaningfulFCIandY1∩ Y2 = ∅,and∃manon-countmeasureinMsuchthatm ∈ Y1 ∪Y2.LetthesetoffactssupportingY1 ∪Y2beX.Then,thesupportofruleris:

1 2

1

( ) ∈

=

=∑∑

jf x jn

j

msupp Y Y

mj ,

wherenisthetotalnumberoffacts,andmjisacountvalueassociatedwithfactfjinX. The confidence is computed as the ratio supp(Y1∪Y2)/supp(Y1),where:

11

1

( ) ∈

=

=∑∑

jf Y jn

j

msupp Y

mj forallfactsfjsupportingY1.

ItisimportanttonotethatinthecaseofNCMARs,thecubecontainsanon-count-basedmeasureapart fromacount-basedone.The latter isused tocompute thesupportoftherule.Asan illustration, the followingrules (CMARandNCMARrespectively)wereextractedfromthefacttablesshowninTable1(leftandrightsidesrespectively)by first computing FCIs.

• CMAR:.Duality=0andInternal=2⇒Govern=2[50/216,(50/216)/(74/216)].ThismeansthatiftheCEOdoesnotactasaboardchairmanandifthepropor-tionofTopManagementontheboardisbetween10and25%,thentheindex

Page 291: Data Warehouses and OLAP - Concepts Architectures and Solutions

264 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ofcorporategovernancequalityisbetween40and70%withasupport=23%and a confidence = 67%.

• NCMAR: Duality = 0 and Internal = 1 ⇒ AvgAsset = 2 [73/216,(73/216)/(74/216)].ThismeansthatiftheCEOdoesnotactasaboardchair-manandiftheproportionoftopmanagementontheboardislessthan10%,thentheaverageassetisover1000K (according to the three defined dimen-sions) with a support = 34% and a confidence = 98%.

Data.Warehousing.Techniques............for.Data.Mining

Manyresearchersrecognizetheneedtohavemechanismsforuserexplorationandguidancewhileminingfromdatabases(Imielinskietal.,2002)orbrowsingthroughdatacubes(Sarawagietal.,1998).Sincetheoutputofadataminingtaskcanbeverylargeevenforareasonablysmalldataset,ourmainobjectivehereistoallowtheusertoexploreanalreadycomputedDMoutput(asetofgroupings/conceptsinourcase)inadiscovery-drivenman-nersimilartowhatisofferedbyOLAPtechniques.Theusercanthengothroughcoarser/finer levels of data abstraction (i.e., rollup vs. drill-down) when an attribute (ordimension)hierarchyisavailable(e.g.,levelsofcompanylocationarecity,state,andcountry),seeaDMoutputunderdifferentperspectives(oneormanyattributes),or use the dice operator to select some specific attributes (or attribute values) and/or asetofobjects.Asapreliminaryillustration,arolluponaDMoutputinourrun-ningexamplemeanseitherareductioninthenumberofperspectivestoconsider(e.g., financial features) or a generalization upon one or many perspectives (e.g., companylocation).Based on the background provided earlier, we define a set of operators inspired fromOLAPtechniques(e.g.,drill-down,slice),whichactlikerelationalalgebrabyoperatingonconceptlatticestogetnewones.

Operations.on.Lattices

In this subsection, we formally define three main operations on lattices: projection, selection,andassembly.MoredetailsabouttheoreticalresultscanbefoundinGanterandWille(1999)andValtchevetal.(2002a).TheprojectioNofL =B(O,A,R)overA1⊂Aisgivenbythefollowingmapping:ϕ: L→L1= B(O, A1, R1).

Page 292: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 26�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Functionϕmapsaconcept(X,Y)fromthelatticeLintoaconceptoftheresult-inglatticeL1byprojectingitsintentovertheattributesetA1:ϕ ((X,Y))=((Y∩A1)',Y∩A1),wheretheoperator'uponanextent(respectivelyanintent)returnsanintent(respectivelyanextent)inL1.WhenA1representstheintentofanexistingconceptcinL,thenL1isnothingbutthe principal filter of cenrichedwiththepartialorder.TheAssemblyoftwolatticesL1=B(O, A1, R1)andL2=B(O, A2, R2)accordingtoasamesetOofobjectsisasubstructureofthedirectproductofL1andL2 defined by:

ψ: L1=B(O, A1, R1)×L2=B(O, A2, R2) → L=B(O, A1∪A2, R1∪R2).

Function ψ maps a pair of concepts from L1andL2intoaglobalconceptbyaninter-section over their respective extents: ψ (⟨(X1,Y1),(X2,Y2)⟩)=(X1∩X2,(X1∩X2)').The assembly of lattices can be used not only to “join” lattices, but also to define nestedlinediagramsasdescribedintheVisualizationMechanismssection.Figure2illustratestheprojectionoflatticeLontothesubsetabcd andefghitogetnewlatticesL1andL2.TheassemblyofL1andL2produceslatticeL.TheselectioNoperation,appliedtoalatticeL=B(O,A,R),producesanewlatticeinwhichasubsetO1ofOisconsidered.Thisoperationisdualtotheprojectionandisgivenbythemappingξ: L→L3= B(O1, A, R3).Thefunctionξmapsaconcept(X,Y)fromthelatticeLintoaconceptoftheresult-inglatticeL3byselectingasetO1 ofobjects:

ξ ((X,Y))=(X ∩ O1, (X ∩ O1)').

Figure 2. Projection of L on two distinct attribute subsets abcd and efghi to pro-duce L1 and L2

Page 293: Data Warehouses and OLAP - Concepts Architectures and Solutions

266 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Forexample(seeFigure2),theselectiononL1ontheset{1,2,3,4}isalatticethathasthefollowingconceptset:{(1234,a),(123,ab),(34,ac),(3,abc),(∅,abcd)}.WhenO1 representstheextentofanexistingconceptcinL,thenL3isnothingbuttheprincipalidealofcenrichedwiththepartialorder.

Operations.on.Data.Mining.Output

Inthefollowing,weshowhowknownOLAPoperations(drill-down,rollup,slice,anddice)canbetranslatedinourdataminingconceptlatticeframeworkasacom-binationofoperationsonlatticessuchasselection,projection,andassembly(notedrespectively by σ, Π, and ×). As stated earlier in the section Integrating DM with DWTechniques,theseoperationscanbeassimilatedtocubingforexploratorydatamining.The operations can be defined as follows:

• Rollup:gouptheattributehierarchyofoneormanyattributes(e.g.,gofromsectortosectorcategory)orignoreasubsetofattributes.

• Drill-down:godowntheattributehierarchyofoneormanyattributesoraddanewattribute(e.g.,introduceCEO’seducation).

• Slice:limittheanalysistoagivenattribute/property(e.g.,proportionofin-ternalshareholdersontheboard).

• Dice:.focusonasubsetofattributesand/orobjects(e.g.,featuresaboutboardstructure for firms working on some given industry sectors).

Additional exploratory operations can be defined (e.g, drill-through, nest-unnest, split). In the sequel, we first provide a formal definition of the four key OLAP operations byborrowingthewell-knownnotationsusedinrelationalalgebra.Then,algorithmsforimplementingtheprojectionandassemblyareproposedanddiscussed.

Definition of OLAP Operations

In the following, we redefine four commonly known OLAP operations when they applytoaDMoutputthattakestheformofaconceptlattice.

Page 294: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 26�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Rollup

LetP ⊆Abetheattributesofagivenrelational(orfact)tableonwhichtherollupwillbeconductedeitherbyclimbingupattributehierarchiesorbydroppingat-tributes,andletL=B(O,A,R)beaconceptlattice.AssumethatAL={⟨A1, l1i⟩,...,⟨Aj, ljm⟩,...}isagivenpatternoftherollup(i.e.,levelclimbing),where⟨Aj, ljm⟩meansthehierarchyattachedtoattributejistobeclimbedfromthecurrentleveltoahigherlevelljm.ThesizeofALrepresentsthemaximalnumberofattributesforwhichtheattributehierarchyneedstobeexploredbottomup,andhence|AL|= |P|.Theop-erationRollup(L,P,AL)usesthelatticeLasinputtoproduceanewconceptlatticeinwhichtheattributesinPareeitherreplacedwithmoregeneralonesorignored.Whenljm = foragivenattributeAj, thismeansthatattributeAj istemporarilydiscardedfromanalysis.Likeindatacubes,therollupoperationreducestheoutputsetwhilethedrill-downoperationincreasesthesizeoftheoutput.Therefore,thelatticeresultingfromarollupissmallerthantheinitialone.ThealgebraicrepresentationofRollup(L,P,AL)usingtheprojectionandassemblyisasfollows:

Rollup(L,P,AL)= )()( 1LLPA ×Π − ,whereLandL1correspondtoB(O, A, R) andB(O, A1, R1)respectively,andA1isthesetof|P|attributesgeneralizedaccordingtothepatternAL.

Example:.Figure3illustratesarollupoflattice L1(seeFigure2)uponanattributebyclimbingupthehierarchyfromthelevelcontainingcanddtoahigherlevelcontainingk.

Figure 3. Rollup of L1 by replacing c and d with a more general value k

Page 295: Data Warehouses and OLAP - Concepts Architectures and Solutions

268 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Drill-Down

Inasymmetricway,Drill-down(L,P,AL) can be defined, where ljminALmeansthattheattributehierarchyattachedtoAjistobeexploredfromthecurrentleveltoalowerlevelljm.SuchoperationusesLasinputtoproduceanewconceptlat-ticeresultingfromthecontextinwhichtheattributesinParereplacedwithmorespecific ones. When ljm=^ foragivenattributeAj,thismeansthatattributeAjisanewattributetobeconsideredfordatamining.ThealgebraicrepresentationofDrill-down(L,P,AL)isthesameastheonefortherollupoperation.Thedifferenceliesinthefactthatforthedrill-downoperation,AlisthesetofPattributesspecialized(throughamovedownintheattributehierar-chies)accordingtothepatternAL.

Slice

Slice(L, ai)limitstheanalysisofaconceptlatticeLtoagivenattributeaiinordertoseeitscorrespondinglattice.Itisimportanttonotethatindatacubes,thisoperationconsistsinselectingagivenvalueforonedimension.However,wegeneralizeittoa given attribute (with its possible values) to allow the definition of new operations (e.g.,nesting)basedonthesliceoperation.Thealgebraicrepresentationofthesliceoperationis:

Slice(L, ai)=Πai (L).

Inourrunningexample,Slice(L, Internal)willprovidethelatticelimitedtothedimension(attribute)Internal.

Dice

Dice(L,P,Q)limitstheanalysistoanarbitrarysubsetQofobjectsand/orasubsetP of attributes. Here again, our definition of the dice operation in concept lattices hasameaningrelativelydistinctfromthediceoperationindatacubes.Thealgebraicrepresentationofthediceoperationis:

Dice(L,P,Q)=

))(( LPio Q Π∈ whereQ ⊂Oand/orP ⊂A.

Page 296: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 26�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Forexample,onewouldliketofocushis/heranalysisofthelatticeLtocompanies1,2,and3usingshareholdingfeaturesonly.

Algorithms

Now that the OLAP operations acting on DM output are formally defined using operationsonlattices,wedescribehereafteralgorithmsfortheimplementationofprojectionandassembly.Algorithm1implementstheprojectionandhastwoarguments:theattributesetPtobeprojectedon,andthenoden which is initially set to the infimum (i.e., the bot-tomofthelattice).Ithandlesatraversalofthelatticeinarecursivewayfromthebottomtothetop(supremum).Theascendingpartofrecursivitycontributestotheproductionofconcepts(nodes)whilethedescendingparthandlesthepartialorderintheresultinglattice.Functionput(n')returnsthenodeoftheinputlatticethatcorrespondstonoden'intheoutputlattice.Functionget(n)conductstheoppositeoperationbyreturningthenodeintheoutputlatticethatcorrespondstonoden.Thefunctionparent_pruningconsiststocheckitemsetinclusiontoavoidtheexplorationofuselessparentnodesinthelattice.

Algorithm 1: ProjectionInput:.Noden,P:asetofattributesOutput:.Noden'ifnisalreadyprocessedthen. returnget(n)Successors←∅/*keeptrackofthesuccessorsofagivennode*/i1←intent(n)∩PParents←sort(Parents(n))/*inadecreasingorderof|intent(p)∩i1|wherep∈Parents */for.eachnonvisitedparentpofParents do i2←intent(p)∩i1. ifi2≠∅andi1≠i2then Successors←Successors ∪Projection(p, P) elseifi1=i2thenProjection(p, P)Marknasaprocessednoden'←(extent(n),i2)Linkn'toSuccessors

Returnn'

Page 297: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�0 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Table3providesthetraceoftheprojectionalgorithmappliedtolatticeL(depictedin Figure 1) and shows that the infimum of the output lattice is rapidly reached and theresultinglatticeisquicklyformedusingheuristicsforselectingthesuccessors(parents)toexplore.The following algorithm exploits the properties defined in the section Operations onLatticestoperformtheassemblyoftwolatticesL1andL2.AsimplisticwaytoimplementsuchoperationistocompareeachnodeinL1witheachnodeinL2.Inordertorapidlygetrealconcepts,eachoneofthetwolatticesisexploredinabot-tom-upwayfollowingalinearextensionofthelatticeorder.Thefollowingprocedurepresents a simplified description of the implemented algorithm where Estorestheintersectionoftwoextents.IfEisanewvalue,thenitcorrespondstotheextentofanewconceptc.Inthatcase,conceptcisthencreatedandlinkedtoitsimmediatepredecessors(descendants).MoredetailscanbefoundinValtchevetal.(2002a).

Algorithm.2:Assembly

Input:L1=⟨G1, ≤L1⟩,L2=⟨G2, ≤L2⟩

Output:L=⟨G, ≤L⟩

L ← ∅

Sort(G1) according to a linear extension of ≤L1;

Sort(G2) according to a linear extension of ≤L2;

for.eachciinG1dofor.eachcjinG2doE ← extent(ci) ∩ extent(cj)

Table 3. Trace of the projection of lattice L (Figure 1) on abcd

n i1 Successors Concept

1 abcd 5 no

5 abcd 7,10,12 yes

10 abc 15,17 yes

15 ab 19 yes

19 a NIL yes

17 ac 19 yes

7 acd 11 no

11 acd 14,17 yes

14 ad 19 yes

12 abd 13,15 yes

13 ad 14 no

Page 298: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

if.Edoesnotexistasanextentofanewlycomputedconceptthen.....c ← (E, intent(ci) ∪ intent(cj)) L ← L ∪ {c} Link c toitsimmediatepredecessors

returnL

AnotherwaytoimplementtheassemblyoperationconsiststostartwithL1andit-erativelyconductasmanyassemblyoperationsasthereareattributesinL2.Amongthequestionsthatwehadtoanswerwhileexploringtheprojectionandtheassemblyoperations,weenumeratethefollowing:

• Isitworthwhiletoperformtheseoperationsonlatticesratherthanrecomputinglatticesfromscratchbasedontheprojectionortheapposition(i.e.,horizontalconcatenation)ofcontexts?

• Are there other benefits of these operations on lattices?

To answer the first question, we have conducted an experimental study which showed that computing a projection on a lattice is generally more efficient than the lattice construction using the modified context. The gain increases significantly as theproportionofprojectionattributesaugments.Figure4illustratesthisfactforacontextof500objectsand50attributes.Ourworkonlatticeassembly(Valtchevetal.,2002a)showsthatthisoperationhasinteresting empirical and theoretical performances. Furthermore, the other benefit ofthetwooperationsliesinthefactthattheycanbeusedtoconstructalatticeinadistributedorparallelenvironment,orconstructanestedstructureofthelattice,callednested line diagram(seeVisualizationMechanismssectionformoredetails).

Figure 4. Projection on lattice vs. projection on context

Page 299: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�2 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Visualization Mechanisms

InlargeandcomplexDMoutput,itiscrucialtoprovidemechanismsto(1)selecttheminingspace(i.e.,inputdata),(2)limittheDMoutputtouser’sneedsandper-spectives,and(3)browsetheDMresults.Ourworkaboutdatavisualizationconcernsmainlytheimplementationofprojectionandassemblyoflatticestoproducenestedlinediagramsandseethedataminingoutput(drawneitherfrombidimensionalormultidimensionaldata)underdifferentperspectives.Nestedlinediagrams(Ganter&Wille,1999)arevisualizationaidswhichallowtheconstructionofalatticeLasanassemblyoftwoormanylatticesL1,...,Ln bycombiningtherespectiveHassediagramsofthen latticesLiintoauniquecom-plexstructure.However,neitherthenodesofLnortheirpartialorderaredirectlyrepresented.Instead,theinformationaboutthemisspreadoverthevariouslevelsofnesting.Figure5presentsthenestedlinediagram(NLD)oftheproductlatticeLInternal,Govern=LInternal×LGovern.Ascanbeseen,thelinediagramofthelatticeInternalisusedasanouterframeinwhichthediagramofGovernisembedded.TheouterlatticeshowsthedistributionofcompaniesaccordingtothedimensionInternal.EachoneofthethreeexternalnodesattheintermediatelevelfocusesonaparticularvalueofInternal.Forexample(seethenodeinthemiddle),110enterpriseshave

Figure 5. Nested-line diagram from a subset of attributes in Table 1a

Page 300: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Internal =2(i.e.,thetopmanagementrepresentsaproportionof10to25%oftheboard).AcarefullookattheinnerlatticeoftheexternalLHSnodeallowstostatethatwhenInternal =3,goodqualityofgovernance(i.e.,Govern=3)tendstobelessfrequentthaninthecasewhenInternalisequalto1or2.Inparticular,acom-parisonbetweentheinnerdiagramsrelatedtotheextremenodes(LHSforInternal=3andRHSforInternal=1)oftheouterstructureshowsclearlythatthequalityofgovernanceisoverallhigherforInternal =1thanforInternal =3(e.g.,24en-terpriseshaveGovern =3whenInternal =1against7whenInternal =3).TheNLDinFigure5canbeperceivedasarolluponthefacttabledepictedbyTable1awhenthedimensionDualityisignored.However,thestructureembedsmultiplerollupssinceonecanseeat thesametimeaggregatevaluesforoneofthetwodimensionsorforacombinationofthetwodimensions.Thisfactismuchmoreemphasizedwhenthenumberofnestinglevelsislarge.Therefore,theNLDstructureoffers a richer environment thanOLAPoperations for the explorationandnavigationinaggregateddata.Toillustratethisfact,onecanseethattheinnerdiagraminthesupremumoftheouterlattice(node#1)isaprojection(rollup)ofthelattice(producedfromthefacttableinTable1(a))onGovernwhiletheimme-diate predecessors of that external node (i.e., nodes #2, #3, and #4) reflect a rollup limitedtoInternal.TogetarolluponthecombinationofInternalandGovern,weneedtolookattheinnerlatticeswithinouternodes.Forexample,whenInternal=1(seenode#4),51enterpriseshaveeitherGovern=2(27cases)orGovern=3(24cases),butnooneofthemhasabadqualityofgovernance(i.e.,Govern=1)likeinthecasewhenInternaltakesavalueequalto2or3(internalstructureinnodes#3and#2).Wehavedevelopedasetoftoolsforinformationandknowledgevisualization:(1)thetoolcalledCubeVizhelpshighlightthesalientcellsinadatacubeaswellasassociationsamongcells,and(2)themoduleNLDallowsanestedrepresentationoflattices.ThelatterisbuiltuponourDMplatformcalledGalicia(2004).

Conclusion

Inthischapter,wehavepresentedoursolutiontowardsamutualcollaborationbe-tween data mining and data warehousing technologies with flexibility/interactivity and efficiency objectives in mind. It exploits the theoretical basis and attractive featuresofformalconceptanalysisandconceptlatticestoproposetwotechniques:(1) one which exploits lattice based mining algorithms for efficiently generating frequentcloseditemsetsfrommultidimensionaldatatofurtherextractassociationrules and clusters, and (2) the second technique which defines new operators simi-larinspirittoOLAPtechniquestoallow“dataminingondemand”byrelyingonoperationslikeprojection,selection,andassemblyonconceptlattices.

Page 301: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�4 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Ourcurrentworkcoversalsostatisticalmodelingindatawarehousesinordertodiscoverusefulpatternsindata(e.g.,outliers),discardirrelevantdimensionsanddimensionmembers,andhideirrelevantcubecells.Inparticular,weareexploringthepotentialoflog-linearmodelingfordatasummarizationandpredictionofmulti-dimensional data. Among the observed barriers, we note the difficulty to efficiently choose a parsimonious model (i.e., a reduced model that fits the data) from a pos-siblyverylargesetofcandidatemodels,andtheapplicabilityoflog-linearmodelstohigh-dimensioncubes.

Acknowledgments

WewouldliketothanktheNaturalSciencesandEngineeringResearchCouncilofCanada(NSERC)andLe fonds québécois de la recherche sur la nature et les technologies (FQRNT) for their financial support.

References

Agrawal,R.,&Srikant,R.(1994).Fastalgorithmsforminingassociationrules.Proceedings of the 20th International Conference on Very Large Data Bases, SantiagodeChile (pp.487-499).MorganKaufmann.

Babcock,B.,Chaudhuri,S.,&Das,G.(2003).Dynamic sample selection for ap-proximate query processing.InProceedings of the 2003 ACM SIGMOD Inter-national Conference on Management of Data, SanDiego,CA(pp.539-550).ACMPress.

Barbara,D.,&Wu,X.(2001).Loglinear-based quasi cubes.Journal of Intelligent Information Systems, 16(3),255-276.

BenMessaoud,R.,Boussaïd,O.,&Rabaséda,S.(2004).AnewOLAPaggregationbasedontheAHCtechnique.InProceedings of the 7th ACM International Workshop on Data Warehousing and OLAP, NewYork(pp.65-72).Washing-ton,DC:ACMPress.

Chaudhuri,S.,&Dayal,U.(1997).AnoverviewofdatawarehousingandOLAPtechnology.SIGMOD Record, 26(1),65-74.

Dong,G.,Han,J.,Joyce,M.W.,Pei,J.,&Wang,K.(2001).Miningmulti-dimen-sionalconstrainedgradientsindatacubes.InProceedings of the 27th Interna-tional Conference on Very Large Data Bases(pp.321-330).SanFrancisco:MorganKaufmannPublishers.

Page 302: Data Warehouses and OLAP - Concepts Architectures and Solutions

Toward Integrating Data Warehousing with Data Mining Techniques 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Galicia.(2004).Galois Lattice Interactive Constructor. SourceForge project.Re-trievedJune14,2006,fromhttp://sourceforge.net/projects/galicia/

Ganter,B.,&Wille,R.(1999).Formal concept analysis: Mathematical foundations(C.Franzke,Trans.).NewYork:Springer-Verlag.

Goil,S.,&Choudhary,A.N.(2001).PARSIMONY:Aninfrastructureforparallelmultidimensionalanalysisanddatamining.Journal of Parallel and Distrib-uted Computing, 61(3),285-321.

Han, J. (1998).Towardson-lineanalyticalmining in largedatabases.SIGMOD Record, 27(1),97-107.

Han,J.,&Kamber,M.(2000).Data mining: Concepts and techniques.SanFran-cisco:MorganKaufmannPublishersInc.

Imielinski,T.,Khachiyan,L.,&Abdulghani,A.(2002).Cubegrades:Generalizingassociationrules.Data Mining and Knowledge Discovery, 6(3),219-257.

Imielinski,T.,&Mannila,H.(1996).Adatabaseperspectiveonknowledgediscov-ery.Communications of the ACM, 39(11),58-64.

Knorr,E.M.,Ng,R.T.,&Tucakov,V.(2000).Distance-basedoutliers:Algorithmsandapplications.The VLDB Journal, 8(3-4),237-253.

Lakshmanan,S.,Pei,J.,&Zhao,Y.(2002).Quotientcube:Howtosummarizethesemanticsofadatacube.InProceedings of the 28th International Conference on Very Large Databases, HongKong(pp.778-789).MorganKaufmann.

Lu,H.,Feng,L.,&Han,J.(2000).Beyondintratransactionassociationanalysis:Miningmultidimensionalintertransactionassociationrules.ACM Transactions on Information Systems, 18(4),423-454.

Naouali,S.,&Missaoui,R.(2005).Flexiblequeryansweringindatacubes.InPro-ceedings of the 7th International Conference on Data Warehousing and Knowl-edge Discovery(pp.221-232),Copenhagen,Denmark.Springer-Verlag.

Pasquier,N.,Taouil,R.,Bastide,Y.,Stumme,G.,&Lakhal,L.(2005).Generatingacondensedrepresentationforassociationrules.Journal of Intelligent Infor-mation Systems, 24(1),29-60.

Pfaltz, J. L., & Taylor, C. M. (2002). Scientific discovery through iterative transfor-mationsofconceptlattices.InProceedings of the 1st International Workshop on Discrete Mathematics and Data Mining, Arlington,VA(pp.65-74).SIAM.

Pinto,H.,Han,J.Pei,J.,Wang,K.,Chen,Q.,&Dayal,U.(2001).Multi-dimen-sionalsequentialpatternmining.Proceedings of the 10th ACM International Conference on Information and Knowledge Manaagement, Atlanta,GA(pp.81-88).ACMPress.

Sarawagi,S.,Agrawal,R.,&Megiddo,N.(1998).Discovery-drivenexplorationofOLAPdatacubes.InProceedings of the 6th International Conference on Extending Database Technology(pp.168-182).London:Springer-Verlag.

Page 303: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�6 Missaoui, Jatteau, Boujenoui, & Naouali

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Shanmugasundaram,J.,Fayyad,U.,&Bradley,P.S.(1999).Compresseddatacubesforolapaggregatequeryapproximationoncontinuousdimensions.InPro-ceedings of the Fifth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining(pp.223-232).ACMPress.

Valtchev,P.,Missaoui,R.,Godin,R.,&Meridji,M.(2002).Generatingfrequentitemsetsincrementally:TwonovelapproachesbasedonGaloislatticetheory.Journal of Experimental and Theoretical Artificial Intelligence, 14(2-3),115-142.

Valtchev,P.,Missaoui,R.,&Lebrun,P. (2002).Apartition-basedapproach to-wardsconstructingGalois(concept)lattices.Discrete Mathematics, 256(3),801-829.

Wang,J.,&Karypis,G.(2004).Bamboo: Accelerating closed itemset mining by deeply pushing the length-decreasing support constraint.InSDM.

Xin,D.,Han,J.,Li,X.,&Wah,B.W.(2003).Star-cubing: Computing iceberg cubes by top-down and bottom-up integration.InVLDB.

Zaki, M. J., & Hsiao, C.-J. (2002). CHARM: An efficient algorithm for closed itemsetmining.InR.Grossman,J.Han,V.Kumar,H.Mannila,&R.Mot-wani(Eds.),Proceedings of the 2nd SIAM International Conference on Data Mining (ICDM’02).

Endnote

1 Weuseaseparator-freeformforsets.Forexample,167standsfor{1,6,7},andbcdfor{b,c,d}.

Page 304: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.XII

Temporal.Semistructured.

Data.Models.and.Data.Warehouses

Carlo Comb�University of Verona, Italy

Barbara OliboniUniversity of Verona, Italy

Abstract

This chapter describes a graph-based approach to represent information stored in a data warehouse, by means of a temporal semistructured data model. We consider issues related to the representation of semistructured data warehouses, and discuss the set of constraints needed to manage in a correct way the warehouse time, that is the time dimension considered storing data in the data warehouse itself. We use a temporal semistructured data model because a data warehouse can contain data coming from different and heterogeneous data sources. This means that data stored in a data warehouse are semistructured in nature; that is, in different documents the same information can be represented in different ways, and the document schemata can be available or not. Moreover, information stored in a data warehouse is often time varying, thus as for semistructured data, also in the data warehouse context, it could be useful to consider time.

Page 305: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�8 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Introduction

In recent years the database community has proposed flexible data models to repre-sent semistructured information. Semistructured data have no absolute schema fixed inadvance.Thestructuremaybeirregularorincomplete(Abiteboul,1997).In the literature there are a number of approaches inwhich labeled graphs areusedtorepresentsemistructureddata(Comai,Damiani,Posenato,&Tanca,1998;Damiani,Oliboni,Tanca,&Veronese,1999;Papakonstantinou,Garcia-Molina,&Widom,1995).Thesemodelsorganizedataingraphswherenodesdenoteobjectsorvalues,andedgesrepresentrelationshipsbetweenthem.Inthesemistructureddatacontext,theeXtensibleMarkupLanguage(XML)(WorldWideWebConsortium,1998)isspreadingoutasastandardforrepresenting,ex-changing, and publishing semistructured information (Abiteboul, Buneman, &Suciu,2000),makinginformation“self-describing,”thatisitispossiblethereisnoseparatedescriptionofthetypeorstructureofdata.Adatawarehouseisarepositoryofdatacomingfromdifferentandheterogeneousdatasources.Thismeansthatdatastoredinadatawarehousearesemistructuredinnature,becauseindifferentdocumentsthesameinformationcanberepresentedindifferentways,andmoreover,thedocumentschematacanbeavailableornot.Furthermore,datawarehousescanbeusedtostoreXMLdocumentsandWWWdata.AdatawarehousestoringinformationrepresentedbymeansofXMLiscalledXML data warehouse (Marian,Abiteboul,Cobena,&Mignet,2001),andadatawarehouse collecting information from theWeb is called Web data warehouse(Bhowmick,Madria,Ng,&Lim,1998).IntheliteraturearealsoconsideredXML Web data warehouses(Marianetal.,2001;Wang&Zaniolo,2003).AdynamicwarehouseforXMLdatawasproposedandimplementedintheXylemeproject(Xyleme,2001).TheprototypewasthenturnedintoaproductbyastartupcompanyalsocalledXyleme.Informationstoredintoadatawarehouseisoftentimevarying,thusasforsemi-structureddata,alsointhedatawarehousecontext,itcouldbeusefultoconsidertime.Theclassical timedimensions,consideredintheliterature,aretransactiontimeandvalidtime.Thetransactiontimeisthetimewhenafactiscurrentinthedatabaseandmayberetrieved,whilethevalidtimeisthetimewhenafactistrueintheconsidereddomain(Jensen,Dyreson,Bohlen,etal.,1998).Inthesemistructureddatacontext,graph-baseddatamodelshavebeenextendedtorepresentthetimedimensionofinformation,andissuesrelatedtotherepresentationoftransactionandvalidtimeshavebeenstudied(Chawathe,Abiteboul,&Widom,1998;Combi,Oliboni,&Quintarelli2004;Oliboni,Quintarelli,&Tanca,2001).Inthedatawarehousecontext,proposalsintheliteraturefocusontherepresentation

Page 306: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

of successive versions of a document (Bębel, Eder, Koncilia, Morzy, & Wrembel, 2004;Marianetal.,2001).Inthischapter,wefocusontherepresentationofsemistructuredwarehouses,andconsiderissuesrelatedtotheirgraph-basedrepresentations.Inparticular,weuseatemporalsemistructureddatamodel,basedonlabeledgraphs,torepresentinforma-tionstoredinadatawarehouse.Moreover,wediscussthesetofconstraintsneededtomanageinacorrectwaythewarehousetimeandtheoperationsusefultohandletheconsideredinformation.Topicsrelatedtothequerying,therefreshment,andmain-tenanceofsemistructureddatawarehousesarenotconsideredinthischapter.The structure of the chapter is as follows: in the Background section we briefly describetheliteraturerelatedtosemistructureddata,temporalsemistructureddata,andtemporaldatawarehouses.IntheRepresentingSemistructuredTemporalDataWarehousessectionweconsiderthemainissuesrelatedtothemanagementoftem-poralinformationinsemistructureddatawarehouses,describehowtorepresentadata warehouse by means of a temporal graph-based data model, and define the set ofconstraintneededtomanagetimeinthewarehousecontext.IntheFutureTrendssectionwedescribethetopicsthatarerelevantinthesemistructureddatawarehousecontextandsketchpossiblelinesforfutureworks,whileintheConclusionsectionwesummarizethechaptercontent.

Background

Semistructured.Data

Semistructureddatahaveirregularstructure,andrapidlyevolvingormissingschema(Abiteboul,1997).TheclassicalexampleofsemistructureddataisrelatedtodatastoredontheWorldWideWeb:atatypicalWebsite,dataarevariedandirregular,andtheoverallstructureofthesitechangesoften.Webdataareintegratedfrommultiple, heterogeneous data sources, where discrepancies among various datarepresentationsarelikely.In the semistructured data context, the database community has investigated flex-ibledatamodelstorepresentinauniformwaythiskindofinformation.Theresultsofthisresearchareanumberofapproachesinwhichlabeledgraphsareusedtorepresentsemistructureddata.Thesemodelsorganizedataingraphswherenodesdenoteobjectsorvalues,andedgesrepresentrelationshipsbetweenthem.In this section, we briefly describe some semistructured data models based on labeled graphs(Damiani&Tanca,1997;Papakonstantinouetal.,1995),andtheeXtensibleMarkupLanguage(XML)(WorldWideWebConsortium,1998)whichisspread-

Page 307: Data Warehouses and OLAP - Concepts Architectures and Solutions

280 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ingoutasastandardforrepresenting,exchanging,andpublishingsemistructuredinformation(Abitebouletal.,2000).InPapakonstantinouetal.(1995),theauthorsproposetheobjectexchangemodel(OEM)whichisagraph-structureddatamodelwherethebasicideaisthateachobjecthasalabelthatdescribesitsmeaning.AnOEMlabelisatuple(label;type;value;object-ID) wherelabeldenotesthekindoftheobject,typeisadatatype(atomic,composed,orreference),valuedenotestheactualvalueoftheobject,andobject-ID represents a unique variable-length identifier for theobject.TheOEMlabelisusedtoextractinformationaboutobjectsthatrepre-senttheunderlyingdata.TheOEMmodelrepresentssemistructureddatabymeansofgraphswherenodesdenoteobjectsorvaluesandedgesrepresentrelationshipsbetweenobjects; inparticularanOEMgraph isadirected labeledgraphwheretheedgelabelsdescribethepointednodes.OEMdoesnotactuallyrepresentthesemanticsofrelationshipsbetweenobjects;thatis,ifanobjectpointedbyanedgelabeledas“Person”isconnectedbymeansofanedgelabeledas“City”toanotherobject,OEMallowsonetorepresentonlythefactthattheobjectCityiscontainedintheobjectPerson,butdoesnotexpressinwhichrelationshiptheyare.Thus,inthisexampleitisimpossibletounderstandifthepersonlivesinthecityorifthepersonworksinthecity.OEMusesedgelabelstodescribethepointednodes,andthusedgesrepresentonlythecontainmentrelationship.InDamianiandTanca(1997),theauthorsproposeagraph-orienteddescriptionandquery language specifically designed for the needs of Web sites (WG-Log). WG-Logallowsonetorepresentclassicalconceptualobjectsandstandardhypermediadesignnotations,allowingtheexpressionofmodelentitiesandrelationshipsaswellasnavigationalconcepts.TheWG-Logdatamodelusesdirectedlabeledgraphstorepresentschemata,instances,andqueries.InWG-Loggraphs,nodesrepresentob-jects,andedgesindicaterelationshipsbetweenthem.Inparticular,inWG-Logtwomain node types are defined: simple and complex nodes. Simple nodes represent simpleobjects(withanatomic,perceivablevalueasstringsandnumbers),whilecomplexnodesrepresentabstractobjects(whosepropertiesaredescribedbymeansofaggregatesofsimpleobjects).Forexample,apersonisrepresentedbymeansofacomplexnodePerson,andtheperson’snamebymeansofasimplenodeNamewithavalue.Moreover,thereareotherkindsofnodestodescribeindexesandentrypoints,usefulfortherepresentationofthehypermediastructure.Forexample,thehomepageofaWWWsitecanberepresentedbymeansofanentrypoint.Graphedgescanindicatebothlogicalandnavigationalrelationships.Alogicaledgehasalabelindicatingtherelationshipname.TheeXtensibleMarkupLanguage(XML)(WorldWideWebConsortium,1998)isspreadingoutasastandardforrepresenting,exchanging,andpublishingsemis-tructured information by means of a simple and flexible text format derived from theStandardGeneralizedMarkupLanguage(WorldWideWebConsortium,1995).

Page 308: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 28�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

XMLisamarkuplanguagedesignedtodescribedatabymeansofasetoftags,which are not predefined. XML allows the author of the document to define the author’sowntagsanddocumentstructure.XMLdocumentscanbeeasilyrepresentedastreesorgraphs.ForexampletheXPathDataModel(WorldWideWebConsortium,2005a)allowstherepresentationofanXMLdocumentasatree.XPathusespathexpressionstoaddressthenodesintheXMLtrees.

Temporal.Semistructured.Data

Asintheclassicalcontext,alsointhecontextofsemistructureddataitisinterest-ingtotakeintoaccountthedynamicaspectsofdatatorepresenttheirevolutionsthroughtimeandeventuallythroughconsecutiveupdates.Inthissection,wedescribethedifferentapproachesproposedintheliteraturetorepresenttimeinthesemistructureddatacontext(Chawatheetal.,1998;Combietal.,2004;Dyreson,Böhlen,&Jensen,1999;Olibonietal.,2001;Amagasa,Yoshi-kawa&Uemura,2001).InChawatheetal.(1998), theauthorsproposethedeltaobjectexchangemodel(DOEM),amodelbasedontheobjectexchangemodel(OEM)(Papakonstantinouetal.,1995).Changeoperations(i.e.,nodeinsertion,updateofnodevalues,additionandremovaloflabelededges)arerepresentedinDOEMbyusingannotationsonthenodesandedgesofanOEMgraph.Intuitively,annotationsaretherepresenta-tionofthehistoryofnodesandedges.ToimplementtheDOEMmodeltheauthorsuse amethod that encodesDOEMdatabases asOEMdatabases.This proposaltakesintoaccountthetransactiontimedimensionofagraph-basedrepresentationofsemistructureddata.AsOEMgraphs,DOEMgraphsdonotconsiderlabeledrelationshipsbetweentwoobjects.InOlibonietal.(2001),theauthorsproposethetemporalgraphicalmodel(TGM),whichisagraphicalmodelforrepresentingsemistructureddatadynamics.ATGMgraphisadirectedlabeledgraphcomposedbytwokindsofnodes(complexandsimplenodes),andtwokindsofedges(relationalandtemporaledges).Complexnodesarerelatedtoothercomplexnodes,andhaveanumberofattributes(atomicnodes),whereasatomicnodesrepresentobjectswithanatomicvalue(i.e.,astring,aninteger,butalsoatext,animage,asound)anddonotexistindependentlyoftheirparentcomplexnode.Thismodelrepresentsthevalidtimedimension.InAmagasaetal.(2001),theauthorsproposealogicaldatamodelforrepresentinghistoriesofXMLdocuments.TheproposedmodelisanextensionoftheXPathdatamodel(WorldWideWebConsortium,2005a),withalabelonedgesexpressingvalidtime.TheresultofageneralXPathexpressionmaybeaselectionofnodesfromtheinputdocuments,oranatomicvalue,ormoregenerally,anysequenceallowedby

Page 309: Data Warehouses and OLAP - Concepts Architectures and Solutions

282 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thedatamodel.Intheproposedextension,nodescanbeselectedalsowithrespecttotheirvalidtime.InDyreson et al. (1999), the authors propose a graph-basedmodelwhich useslabeled graphs to represent semistructured databases. In the defined graphs, each edgelabeliscomposedbyasetofdescriptiveproperties(e.g.,name,transactiontime,validtime,securitypropertiesofrelationships):apropertycanbepresentinanedgeandmissinginanotherone.Thisproposalisverygeneralandextensible:any property may be used and added to adapt the model to a specific context. In particular, the model allows one to represent temporal aspects and to consideronlyatemporaldimensionormultipletemporaldimensions:tothisregard,someexamplesofconstraintswhichneedtobesuitablymanagedtocorrectlysupportsemanticsof the time-relatedpropertiesareprovided,bothforqueryingandformanipulatinggraphs.InCombietal.(2004)theauthorsproposetheGraphicalsEmistructuredteMporaldatamodel(GEM),whichisbasedonlabeledgraphsandallowsonetorepresentinauniformwaysemistructureddataandtheirtemporalaspects.Inparticular,theyfocusontransactiontime.TheGEMdatamodelisbasedonrooted,connected,di-rected,labeledgraphs.AGEMgraphiscomposedbytwokindsofnodes,complexandsimplenodes,whicharegraphicallyrepresentedindifferentways.Complexnodesaredepictedasrectanglesandrepresentabstractentities,whilesimplenodesaredepictedasovalsandrepresentprimitivevalues.Thetransactiontimeofnodesand edges is represented by means of an interval. In this work, the authors define the setofconstraintsneededtomanageinacorrectwaythetransactiontimedimension,andmoreoverdescribetheoperationsusedtomodifyaGEMgraph.TheGEMdatamodel isgeneralenough torepresentboth transactionandvalidtimes.InFigure1,aGEMgraphmanagingvalid time is represented. In thisexampleinformationaboutagroupofrestaurantsisrepresented.ThegroupofrestaurantsisrepresentedasacomplexnodehavinglabelcomposedbythenameGroupandthevalidtimeinterval[01/05/05,now].Thenameofthegroup(“Red Horse”)isrepresentedbymeansofasimplenoderelatedtothecomplexnodeGroup.Thissimplenodehasthelabelcomposedbythename Name andthevalidtimeinter-val[01/05/05,now]. ThenodeGroupistherootofthegraph,andisconnectedtoitspropertybymeansoftheedgewithnameGroupNameandvalidtimeinterval[01/05/05,now].Thevalidtimeinterval[01/05/05,now]representsthefactthatthegroupofrestaurantsisvalidfromJune1,2005untilnow.Informationaboutrestaurants,addresses,andmenuarerepresentedrespectivelybymeansofthecomplexnodesRestaurant,Address, andMenu.TheirpropertiesarerepresentedassimplenodessuchasName,Position,Price,Street,andCity.DatainFigure1aresemistructured:thesameinformation,suchastheaddressoftherestaurant,isrepresentedindifferentways,thatisasasimplenodefor“BigHome,”

Page 310: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 28�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

andasacomplexnodefor“TheBeach.”TheGEMdatamodelallowstherepresen-tationofdataevolution,suchastheincreasingofaprice.Forexample,inFigure1,thepriceofthe“Summer”menuincreasedfrom$25to$30onJune15,2005.Thisevolutionisrepresented,inaGEMgraphmanagingvalidtime,bymeansofanewsimplenodewiththesamename(“Price”),withthenewvalue(“$30”)andvalidtimeintervalstartingfrom“15/06/05”andending“now.”Thespecialvalue“now”

Figure 1. A GEM graph related to restaurant information

<Group,[01/05/05,now]>

<Restaurant,[01/06/05,now]> <Restaurant,[01/07/05,now]>

<Address,[01/07/05,now]><Menu,[01/06/05,now]><Position,[01/06/05,now]>

<Name,[01/05/05,now]>

<Name,[01/06/05,now]>

<Price,[01/06/05,14/06/05]>

<Price,[15/06/05,now]>

<Street,[01/07/05,now]>

<City,[01/07/05,now]>

<Composition,[01/06/05,now]> <Composition,[01/07/05,now]>

<RestPosition,[01/06/05,now]>

<RestMenu,[01/06/05,now]>

<RestMenu,[10/07/05,now]>

<RestAddress,[01/0705,now]>

<MenuName,[01/06/05,now]>

<MenuPrice,[01/06/05,14/06/05]>

<MenuPrice,[15/06/05,now]>

<RestStreet,[01/0705,now]>

<RestCity,[01/0705,now]>

RedHorse

BigStreet,15-NewYork

Summer

$25

$30

NewYork

SmallStreet,20

<RestName,[01/06/05,now]>

BigHome

<RestName,[01/07/05,now]>

TheBeach

<InfoName,[01/06/05,now]> <InfoName,[01/07/05,now]>

<GroupName,[01/05/05,now]>

Page 311: Data Warehouses and OLAP - Concepts Architectures and Solutions

284 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

meansthattheconsiderednode(edge)iscurrentlyvalid(andwillremainvaliduntilasuitableupdatehappens).TheoldpriceisrepresentedintheGEMgraph,butitsvalidtimeintervalstartsfrom“01/06/05”andends“14/06/05.”

Temporal.Data.Warehouses

Inthecontextofdatawarehousesit isveryimportant torepresentandconsidertime.Representingtimeindatawarehousesmeanstoallowonetocomparedataindifferentperiods,thatis,toconsiderthedataevolution.Thetimedimensioncanberelatedeithertothevalidityofinformation(validtime),ortothepresenceofinformationinthewarehouse(transactiontime).Moreover,thetimedimensioncanberelatedtotheevolutionofdatawithrespecttothetime.Inthiscaseitispossibletostore,inthedatawarehouse,successiveversionsofinformation.In thissection,wedescribedifferentapproaches toconsiderandrepresent tem-poralinformationinadatawarehouse(Eder&Koncilia,2001;Eder,Koncilia&Morzy,2001).Moreover,wefocusontherepresentationofsuccessiveversionsofa document (Bębel et al., 2004; Marian et al., 2001; Wang & Zaniolo, 2003; Wang, Zaniolo,Zhou,&Moon,2005).InEderandKoncilia(2001),theauthorsproposeanapproachforrepresentingchangesindatadimensionsofmultidimensionaldatawarehouses,byintroducingtemporalextension,structureversioning,andtransformationfunctions.Theproposedmodelisanextensionofthemultidimensionaldatamodel(Li&Wang,1996;Vassiliadis&Sellis,1999),andallowsonetorepresentthevalidtimedimensionbymeansofthetimestampingofdata.Thisapproachconsidersthestructure version,whichisaviewonatemporaldatawarehousevalidforagiventimeinterval.Theproposedsystemisabletorepresentsuccessiveversionsofstructures,andprovidestransfor-mationfunctionstomapdatafromastructureversiontoadifferentone.InEderetal.(2001),theauthorsproposeanarchitecturefortemporaldatawarehousesystemswhichallowstheregistrationoftemporalversionsofdimensiondata,andthetransferofdatabetweendifferenttemporalversions.Inthiswork,theauthorsextend the model presented in Eder and Koncilia (2001) to represent also modifica-tionsattheschemalevel,suchastheinsertionofanewdimensionlevel(e.g.,thenewdimensionlevelquarterinsertedbetweenmonthandyear).InMarianetal.(2001),theauthorspresentachange-centricmethodformanagingversionsinWebwarehousesofXMLdata.ThesewarehousescontainsequencesofsnapshotsofXMLdocumentscomingfromtheWeb.Theapproachischange-centricbecausetheproposalfocusesonchanges(deltas).Ateachpointintime,thelastversionofadocumentandthesequenceofcompleteddeltas(similartologsofdatabasesystems)arestored.Inthiswork,thetimeofadocumentversionis

Page 312: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 28�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thetimeatwhichthesystemacquiredthisversion,thusthisproposalconsidersthetransactiontimedimension.ThemodelintroducedinMarianetal.(2001)isbasedon ordered trees, where all nodes have identifiers. The XML tree can be modified bymeansofbasicoperationssuchasdelete, insert, move,andupdate,after thecheckingofconsistencyconditions.InWangandZaniolo(2003),theauthorsproposeXML-basedtechniquesforman-agingamultiversiondocumentasaunit,andrepresentingsuccessiveversionsbymeansofdeltachanges.IntheXMLdocumentcontainingthesuccessiveversionsofadocument,eachelementhastwoattributes,vstartandvend, whichrepresentthevalidversionintervaloftheelement.Theformerattributerepresentsthemomentat which the element is first added to the XML document (i.e., the initial version inwhichtheelementisvalid),whilethelatterrepresentsthemomentatwhichtheelementisremovedfromtheXMLdocument(i.e.,thelastversioninwhichtheel-ementisvalid).Thevalidversionintervalcanberepresentedbymeansofversionnumbersortimestamps.Inthecaseoftimestamps,theconsideredtimedimensionisthevalidtime.Tomanageinacorrectwaythevalidtimedimension,theauthorsimposethattheversionintervalofanancestornodealwayscontainsthoseofitsdescendantnodes.Theconsideredchangeoperationsaredelete,insert,andupdate.InWangetal.(2005),theauthorsdescribeanapproachtostoreandquerythehis-toryofXMLevolvingdocument.Inparticular,theycomputethedifferencebetweenthesuccessiveversionsofadocument,andrepresentthehistoryofthedocumentbytimestampingandtemporallygroupingthedeltas.Inthisway,amultiversiondocumentismanagedasaunitanditssuccessiveversionsarerepresentedbythedeltachangesbetweenversions.Thisapproachmakesitpossibletosupportcomplexhistoricalqueriesontheevolutionofthedocumentanditselements,byusingXquery(WorldWideWebConsortium,2005b),thestandardquerylanguageofXML.In Bębel et al. (2004), the authors propose a multiversion data warehouse that is capableofhandlingchangesintheschemastructureaswellassimulatingalterna-tivebusinessscenariosusefultopredicttrendsbymeansofthewhat-ifanalysis.Atthisaim,theauthorsproposetwodifferentkindsofversions:realversions,whichhandlechangesmadetotheexternaldatasources,andalternativeversions,whichhandlechangesmadebyauserforthepurposeofapplyingthewhat-ifanalysis.Severalalternativeversionscanbecreatedfromarealversion.Alternativeversionscanbecreatedalsotosimulatechangesinthestructureofadatawarehouseschema.Suchaversionisusedforanalyzingthesystemperformancesandtheoptimizationofthedatawarehousestructure.Thetimedimensionconsideredinthisproposalisthevalidtime,whichisrepresentedbymeansoftwotimestamps:thebeginningvalidtimeandtheendingvalidtime.

Page 313: Data Warehouses and OLAP - Concepts Architectures and Solutions

286 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Representing.Semistructured.Temporal.Data.Warehouses

Datastoredinawarehouseusuallycomefromgeneralheterogeneousdatasources,and are semistructured in nature, thus a general and flexible data model to represent informationstoredinthedatawarehouseisneeded.Moreover,datawarehousesusu-allyareusedasarepositoryfortimevaryinginformation.Thismeansthat,temporalaspectsareaveryimportantissueinthiscontext.Inthissection,weconsiderthemaintopicsrelatedtothemanagementoftimeinsemistructureddatawarehouses.Inparticular,wedescribehowtorepresentadatawarehousebymeansofagraph-basedtemporalsemistructureddatamodel,andproposethesetofconstraintsneededtomanageinthecorrectwaytheconsideredtimedimensioninthewarehousecontext.InFigure2aGEMgraphrepresentingaportionofadatawarehouseisreported.Inthisexampleinformationaboutproductsinacataloguearestored.Inparticular,datainthegraphrepresentacataloguecomposedbytwocategories:ClothesandSportProduct.ThecomplexnoderepresentingthecatalogueistherootofthegraphandhasaslabelitsnameCatalogueanditsvalidtime[01/01/05,now]. Thevalidinterval[01/01/05,now]representsthefactthatthecatalogueisvalidfromJanuary1,2005untilnow.TheClothesandSportProduct categoriesarealsorepresentbymeansofcomplexnodeswiththesamevalidtimeintervals.Theformercategoryhastwoproductswiththeircodesandprices,whilethelatteroneisempty.Inparticular,theproductsincludedintheClothes categoryarerepre-sentedbymeansoftwocomplexnodeswithlabelProduct andvalidtimeinterval[01/01/05,now]. The first product has a code equal to “X1” andapriceequalto“$10.”Bothpropertiesarerepresentedassimplenodes.Eachsimplenodehasaslabelthename(Code/Price),andthevalidtimeinterval([01/01/2005]),andthevalueoftheproperty(X1/$10). The second product is structured as the first one, andrepresentsaproducthavingcodeequalto“X2” andapriceequalto“$20.” Eachcomplexnodeisrelatedtoitschildren(complexorsimplenodes)bymeansofedgeshaving labelcomposedby thenameof the relationand thevalid timeof therelationitself.ForexamplethecomplexnodeCatalogue isrelatedto thecategoryClothes bymeanstheedgewithnameCategoryandvalidtimeinterval[01/01/2005,now].ThedescribedinformationisvalidsinceJanuary1,2005;thus,thevalidtimein-tervaloftheobjectsinthedatawarehouseis[01/01/05,now].OnMarch1,2005,thepriceoftheproducthavingcode“X2”changesfrom“$20”to“$25.”InFigure3thisupdateisreported.Inparticular,thetimeintervalofthesimplenodePricechangesfrom[01/01/05,now]to[01/01/05, 28/02/05],andthesameforthetimeintervaloftheedgeProdPricebetweenthecomplexnodeProd-

Page 314: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 28�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

uct andthesimplenodePrice.Theinterval[01/01/05, 28/02/05] meansthattheconsideredobjectswerevalidfromJanuary1,2005toFebruary28,2005.ThenewpriceisrepresentedbymeansofthenewsimplenodePricewithvalue“$25”andvalidtimeinterval[01/03/05,now], relatedtothecomplexnodeProduct,representingtheproducthavingcode“X2,”bymeansoftheedgeProdPrice withvalidtimeinterval[01/03/05,now].ThedashedregioninFigure3containstheoldandthenewprices.

<Catalogue,[01/01/05,now]>

<Clothes,[01/01/05,now]> <SportProduct,[01/01/05,now]>

<Product,[01/01/05,now]>

<Product,[01/01/05,now]>

<Code,[01/01/05,now]>

<Code,[01/01/05,now]>

<Price,[01/01/05,now]>

<Price,[01/01/05,now]>

<Category,[01/01/05,now]> <Category,[01/01/05,now]>

<ProdList,[01/01/05,now]>

<ProdList,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdPrice,[01/01/05,now]>

<ProdPrice,[01/01/05,now]>

$10

X1

$20

X2

Figure 2. A GEM graph representing a data warehouse

Page 315: Data Warehouses and OLAP - Concepts Architectures and Solutions

288 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

OnApril1,2005anewproductwithcode“Y1”andprice“$50”isaddedtothecata-logueinthecategorySporProduct.TheGEMgraphafterthisinsertionisreportedinFigure4.Thedashedregioncontainsthenewproductwithitsproperties.Inparticular,thenewproductisrepresentedbymeansofthecomplexnodeProduct withvalidtimeinterval[01/04/05,now]. ThenewproductisrelatedtoSportProd-uctbymeansoftheedgeProdListhavingthesametimeinterval.Moreover,thenewproducthasthesimplenodeCodewithvalue“Y1”andthesimplenodePrice

Figure 3. Changing the price

<Catalogue,[01/01/05,now]>

<Clothes,[01/01/05,now]> <SportProduct,[01/01/05,now]>

<Product,[01/01/05,now]>

<Product,[01/01/05,now]>

<Code,[01/01/05,now]>

<Code,[01/01/05,now]>

<Price,[01/01/05,28/02/05]>

<Price,[01/01/05,now]>

<Category,[01/01/05,now]> <Category,[01/01/05,now]>

<ProdList,[01/01/05,now]>

<ProdList,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdPrice,[01/01/05,28/02/05]>

<ProdPrice,[01/01/05,now]>

$10

X1

$20

X2

<Price,[01/03/05,now]>

<ProdPrice,[01/03/05,now]>

$25

Page 316: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 28�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

withvalue“$50.”Thesesimplenodeshavetimeinterval[01/04/05,now], astheiringoingedges.OnJune1,2005theClothes categoryisreplacedbytheKidClothesandtheAdult-Clothescategories.TheGEMgraphafterthisreplacementisreportedinFigure5.Thedashedregioncontainsthenewcategories.In particular, the time interval of the replaced Clothes category changes from[01/01/05,now]to[01/01/05, 31/05/05],andthesameforthetimeintervaloftheedgeCategorybetweenthecomplexnodeCatalogue andthecomplexnodeClothes.ThenewcategoriesarerepresentedbymeansofthecomplexnodesKidClothesandtheAdultClothes withvalidtimeinterval[01/06/05,now]. Theproductsincludedin

Figure 4. Adding a new product

<Catalogue,[01/01/05,now]>

<Clothes,[01/01/05,now]> <SportProduct,[01/01/05,now]>

<Product,[01/01/05,now]>

<Product,[01/01/05,now]>

<Code,[01/01/05,now]>

<Code,[01/01/05,now]>

<Price,[01/01/05,28/02/05]>

<Price,[01/01/05,now]>

<Category,[01/01/05,now]> <Category,[01/01/05,now]>

<ProdList,[01/01/05,now]>

<ProdList,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdPrice,[01/01/05,28/02/05]>

<ProdPrice,[01/01/05,now]>

$10

X1

$20

X2

<Price,[01/03/05,now]>

<ProdPrice,[01/03/05,now]>

$25

<Product,[01/04/05,now]>

<ProdList,[01/04/05,now]>

<Code,[01/04/05,now]>

<Price,[01/04/05,now]>

<ProdCode,[01/04/05,now]>

<ProdPrice,[01/04/05,now]>

$50

Y1

Page 317: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�0 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

thereplacedcategoryarerelatedtothenewcategories.Inparticular,theproductwithcode“X1”isrelatedtotheAdultClothescategory,whiletheproductwithcode“X2”isrelatedtotheKidClothescategory.ThismeansthatthevalidtimeintervalsbetweentheClothes categoryandtheconsideredproductschangesfrom[01/01/05,now]to[01/01/05, 31/05/05],andnewedgesbetweenthenewcategoriesandtheproductsareadded.Thenewedgeshavevalidtimeintervalequalto[01/06/05,now].

Figure 5. Replacing a category

<Catalogue,[01/01/05,now]>

<Clothes,[01/01/05,31/05/05]> <SportProduct,[01/01/05,now]>

<Product,[01/01/05,now]>

<Product,[01/01/05,now]>

<Code,[01/01/05,now]>

<Code,[01/01/05,now]>

<Price,[01/01/05,28/02/05]>

<Price,[01/01/05,now]>

<Category,[01/01/05,31/05/05]> <Category,[01/01/05,now]>

<ProdList,[01/01/05,31/05/05]>

<ProdList,[01/01/05,31/05/05]>

<ProdCode,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdPrice,[01/01/05,28/02/05]>

<ProdPrice,[01/01/05,now]>

$10

X1

$20

X2

<Price,[01/03/05,now]>

<ProdPrice,[01/03/05,now]>

$25

<Product,[01/04/05,now]>

<ProdList,[01/04/05,now]>

<Code,[01/04/05,now]>

<Price,[01/04/05,now]>

<ProdCode,[01/04/05,now]>

<ProdPrice,[01/04/05,now]>

$50

Y1

<KidClothes,[01/06/05,now]>

<Category,[01/06/05,now]>

<ProdList,[01/06/05,now]>

<AdultClothes,[01/06/05,now]>

<Category,[01/06/05,now]>

<ProdList,[01/06/05,now]>

Page 318: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

OnJuly1,2005 thenewTShirt subcategory is insertedunder theAdultClothescategory.TheGEMgraphafterthisinsertionisreportedinFigure6.Thedashedregioncontainsthenewsubcategory.Asinthepreviouscase,thenewsubcategoryisrepresentedbymeansofanewcomplexnode.Thevalidtimeintervalofthenewobjects(nodes/edges)is[01/07/05,now].

Figure 6. Adding a new subcategory

<Catalogue,[01/01/05,now]>

<Clothes,[01/01/05,31/05/05]> <SportProduct,[01/01/05,now]>

<Product,[01/01/05,now]>

<Product,[01/01/05,now]>

<Code,[01/01/05,now]>

<Code,[01/01/05,now]>

<Price,[01/01/05,28/02/05]>

<Price,[01/01/05,now]>

<Category,[01/01/05,31/05/05]>

<Category,[01/01/05,now]>

<ProdList,[01/01/05,31/05/05]>

<ProdList,[01/01/05,31/05/05]>

<ProdCode,[01/01/05,now]>

<ProdCode,[01/01/05,now]>

<ProdPrice,[01/01/05,28/02/05]>

<ProdPrice,[01/01/05,now]>

$10

X1

$20

X2

<Price,[01/03/05,now]>

<ProdPrice,[01/03/05,now]>

$25

<Product,[01/04/05,now]>

<ProdList,[01/04/05,now]>

<Code,[01/04/05,now]>

<Price,[01/04/05,now]>

<ProdCode,[01/04/05,now]>

<ProdPrice,[01/04/05,now]>

$50

Y1

<KidClothes,[01/06/05,now]>

<Category,[01/06/05,now]>

<ProdList,[01/06/05,now]>

<AdultClothes,[01/06/05,now]>

<Category,[01/06/05,now]>

<ProdList,[01/06/05,now]>

<TShirt,[01/07/05,now]>

<ProdList,[01/07/05,now]>

<Type,[01/07/05,now]>

Page 319: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�2 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Representing Constraints by Means of Graphs

Inthecontextoftemporalsemistructureddata,itisimportanttostorethetimedi-mensionrelatedtotherepresentedinformation,andtomanageinacorrectwaytheconsidered time dimension. At this aim, a set of constraints must be defined. In this work, we consider the valid time dimension, thus the defined constraints must be abletoguaranteethatthehistoryofthegivenapplicationdomainisconsistent.In our proposal, it is possible to define two different categories of constraints for validtimevaluesofnodesandedges:basic constraints must be satisfied by every GEMgraph;domain-dependent constraintsarefurtherconstraints,whichcanbedefined either for some specific nodes and edges or for the whole graph for a spe-cific application domain. Domain-dependent constraints are strictly related to the semanticsoftherepresentedobjectsandrelationships.As an example of basic constraints, at a specific time instant, between two nodes itcannotexistmorethanoneedgerepresentingthesamerelation(Combietal.,2004).ThegraphicalformalismusedinthefollowingconstraintshasbeendescribedinDamiani,Oliboni,Quintarelli,andTanca(2003)andOliboni(2003):aconstraintiscomposedbyagraph,whichisusedtoidentifytheportionsofasemistructuredgraphwheretheconstrainthastobeapplied,andasetofformulae,whichrepresentrestrictionsimposedonthosesubgraphs.InFigure7abasicconstraintisreported.Inparticularthisconstraintimposesthatthetimeintervalofanedgebetweenacomplexnodeandasimplenodemustberelatedtothetimeintervalofthecomplexnode.Intuitively,therelationbetweenacomplexnodeandasimplenodecannotsurvivethecomplexnode;thus,thetimeintervaloftheedgecannotstartbeforeandcannotendafterthevalidtimeofthecomplexnode,asdepictedinFigure7.Thisisduetothefactthatwesupposethatacomplexnodeisrelatedtoitsproperties(simplenodes)whileitisvalid.Theedge-relatedtimeinterval[tjs,tje] startsafterandendsbeforethetimeinterval[ths,the]ofthecomplexnode.Figure 7(a) identifies the subgraphs where the constraint has to be applied, and the setofformulaerepresentingrestrictionsimposedonthosesubgraphs.Figure7(b)showsanexampleofintervalssatisfyingtherelatedconstraint.Figure8showsadomain-dependentconstraintontherelationbetweenaproductanditscategories.Inparticularthisconstraintimposesthataproductmustbere-latedtoacategory;thatis,aproductcanbeinsertedinthecatalogueonlyifitisconnectedtoatleastonecategory.Figure 8(a) identifies the subgraphs where the constraint has to be applied, and the formularepresentingrestrictionsimposedonthosesubgraphs.Figure8(b)showsanexampleofintervalssatisfyingtherelatedconstraint.

Page 320: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Future.Trends

Inthesemistructureddatawarehousecontext,thefollowingissuesareveryrelevantandinteresting:

• Querying.of.semistructured.temporal.data.warehouse: Startingfromagraph-basedrepresentationofdatastoredinadatawarehouse,itcouldbeusefultostudyatemporalsemistructuredquerylanguagewhichallowsonetoimposetemporalclauses,andretrieveinformationwithoutknowinginadvancethestructureofdata.Inthesemistructureddatacontext,querylanguagesusepath

Figure 7. A basic constraint

Figure 8. The constraint on the relation between a product and its categories

<NodeNameh,[ths,the]>

<EdgeNamej,[tjs,tje]>

ths the

tjs tje

tks tke

t

<NodeNamek,[tks,tke]>

hetjethstjst

∧≥

(a) (b)

<NodeNameh,[ths,the]>

<Product,[tks,tke]>

<ProdListi,[tis,tie]>

t�s t�e

t2s

t�s

t�e

t�e

tks tke

t

n1,...,i

]iet,is[t

)iemax(tket

)ismin(tkst

=

∅=

∧=

∧=

(a) (b)

Page 321: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�4 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

expressionstodescribepathsonthegraph.Inthiscontext,theproblemsarerelated to the definition of a simple and intuitive syntax allowing the user to express complex temporal clauses, and to the definition of a query language which is general and flexible enough to overcome difficulties coming from thesemistructurednatureofdata.

• Data aggregation and materialization: Inthesemistructureddatacontextthesameinformationcanbestructuredindifferentways,thusaninterestingpoint is thestudyofsuitabletechniquestoaggregatedatahavingdifferentstructure,choosingacommongraphicalrepresentation.Moreover,theresultofdataaggregationcanbeseenasaviewonthedatawarehouse,andthusitcouldbeinterestingtomaterializetheviewitself,andtostudydifferentpos-sibilitiestostoredataintheview,andtorelatethemtotheoriginalinforma-tion.

• Representation.of.versions:IntheXMLdatawarehousecontext,itcouldbeusefultomaintainthesuccessiveversionsofanXMLdocumentstoredinthedatawarehouse.Agraphicalrepresentationofversionscouldbestudiedandproposed.Thegraph-basedapproachforrepresentingsuccessiveversionswouldrepresentthevalidtimeofdata,andthevalid(transaction)timeofthedocumentversion.Inthiscasetheproblemtoconsiderisrelatedtothebestrepresentationofdifferentversionsofthesamedocument.Thismeanstochoosetorepresenteithereachversionofthewholedocumentoronlythepartofthenewversionwhichisdifferentfromthepreviousone,andtounderstandhowtorepresentthetimedimensionrelatedtotheversiontime.

• Querying.successive.versions.of.documents.stored.in.a.data.warehouse:.Inthiscontextitcouldbeusefultoquerybyconsideringthevalidtimeofinformation,orthevalidversionofadocument,oraparticularpastversion,orbyconsideringbothtimedimensions.Inthiscasetheproblemsarerelatedtothestudyofsuitabletemporalclausesallowingtheusertoexpresstempo-ralconditionsondifferenttimedimensions,thatis,versiontimedimension,documentvalidtime.Forexample,theusercouldbeinterestedinretrievingtheevolutionofaportionofthedocument,orinretrievingvaliddata.Intheformer case the userwould query the successive versions of a document,whileinthelattercasetheuserwouldquerythepresent(valid)versionofthedocument.Moreover,theuserwouldliketoqueryagivenpastversionofthedocument.

Conclusion

Inthischapterwedescribedagraph-baseddatamodeltorepresentsemistructureddatawarehousebyconsideringthevalidtimedimension.Thisapproachallowsone

Page 322: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

torepresentdatastoredinadatawarehousebymeansoflabeledgraphs.Eachobjectofthegraph(node/edge)hasalabelcomposedbythedescriptionoftheobjectitself(thename),andthevalidtimedimension(thevalidtimeinterval).Inparticular,weconsideredandrepresentedthevalidtimedimension,andgavesomeexamplesoftheconstraintsneededtomanageinthecorrectwaytheconsideredtimedimension.

References

Abiteboul,S.(1997,January8-10).Queryingsemi-structureddata.InProceedings of the International Conference on Database Theory, Greece(LNCS1186,pp.262-275).

Abiteboul,S.,&Buneman,P.,&Suciu,D.(2000).Data on the Web: From relations to semistructured data and XML.MorganKaufman.

Amagasa,T.,Yoshikawa,M.,&Uemura,S.(2001,April23-24).Realizingtem-poralXMLrepositoriesusingtemporalrelationaldatabases.InProceedings of the Third International Symposium on Cooperative Database Systems and Applications,Beijing (pp.63-68).

Bębel, B., Eder, J., Koncilia, C., Morzy, T., & Wrembel, R. (2004, March). Creation andmanagementofversionsinmultiversiondatawarehouse.InProceedings of the 2004 ACM Symposium on Applied Computing, Cyprus (pp.717-723).ACMPress.

Bhowmick,S.S.,Madria,S.K.,Ng,W.K.,&Lim,E.P.(1998).Webwarehous-ing:Designandissues.InProceedings of International Workshop on Data Warehousing and Data Mining (in conjunction with International Conference on Conceptual Modelling, Singapore (LNCS1552,pp.93-104).

Chawathe,S.S.,Abiteboul,S.,&Widom,J.(1998).Representingandqueryingchangesinsemistructureddata.InProceedings of the Fourteenth International Conference on Data Engineering (pp.4-13). IEEEComputerSociety.

Combi,C.,Damiani,E.,Posenoto,R.,&Tanca,L.(1998,May13-15).Ascheme-basedapproachtomodelingandqueryingWWWdata.Proceedings of Flexible Query Answering Systems (LNCS1495,pp.110-125).

Combi,C.,Oliboni,B.,&Quintarelli,E.(2004).Agraph-baseddatamodeltorep-resenttransactiontimeinsemistructureddata.InProceedings of the Database and Expert Systems Applications (LNCS3180,pp.559-568).

Damiani,E.,Oliboni,B.,Quintarelli,E.,&Tanca,L.(2003).Modelingsemistruc-tureddatabyusinggraph-basedconstraints.In Proceedings of On The Move to Meaningful Internet Systems 2003: OTM 2003 Workshops (LNCS2889,pp.20-21).

Page 323: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�6 Combi & Oliboni

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Damiani,E.,&Tanca,L.(1997).SemanticapproachtostructuringandqueryingtheWebsites.InProceedings of 7th IFIP Working Conference on Database Semantics (pp.21-49).Chapman&Hall.

Dyreson,C.E.,Böhlen,M.H.,&Jensen,C.S.(1999,September7-10).Capturingandqueryingmultipleaspectsofsemistructureddata.InProceedings of 25th International Conference on Very Large Data Bases(pp.290-301). MorganKaufmann.

Eder, J., & Koncilia, C. (2001). Changes of dimension data in temporal datawarehouses.InProceedings of the Third International Conference on Data Warehousing and Knowledge Discovery,Munich,Germany (LNCS2114,pp.284-293). ACM.

Eder,J.,Koncilia,C.,&Morzy,T.(2001).Amodelforatemporaldatawarehouse.InProceedings of the OES-SEO Workshop(pp.48-54).

Jensen,C.S.,Dyreson,C.E.,Bohlen,M.H.,etal.(1998).Theconsensusglossaryoftemporaldatabaseconcepts(February1998Version).Temporal Databases: Research and Practice, Rockville,MD (LNCS 1399,pp.367-405).

Li,C.,&Wang,X.(1996,November12-16).Adatamodelforsupportingon-lineanalyticalprocessing.InProceedings of the Fifth International Conference on Information and Knowledge Management (pp.81-88). ACMPress.

Marian, A., Abiteboul, S., Cobena, G., & Mignet, L. (2001). Change-centricmanagementofversionsinanXMLwarehouse.InProceedings of the 27th International Conference on Very Large Data Bases (pp.581-590). MorganKaufmannPublishersInc.

Oliboni,B.(2003). Blind queries and constraints: Representing flexibility and time in semistructured data.Doctoralthesis,PolitecnicodiMilano.

Oliboni,B.,Quintarelli,E.,&Tanca,L.(2001,June14-16).Temporalaspectsofsemistructureddata.InProceedings of the Eighth International Symposium on Temporal Representation and Reasoning (pp.119-127).IEEEComputerSociety.

Papakonstantinou,Y.,Garcia-Molina,H.,&Widom,J.(1995).Objectexchangeacrossheterogeneousinformationsources.InProceedings of the Eleventh In-ternational Conference on Data Engineering, Taipei,Taiwan (pp.251-260).IEEEComputerSociety.

Vassiliadis,P.,&Sellis,T.(1999).AsurveyoflogicalmodelsforOLAPdatabases.SIGMOD Record 28, 64-69.

Wang,F.,&Zaniolo,C.(2003).TemporalqueriesinXMLdocumentarchivesandWebwarehouses.InProceedings of the 10th International Symposium on Tem-poral Representation and Reasoning and Fourth International Conference on Temporal Logic (pp.47-55).IEEEComputerSociety.

Page 324: Data Warehouses and OLAP - Concepts Architectures and Solutions

Temporal Semistructured Data Models and Data Warehouses 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Wang,F.,Zaniolo,C.,Zhou,X.,&Moon,H.J.(2005,July8-10).Versionman-agementandhistoricalqueriesindigitallibraries.In Proceedings of the12th International Symposium on Temporal Representation and Reasoning (pp.207-209). IEEEComputerSociety.

WorldWideWebConsortium.(1995).OverviewofStandardGeneralizedMarkupLanguage (SGML) resources. Retrieved June 14, 2006, from http://www.w3.org/MarkUp/SGML/

WorldWideWebConsortium.(1998).Extensible Markup Language (XML) 1.0.RetrievedJune14,2006,fromhttp://www.w3C.org/TR/REC-xml/

WorldWideWebConsortium.(2005a).XML Path Language (XPath) 2.0.RetrievedJune14,2006,fromhttp://www.w3.org/TR/xpath20/

WorldWideWebConsortium.(2005b).XQuery 1.0: An XML query language.Re-trievedJune14,2006,fromhttp://www.w3.org/TR/xquery/

Xyleme,L.(2001,July16-18).Xyleme:AdynamicwarehouseforXMLdataoftheWeb.InProceedings of International Database Engineering & Applications Symposium, IDEAS ’01 (pp.3-7).IEEEComputerSociety.

Page 325: Data Warehouses and OLAP - Concepts Architectures and Solutions

2�8 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Chapter.XIII

Spatial.Online.Analytical.Processing.

(SOLAP):Concepts,.Architectures,.and.Solutions.from.a.Geomatics.

Engineering.PerspectiveYvan Bédard

Laval University, Canada

Sonia RivestLaval University, Canada

Marie-Josée ProulxLaval University, CAnada

Abstract

It is recognized that 80% of data have a spatial component (e.g., street address, place name, geographic coordinates, map coordinates). Having the possibilities to display data on maps, to compare maps of different phenomena or epochs, and to combine maps with tables and statistical charts allows one to get more insights into spatial datasets. Furthermore, performing fast spatio-temporal analysis, interactively

Page 326: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) 2��

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

exploring the data by drilling on maps similarly to drilling on tables and charts, and easily synchronizing such operations among these views is nowadays required by more and more users. This can be done by combining geographical information systems (GIS) with online analytical processing (OLAP), paving the way to “SO-LAP” (spatial OLAP). The present chapter focuses on the spatial characteristics of SOLAP from a geomatics engineering point of view: concepts, architectures, tools and remaining challenges.

Introduction

Itisrecognizedthatupto80%ofcorporatedatahavespatialcomponentssuchasstreetaddresses,placenames,geographiccoordinates,ormapcoordinates.Thisfact,estimatedbyFranklin(1992),isstillrecognizedtodayanditonlystartstoshowitspotentialforthemasseswithrecentcommercialadvancessuchasGoogleMapsandGoogleEarth.However,thetruepowerofmapstypicallyremainsunderusedforgeographicknowledgediscoveryunlessonecombinesageographicinformationsystem(GIS)toOLAPtechnology.

The.Power.of.Maps

Mapdataaretherawmaterialtoproducethegeographicinformationthatleadstoknowledgeabouttheposition,extent,anddistributionofphenomenaoverourter-ritories.Suchphenomenaarecountedbythousandsandincludeinsectterritorialexpansions,environment-healthcorrelations,land-useevolution,911vehicletrack-ingandwatershedanalysis,tonameafew.Visualizinggeographicphenomenaonmapsfacilitatestheextractionofinsightsthathelptounderstandthesephenomena.Suchinsightsincludespatialcharacteristics(position,shape,size,orientation,etc.),spatialrelationships(adjacency,connectivity,inclusion,proximity,exclusion,over-lay,etc.),andspatialdistribution(concentrated,scattered,grouped,regular,etc.).Whenwevisualizeamapdisplayingdifferentregions,wecancompare.Whenwevisualizedifferentmapsforasameregion,wecandiscovercorrelationsbetweenphenomena.Whenwevisualizethemapofaregionfordifferentepochs,wecanseetheevolutionofthephenomena.Whenweusemaps,weoftengetabetterun-derstandingofthestructuresandrelationshipscontainedwithinspatialdatasetsthanusingsimpletablesandcharts.Whenwecombinemapswithtablesandstatisticalcharts,wecanrelatethesetomakenewdiscoveries.Mapsarenaturalaidstotheknowledgediscoveryprocess.Inthecontextofspatialdataexploration,mapsdomorethanjustmakethedatavisible,theyareactiveinstrumentstosupporttheenduserthinkingprocess.Usingmapsforgeographicknowledgediscoveryrequiresless

Page 327: Data Warehouses and OLAP - Concepts Architectures and Solutions

�00 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

abstraction efforts for users, which in turn, increases their efficiency. Maps show informationthatwouldnotbevisiblefromnonspatialdataforthosephenomenahaving a spatial distribution that does not correspond to predefined boundaries (e.g., administrativeboundaries).Numerousstudies incognitivescienceshaveshownthesuperiorityofimagesovernumbersandwordstostimulateunderstandingandmemory(Buzan&Buzan,2003;Fortin&Rousseau,1989;Standing,1973),lead-ing to a more efficient knowledge discovery process (more alert brain, better visual rhythm,moreglobalperception).

Marrying.OLAP.with.GIS

Geographicinformationsystems(GIS)areverygoodatachievingthegoaltheyhavebeendevelopedfor,thatis,gathering,storing,manipulatinganddisplayingspatialdata(seeLongley,Goodchild,Maguire,&Rhind,2001).However,theyaretransaction-orientedsystemsanddonotaddresssummarizedinformation,cross-referencedinformation,interactiveexplorationofdata,andsoforth.Furthermore,theyarenotsuitedfortemporaldata,theyareveryslowtoaggregatedata,theyhardlydealwithmultiplelevelsofdatagranularity,andtheiruserinterfaceistoocomplexformostusers.Similarlytodatabasemanagementsystems(DBMS),GISalone cannot fill the “analysis gap” between spatial data and geographic knowledge discovery.Whenonehastointeractivelydigintodata,rollthemup,andcross-ref-erencethemtogettheinformationofinterest,today’sGISinteractivityandqueryinterfacesarenotappropriateintermsoffunctions,ease-of-use,orresponsetimes.Today’sGISdonotsupportNewell’scognitivebandof10seconds(Newell,1990)whenoneneedstokeephistrain-of-thoughtwhileanalyzingspatialdata.Ontheotherhand,eventhoughOLAPiswell-suitedforknowledgediscovery,itisnotadaptedfortheanalysisofspatialdata(Caron,1998).Infact,OLAPtreatsspatial data like other data and spatial analysis is limited to predefined nominal lo-cations(e.g.,namesofcountries,states,regions,cities).Supportforspatiotemporalanalysesisseriouslylimited(nospatialvisualization,practicallynospatialanalysis,nomap-basedexplorationofdata,etc.).Extraction,transformation,andload(ETL)processescannotdealwithmostaspectsofspatialdata.Nevertheless,itispossibletoachievegoodresultsbymarryingGISwithOLAP.SeveralprojectsinCanada,U.S.,France,Portugal,andelsewherehaveshownthesuperiorityofthiscombina-tionoverstand-aloneGISorOLAPforinteractivespatialdataexploration.

Towards.SOLAP

Inmostofthoseprojects,GISandOLAParelooselycoupledandtheGISservesasamapviewerofOLAPoperations.Inmoretightlycoupledcases,functionsare

Page 328: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

addedtosupportcartographicdrillingintheGISandtomaintainthesynchroniza-tionbetweentheGISandOLAPdisplays.Sometimes,acommonuserinterfaceisbuiltovertheGIS-OLAPcombotomaketheapplicationappearasauniquesystem.Dependingonthefunctionsthatareprioritized,theresultistermedOLAP-centric,GIS-centric,orhybrid(LGSGroup,2000).Morerecently,SOLAPsoftwarehasreachedthemarket,allowingeventighterin-tegrationbetweenGISandOLAP(dataandfunctions).Bédard,Proulx,andRivest(2005)makeacleardistinctionbetween“SOLAPapplications”developedwithanyofthepreviouslymentionedapproachesandsoftware,and“SOLAPsoftware”which relies on a hybrid approach and is specifically meant to improve the devel-opmentofSOLAPapplications.IncomparisontothelooselycoupledGIS-OLAP,SOLAP software typically provides four major benefits: (1) important savings in developmenttime(noprogrammingrequired),(2)richerSOLAPapplications(moreadvancedfunctions,betterGIS-OLAPintegrationoncomplexissues),(3)testeduserinterfacesdesignedespeciallyforSOLAPoperations,and(4)easiereditingofthemultidimensional data structure (using a SOLAP administrator module). The first SOLAPsoftwarecommerciallyavailable(JMap®SpatialOLAP)wasdevelopedbyBédard’steamatLavalUniversity.Inspiteofsuchadvances,today’sSOLAPimplementations still face challenges to become more efficient. In fact, coupling GISandOLAPisnotenough,manyhiddenchallengesmustbeovercome,resultingin important development efforts before obtaining an efficient solution.Theobjectiveofthepresentchapteristointroducethereadertothemainadvan-tagesandchallengesrelatedtotheuseofspatialdataandSOLAP.WebeginwithanoverviewoftheparticularitiesofspatialdatatohelpreaderstobetterassessthechallengesthatSOLAPdevelopmentpresents.After,wesummarizethehistoryofSOLAPapplicationsandtechnologiesaswellastoday’sstate-of-the-art.Then,wefocusontheconcepts,issues,challenges,andsolutionsrelatedtoSOLAP.Inthelastsections,wediscussfuturetrendsandpresentconcludingremarks.Thiscontentispresentedfromageomaticsengineeringperspective;itiswrittenforcomputerscien-tistswhoknowthefundamentalconceptsrelatedtospatialdatacubesandOLAP.

Background. Information

Withtherecentevolutionofgeomaticssciences(geodesy,globalpositioningsys-tems(GPS),photogrammetry,remotesensing,surveying,mapping,andGIS),wegathertodayterabytesofland-relateddataeverydayatacostthatismuchlowerthanadecadeago.Mainstreamapplicationsusingspatialdataareappearingev-erywhere. The benefits of using spatial data have been discussed previously in a generalmanner.IntheparticularcaseofSOLAP,thetightintegrationofGISand

Page 329: Data Warehouses and OLAP - Concepts Architectures and Solutions

�02 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

OLAP bring significant profits such as (1) offering the most intuitive user interface insofartoaccesscross-referencedspatialdata,(2)offeringthefastestsolutiontoaccessaggregatedspatialdata,and(3)allowingthediscoveryofspatialpatternsandclustersofphenomenathatcannotbedetectedwithOLAPsolely(e.g.,aphe-nomenontakingplaceintheforeststandslocatedalongarivergetsunnoticedwhenthenextaggregatedlevelofOLAPspatialunitsareadministrativeregionsmadeofthousandsofstands).AtightGIS-OLAPintegrationisalsoneededwhenonerequiresahighlevelofinteractivitybetweenthemapsandthetablesorcharts,acompletesynchronizationbetweenthevisualvariables(semiology)ofmaps,tables,and charts, as well as a high level of flexibility into the display of information that relatestoplacesorregionswhichmayvaryintime.Thisisthecaseformapsdis-playingsimultaneouslyseveraldimensionsandmeasures,formultimapsdisplay-ingasamephenomenonforcategoriesofmembers,andforthesequentialdisplayofmapsillustratingtheevolutionofaphenomenonovertime,amongothers.Forexample, one may want to synchronize a first set of views where drilling into one ofthemtriggerstheothersautomatically(e.g.,drillingonanationalmapofcancerratioformenautomaticallytriggersadrilloperationintotabularnationalstatisticsandintoahistogram),thentoopenasecondsetofviewsalsosynchronizedamongthemselves(e.g.,forwomencancer)forcomparisonpurposes,thentocreateamul-timapdisplayingonemapperyearforthelast10years(toseetheevolution),thentoaddpiechartsontopofeachregionofthemaptoseethedistributionofcancersbycategory,thentosynchronizewithasecond10-yearmultimapdisplayingdatafrom the National Inventory of Industrial Pollutants, to slice and dice into the first multimap tohighlightagiven typeofcancersand into the secondmultimap tohighlightagiventypeofpollutant,tovisuallylookforclustersorspatialcorrela-tionsthatmaytakeplaceregardlessofregionboundaries,todrillonaselectionofthreeregionstoseefurtherdetailsaswellasthemunicipalboundaries,tooverlaythehydrographicnetworkandthesourcesforwaterdistributionsystems,torollupriversandsourcesperwatershed,togetthetotallengthofpotentiallycontaminatedriverspermunicipality,todisplayandcountthenumberofwatersourcespermu-nicipalityforeachofthe10years,toshowthemunicipalitieswiththehighestratioofcancersofagiventypethatoverlaytheriverswithagiventypeofpollutantandwhichhappentohavetheirhighestratioofthegivencancerwithin5yearsafterthispollutantwasreleasedaboveagiventhreshold,torollupfortheentirecountrytocheckifthisisalocalornationalpattern,torollupforthelast25yearstoseeifthisisanevent-basedphenomenaorageneraltrendforthisplace,andsoforth.Such flexibility to navigate into space as well as time to analyze a phenomenon requires a very efficient coupling between the GIS and the OLAP, in terms of in-terface,functions,andspeed.Wehaveencounteredsuchneedsindifferentexperi-mentswithuniversityresearchers(e.g.,archaeologists,kinesiologists)andreal-lifeprojectsattheQuebecNationalInstituteofPublicHealth(users=epidemiologists),theQuebecMinistryofTransportation(users=civilengineers),LavalUniversity

Page 330: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

ExecutiveVice-Presidency(users=studentsrecruitmentteam),CanadaNationalCoastGuard(users=incidentanalysts),andsoforth.Typically,mosttransactionalandanalyticalapplicationsaresimplefromageomaticspointofview.Theytypicallyusespatialdataobtainedfromasinglesource,theyareout-of-date(oneormoreyearsoldistherule),theyareincompleteandtheyshowlimitedprecisionregardingthepositionofobjects(intheorderoftensofmeters,and more). Although this is sufficient for most users (e.g., tourists, news, routing), otherusershavemorecomplexneedsthatrequirefrequentupdates,integrationofdatafromdifferentsources,integrationofdatafromdifferentepochs,integrationoffield measurements, integration of real time data, and so on. Insofar, most research inSOLAPhasbeendonewiththeneedsoftheformergroupinmind.Wecansaythat today’s research community is succeeding in bringing spatial data into theOLAParena.However,majorchallengesremainforthenextseveralyearsinordertosatisfytheneedsofmoreadvancedusers.WestillneedtobringOLAPcapabili-tiesintothegeomaticsengineeringarena.

Particularities.of.Spatial.Data

Computer displays are flat; however the Earth is not. Furthermore, it is not a simple sphere nor a simple ellipsoid flattened at the poles. Earth’s true shape looks more like a nice potato and it is scientifically defined as the geoid. The geoid is an equi-potentialsurfacethatcorrespondstothemeansealevel.Thisphysicalmodelisthemathematical figure of the Earth as defined by its irregular gravity field. It is the modelusedbynationalmappingagenciestoproducetopographicmapsuponwhichmostthematicmapsarebased.ItismoreirregularthantheellipsoidofrevolutionbecauseoftheirregularitiesoftheEarthsurface(19,000metersfromthetopofMountEveresttothebottomofMarianaTrench)andbecauseofthedifferentdensi-tiesassociatedwithdifferenttypesofminerals.Thedifferencebetweentheellipsoidandthegeoidcanbeupto100metersbutweprojectourmeasurementsontheel-lipsoidtosimplifythemathematicsandtoremainmorestableovertime(thegeoidchangesovertime).Sincetheforceofgravityiseverywhereperpendiculartothegeoid(nottotheellipsoid),ourmeasurements(land-basedorsatellite-based)areinfluenced by the geoid. A slight vertical deviation of the measuring instrument may createdifferencesofhundredsofmeterswhenreportingapositionfromthegeoidtotheellipsoid.Thegeomaticssciencedealingwiththegeoidandtheellipsoidiscalledphysicalgeodesy;itprovidesthebasisforallmeasurements(seeHofmann-Wellenhof&Moritz,2005).Onceweknowthedifferencebetweenthegeoidandtheellipsoid,wemustprojectthe measured position to a flat surface such as a paper map or a computer display. Thiscannotbedonewithoutdistortion,eitherofangles,areas,ormoretypically,ofbothatthesametime.Thishasanimmediateimpactontheshapesofobjects,

Page 331: Data Warehouses and OLAP - Concepts Architectures and Solutions

�04 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

lengths,perimeters,areas,andpositions,forexample.Tocontrolthesedistortions,weusedifferentmapprojectionshavingdifferentmathematicalproperties.Thus,fromauniquepositionandshapeonanellipsoid,wemayobtaindifferentshapesandpositionsondifferentmaps.Thesedifferencesmaybeuptohundredsofmetersinsomecases.Thegeoid-ellipsoid-maptransferprocessisillustratedbyFigure1(fordetails,seeIliffe,2000).Inspiteoftheexistenceofastandardinternationalellipsoid,manymappingagenciesprefer to use a national or continental ellipsoid that better fits the surface of their country.Theyalsousedifferentmapprojectionsthatminimizethedistortionsforthegeometryoftheircountry.Furthermore,differentprojectsororganizationswithinasamecountryoftenusedifferentmapprojectionsoverasamezonedependingofthetotalareatobecoveredbytheirmaps.Selectingthemostappropriateellipsoidandmapprojectionallowsthemtominimize(fortheentirezonecoveredbyamapseries)thedistortionbetweenmapmeasurementsandthemeasurementsmadeontheEarth(i.e.,withregardtothegeoid).Furthermore,therearedifferentspatialreferencingsystemstodeterminetheposi-tionofobjectsonmaps.Onemayusealatitude-longitude-heightinternationalel-lipsoidalcoordinatesystem,anx-ycoordinatesystembasedonamapprojection,anx-y-zcoordinate systemfroma3Ddigital terrainmodel, a street addressorstreet-intersection,aplacename,adistance-directiontoalandmark,aroute-direc-tion-distance-offsetlinearreferencingsystems,andsoon.

Figure 1. From one object measured on the Earth to different map representa-tions

Page 332: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Theprecedingdifferencescanbecontrolledalgorithmicallyandarecurrentlyhan-dledbycommercialsoftwareandinteroperabilitystandards.However,thereremainsothersourcesofdistortionthatcannotbecontrolledtotallywhendealingwithmul-tiplesourcesofdata:diversityofmeasurementinstruments,inherentimprecisionof the measurement methods and tools used, data acquisition specifications that evolveover theyears, limitationsof thehumaninterpretationofmeasuredphe-nomena, independent data update policies, conflicting priorities over data quality, andsoforth.Theoverallresultsarespatialdataintegrationproblemsthatcannotbeavoided.Suchproblemshappen,forexample,whenoneintegratesupdatestoanexistingdataset(e.g.,originalmapscanhavebeenmadefromaerialphotographsbut updates may be coming from field surveys required by municipal bylaws). Theyalsohappenwhenoneintegratesdatafromtwoadjacentmapsmadebytwomunicipalities.Theyalsotakeplacewhenintegratingdifferentdatacollectedin-dependentlyfordifferentpurposessuchaslandusemapsandutilitiesmaps.Theyalsooccurwhenusingreal-timeGPSvehicletrackingoveraroadmapmadefromsatelliteimagery.Manymoreexamplescouldbepresentedtoexplainwhyspatial

Figure 2. Example of spatial aggregation-generalization mismatch where aggre-gated data provide true data but unreadable map while generalized data produce readable map but inexact data

Page 333: Data Warehouses and OLAP - Concepts Architectures and Solutions

�06 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

data never fit together or with reality! This creates major challenges for SOLAP as explainedlaterinthischapter.Inadditiontotheprecedingissues,whenoneneedstohaveamoreglobalcarto-graphicviewofaphenomenon,itisnotpossibletosimplyaggregatespatialdatasincethemapordisplaybecomesovercrowdedandunreadable.Onemustratherusemapgeneralizationprocesses.AccordingtoWeibelandDutton(1999,p.126),“Mapgeneralization is responsible for reducingcomplexity inamap inascalereductionprocess,emphasizingtheessentialwhilesuppressingtheunimportant,maintaininglogicalandunambiguousrelationsbetweenmapobjects,andpreserv-ingaestheticquality.”Everymap,includingthemapmadefromsourcedata,usessome level of generalization. By definition, a map is a model of only a subset of therealitywhereunnecessarydetailsareeliminatedandusefuldataemphasizedwhilemaintainingthemapreadability.Goingfromalargemapscaletoasmallermapscaleworsensthesituation.Categoriesofobjectsaswellasindividualobjectsareeliminated,othersarereplacedbyasymboloflargerorsmallersize,somearedisplaced, their shape is simplified, topological relationships may change, groups suchas“buildingblocks”replaceindividualbuildingswherethedensityistoohigh,andsoon.Inotherwords,thecontentofeverymapmaylie,themeasurementsmadeoneverymapmaylie,andatopologicalrelationshiponeverymapmaylie.Takingthisintoaccountinamultiresolutionspatialdatacubegoesbeyondthetraditionaltopologicalconcepts.Figure2showsanexampleoftheimpactofmapgeneralizationwithregardtothespatialdimensionofadatacube(a“spatialaggregation-generalizationmismatch”).This introduces specific concerns for the interactive exploration of spatial data as seenlaterinthischapter.Fromageomaticspointofview,spatialandtemporaldataaretypicallyconsidereddifferentfromthematicdata.Spatialandtemporaldataarereferencedata;theyareusedtolocatephenomenainspaceandtimeratherthandescribingthem.Theyarenotintrinsictoaphenomenonlikethematicdataare.Sincethehumanbrainhasbuilt-incapabilitiestousespaceandtime,usersintuitivelyrelyonspatialandtemporaldatatointegrateotherdataobtainedfromdifferentsources.Suchintegrationfromdifferentsourcesistypicallyperformedwithoutaprioriplanningsincespaceandtimeareperceivedbymosttobeuniversalreferencesystems.Theprecedingpageshaveshownthatpositioningobjectsinspaceismorecomplexthanitappears,creat-ingunexpectedproblemswhenonedevelopsmoreadvancedSOLAPapplications.Time shows similar problems but to a much lower level of difficulty since it can be perceivedasaone-dimensionaluniversewith0D(instant)and1D(interval)events,ascomparedtothe3Dspatialuniversehaving0D(point),1D(line),2D(surface),and3D(volume)objects.Fromacomputersciencepointofview,recenttechni-caldevelopmentshavereducedtheneedtomaintaindistinctionsbetweenspatialdataandotherdata(Longley,Goodchild,Maguire,&Rhind,1999).Nevertheless,

Page 334: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

specialcaremustalwaysbetakenwhenprocessingdatafromdifferentmapsandpositioningtechnologies(e.g.,GPS)astypicallyisthecasewhenwebuildspatialdatawarehousesandspatialdatacubes.

Evolution.of.SOLAP

Inspiteofadecadeofresearch,testing,andexperiments,itisonlyrecentlythatSOLAP applications have been implemented into organizations for their dailydecision making. Examples in very diverse fields exist in Canada, France, United States,andPortugalinparticular.Furthermore,productssupportingsomeSOLAPrequirementshaveappearedonthemarketrecently,eitherfromkeyplayerssuchasSAS,ESRI,MapInfo,BusinessObjects,andCognos,orfromsmallerinnovativecompaniessuchasKHEOPSTechnologiesandProClarity.Theseapplicationsandtechnologiesarestillintheirinfancybuttheyalreadyprovidenewservices.ThetermspatialOLAP,orSOLAP,wascoinedbyBédard(1997)inparalleltothetermspatialdatabases.Severalresearchprojectsaimingatcombininganalyticaldata-basesandspatialdatabaseshavebeencarriedoutsincethemid-1990s.PioneersfromSimonFraserUniversitydevelopedtheGeoMinerprototype(Stefanovic,1997)thatincluded an efficient method for spatial datacube materialization (Han, Stefanovic, &Koperski,1998;Stefanovic,Han,&Koperski,2000).OtherpioneersfromLavalUniversity(Bédard,1997;Rivest,Bédard,&Marchand,2001)experimentedwithvariedcombinationsofGISandOLAPtechnologieswithexternalusersindifferentfields of application (Bédard et al., 2005) before developing the first commercial hybrid solution:JMap®SpatialOLAPExtension(Bédard,2005).Theydevelopedseveralconcepts,includingnewOLAPfunctions,spatiotemporaltopologicaldimensions(Marchand,2004),theuseofrasterrepresentationsofspaceforevolvingdatacubes(Miquel,Bédard,&Brisebois,2002),andintegratingmultiplerepresentationsinspatialdatacubes(Bédard&Bernier,2002;Bernier&Bédard,2005),forinstance.ManyresearchprojectshavebuiltbridgesbetweenOLAPandGIStofacilitatethedevelopmentofhybridsystemssimilartothemostrecentcommercialreleases,suchasGOAL(Kouba,Matousek,&Miksovsky,2000),SIGOLAP(Ferreira,Campos,&Tanaka,2001),SOVAT(Scotch&Parmanto,2005),GMLAWebServices(Silva,Times,Fidalgo&Barros,2005),andCommonGIS(Hernandez,Voss,&Gohring,2005).A team from the University of Minnesota developed MapCube, a datastructureandvisualizationtoolforspatialdatacubes(Shekhar,Lu,Tan,Chawla,&Vatsavai,2001).AnothergroupfromINSA-Lyon,inFrance,alsodevelopedapro-totypeofSOLAPapplicationandisworkingonfundamentalconcepts(Tchonikine,Miquel,Laurini,Ahmed,Bimonte,&Baillot,2005).IncollaborationwiththeLavalUniversityteam,theyworkedonevolvingdimensions(Body,Miquel,Bédard,&Tchounikine,2002)andhighlyheterogeneousdata(Miqueletal.,2002).Fidalgo,Times,Silva,andSouza(2004)haveproposedaGeoDWFramebasedonthestar

Page 335: Data Warehouses and OLAP - Concepts Architectures and Solutions

�08 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

schematofacilitatethedesignofspatialdimensionalschemas.SeveralItalianre-searchershavebeenactiveinfundamentalresearchrelatedtoSOLAP.Pourabbas,Rafanelli,Ferri,andothershavepublishedwidelyonPQL,apictorialquerylan-guageforspatialdatausingOLAPoperators(Ferri,Pourabbas,&Rafanelli,2002;Pourabbas,2003;Pourabbas&Rafanelli,2002).Pourabbas(2003)haspresentedtheuseofbindingattributestobuildabridgewhilepreservingthestructureofboththespatialdatabaseandtheOLAPdatacube.PestanaisdevelopingtheconceptofspatialdashboardbasedonSOLAPtechnologyandcollaborateswithLavalteamonconceptualmodelingofspatialdatacubes(Pestana,daSilva,&Bédard,2005).Otherprojectsaimatimprovingspatialindexation,spatialaggregation,orspatialoperators(e.g.,Gupta,Harinarayan,Rajaraman,&Ullman,1997;Hanetal.,1998;Papadias,Kalnis,Zhang,&Tao,2001;Prasher&Zhou,2004;Stefanovicetal.,2000;Wang,Pan,Ren,Cui,Ding,&Perrizo,2003;Zhang,Li,Rao,Yu,Chen,&Liu,2003;Zhou,Truffet,&Han,1999).In spite of all this research activity, commercial solutions efficiently coupling OLAP andGISappearedonthemarketonlyveryrecently.Thesesolutions,someOLAP-centric, some GIS-centric, some hybrid, present only a subset of the desirablefunctionalitiesofaspatialOLAPtechnology.SomearestilllimitedtostaticmapvisualizationofOLAPqueryresults.Othersrequirethestorageofeachpotentialindividualmapviewontheserver,thusaffectingtheupdateeffectivenessofspatialdata.Thesesolutionspresentlimitationswithregardtointeractivedatamanipula-tionandexploration throughcartographicviews.However, themainbottleneckstill remains thebuildingof spatialdatacubes,especiallywhendatacomefromdifferentsources.

SOLAP.Concepts

SpatialOLAP(SOLAP) can be defined as a type of software that allows rapid and easynavigationwithinspatialdatabasesandthatoffersmanylevelsofinformationgranularity,manythemes,manyepochs,andmanydisplaymodessynchronizedornot:maps,tables,anddiagrams.ThekeytoSOLAPconceptsismultiresolutionspatialdatabasesordatawarehouses.Ofparticularinterestisthe4-tierarchitecturefor spatial data warehousing. The first tier represents the first data warehouse where integrated, homogeneous detailed data are stored. This first tier is very useful since theintegrationofspatialdatafromheterogeneoussourcescanbedoneautomati-callyonlyforthesimplestcases,thatis,rarely.CurrentETLtechnologydoesnothandlespatialdatawhile“spatialdataintegrators”and“interoperabilitystandards”werenotdevelopedtosupporttheaggregationofspatialdataorthematchingofmapobjectsfromdifferentmapscales.Thesecondtierrepresentsaseconddatawarehousewheretheresultsoftheaggregationprocessesarestored.Sinceautomatic

Page 336: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) �0�

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

mapgeneralizationisnotfullyautomatedandrequiresimportanthumaninterven-tion,thissecondtierisnecessarytostoretheresults.Thethirdtieriscomprisedofthedatamarts,whichcanbefurtherprocessedandorganizedaccordingtoaverticalviewofthedata(e.g.,withinarangeofmapresolutions)orahorizontalview(e.g.,withinaregionoradepartment).ThefourthtierincludesSOLAPclientsthatcanaddlocalinformation.Sucharchitectureisusefulwhenthefusionofdetailedsourcedatarepresentsimportanteffortsthatcannotbefullyautomated.BernierandBédard(2005) describe the difficulties related to spatial data warehousing.TheSOLAPconceptssupportthemultidimensionalparadigmandenricheddataexplorationbasedonanexplicitspatialreferencerepresentedonmaps.ThisexplicitspatialreferencecanrelatetodimensionsandmeasuresasSOLAPsupports“spa-tial”dimensionsand“spatial”measures.Threetypesofspatialdimensionscanbedefined: the nongeometric spatial dimensions, the geometric spatial dimensions, and the mixed spatial dimensions (Bédard, Merrett, & Han, 2001). In the first type of spatialdimension,thespatialreferenceusesnominaldataonly(e.g.,placenames)asnogeometryor cartographic representation is associatedwith thedimensionmembers.ItistheonlytypeofspatialdimensionsupportedbynonspatialOLAP.Thistypeofspatialdimensionistreatedlikeotherdescriptivedimensionscausingthespatiotemporalanalysistobepotentiallyincompleteandthediscoveryofcertainspatialrelationsorcorrelationsbetweenthephenomenaunderstudytobemissedbytheanalyst.Thetwoothertypesofspatialdimensionsaimatmaximizingthepotential to discover spatial relations and correlations that do not fit in predefined boundaries.Thegeometricspatialdimensionscomprise,foralldimensionmembers,atalllevelsofdetail,geometricshapes(e.g.,polygonstorepresentcityboundaries)thatarespatiallyreferencedtoallowtheirdimensionmembers(e.g.,NewYork)tobevisualizedandqueriedonmaps.Themixedspatialdimensionscomprisegeometricshapesforasubsetofthelevelsofdetails.Themembersofthegeometricandmixedspatialdimensionscanbedisplayedonmapsusingvisualvariablesthatrelatetothevaluesofthedifferentmeasurescontainedinthedatacubebeinganalyzed.Figure3presentsexamplesofthethreetypesofspatialdimensions.Two types of spatial measures can be defined (Bédard et al., 2001; Han et al., 1998; Rivest et al., 2001; Stefanovik, 1997; Tchounikine et al., 2005). A first type

Figure 3. Three types of spatial dimensions: nongeometric, geometric, and mixed spatial dimensions (Modeled on Rivest, Bédard, Proulx, & Nadeau, 2003)

Page 337: Data Warehouses and OLAP - Concepts Architectures and Solutions

��0 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

isgeometric.Itisthesetofallthegeometriesrepresentingthespatialobjectscor-respondingtoaparticularcombinationofdimensionmembersfromonetomanyspatialdimensions.Itconsistsofasetofcoordinates,whichrequirescomputinggeometricoperationssuchasspatialunion,spatialmerge,orspatialintersection.Asecondtypeofspatialmeasureisnumeric.Itresultsfromthecomputationofmet-ricortopologicalspatialoperatorssuchas“surface,”“distance,”and“numberofneighbors.”Figure4presentsthetwotypesofspatialmeasures.Asetofmeasures(spatialandnonspatial)organizedaccording toasetofdimensions (spatialandnonspatial)formaspatialdatacube.InaSOLAPclientinterface,variantsoftheOLAPoperatorsareusedinordertotakeadvantageofthespatialmultidimensionaldatastructureandofthedifferentlevelsofdetailofthespatialdata.Thegeneraloperatorsaredrill-down,rollup(ordrill-up), drill-across, swap (or pivot), and slice anddice.Theseoperations areavailableinthedifferenttypesofdisplays(maps,diagrams,ortables)andcanbespecializedaccordingtothetypeofdimensiontheymanipulate(Rivest,Bédard,Proulx,&Nadeau,2003).Thematic operationsallowthemanipulationofthematic(ordescriptive)dimensions,whilekeepingthesamelevelofspatialandtemporalgranularities. Temporaloperationsallowthemanipulationoftemporaldimensions,whilekeepingthesamelevelofthematicandspatialgranularities.Spatialoperationsallowthemanipulationofthespatialdimensionswhilekeepingthesamelevelofthematicandtemporalgranularities.Spatialoperationscanbeexecuteddirectlybyclickingontheelements(dimensionmembers)shownonthemaps.SOLAPtoolscansupportdifferenttypesofviews:tables,varioustypesofdiagramsandcharts,andvarioustypesofmaps.Theseincludesimplemaps(i.e.,singlemapsshowingmanygeometricelements),multimaps(i.e.,manymaps,eachrelatedtoaparticularparameter,forexample,onemapperyear),complexthematicmaps(i.e.,thematicmaps composed of superimposed visual variables, e.g., color, pattern,shapeofsymbols,oneperselectedmeasure),andmapswithsuperimposeddiagrams(i.e.,mapswithlittlechartssuperimposedonthegeometricelementsofthemap).TheSOLAPviewscansupportoperatorsynchronizationandgraphicalsemiologysynchronization.Figure5presentsanexampleofaSOLAPdisplaycomprisedof

Figure 4. The two types of spatial measures supported in SOLAP tools

Page 338: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

threeviews(map,table,chart)thatusesemiologysynchronization(inacontextofcaraccidentsanalysis).Thesemiologysynchronizationhelpstokeepavisualhomogeneityfromonedisplaytotheotherandfromonenavigationoperationtotheother.However,itinvolvestak-ingcareofpotentialcollisionsofgraphicalsemiologyrulessincetheoretically,thesamerulesdonotalwaysapplytoallviewtypes.Manymoregeographicvisualiza-tion,orgeovisualization,featurescanbeincorporated.Geovisualizationrepresentsaresearch field of its own and can be defined as a private activity in which unknowns arerevealedinahighlyinteractiveenvironment.Itisanactiveprocessinwhichanindividual engages in sorting, highlighting, filtering, and otherwise transforming datainasearchforpatternsandrelationships(MacEachren,1994).SOLAPtoolsmaybeusedtoimplementawiderangeofspatiallyreferenceddeci-sionapplications.Forexample,aroadnetworkmanagementapplicationmayhelpto find, in seconds and without SQL queries, the effects of variations in the annual average daily traffic on the average road conditions, or calculating the intervention costs(Rivestetal.,2001).Inasimilarway,itispossibletoanalyzethenumberandthegravityofcaraccidentsaccordingtotheirpositionontheroadnetwork,thecharacteristicsoftheroad,ortheenvironmentandthetimeperiod(Rivest,Gignac,Charron,&Bédard,2004).Anotherexampleisanenvironmentalhealthapplica-tionthatallowsinvestigatingtherelationshipsbetweenhealthandenvironmentalphenomena,liketheincidenceofrespiratorydiseasesaccordingtoairqualitymea-surements (Bédard,Gosselin,Rivest,Proulx,Nadeau,Lebel,&Gagnon, 2003).Anotherexamplerelatestothetrainingofolympic-levelspeedskatingathletesus-ingGPSmeasurements,theyuseSOLAPtoanalyzetheirperformancesonvarioussectionsofatrackaccordingtovarioustechnical,mechanical,andmeteorological

Figure 5. An example of the use of semiology synchronization in a SOLAP between the map view (left), table view (centre), and chart view (right) spread over two contiguous computer displays (using JMap spatial OLAP)

Page 339: Data Warehouses and OLAP - Concepts Architectures and Solutions

��2 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

parameters(Veilleux,Lambert,Santerre,&Bédard,2004).Inforestry,a3DSOLAPapplicationhasalsobeenrecentlyimplemented(Brisebois,2004)aswellasoneforarchaeology (Rageul, 2004). These applications benefit from the three-dimensional aspectofspace,thatis,thevolumeofthephenomenabeingstudied.Forinstance,whenarchaeologicalexcavationlotsarerepresentedasvolumes,itispossibletonavigateinthevariousstratigraphicunitstocomparethelotsaccordingtotheircolor,granulometry,consistency,geographicandstratigraphicpositions,andthetypeofartifactsfound(Fortin&Bédard,2004).

SOLAP.Issues,.Challenges,.and.Recommendations

AlthoughthereremaincomputingchallengesforSOLAP,ourgeomaticsengineer-ingperspectiveleadsustoseethemostcrucialissuesastheonesthatrelatetothemanagement and processing of spatial referencing. We need to facilitate the flow ofspatialdatafromthegeospatialdatasourcestothedatacubes.WhencomparedtotraditionalGISresearch,researchinspatialdatawarehousing,spatialOLAP,andspatialdatacubesrequirestodealwithmorecomplexissueslike:

• Integratingtime(whichisubiquitousindatacubes)withspace:VeryfewGISdatabasesaretemporal,andwhentheyare,theysufferfromthesamecom-plexityissuesastraditionalDBMS(versionings,queryingversions)buttheymustalsodealwiththeevolutionandtracingofthepositionofobjects(e.g.,amovingpointrepresentingavehicleinreal-time)aswellastheevolutionof their shape (e.g., a forest fire, a building which has been enlarged), and theirmergings/splittings(e.g.,manycountryboundarieshavechangedsincethelate1980s).Furthermore,itisnotraretoseespatialdatacubeswherethetemporal resolution of the measures is finer (e.g., monthly values) than that of theavailablecartographicdata(e.g.,annualmaps),creatingnewchallengesespeciallywithusingthepropermetadataanduserwarnings.

• Producingspatialdataatdifferentlevelsofgranularityforasamedisplaysize:Today’sSOLAPimplementationssometimesleadtothedisplayof“zoomedout”maps that become too crowded and inappropriate for the analysis oflarger areas. Improperly applying on-the-fly automatic map generalization mayleadtodrillingdeadendsandincoherencebetweenthemapandthecubemeasures.

• Integratingspatialdatafromheterogeneousandspatiallydivergentsources,forinstance(inspiteofadvancesininteroperability,uncontrolleddistortionscannotberesolvedautomatically):Inparticular,spatialaggregationandsum-marizationoftencannotbederivedfromdetailedspatialdata,requiringtheuseofsmaller-scalemapsfromothersourcesandtoautomaticallymatchcor-respondingspatialobjectsbetweendifferentmapscales(astepthatisnotyet

Page 340: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

fully automatic). A similar challenge is to define and support spatial datacubes interoperability(e.g.,extendingISO/TC211andOGCstandards).

• Improvingtheintegrationofspatiotemporaloperators(topologicalandmetric)inthemeasuresanddimensionsofspatialdatacubes,andtofeedthespatio-temporalfacts

• Improvingconceptualmodelingofspatiotemporaldatacubes(e.g.,usingmul-tidimensionalstereotypesinUMLalongwithexistingspatialandtemporalstereotypes)

• DevelopingaSOLAPdesignmethodthathelpsuserstodiscoverearlierwhattheycandowithSOLAPandhowtheycanchangetheirwayofexploringtheirspatialdata.

• Developingnewgraphicalsemiologyrulessimultaneouslycompatiblewithmaps,charts,andtablestobettersupportthecognitiveprocessinvolveddur-ingtheexplorationofdata

• Enrichingtheintegrityconstraintsforcombinedspatial-temporal-aggregativeconstraints

• Developingmethodsthathelptoselectthebestsourcesandprocessestofeedthespatialdatacube:Incontrasttononspatialdatacubes,spatialdataatthemostaggregatedlevelsdonotnecessarilycomefromthedetailedmaps.Moreover,thereexistseveralpotentialsourcesofmapsthatarehighlyheterogeneous.Typically, every sourceof spatialdata requires importantwork tomake itfit the needs of the users. Considering the time and budget constraints along withthequalityrequirementsoftheusers,selectingthebestcombinationsofsources is a complex task that would benefit from a formal method.

• Developingexplicitwaystoassessanddisplaytheestimatedqualityofin-formation, both internally (i.e., respect of data specifications) and externally (i.e., fitness for use)

• Improvingtheperformanceofspatialdatacubebuilding(spatiotemporalanaly-sis,spatialaggregation,spatiotemporalindexing,etc.)andindexing(seeforexampletheevolutionoftheR-TreespatialindexingmethodinManolopoulosetal.,2005)

• ImprovingexistingtechnologiesforenrichedSOLAPandbetterintegrationinto spatial data production workflows

Future.Trends.and.Conclusion

ResearchrelatedtospatialdatawarehousingandspatialOLAPhasgrownovera10year period from the first ideas developed in a small number of isolated university

Page 341: Data Warehouses and OLAP - Concepts Architectures and Solutions

��4 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

laboratoriestotoday’semergenceofanR&Dcommunity.Researchersfromseveralcountriesareaddressingfundamentalissues.Insofar,thiscommunitycomesmainlyfromcomputersciencedepartments.ThegeomaticscommunityisonlydiscoveringthepowerofdatacubesandOLAP.Rather,thiscommunityhaslookedintootherdirectionssuchasgeovisualization,advancedGIS,andexpertsystems tobettersupportspatialdecisionmakingandgeographicknowledgediscovery.LookingattheissuesofSOLAPfromageomaticsengineeringperspectiveisverypromising.Itbringsanewlevelofchallengesthatrelatetotheverynatureofspatialdataanditsuseinmultistakeholderenvironments.Thisenrichestheconceptsandtechnolo-giesalreadyavailable.Inparticular,itallowstheintegrationoftheearlySOLAPsolutionsintothemainstreamofspatialdataproductionwhichishighlymorecom-plex than perceived at first sight. To further advance knowledge and to improve SOLAP applicability to complex interoperable environments, it is necessary tomergeknowledgefromthegeomaticsandthecomputersciencecommunities.Weexpect that the most significant trends will emerge from this combination. From a scientific point of view, these trends would include the support of highly efficient buildingofspatialdatacubes(i.e.,withouthumanintervention),real-timeSOLAP,mobileSOLAP,spatialdashboards,andspatiallyconstraineddatamining.Fromacommercialpointofview,trendsarelikelytofollowthetypicalevolutionfrombridgingseparatetechnologies(OLAP-centricorGIS-centric)intomoreintegratedsolutions(bidirectionalbridgeswithcommonuserinterface)intofullyintegratedtechnologiesthatinteroperateviaWebservicesandinteroperatewithspatiallegacysystems.ItistocontributetothesetrendsthatwehaveputforwardamajorNSERCIndustrialResearchChairandthatweinvitetheinterestedreaderstocollaboratewithusontheprojectsmentionedhere.

Acknowledgments

We recognize the financial support of Canada NSERC Industrial Research Chair inGeospatialDatabasesforDecision-Supportanditspartners(http://mdspatialdb.chair.scg.ulaval.ca/).

References

Bédard,Y.(1997,November).Spatial OLAP.PaperpresentedattheAnnualForumonR&D,GeomaticsVI,CanadianInstituteofGeomatics,Montreal,Canada.

Page 342: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Bédard,Y.(2005,May).Integrating GIS and OLAP: A new way to unlock geospa-tial data for decision-making.PaperpresentedattheLocationTechnologyandBusinessIntelligenceConference,Philadelphia.

Bédard,Y.,&Bernier,E.(2002,July).Supporting multiple representations with spatial view management and the concept of “VUEL”.PaperpresentedattheJointWorkshoponMulti-ScaleRepresentationsofSpatialData,InternationalSocietyforPhotogrammetryandRemoteSensing,WorkingGroupIV/3,In-ternationalCartographicAssociationCommunicationonMapGeneralization,Ottawa,Canada.

Bédard,Y.,Gosselin,P.,Rivest,S.,Proulx,M.J.,NadeauM.,Lebel,G.&Gagnon,M.F.(2003).IntegratingGIScomponentswithknowledgediscoverytech-nologyforenvironmentalhealthdecisionsupport.International Journal of Medical Informatics, 70(1),79-94.

Bédard,Y.,Merrett,T.,&Han,J.(2001).Fundamentalsofspatialdatawarehous-ingforgeographicknowledgediscovery.InH.Miller&J.Han(Eds.),Geo-graphic data mining and knowledge discovery(pp.53-73). London:Taylor&Francis.

Bédard,Y.,Proulx,M.J.,&Rivest,S.(2005).OLAPimprovementforgeographicanalysis:Examplesofrealizationsandtechnologicalsolutions(EnrichissementduOLAPpourl’analysegéographique:Exemplesderéalisationsetdifférentespossibilitéstechnologiques).New Information Technologies Journal (Revue des nouvelles technologies de l’information), B-1,1-20.

Bernier,E.,&Bédard,Y.(2005).UsingadatawarehousingarchitecturetocombineautomaticgeneralizationandmultiplerepresentationforWeb-basedon-demandmapping.InA.Ruas&W.McKinnis(Eds.),Challenges in the portrayal of geographic information: Issues of generalisation and multi scale representa-tion.(Forthcoming)

Body,M.,Miquel,M.,Bédard,Y.,&Tchounikine,A.(2002).AmultidimensionalandmultiversionstructureforOLAPapplications.InProceedings of the ACM Fifth International Workshop on Data Warehousing and OLAP(pp.1-6).

Brisebois,A. (2004).Analysis of the potential of extension SOLAP concept for the investigation of the three-dimensional spatial data (Analyse du potentiel d’extension du concept SOLAP pour l’exploration des données spatiales 3D).Master’sthesis,LavalUniversity,Canada.

Buzan,T.,&Buzan,B.(2003).Mind map, drawing intelligence (Mind map, des-sine-moi l’intelligence).Paris:Éd.l’Organisation.

Caron,P.Y.(1998).Application of on-line analytical processing (OLAP) techno-logies in a spatio temporal context (Étude du potentiel OLAP pour supporter l’analyse spatio-temporelle). Master’sthesis,LavalUniversity,Canada.

Page 343: Data Warehouses and OLAP - Concepts Architectures and Solutions

��6 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Ferreira,A.C.,Campos,M.L.,&Tanaka,A.(2001).Anarchitectureforspatialanddimensional analysis integration. In ProceedingsofSCI2001,v.XIVCSE,PartII(pp.392-395).

Ferri,F.,Pourabbas,E.,&Rafanelli,M.(2002).Thesyntacticandsemanticcor-rectness of pictorial configurations to query geographic databases by PQL. In Proceedings of SAC 2002(pp.432-437).

Fidalgo,R.N.,Times,V.C.,Silva,J.,&Souza,F.F.(2004).GeoDWFrame:Aframeworkforguidingthedesignofgeographicaldimensionalschemas.InProceedings of DaWaK 2004 (LNCS3181,pp.26-37).

Fortin,M.,&Bédard,Y.(2004,October).Development of geospatial data explo-ration application for spatio-temporal knowledge issue from archaeological excavation (Développement d’un système de découverte des connaissances spatio-temporelles issues d’un chantier de fouilles archéologiques). PaperpresentedatGéomatique2004,CanadianInstituteofGeomatics,Montreal,Canada.

Fortin,C.,&Rousseau,R.(1989).Cognitive psychology: An information processing approach (Psychologie cognitive: Une approche de traitement de l’informa-tion).Pressesdel’UniversitéduQuébec.

Franklin,C. (1992,April).An introduction to geographic information systems:Linkingmapstodatabases.Database,13-21.

Gupta,H.,Harinarayan,V.,Rajaraman,A.,&Ullman,J.D.(1997).Indexselec-tionforOLAP.InProceedings of the13th International Conference on Data Engineering(pp.208-219).

Han, J., Stefanovic, N., & Koperski, K. (1998). Selective materialization: An effi-cientmethodforspatialdatacubeconstruction,researchanddevelopmentinknowledgediscoveryanddatamining.InProceedings of the Second Pacific-Asia Conference, PAKDD’98 (pp.144-158).

Hernandez,V.,Voss,A.,&Gohring,W.(2005).Sustainabledecisionsupportbytheuseofmulti-levelandmulti-criteriaspatialanalysisontheNicaraguaDe-velopmentGateway,Frompharaohstogeoinformatics.InProceedings of the Fédération Internationale des Géomètres Working Week 2005 and GSDI-8(pp.16-21).

Hofmann-Wellenhof,B.,&Moritz,H.(2005).Physical geodesy (1sted.).Spring-er.

Iliffe,J.C.(2000).Datums and map projections.London:WhittlesPublishing.KHEOPS.(2005).JMAP spatial OLAP.RetrievedJune14,2006,fromhttp://www.

kheops-tech.com/en/jmap/solap.jspKouba,Z.,Matousek,K.,&Miksovsky,P.(2000).OndatawarehouseandGIS

integration.InProceedings of DEXA 2000 (LNCS1873,pp.604-613).

Page 344: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

LGSGroupInc.(2000).Analysis of health surveillance business intelligence tools and applications.FinalDraft.

Longley,P.A.,Goodchild,M.F.,Maguire,D.J.,&Rhind,D.(Eds.).(1999).In-troduction.InGeographical information systems: Principles, techniques, ap-plications and management (2nded.,p.1296).Wiley.

Longley,P.A.,Goodchild,M.F.,Maguire,D.J.,&Rhind,D.(2001).Geographic information systems and science.Wiley.

MacEachren,A.M.(1994).Visualizationinmoderncartography:Settingtheagenda.InA.M.MacEachren&D.R.F.Taylor(Eds.),Visualization in modern car-tography, 28(1),1-12.

Manolopoulos,Y.,Nanopoulos,A.,Papadopoulos,A.N.,&Theodoridis,Y.(2005).Rtrees: Theory and applications(SeriesinAdvancedInformationandKnowled-geProcessing).Springer.

Marchand,P.(2004).The spatio-temporal topological operator dimension, a hy-perstructure for multidimensional spatio-temporal exploration and analysis.Doctoralthesis,LavalUniversity,Canada.

Miquel,M.,Bédard,Y.,&Brisebois,A.(2002).Conceptionofageospatialdatawarehousefromheterogeneousdatasources,applicationexampleinforesty(Conceptiond’entrepôtsdedonnéesgéospatialesàpartirdesourceshétérogè-nes,exempled’applicationenforesterie).Engineering of Information Systems (Ingénierie des Systèmes d’information), 7(3),89-111.

Newell,A.(1990).Unified theories of cognition.Cambridge,MA:HarvardUni-versityPress.

Papadias, D., Kalnis, P., Zhang, J., & Tao, Y. (2001). Efficient OLAP operations in spatialdatawarehouses.Proceedings of the 7th International Symposium on Spatial and Temporal Databases (SSTD) (LNCS2001,pp.443-459).Sprin-gerVerlag.

Pestana,G.,daSilva,M.M.,&Bédard,Y.(2005).SpatialOLAPmodeling:Anover-viewbasedonspatialobjectschangingovertime.InProceedings of the IEEE 3rd International Conference on Computational Cybernetics, Mauritius.

Pourabbas,E.(2003).Cooperationwithgeographicdatabases.InM.Rafanelli(Ed.),Multidimensional databases: Problems and solutions(pp.393-432).Hershey,PA:IdeaGroupPublishing.

Pourabbas,E.,&Rafanelli,M. (2002).Apictorialquery languageforqueryinggeographicdatabasesusingpositionalandOLAPoperators.SIGMOD Record, 31(2),22-27.

Prasher,S.,&Zhou,X.(2004).Multiresolutionamalgamation:Dynamicspatialdatacubegeneration.InProceedings of the Fifteenth Conference on Australasian Databases, ACM International Conference Proceeding Series, 52,103-111.

Page 345: Data Warehouses and OLAP - Concepts Architectures and Solutions

��8 Bédard, Rivest, & Proulx

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Rageul,N. (2004).Développement d’une application d’exploration de données géospatiales comme support à la fouille archéologique.Undergraduatereport,INSA-Strasbourg,France.

Rivest,S.,Bédard,Y.,&Marchand,P.(2001).Towardsbettersupportforspatialdecision-making: Defining the characteristics of spatial on-line analytical processing.Geomatica, 55(4),539-555.

Rivest,S.,Bédard,Y.,Proulx,M.J.,&Nadeau,M.(2003,October).SOLAP: A new type of user interface to support spatio-temporal multidimensional data exploration and analysis.PaperpresentedattheISPRSJointWorkshopofWGII/5, II/6, IV/1andIV/2onSpatial,TemporalandMulti-DimensionalDataModellingandAnalysis,Quebec,Canada.

Rivest,S.,Gignac,P.,Charron,J.,&Bédard,Y.(2004,October).Development of a spatio-temporal interactive data exploration system for the Information Data Bank of Ministry of Transportations, Quebec (Développement d’un système d’exploration spatio-temporelle interactive des données de la Banque d’infor-mation du ministère des Transports du Québec).PaperpresentedatGéomatique2004,CanadianInstituteofGeomatics,Montreal,Canada.

Scotch,M.,&Parmanto,B.(2005).SOVAT:SpatialOLAPvisualizationandanalysistool.InProceedings of the 38th Hawaii International Conference on System Sciences(p.142b).

Shekhar,S.,Lu,C.T.,Tan,X.,Chawla,S.,&Vatsavai,R.(2001).MapCube:Avisualizationtoolforspatialdatawarehouses.InH.Miller&J.Han(Eds.),Geographic data mining and knowledge discovery (pp. 74-109). London:Taylor&Francis.

Silva,J.,Times,V.,Fidalgo,R.,&Barros,R.(2005).Providinggeographic-mul-tidimensionaldecisionsupportovertheWeb.InProceedings of theAPWeb 2005: 7th Asia-Pacific Web Conference (LNCS3399,pp.477-488).

Standing,L.(1973).Learning10000pictures.Quarterly Journal of Experimental Psychology, 25(2),207-222.

Stefanovic,N.(1997).Design and implementation of on-line analytical processing (OLAP) of spatial data.Master’sthesis,SimonFraserUniversity,Canada.

Stefanovic,N.,Han,J.,&Koperski,K.(2000).Object-basedselectivematerializa-tion for efficient implementation of spatial data cubes. IEEE Transactions on Knowledge Discovery and Data Engineering, 12(6),938-958.

Tchounikine,A.,Miquel,M.,Laurini,R.,Ahmed,T.,Bimonte,S.,&Baillot,V.(2005).Overviewofworksaboutspatio-temporaldatainetgrationintohyper-cubes(Panoramadetravauxautourdel’intégrationdedonnéesspatio-tem-porellesdansleshypercubes).New Information Technologies Journal (Revue des nouvelles technologies de l’information), B-1,21-33.

Page 346: Data Warehouses and OLAP - Concepts Architectures and Solutions

Spatial Online Analytical Processing (SOLAP) ���

Copyright©2007,IdeaGroupInc.CopyingordistributinginprintorelectronicformswithoutwrittenpermissionofIdeaGroupInc.isprohibited.

Veilleux,J.P.,Lambert,M.,Santerre,R.,&Bédard,Y.(2004,October).Uses of GPS and exploration and SOLAP analysis tools for the evaluation and analysis of outdoor sports (Utilisation du système de positionnement par satellites (GPS) et des outils d’exploration et d’analyse SOLAP pour l’évaluation et le suivi de sportifs de haut niveau).PaperpresentedatGéomatique2004,CanadianInstituteofGeomatics,Montreal,Canada.

Wang, B., Pan, F., Ren, D., Cui, Y., Ding, Q., & Perrizo, W. (2003). Efficient OLAP operationsforspatialdatausingPeanotrees.InProceedings of the 8th ACM SIGMOD Workshop on Research Issues in Data Mining and Knowledge Dis-covery(pp.28-34).

Weibel,R.,&Dutton,G.(1999).Generalisingspatialdataanddealingwithmul-tiplerepresentations.InP.Longley,M.Goodchild,D.Maguire,&D.Rhind(Eds.),Geographical information systems: Principles and technical issues (pp.125-155).Wiley.

Zhang,L.,Li,Y.,Rao,F.,Yu,X.,Chen,C.,&Liu,D.(2003).Anapproachtoena-blingspatialOLAPbyaggregatingonspatialhierarchy.InProceedings of DaWaK 2003 (pp.35-44).

Zhou, X., Truffet, D., & Han, J. (1999). Efficient polygon amalgamation methods forspatial(OLAP)andspatialdatamining.Lecture Notes in Computer Sci-ences, 1651,167-187.

Page 347: Data Warehouses and OLAP - Concepts Architectures and Solutions

320 About the Editors

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

About the Editors

Robert Wrembel works as an assistant professor at the Poznań University of Technology, Poland. In 2001 he received a PhD in computer science (databases). In 1996-2006 he took part in four research projects on databases and four industrial projects in the field of information technologies. He has paid a number of visits to research and education centers, including the INRIA Paris-Rocquencourt (France), the Paris Dauphine University (France), the Klagenfurt University (Austria), and the Loyola University (USA). His research interests encompass mainly data ware-house technologies (temporal, multiversion, object-relational) and object-oriented systems (views, data access optimization). Robert Wrembel works also as a lecturer at Oracle Poland.

Christian Koncilia works as data warehouse consultant at Panoratio Database Im-ages, Inc. in Munich, Germany. Prior to this position, he was lecturer at the Depart-ment of Informatics-Systems at the University of Klagenfurt, Austria. He holds a master’s degree in information science, as well as a doctorate in applied computer science from the University of Klagenfurt. During his MS studies he worked as project manager for a large Carinthian company with more than 7,000 employees. Among other duties, he was responsible for the introduction of an OLAP system. His research interests include temporal databases, data warehousing, multidimen-sional databases, and data mining. He published several papers in international conference proceedings.

Page 348: Data Warehouses and OLAP - Concepts Architectures and Solutions

About the Authors 321

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

About the Authors

Jovanka Adzic received the political science degree in 1986 (University of Bel-grade), then she received the computer science degree in 1996 (University of Tu-rin) and a master’s degree in the telecommunication field in 1998 (Politecnico of Turin). She joined TILAB in 1996 where she was involved in projects focused on evaluating database technologies (particularly OODBMS) for telecommunication needs, data analysis, and data warehouses solutions for traffic and customer data (fixed and mobile network). She has been involved as a technical expert and later as a project leader of the very innovative solution for the Fraud Detection & Analysis for mobile operator.

Yvan Bédard has been professor of GIS and spatial databases at Laval University Department of Geomatics Sciences, Canada since 1986. He was director of the Centre for Research in Geomatics for 7 years and is involved in the GEOIDE Net-work of Centers of Excellence. Dr. Bédard has participated to major projects with government agencies and private industries in Canada and abroad and has presented about 350 papers and conferences worldwide. Actually, Dr. Bédard is chair holder of the industrial research chair in geospatial database for decision support funded by National Science and Engineering Research Council of Canada.

Ameur Boujenoui holds bachelor’s and master’s degrees in engineering (applied mathematics) from INSEA (Morocco) and a PhD in management from HEC Mon-treal (Canada). He has more than 30 years experience in management and consult-ing. He is currently a teaching associate at the University of Ottawa. His research interests include business strategy and policy, corporate governance, and change management.

Page 349: Data Warehouses and OLAP - Concepts Architectures and Solutions

322 About the Authors

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Carlo Combi received the master’s degree in EE by the Politecnico of Milan. In 1993 he received the PhD in biomedical engineering. In 1994 and 1995 he was postdoctoral fellow at the Department of Biomedical Engineering of the Politecnico of Milan. From 1987 to 1996 he worked within the research group in medical informatics at the Politecnico of Milan. From April 1996 to October 2001, Carlo Combi was with the Department of Mathematics and Computer Science of the University of Udine as assistant professor. Since November 2001, he has been with the Department of Computer Science of the University of Verona: from November 2001 to February 2005, he was associate professor of computer science; since March 2005, he has been professor of computer science.

Karen C. Davis ([email protected]) is an associate professor of electrical and computer engineering and computer science at the University of Cincinnati, USA. She received an MS and a PhD in computer science from the University of Louisi-ana, Lafayette in 1987 and 1990, respectively. Her research interests include data-base design, query processing and optimization, and data warehousing. Dr. Davis has advised more than 20 graduate students and supervised more than 40 under-graduate senior design project students. She has been recognized for outstanding classroom instruction and curriculum innovation with five teaching awards. She is a senior member of IEEE and an ABET computer engineering program evaluator. She has served on program committees including DOLAP, DAWAK, ER, ICDE, and CIKM.

Valter Fiore joined TILAB in 1976. From the beginning of his work in TILAB, his research interest covered several aspects: software environments for advanced languages for telecommunications needs, operating systems, database technology, and architecture. Since 1996, he has been interested in ETL and data warehouse server-side problems with particular attention to the population aspects related to transformation and loading vast amounts of data into data warehouses. He has been technical leader in ideation and development of the infrastructure based ETL.

Pedro Furtado is an assistant professor of computer sciences at the University of Coimbra, Portugal where he teaches both undergraduate and postgraduate curricula, mostly in data management related areas. He is also an active researcher in the databases group of the CISUC research laboratory. His research interests include data warehousing, approximate query answering, parallel and distributed database systems, with a focus on performance and scalability and data management in dis-tributed data intensive systems. He received a PhD in computer science from the University of Coimbra-Portugal in 2000.

Page 350: Data Warehouses and OLAP - Concepts Architectures and Solutions

About the Authors 323

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Ashima Gupta obtained a BS in computer science in 1998 from Fergusson College, University of Pune, Pune, India. She earned an MS in computer science in 2002 from the University of Cincinnati. She worked for three years as a systems analyst in the Pediatric Informatics Department at Cincinnati Children’s Hospital Research Foundation where she researched and implemented computational methods and ap-plications to facilitate genome research (http://cismols.cchmc.org). Currently, she is based in Chicago and working with a nonprofit children’s aid organization in an effort to provide basic rights of survival to underprivileged children.

Claudio Gutierrez is an associate professor at the Department of Computer Sci-ence, Universidad de Chile, Chile. He received his PhD from Wesleyan University in 1999. His research interests lie in the intersection of logic, databases and semantic Web. Currently he is associate researcher at the Center for Web Research where he works on semantic Web databases.

Carlos A. Hurtado is an assistant professor at the Department of Computer Sci-ence, Universidad de Chile, Chile. He received his PhD in computer science from the University of Toronto in 2002. His research areas include databases, semantic Web, data mining, OLAP, and data warehousing. Currently he is a researcher at the Center for Web Research and a visitor researcher at the School of Computer Science and Information Systems, Birkbeck College, University of London.

Ganaël Jatteau holds a bachelor’s of engineering degree from ENSSAT (École Nationale Supérieure de Sciences Appliquées et de Technologie) and a master’s in computer science from UQO. His research interests include data mining and associa-tion rule mining using concept lattices. He is currently working for PCI Geomatics (Gatineau, Canada).

Nikos Karayannidis received his degree in electrical and computer engineering in 1997 from the National Technical University of Athens. In 2003 he received the PhD from the same university. His thesis focused on the issues of physical organization and indexing of multidimensional data with hierarchies, as well as the processing of OLAP and data warehousing queries. Through his participation in several data warehousing and OLAP projects, Dr. Karayannidis has gained a useful experience in the field. He is currently working as the project manager and lead data modeler for the Data Warehouse implementation project for the Hellenic Telecommunica-tions Organization (OTE S.A.). His research interests include indexing/storage structures for DW/OLAP systems, query processing for DW/OLAP systems, and processing of ETL procedures.

Page 351: Data Warehouses and OLAP - Concepts Architectures and Solutions

324 About the Authors

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Rokia Missaoui has been a full professor in the Department of Computer Science and Engineering at UQO (Université du Québec en Outaouais) since August 2002. Before joining UQO, she was a professor at UQAM (Université du Québec à Mon-tréal) between 1987 and 2002. She obtained her bachelor’s (1971) and her master’s in engineering (1978) in applied mathematics from INSEA (Morocco), and her PhD (1988) in computer science from Université de Montréal. Her research interests include knowledge discovery from databases, formal concept analysis, integration of data mining and data warehousing technologies, as well as content-based image retrieval and mining.

Tadeusz Morzy received his MSc, PhD, and Polish habilitation from the Technical University of Poznań, Poland. Currently, he is professor of computer science at the Institute of Computing Science of the Technical University of Poznań. He has held visiting positions at the Loyola University, New Orleans in the U.S., Klagenfurt University in Austria, University La Sapienza in Italy, Free University Amsterdam, and the Polish-Japanese Institute of Information Technology, Warsaw, Poland. He has authored and coauthored over 100 papers on databases, data mining, and data warehousing. He is a coauthor of the book Concurrency Control in Distributed Database Systems by North-Holland, and an editor and coauthor of Handbook on Data Management by Springer. He served as the general chair of the 2nd ADBIS Conference (1998), and has been a member of numerous program committees of international conferences and workshops. His research interests include data min-ing, data warehousing, transaction processing in database and data warehouse sys-tems, access methods and query processing for databases, database optimization and performance evaluation.

Sami Naouali holds a PhD in computer science from Université de Nantes, and a master’s degree in CS from Institut National Polytechnique (Grenoble, France). He was a postdoctoral fellow at UQO in 2005. His current research covers data warehousing and the integration of knowledge into data cubes.

Barbara Oliboni received the master’s degree in computer science from the Uni-versity of Verona with the thesis “Representing Semistructured Data by Means of WG-Log: Querying Lorel Data Sources.” In 2003 she received the PhD in computer engineering from the Politecnico of Milan with the dissertation “Blind Queries and Constraints: Representing Flexibility and Time in Semistructured Data.” Since 2004, she has been a postdoctoral fellow at the Department of Computer Science of the University of Verona.

Page 352: Data Warehouses and OLAP - Concepts Architectures and Solutions

About the Authors 325

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Marie-Josée Proulx holds an MSc in geomatics sciences from Laval University, Canada. She actually works at the Centre for Research in Geomatics of Laval Uni-versity as a research professional within the GIS and spatial databases team. She participates in the industrial research chair in geospatial databases for decision sup-port. Her professional interests include spatial databases modeling, multidimensional modeling, spatial data warehouse, SOLAP, and metadata management.

Sonia Rivest holds a MSc in geomatics sciences from Laval University, Canada. She actually works at the Centre for Research in Geomatics of Laval University as a research professional with the GIS and spatial databases team. She is part of the industrial research chair in geospatial databases for decision support. Mrs. Rivest works in multidimensional databases, spatial data warehouses, and SOLAP.

Stefano Rizzi received his PhD in 1996 from the University of Bologna, Italy. Since 2005 he has been full professor at the University of Bologna, where he is the head of the Data Warehousing Laboratory. He has published about 60 papers in refereed journals and international conferences mainly in the fields of data warehousing, pattern recognition, and mobile robotics. He joined several research projects on the above areas and has been involved in the PANDA thematic network of the Eu-ropean Union concerning pattern-base management systems. His current research interests include all the aspects related to data warehouse design and business intel-ligence, in particular multidimensional modeling, data warehouse evolution, and what-if analysis.

Uwe Röhm obtained his master’s degree in computer science from the University of Passau, Germany, in 1996. He received his PhD from ETH Zurich, Switzerland, in 2002 for his work on “Online Analytical Processing with a Cluster of Databases.” This work was part of the PowerDB project at ETH Zurich that investigated large database clusters and that was partly sponsored by Microsoft. Uwe Röhm currently holds a position as lecturer in database systems at the School of Information Tech-nologies at the University of Sydney, Australia. He has research interests in database clusters, freshness-aware caching, and database support for bioinformatics.

Timos Sellis received his degree in electrical engineering in 1982 from the National Technical University of Athens (NTUA), Greece. In 1983 he received the MSc from Harvard University and in 1986 the PhD from the University of California at Berkeley. In 1986, Professor Sellis joined the Department of Computer Science of the University of Maryland, College Park, and in 1992 the Computer Science Divi-sion of NTUA, where he is currently a full professor. His research interests include peer-to-peer database systems, data warehouses, the integration of Web and data-

Page 353: Data Warehouses and OLAP - Concepts Architectures and Solutions

326 About the Authors

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

bases, and spatial database systems. He has published over 120 articles in journals and conferences and has been an invited speaker in major international events.

Alkis Simitsis is a visiting lecturer at the University of Peloponnese. He received his PhD from the National Technical University of Athens (NTUA) in 2004. His research interests include extraction-transformation-loading (ETL) processes in data warehouses, query processing/optimization, and security issues. He has pub-lished more than 20 papers in refereed journals and international conferences in the above areas.

Luisella Sisto received the computer science degree in 1981 (University of Turin). She joined TILAB in 1982, where she was initially involved in projects in the ar-tificial intelligence area, focusing on natural language understanding and expert systems for troubleshooting. Then she was involved in projects concerning use of constraints satisfaction techniques for workforce management, monitoring of telecommunication systems, services leveraging data analysis and data warehouse solutions, and identity management.

Spiros Skiadopoulos is an assistant professor at the University of Peloponnese, Greece. He received his diploma and PhD from the National Technical University of Athens and his MSc from UMIST. His research interests include spatial and temporal databases, constraint databases, query evaluation, and optimization and data warehouses. He has published more than 25 papers in international refereed journals and conferences.

Kurt Stockinger is a computer scientist with the Scientific Data Management Research Group of Berkeley Lab, Berkeley, California. His research interests include database access optimization, multidimensional indexing for large-scale data warehouses and performance optimization of parallel and distributed systems (data grids). Previously, Kurt was leading the Optimization Task of the European DataGrid Project managed by CERN. He was also a visiting researcher at the California Institute of Technology where he worked on object-oriented databases for high energy physics applications. Kurt studied computer science and business administration at the University of Vienna, Austria, and the Royal Holloway Col-lege, University of London, England. He received a PhD in computer science and business administration from the University of Vienna, Austria, under supervision of CERN’s Database Group.

Aris Tsois received a diploma in electrical and computer engineering from the National Technical University of Athens (NTUA), Greece, in 1995 and a PhD in

Page 354: Data Warehouses and OLAP - Concepts Architectures and Solutions

About the Authors 327

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

computer science from the same university in 2005. In September 2005 he started working at the Joint Research Center in Italy on data warehousing and data mining projects. His research interests include on-line analytical processing technology, data warehouses, query optimization, and artificial intelligence. Dr. Tsois has worked in different projects related to data warehousing and OLAP and has published several articles in refereed international conferences and workshops.

Alejandro Vaisman was born in Buenos Aires, Argentina. He received a BA in civil engineering, a BA in computer science, and a PhD in computer science from the University of Buenos Aires. He has been a professor at the University of Buenos Aires since 1994. He was an invited professor at the Universidad Politecnica de Madrid in 1997. In 2001 he was appointed vice-dean of the School of Engineering and Information Technology at the University of Belgrano, in Argentina. He was a visiting researcher at the University of Toronto, University of Hasselt, and Uni-versidad de Chile. His research interests are in the field of databases, particularly in OLAP, data warehousing, data mining, P2P databases, XML, and the semantic Web. He is currently with the University of Buenos Aires, lecturing several courses on database systems topics. In 2004 he was appointed vice-head of the Department of Computer Science, and chair of the graduate program in data mining.

Panos Vassiliadis is a lecturer at the University of Ioannina. He received his PhD from the National Technical University of Athens in 2000. His research interests include data warehousing, Web services, and database design and modeling. He has published more than 25 papers in refereed journals and international conferences in the above areas.

Kesheng Wu is a staff computer scientist with the Scientific Data Management Research Group of Berkeley Lab, Berkeley, California. His recent research interests focus on indexing large high-dimensional datasets and managing of distributed data warehouses. He is one of the principal contributors to the FastBit project which is developing a set of efficient bitmap indices and applying them to different applica-tions. Previously, he had worked on a number of parallel computing projects and industrial software engineer projects. He received his PhD in computer science from the University of Minnesota in 1997.

Page 355: Data Warehouses and OLAP - Concepts Architectures and Solutions

328 Index

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

Index

Symbols2PC (see two-phase-commit) 235

Aaccuracy 69additivity 17ad hoc analysis 137ad hoc star queries 137advanced modeling 9aggregate navigation 32, 53aggregation 17algorithm 269analysis and modeling 61association rule mining (ARM) 257, 261attribute value decomposition (AVD) 186

Bbasic bitmap index 161BBC (see byte-aligned bitmap code) 166binning 164bit-sliced index (BSI) 186bitmap index tuning 168BSI (see bit-sliced index) 186byte-aligned bitmap code (BBC) 166

Ccache approximation query routing 241canonical schemas 52chunk-tree representation 147combustion dataset 171completeness 69compression 166conceptual design 18conceptual model 122conceptual modeling 2consistency 69contextual data quality 66controlled requirements expression

(CORE) 62conventional routing strategies 239convergence 11CORE (see controlled requirements ex-

pression) 62correctness 242cost model 206, 217cross-dimension attribute 10cube dependence graph 38cube view 37currency 69

Page 356: Data Warehouses and OLAP - Concepts Architectures and Solutions

Index 329

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

DDAG (see directed acyclic graph) 35database management system (DBMS)

89, 300data communication cost (DC) 217data cube 37data driven 62data mining (DM) 254data partitioning 236data quality 58, 65data replication 236data source availability 70data warehouse (DW) 1, 88, 203data warehouse design 1data warehouse operational processes 112data warehouses (DWs) 2data warehousing 62, 254DBMS (see database management system)

89, 300DC (see data communication cost) 217decisional model 20decision support system (DSS) 58, 62delay freshness 244delta object exchange model (DOEM) 281descriptive attribute 10DFM (see dimensional fact model) 3dimensional fact model (DFM) 3dimension attribute 8dimension constraint 34, 51-53dimension schema 51directed acyclic graph (DAG) 35DM (see data mining) 254DOEM (see delta object exchange model)

281domain 73drill-down 268DSS (see decision support system) 58DSS-METRIQ 66DW (see data warehouse) 1, 88, 203dynamic hierarchies 15

EEEBSI (see encoded bit-sliced index) 187encoded bitmap index (EBI) 185encoding 161entity/relationship (E/R) 3

entry point 9equality-encoded bitmap 174equality encoded bit-sliced index (EEBSI)

187ETL (see extraction, transformation, and

load) 88, 112, 300expected query response time 70eXtensible Markup Language (XML) 278extraction 119extraction, transformation, and load (ETL)

88, 112, 300

Ffacts 28, 37, 216fact table 37FAS (see freshness-aware scheduling) 232flow measure 17FPR (see fully partitioned replica) 224freshness-aware scheduling (FAS)

232, 242freshness index by data deviation 244frozen dimension 51full replica (FR) 222fully partitioned replica (FPR) 224

GGEM (see graphical semistructured tempo-

ral data model) 282geographical information system (GIS)

299global positioning systems (GPS) 301global rollback 107goal question metric (GQM) 61GPS (see global positioning system) 301GQM (see goal question metric) 61graphical semistructured temporal data

model (GEM) 282graph morphism 36

Hhash-partition fact and replicate dimen-

sions strategy (PFRD-H) 215heterogeneous 36hierarchical chunking 147hierarchical pregrouping transformation

138

Page 357: Data Warehouses and OLAP - Concepts Architectures and Solutions

330 Index

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

hierarchy 9hierarchy domain 28, 35, 44hierarchy schema 28, 35high-energy physics dataset 171homogeneous 36hub 102hybrid design 236

IIBIS (see issue-based information system)

61initial aggregations dictionary 73initial data dictionary 73initial requirements 72intrinsic data quality 66issue-based information system (IBIS) 61

Jjoint application development (JAD) 61

Kknowledge discovery in databases (KDD)

257

LLAN (see local area network) 203LC (see local processing cost) 217loading atomicity 91local area network (LAN) 203local processing cost (LC) 217logical model 122low bandwidth 208

Mmerging cost (MC) 217metrics 9middleware 235modularization 99motivation 116multidimensional data model 28multiple arc 12

NNCR methodology 62

near real time (NRT) 91node-partitioned data warehouse (NPDW)

203, 204nonstandard/complex transformation 91NPDW (see node-partitioned data ware-

house) 203NPDW (see node-partitioned data ware-

houses) 204NRT (see near real time) 91null element 45

OO&M (see operation and maintenance)

106object exchange model (OEM) 281OLAP (see online analytical processing)

2, 34, 136, 159, 230, 299OLTP (see online transaction processing)

2, 159online analytical processing (OLAP)

2, 136, 159, 230, 299online decision support system 230online transaction processing (OLTP)

2, 159operational systems 62operation and maintenance (O&M) 106optional arc 12organizational model 20

Pparallelism 88, 96parallel join 206partition and replicate strategy (PRS)

208, 214partitioned replica (PR) 224partitioning 93, 206, 213PFRD-H 215physical database design 88, 93physical design alternatives 235pipelining 88, 96PMap (see property map) 188pragmatic approach 66previous knowledge 239process driven 62property map (PMap) 188

Page 358: Data Warehouses and OLAP - Concepts Architectures and Solutions

Index 331

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

PRS (see partition and replicate strategy) 208, 214

PR (see partitioned replica) 224

QQFD (see quality function deployment) 61quality dimensions 73quality function deployment (QFD) 61quantifying 63queries 58query-dependence 239query frequency 70query routing 238

Rragged (or incomplete) hierarchy 14range-encoded bitmap indices 173RC (see repartitioning cost) 217relational OLAP (ROLAP) 138reliability/availability 91repartitioning cost (RC) 217replication 212, 242replication for availability 209requirements elicitation 61requirements validation 62right-hand side (RHS) 256ROLAP (see relational OLAP) 138roll-up 267roll-up operation 32, 38roll-up relation 36

Sscientific approach 65secondary event 9self-describing 278semistructured data 279shared hierarchies 13skills acquisition 73slice 268snowflake dimension 42snowflake schema 42software construction 125SOLAP (see spatial OLAP) 308source instability 91spatial OLAP (SOLAP) 308

Standard Generalized Markup Language 280

star dimension 42, 44star join 137star query optimization 151star query processing 143star schema 3, 31, 42star transformation 144stock measures 17strict time constraints 91structural heterogeneity 32structurally heterogeneous 29structurally heterogeneous OLAP data 28structurally homogeneous 29summarizability 39, 40, 54system architecture 234

Ttemporal data warehouses 284temporal graphical model (TGM) 281temporal hierarchy 13temporal operations 310temporal semistructured data model 277TGM (see temporal graphical model) 281thematic operations 310time complexity 172timeliness 69transaction model 235transaction routing 240transportation 119two-phase-commit (2PC) 235

Uunbalanced (or recursive) hierarchy 15unbalanced dimension 34, 47unit measures 17

Vvariables 9version freshness 244volatility 70

WWAH code (see word-aligned-hybrid code)

166

Page 359: Data Warehouses and OLAP - Concepts Architectures and Solutions

332 Index

Copyright © 2007, Idea Group Inc. Copying or distributing in print or electronic forms without written permission of Idea Group Inc. is prohibited.

WBP (see workload-based partitioning) 215

WBP+JB (see WBP with bitmap join indexes) 216

word-aligned hybrid (WAH) code 166workflow management 99workload-based partitioning (WBP) 215

XXML (see eXtensible Markup Language)

278XML data warehouse 278XML Web data warehouses 278

Page 360: Data Warehouses and OLAP - Concepts Architectures and Solutions

InformationTechnology Research

at the Click of aMouse!

InfoSci-OnlineInstant access to thousands of information technologybook chapters, journal articles, teaching cases, and confer-ence proceedings

Multiple search functions

Full-text entries and complete citation information

Upgrade to InfoSci-Online Premium and add thousands ofauthoritative entries from Idea Group Reference’s hand-books of research and encyclopedias!

IGI Full-Text Online Journal Collection

Instant access to thousands of scholarly journal articles

Full-text entries and complete citation information

IGI Teaching Case Collection

Instant access to hundreds of comprehensive teaching cases

Password-protected access to case instructor files

IGI E-Access

Online, full-text access to IGI individual journals,encyclopedias, or handbooks of research

Additional E-Resources

E-Books

Individual Electronic Journal Articles

Individual Electronic Teaching Cases

IGI ElectronicResourceshave flexiblepricing to help meet theneeds of anyinstitution.

Sign Up for aFree Trial ofIGI Databases!

Looking for a way to make information science and technology research easy?Idea Group Inc. Electronic Resources are designed to keep your institutionup-to-date on the latest information science technology trends and research.

���

��

��

���

www.igi-online.com

Page 361: Data Warehouses and OLAP - Concepts Architectures and Solutions

IntroducingIntroducing

The new IGI Teaching Case Collection is a full-text database contain-ing hundreds of teaching cases related to the fields of information science,technology, and management.

Key Features• Project background

information• Searches by keywords and

categories• Abstracts and citation

information• Full-text copies available for

each case• All cases are available in PDF

format with instructor files• Cases are written by IT

educators, researchers, andprofessionals worldwide

The Benefits of the IGI Teaching Case Collection• Frequent updates as new cases are available• Instant access to all full-text articles saves research time• No longer necessary to purchase individual cases• Password-protected case instructor files included in the database

A Product Of

www.igi-online.comFor More Information Visit

www.igi-online.com

IGI Teaching Case Collection

Recommend to your librarian today!

View each case in full-text, PDF form.Hundreds of cases provide a real-worldedge in information technology classes orresearch!