You are on page 1of 4

6/1/2015

BIDirect:OBIEE11gHowtoResolveManytoManyRelationshipSolutions
0

Linktkhc Blogtiptheo

ToBlog ngnhp

BIApps,Exalytics,AdvancedandPredictiveAnalytics&BigData
Home

Exalytics

SearchThisBlog
Search

Friday,28December2012

BlogArchive

OBIEE11gHowtoResolveManytoManyRelationshipSolutions

2014(56)
2013(88)

PravinKhadakkar

ItiscommontowanttomodelaManytoManyrelationshipbetweenDimensionsandFacts.Forexample,itmaybenecessaryto
seeallemployeesassociatedwithanopportunity,notjusttheprimary.Thisblogpresentsaseriesoftoolsandtechniquesthat
maybeappliedtosolveaparticularcase.Thisisjustanattempttosharethisvaluableinformationwhichhasbeenwrittenbyone
ofmycolleaguewhileworkingoncustomersite.

Technique#1:SelectaPrimary
Follow

49

Viewmycompleteprofile

EnterpriseArchitect

Althoughnotatechnicalsolution,thebestwaytosolvetheM:Mproblemistoeliminateit.Byselectingoneofthemany
dimensionalrecordsthatareassociatedwithafact,theentireproblemcanbeavoided.IntheSiebelOLTP,Primariesareused
throughoutthemodel,whicharecarriedoverandusedintheAnalyticsmodel.Ifitisatallpossibletoidentifyaprimary,andthe
useoftheprimaryisacceptabletotheusercommunity,thenitisrecommendedtousethistechnique.

Technique#2:DirectModelingintotheDimension
AstraightforwardtechniquewherethetablethatservesastheintersectiontableismodeledintoalowerlevelintheDimension.
ThespecificsofthistechniquearesimilartothoseoutlinedinSolutionBoftheNodirectphysicallinkbetweenabaseDimension
andaFacttablesectionabove.
Notethatovercountingwilloccurwhenperformingthemanytomanyjoin.

Disclaimer
Theopinionsexpressed
hereareentirelymyown
anddonotreflectthe
positionofmyemployer,
Oracleoranyother
corporation.I'mnot
responsibleforany
damagesinwhateverform
causedbytheusageofthe
contentofthisblog.

PopularPosts
OBIEE10G/11G
DashboardTipsandBest
PracticeGuidelines
Iwouldliketosharesome
ofthedashboarddesign

Technique#3a:UseofaBridgeTable
InsteadofmodelingtherelationshiptableintoanewlowerlevelinthedimensionasinTechnique#2,therelationshiptablecan
becomeaseparatelogicaltablethatserversastheBridgebetweenthedimensionandthefacts.CreateanewLogicaltablewith
theM:Mrelationshiptableasthesource,markthelogicaltableasaBridgetable,andadjusttheBusinessmodeltoshowthe
relationshipofFacts:Bridgeas1:MandBridge:DimensionasM:1.TheindicationthattheLogicalTableisaBridgetableismerely
anindicatortoAnalyticsthatthetableisnotaFacttable,whichitassumestobeanylowestleveltableinthedatamodel.

2012(53)
Dec2012(2)
Nov2012(5)
Oct2012(1)
Jul2012(4)
Jun2012(7)
May2012(6)
Apr2012(8)
Mar2012(7)
Feb2012(6)
Jan2012(7)
2011(4)

BiDIRECT
Posts
Comments

Labels

Notethatovercountingwilloccurwhenperformingthemanytomanyjoin

OBIEE 11G

Technique#3b:UseaWeightedBridgeTable

EXALYTICS

SimilartoTechnique#3a,thistechniqueistheclassicKimballapproach,wheretheBridgetableemploysweightingfactorsto
prorateatotalvalueovermultiplerecords.Forexample,ifthereisoneOpportunityworth$1,000,000andtherearetwoEmployees
associatedwithit,thebridgetablemightcontainarecordforeachwithaweightingfactorof0.5.Inthisway,eachemployeewillbe
associatedwith0.5ofthewholeamountof$1,000,000,or$500,000.IfitisdeterminedthatEmployeeAshouldreceive75%ofthe
credit,thentheweightingfactorswouldbestoredas0.75and0.25,whichwouldgiveEmployeeA75ofthetotalor$750,000.

Adaptive Inmemory Cache


Big Data Integration X34
Exalytics Hardware X34
ExalyticsSoftware

Times
Ten Database 11.2.2

Itisimportanttonotethattheweightingfactorsmustalladdupto1(One),astheyareeffectivelypercentagesofawhole.

http://bidirect.blogspot.com/2012/12/obiee11ghowtoresolvemanytomany.html

1/4

6/1/2015
tipsandbestpractices
writtenforOBIEE10gfrom
myknowledgebase.I
believemost...
OBIEE11g:BugsFixedin
11.1.1.6.6PatchSetOracle
SupportWebNotification
TheBusinessIntelligence
EnterpriseEdition
11.1.1.6.6patchsethas
beenreleasedandis
availabletodownloadfrom
MyOracleSupport.The...
ModelingOuterJoinfor
OBIEE11g
Ajoinisaquerythat
combinesrowsfromtwoor
moretables,views,or
materializedviews.
Databaseperformsajoin
whenevermultipletab...

BIDirect:OBIEE11gHowtoResolveManytoManyRelationshipSolutions

AdditionalETLeffortwillberequiredtocompletethissolution.
Thistechniqueeliminatesovercounting,butmaybedifficulttoimplementifusersarenotcomfortableproratingavalueover
severalrecords.

Technique#4:UseLevelBasedMeasures
AsanenhancementtoTechniques2and3,theuseoflevelbasedmeasurescanhelppreventtheovercountingproblem
associatedwitheach.Whenametricormeasureisexplicitlyboundtoaspecificlevelinadimension,itisindicatingthatthemetric
willbeviewedatthatlevel.IfthemetricsinafacttablearetobeviewedbyaDimensionwithwhichithasaM:Mrelationship,those
metricscanbesettoalevelinthedimension,therebyforcingthattherecordsbebrokenoutacrossthatdimension.Byforcinga
breakoutofrows(onefactrowforeachdimensionalrow),aggregationisprevented,andthereforeovercountingwillnotoccur.
Asanexample,supposethereisaM:MbetweenEmployeeandFact_Opty_Revenue.ThedatainthetablesindicatethatTom,
LarryandBillarealllinkedtoanOpportunityworth$9million.TheusermakesareportthatasksfortheOpportunityTypeandthe
totalPotentialOpportunityRevenue.Withoutlevelsettingthemetricsonthefacttable,areportthatdoesnotincludetheemployee
dimensionwillovercount,aseachofthethreedimrecordswillbebroughtintothequeryandaggregatedintoone:
OpportunityType

PotentialOpportunityRevenue

SoftwareSales

$27,000,000

BylevelsettingtheRevenuemetricstotheEmployeelevelintheEmployeeDimension,thissamereportwillreturnthefollowing:
OpportunityType

PotentialOpportunityRevenue

SoftwareSales

$9,000,000

SoftwareSales

$9,000,000

SoftwareSales

$9,000,000

Althoughnotintuitivelyobviousastothecauseofthebreakouttotheenduser,theovercountingscenarioisprevented.Whenthe
useraddstheEmployeetothereport,thebreakoutbecomesclearer:
OpportunityType

Employee

PotentialOpportunity
Revenue

SoftwareSales

Larry

$9,000,000

SoftwareSales

Tom

$9,000,000

SoftwareSales

Bill

$9,000,000

Technique#5:LowertheFactTable
http://bidirect.blogspot.com/2012/12/obiee11ghowtoresolvemanytomany.html

2/4

6/1/2015

BIDirect:OBIEE11gHowtoResolveManytoManyRelationshipSolutions

Themostcomplicatedandinvolvedsolutionistolowerthelevelofthefacttable,andcreatea1:MbetweentheDimensionsand
theFacts.Thisinvolvesabusinessruletosplitupthemetricsandspreadthemoverallpossibledimensionalrecords.Inthe
exampleabove,thesimplestspreadwouldbetoassignLarry,TomandBilleach1/3ofthetotalamountof$9,000,000,or
$3,000,000.Thus,areportthatdoesnotbreakoutbyEmployeewillstilltotaltothecorrect$9,000,000.Notethatthiswould
requirethreerecordsinthefacttableinsteadofone,hencetheconceptofloweringthelevelofdetailinthefact.
Iwillleavefinalcalltochooseanappropriatetechniqueondesignerordeveloper.Theselectionshouldbebasedoncustomer
requirementasIunderstandtechnologydesignistosupportthecustomeraspiration.

PostedbyPravinKhadakkarat03:21

Recommend this on Google

2comments:
KashifM 17March2014at03:44
Nice
http://mkashu.blogspot.com
Reply

PaulaMaxwell 4June2014at10:58
IamusingOracle11gandIneedtoresolveamanytomanyrelationshipandIamhavingissues.Ihavea
modelforsurveydata.Myfacttableisatthesurveyquestionforeachpersonthatcompletedthesurvey.I
have benchmark data for a given question in the fact table. There can be 1000 possiblites of topbox
percentiles based on the percentile they want. I created a dim_percentile_grouping that has a one to
many relationship to my fact table. I then created a bridge table between the dim_percentile_grouping
tableandthepercentiletabletoresolvethemanytomanyrelationship.WhenIpublishthis,itworkswith
verysmallfilters,buttheminuteIstartbringinginfiltersfromtheotherdimtablesattachedtothefact
table,itwillnotreturnanyrecords.Doyouhaveanyideawhatcouldbecausingthis?
Reply

Enteryourcomment...

Commentas:

Publish

GoogleAccount

Preview

http://bidirect.blogspot.com/2012/12/obiee11ghowtoresolvemanytomany.html

3/4

6/1/2015

BIDirect:OBIEE11gHowtoResolveManytoManyRelationshipSolutions

Linkstothispost
CreateaLink

NewerPost

Home

OlderPost

Subscribeto:PostComments(Atom)

BIDirect.PoweredbyBlogger.

http://bidirect.blogspot.com/2012/12/obiee11ghowtoresolvemanytomany.html

4/4

You might also like