版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
**Exercise3.1.1Answersforthisexercisemayvarybecauseofdifferentinterpretations.感谢阅读SomepossibleFDs:SocialSecuritynumbername谢谢阅读AreacodestateStreetaddress,city,statezipcode谢谢阅读Possiblekeys:{SocialSecuritynumber,streetaddress,city,state,areacode,phonenumber}谢谢阅读Needstreetaddress,city,statetouniquelydeterminelocation.Apersoncouldhavemultipleaddresses.Thesameistrueforphones.Thesedays,apersoncouldhavealandlineandacellularphone精品文档放心下载Exercise3.1.2Answersforthisexercisemayvarybecauseofdifferentinterpretations精品文档放心下载SomepossibleFDs:IDx-position,y-position,z-position感谢阅读IDx-velocity,y-velocity,z-velocity感谢阅读x-position,y-position,z-positionID感谢阅读Possiblekeys:{ID}{x-position,y-position,z-position}感谢阅读Thereasonwhythepositionswouldbeakeyisnotwomoleculescanoccupythesamepoint.精品文档放心下载Exercise3.1.3aThesuperkeysareanysubsetthatcontainsA1.Thus,thereare2(n-1)suchsubsets,sinceeachofthen-1attributesA2throughAnmayindependentlybechoseninorout.谢谢阅读**Exercise3.1.3bThesuperkeysareanysubsetthatcontainsA1orA2.Thereare2(n-1)suchsubsetswhenconsideringA1andthen-1attributesA2throughAn.Thereare2(n-2)suchsubsetswhenconsideringA2andthen-2attributesA3throughAn.WedonotcountA1inthesesubsetsbecausetheyarealreadycountedinthefirstgroupofsubsets.Thetotalnumberofsubsets谢谢阅读is2(n-1)+2(n-2).Exercise3.1.3cThesuperkeysareanysubsetthatcontains{A1,A2}or{A3,A4}.Thereare2(n-2)suchsubsetswhenconsidering{A1,A2}andthen-2attributesA3throughAn.Thereare2(n-2)–2(n-4)suchsubsetswhenconsidering{A3,A4}andattributesA5throughAnalongwiththeindividualattributesA1andA2.Wegetthe2(n-4)termbecausewehavetodiscardthesubsetsthatcontainthekey{A1,A2}toavoiddoublecounting.Thetotalnumberofsubsetsis2(n-2)+2(n-2)精品文档放心下载–2(n-4).Exercise3.1.3dThesuperkeysareanysubsetthatcontains{A1,A2}or{A1,A3}.Thereare2(n-2)suchsubsetswhenconsidering{A1,A2}andthen-2attributesA3throughAn.Thereare2(n-3)suchsubsetswhenconsidering{A1,A3}andthen-3attributesA4throughAnWedonotcountA2inthesesubsetsbecausetheyarealreadycountedinthefirstgroupofsubsets.Thetotalnumberofsubsetsis2(n-2)+2(n-3).谢谢阅读Exercise3.2.1aWecouldtryinferencerulestodeducenewdependenciesuntilwearesatisfiedwehavethemall.Amoresystematicwayistoconsidertheclosuresofall15nonemptysetsofattributes.精品文档放心下载Forthesingleattributeswehave{A}+=A,{B}+=B,{C}+=ACD,and{D}+=AD.Thus,theonlynewdependencywegetwithasingleattributeontheleftisCA.感谢阅读**Nowconsiderpairsofattributes:精品文档放心下载{AB}+=ABCD,sowegetnewdependencyABD.{AC}+=ACD,andACDisnontrivial.{AD}+=AD,sonothingnew.{BC}+=ABCD,sowegetBCA,andBCD.{BD}+=ABCD,givingusBDAandBDC.{CD}+=ACD,givingCDA.感谢阅读Forthetriplesofattributes,{ACD}+=ACD,buttheclosuresoftheothersetsareeachABCD.谢谢阅读Thus,wegetnewdependenciesABCD,ABDC,andBCDA.感谢阅读Since{ABCD}+=ABCD,wegetnonewdependencies.感谢阅读Thecollectionof11newdependenciesmentionedaboveare:精品文档放心下载CA,ABD,ACD,BCA,BCD,BDA,BDC,CDA,ABCD,ABDC,andBCDA.谢谢阅读Exercise3.2.1bFromtheanalysisofclosuresabove,wefindthatAB,BC,andBDarekeys.AllothersetseitherdonothaveABCDastheclosureorcontainoneofthesethreesets.谢谢阅读Exercise3.2.1cThesuperkeysareallthosethatcontainoneofthosethreekeys.Thatis,asuperkeythatisnotakeymustcontainBandmorethanoneofA,C,andD.Thus,the(proper)superkeysareABC,ABD,BCD,andABCD.谢谢阅读Exercise3.2.2aForthesingleattributeswehave{A}+=ABCD,{B}+=BCD,{C}+=C,and{D}+=D.Thus,thenewdependenciesareACandAD.感谢阅读Nowconsiderpairsofattributes:感谢阅读{AB}+=ABCD,{AC}+=ABCD,{AD}+=ABCD,{BC}+=BCD,{BD}+=BCD,{CD}+=CD.ThusthenewdependenciesareABC,ABD,ACB,ACD,ADB,ADC,BCDandBDC.感谢阅读**Forthetriplesofattributes,{BCD}+=BCD,buttheclosuresoftheothersetsareeachABCD.谢谢阅读Thus,wegetnewdependenciesABCD,ABDC,andACDB.精品文档放心下载Since{ABCD}+=ABCD,wegetnonewdependencies.谢谢阅读Thecollectionof13newdependenciesmentionedaboveare:谢谢阅读AC,AD,ABC,ABD,ACB,ACD,ADB,ADC,BCD,BDC,ABCD,ABDCandACDB.精品文档放心下载Forthesingleattributeswehave{A}+=A,{B}+=B,{C}+=C,and{D}+=D.Thus,therearenonewdependencies.感谢阅读Nowconsiderpairsofattributes:感谢阅读{AB}+=ABCD,{AC}+=AC,{AD}+=ABCD,{BC}+=ABCD,{BD}+=BD,{CD}+=ABCD.ThusthenewdependenciesareABD,ADC,BCAandCDB.谢谢阅读Forthetriplesofattributes,alltheclosuresofthesetsareeachABCD.Thus,wegetnewdependenciesABCD,ABDC,ACDBandBCDA.感谢阅读Since{ABCD}+=ABCD,wegetnonewdependencies.感谢阅读Thecollectionof8newdependenciesmentionedaboveare:谢谢阅读ABD,ADC,BCA,CDB,ABCD,ABDC,ACDBandBCDA.谢谢阅读Forthesingleattributeswehave{A}+=ABCD,{B}+=ABCD,{C}+=ABCD,and{D}+=ABCD.Thus,thenewdependenciesareAC,AD,BD,BA,CA,CB,DBandDC.谢谢阅读Sinceallthesingleattributes’closuresareABCD,anysupersetofthesingleattributeswillalsoleadtoaclosureofABCD.Knowingthis,wecanenumeratetherestofthenewdependencies.精品文档放心下载Thecollectionof24newdependenciesmentionedaboveare:谢谢阅读AC,AD,BD,BA,CA,CB,DB,DC,ABC,ABD,ACB,ACD,ADB,ADC,BCA,BCD,BDA,BDC,CDA,CDB,ABCD,ABDC,ACDBandBCDA.感谢阅读**Exercise3.2.2bFromtheanalysisofclosuresin3.2.2a(i),wefindthattheonlykeyisA.AllothersetseitherdonothaveABCDastheclosureorcontainA.感谢阅读Fromtheanalysisofclosures3.2.2a(ii),wefindthatAB,AD,BC,andCDarekeys.AllothersetseitherdonothaveABCDastheclosureorcontainoneofthesefoursets.谢谢阅读Fromtheanalysisofclosures3.2.2a(iii),wefindthatA,B,CandDarekeys.AllothersetseitherdonothaveABCDastheclosureorcontainoneofthesefoursets.精品文档放心下载Exercise3.2.2cThesuperkeysareallthosesetsthatcontainoneofthekeysin3.2.2b(i).ThesuperkeysareAB,AC,AD,ABC,ABD,ACD,BCDandABCD.谢谢阅读Thesuperkeysareallthosesetsthatcontainoneofthekeysin3.2.2b(ii).ThesuperkeysareABC,ABD,ACD,BCDandABCD.感谢阅读Thesuperkeysareallthosesetsthatcontainoneofthekeysin3.2.2b(iii).ThesuperkeysareAB,AC,AD,BC,BD,CD,ABC,ABD,ACD,BCDandABCD.精品文档放心下载Exercise3.2.3aSinceA1A2…AnCcontainsA1A2…An,thentheclosureofA1A2…AnCcontainsB.ThusitfollowsthatA1A2…AnCB.感谢阅读Exercise3.2.3bFrom3.2.3a,weknowthatA1A2…AnCB.Usingtheconceptoftrivialdependencies,wecanshowthatA1A2…AnCC.ThusA1A2…AnCBC.谢谢阅读Exercise3.2.3c**FromA1A2…AnE1E2…Ej,weknowthattheclosurecontainsB1B2…BmbecauseoftheFDA1A2…AnB1B2…Bm.TheB1B2…BmandtheE1E2…EjcombinetoformtheC1C2…Ck.ThustheclosureofA1A2…AnE1E2…EjcontainsDaswell.Thus,A1A2…AnE1E2…EjD.感谢阅读Exercise3.2.3dFromA1A2…AnC1C2…Ck,weknowthattheclosurecontainsB1B2…BmbecauseoftheFDA1A2…AnB1B2…Bm.TheC1C2…CkalsotellusthattheclosureofA1A2…AnC1C2…CkcontainsD1D2…Dj.Thus,A1A2…AnC1C2…CkB1B2…BkD1D2…Dj.谢谢阅读Exercise3.2.4aIfattributeArepresentedSocialSecurityNumberandBrepresentedaperson’sname,thenwewouldassumeABbutBAwouldnotbevalidbecausetheremaybemanypeoplewiththesamenameanddifferentSocialSecurityNumbers.谢谢阅读Exercise3.2.4bLetattributeArepresentSocialSecurityNumber,BrepresentgenderandCrepresentname.谢谢阅读SurelySocialSecurityNumberandgendercanuniquelyidentifyaperson’sname(i.e.谢谢阅读ABC).ASocialSecurityNumbercanalsouniquelyidentifyaperson’sname(i.e.AC).感谢阅读However,genderdoesnotuniquelydetermineaname(i.e.BCisnotvalid).精品文档放心下载Exercise3.2.4cLetattributeArepresentlatitudeandBrepresentlongitude.Together,bothattributescanuniquelydetermineC,apointontheworldmap(i.e.ABC).However,neitherAnorBcanuniquelyidentifyapoint(i.e.ACandBCarenotvalid).谢谢阅读Exercise3.2.5GivenarelationwithattributesA1A2…An,wearetoldthattherearenofunctionaldependenciesoftheformB1B2…Bn-1CwhereB1B2…Bn-1isn-1oftheattributesfromA1A2…AnandCistheremainingattributefromA1A2…An.Inthiscase,thesetB1B2…Bn-1andanysubsetdonotfunctionallydetermineC.Thustheonlyfunctionaldependenciesthatwecan感谢阅读**makeareoneswhereCisonboththeleftandrighthandsides.AllofthesefunctionaldependencieswouldbetrivialandthustherelationhasnonontrivialFD’s.谢谢阅读Exercise3.2.6Let’sprovethisbyusingthecontrapositive.WewishtoshowthatifX+isnotasubsetofY+,thenitmustbethatXisnotasubsetofY.谢谢阅读IfX+isnotasubsetofY+,theremustbeattributesA1A2…AninX+thatarenotinY+.IfanyoftheseattributeswereoriginallyinX,thenwearedonebecauseYdoesnotcontainanyoftheA1A2…An.However,iftheA1A2…Anwereaddedbytheclosure,thenwemustexaminethecasefurther.AssumethattherewassomeFDC1C2…CmA1A2…AjwhereA1A2…AjissomesubsetofA1A2…An.ItmustbethenthatC1C2…CmorsomesubsetofC1C2…CmisinX.However,theattributesC1C2…CmcannotbeinYbecauseweassumedthatattributesA1A2…AnareonlyinX+andarenotinY+.Thus,XisnotasubsetofY.谢谢阅读Byprovingthecontrapositive,wehavealsoprovedifX⊆Y,thenX+⊆Y+.感谢阅读Exercise3.2.7ThealgorithmtofindX+isoutlinedonpg.76.Usingthatalgorithm,wecanprovethat(X+)+=X+.Wewilldothisbyusingaproofbycontradiction.谢谢阅读Supposethat(X+)+≠X+.Thenfor(X+)+,itmustbethatsomeFDallowedadditionalattributestobeaddedtotheoriginalsetX+.Forexample,X+AwhereAissomeattributenotinX+.However,ifthiswerethecase,thenX+wouldnotbetheclosureofX.TheclosureofXwouldhavetoincludeAaswell.ThiscontradictsthefactthatweweregiventheclosureofX,X+.Therefore,itmustbethat(X+)+=X+orelseX+isnottheclosureofX.精品文档放心下载Exercise3.2.8aIfallsetsofattributesareclosed,thentherecannotbeanynontrivialfunctionaldependencies.SupposeA1A2...AnBisanontrivialdependency.Then{A1A2...An}+containsBandthusA1A2...Anisnotclosed.精品文档放心下载**Exercise3.2.8bIftheonlyclosedsetsareøand{A,B,C,D},thenthefollowingFDshold:感谢阅读ABBACADAABCABDACBACDADBADCBCABCDBDABDCCDACDBABCDABDCACDBBCDA感谢阅读
AC ADBC BDCB CDDB DCExercise3.2.8cIftheonlyclosedsetsareø,{A,B}and{A,B,C,D},thenthefollowingFDshold:精品文档放心下载ABBACA CB CDDA DB DCACBACDADBADCBCABCDBDABDCCDACDBABCDABDCACDB**BCDAExercise3.2.9WecanthinkofthisproblemasasituationwheretheattributesA,B,Crepresentcitiesandthefunctionaldependenciesrepresentonewaypathsbetweenthecities.Theminimalbasesaretheminimalnumberofpathwaysthatareneededtoconnectthecities.Wedonotwanttocreateanotherroadwayifthetwocitiesarealreadyconnected.谢谢阅读Thesystematicwaytodothiswouldbetocheckallpossiblesetsofthepathways.However,wecansimplifythesituationbynotingthatittakesmorethantwopathwaystovisitthetwoothercitiesandcomeback.Also,ifwefindasetofpathwaysthatisminimal,addingadditionalpathwayswillnotcreateanotherminimalset.精品文档放心下载Thetwosetsofminimalbasesthatweregiveninexample3.11are:感谢阅读{AB,BC,CA}{AB,BA,BC,CB}Theadditionalsetsofminimalbasesare:感谢阅读{CB,BA,AC}{AB,AC,BA,CA}{AC,BC,CA,CB}Exercise3.2.10aWeneedtocomputetheclosuresofallsubsetsof{ABC},althoughthereisnoneedtothink精品文档放心下载abouttheemptysetorthesetofallthreeattributes.Herearethecalculationsforthe感谢阅读remainingsixsets:{A}+=A{B}+=B{C}+=ACE{AB}+=ABCDE{AC}+=ACE**{BC}+=ABCDEWeignoreDandE,soabasisfortheresultingfunctionaldependenciesforABCis:CAandABC.NotethatBC->Aistrue,butfollowslogicallyfromC->A,andthereforemaybeomittedfromourlist.谢谢阅读Exercise3.2.10bWeneedtocomputetheclosuresofallsubsetsof{ABC},althoughthereisnoneedtothink感谢阅读abouttheemptysetorthesetofallthreeattributes.Herearethecalculationsforthe谢谢阅读remainingsixsets:{A}+=AD{B}+=B{C}+=C{AB}+=ABDE{AC}+=ABCDE{BC}+=BCWeignoreDandE,soabasisfortheresultingfunctionaldependenciesforABCis:ACB.感谢阅读Exercise3.2.10cWeneedtocomputetheclosuresofallsubsetsof{ABC},althoughthereisnoneedtothink谢谢阅读abouttheemptysetorthesetofallthreeattributes.Herearethecalculationsforthe谢谢阅读remainingsixsets:{A}+=A{B}+=B{C}+=C{AB}+=ABD{AC}+=ABCDE{BC}+=ABCDEWeignoreDandE,soabasisfortheresultingfunctionaldependenciesforABCis:ACBandBCA.感谢阅读**Exercise3.2.10dWeneedtocomputetheclosuresofallsubsetsof{ABC},althoughthereisnoneedtothink谢谢阅读abouttheemptysetorthesetofallthreeattributes.Herearethecalculationsforthe感谢阅读remainingsixsets:{A}+=ABCDE{B}+=ABCDE{C}+=ABCDE{AB}+=ABCDE{AC}+=ABCDE{BC}+=ABCDEWeignoreDandE,soabasisfortheresultingfunctionaldependenciesforABCis:AB,BCandCA.谢谢阅读Exercise3.2.11ForsteponeofAlgorithm3.7,supposewehavetheFDABCDE.WewanttouseArmstrong’sAxiomstoshowthatABCDandABCEfollow.SurelythefunctionaldependenciesDEDandDEEholdbecausetheyaretrivialandfollowthereflexivityproperty.Usingthetransitivityrule,wecanderivetheFDABCDfromtheFDsABCDEandDED.Likewise,wecandothesameforABCDEandDEEandderivetheFDABCE.精品文档放心下载ForstepstwothroughfourofAlgorithm3.7,supposewehavetheinitialsetofattributesoftheclosureasABC.SupposealsothatwehaveFDsCDandDE.AccordingtoAlgorithm3.7,theclosureshouldbecomeABCDE.TakingtheFDCDandaugmentingbothsideswithattributesABwegettheFDABCABD.WecanusethesplittingmethodinsteponetogettheFDABCD.SinceDisnotintheclosure,wecanaddattributeD.TakingtheFDDEandaugmentingbothsideswithattributesABCwegettheFDABCDABCDE.UsingagainthesplittingmethodinsteponewegettheFDABCDE.SinceEisnotintheclosure,wecanaddattributeE.精品文档放心下载GivenasetofFDs,wecanprovethataFDFfollowsbytakingtheclosureoftheleftsideofFDF.ThestepstocomputetheclosureinAlgorithm3.7canbemimickedbyArmstrong’saxiomsandthuswecanproveFfromthegivensetofFDsusingArmstrong’saxioms.精品文档放心下载**Exercise3.3.1aInthesolutiontoExercise3.2.1wefoundthatthereare14nontrivialdependencies,includingthethreegivenonesandelevenderiveddependencies.Theyare:CA,CD,DA,ABD,ABC,ACD,BCA,BCD,BDA,BDC,CDA,ABCD,ABDC,andBCDA.精品文档放心下载WealsolearnedthatthethreekeyswereAB,BC,andBD.Thus,anydependencyabovethatdoesnothaveoneofthesepairsontheleftisaBCNFviolation.Theseare:CA,CD,DA,ACD,andCDA.谢谢阅读OnechoiceistodecomposeusingtheviolationCD.UsingtheaboveFDs,wegetACDandBCasdecomposedrelations.BCissurelyinBCNF,sinceanytwo-attributerelationis.UsingAlgorithm3.12todiscovertheprojectionofFDsonrelationACD,wediscoverthatACDisnotinBCNFsinceCisitsonlykey.However,DAisadependencythatholdsinABCDandthereforeholdsinACD.WemustfurtherdecomposeACDintoADandCD.Thus,thethreerelationsofthedecompositionareBC,AD,andCD.感谢阅读Exercise3.3.1bBycomputingtheclosuresofall15nonemptysubsetsofABCD,wecanfindallthenontrivialFDs.TheyareBC,BD,ABC,ABD,BCD,BDC,ABCDandABDC.FromtheclosureswecanalsodeducethattheonlykeyisAB.Thus,anydependencyabovethatdoesnotcontainABontheleftisaBCNFviolation.Theseare:BC,BD,BCDandBDC.精品文档放心下载OnechoiceistodecomposeusingtheviolationBC.UsingtheaboveFDs,wegetBCDandABasdecomposedrelations.ABissurelyinBCNF,sinceanytwo-attributerelationis.UsingAlgorithm3.12todiscovertheprojectionofFDsonrelationBCD,wediscoverthatBCDisinBCNFsinceBisitsonlykeyandtheprojectedFDsallhaveBontheleftside.ThusthetworelationsofthedecompositionareABandBCD.精品文档放心下载Exercise3.3.1c**InthesolutiontoExercise3.2.2(ii),wefoundthatthereare12nontrivialdependencies,includingthefourgivenonesandtheeightderivedones.TheyareABC,BCD,CDA,ADB,ABD,ADC,BCA,CDB,ABCD,ABDC,ACDBandBCDA.谢谢阅读WealsofoundoutthatthekeysareAB,AD,BC,andCD.Thus,anydependencyabovethatdoesnothaveoneofthesepairsontheleftisaBCNFviolation.However,alloftheFDscontainakeyontheleftsotherearenoBCNFviolations.感谢阅读NodecompositionisnecessarysincealltheFDsdonotviolateBCNF.谢谢阅读Exercise3.3.1dInthesolutiontoExercise3.2.2(iii),wefoundthatthereare28nontrivialdependencies,精品文档放心下载includingthefourgivenonesandthe24derivedones.TheyareAB,BC,CD,DA,感谢阅读AC,AD,BD,BA,CA,CB,DB,DC,ABC,ABD,ACB,ACD,ADB,ADC,感谢阅读BCA,BCD,BDA,BDC,CDA,CDB,ABCD,ABDC,ACDBandBCDA.精品文档放心下载WealsofoundoutthatthekeysareA,B,C,D.Thus,anydependencyabovethatdoesnothaveoneoftheseattributesontheleftisaBCNFviolation.However,alloftheFDscontainakeyontheleftsotherearenoBCNFviolations.精品文档放心下载NodecompositionisnecessarysincealltheFDsdonotviolateBCNF.感谢阅读Exercise3.3.1eBycomputingtheclosuresofall31nonemptysubsetsofABCDE,wecanfindallthenontrivialFDs.TheyareABC,DEC,BD,ABD,BCD,BEC,BED,ABCD,ABDC,ABEC,ABED,ADEC,BCED,BDEC,ABCED,andABDEC.FromtheclosureswecanalsodeducethattheonlykeyisABE.Thus,anydependencyabovethatdoesnotcontainABEontheleftisaBCNFviolation.Theseare:ABC,DEC,BD,ABD,BCD,BEC,BED,ABCD,ABDC,ADEC,BCEDandBDEC.精品文档放心下载OnechoiceistodecomposeusingtheviolationABC.UsingtheaboveFDs,wegetABCDandABEasdecomposedrelations.UsingAlgorithm3.12todiscovertheprojectionofFDsonrelationABCD,wediscoverthatABCDisnotinBCNFsinceABisitsonlykeyandtheFD感谢阅读**BDfollowsforABCD.UsingviolationBDtofurtherdecompose,wegetBDandABCasdecomposedrelations.BDisinBCNFbecauseitisatwo-attributerelation.UsingAlgorithm3.12again,wediscoverthatABCisinBCNFsinceABistheonlykeyandABCistheonlynontrivialFD.GoingbacktorelationABE,followingAlgorithm3.12tellsusthatABEisinBCNFbecausetherearenokeysandnonontrivialFDs.ThusthethreerelationsofthedecompositionareABC,BDandABE.精品文档放心下载Exercise3.3.1fBycomputingtheclosuresofall31nonemptysubsetsofABCDE,wecanfindallthe精品文档放心下载nontrivialFDs.Theyare:CB,CD,CE,DB,DE,ABC,ABD,ABE,ACB,ACD,感谢阅读ACE,ADB,ADC,ADE,BCD,BCE,BDE,CDB,CDE,CEB,CED,DEB,感谢阅读ABCD,ABCE,ABDC,ABDE,ABEC,ABED,ACDB,ACDE,ACEB,ACED,精品文档放心下载ADEB,ADEC,BCDE,BCED,CDEB,ABCDE,ABCED,ABDECandACDEB.From精品文档放心下载theclosureswecanalsodeducethatthekeysareAB,ACandAD.Thus,anydependency精品文档放心下载abovethatdoesnotcontainoneoftheabovepairsontheleftisaBCNFviolation.Theseare:谢谢阅读CB,CD,CE,DB,DE,BCD,BCE,BDE,CDB,CDE,CEB,CED,DEB,精品文档放心下载BCDE,BCEDandCDEB.OnechoiceistodecomposeusingtheviolationDB.UsingtheaboveFDs,wegetBDEandABCasdecomposedrelations.UsingAlgorithm3.12todiscovertheprojectionofFDsonrelationBDE,wediscoverthatBDEisinBCNFsinceD,BD,DEaretheonlykeysandalltheprojectedFDscontainD,BD,orDEintheleftside.GoingbacktorelationABC,followingAlgorithm3.12tellsusthatABCisnotinBCNFbecausesinceABandACareitsonlykeysandtheFDCBfollowsforABC.UsingviolationCBtofurtherdecompose,wegetBCandACasdecomposedrelations.BothBCandACareinBCNFbecausetheyaretwo-attributerelations.ThusthethreerelationsofthedecompositionareBDE,BCandAC.感谢阅读Exercise3.3.2Yes,wewillgetthesameresult.BothABandABChaveAontheleftsideandpartoftheprocessofdecompositioninvolvesfinding{A}+toformonedecomposedrelationandAplustherestoftheattributesnotin{A}+asthesecondrelation.Bothcasesyieldthesamedecomposedrelations.精品文档放心下载**Exercise3.3.3Yes,wewillstillgetthesameresult.BothABandABChaveAontheleftsideandpartoftheprocessofdecompositioninvolvesfinding{A}+toformonedecomposedrelationandAplustherestoftheattributesnotin{A}+asthesecondrelation.Bothcasesyieldthesamedecomposedrelations.感谢阅读Exercise3.3.4ThisistakenfromExample3.21pg.95.感谢阅读SupposethataninstanceofrelationRonlycontainstwotuples.谢谢阅读ABC123425TheprojectionsofRontotherelationswithschemas{A,B}and{B,C}are:谢谢阅读ABBC12234225Ifwedoanaturaljoinonthetwoprojections,wewillget:精品文档放心下载ABC123125423425TheresultofthenaturaljoinisnotequaltotheoriginalrelationR.谢谢阅读Exercise3.4.1a**Thisistheinitialtableau:感谢阅读ABCDEabcd1e1a1bcde1ab1cd1eThisisthefinaltableauafterapplyingFDsBEandCEA.谢谢阅读ABCDEabcd1e1abcde1ab1cd1eSincethereisnotanunsubscriptedrow,thedecompositionforRisnotlosslessforthissetofFDs.感谢阅读WecanusethefinaltableauasaninstanceofRasanexampleforwhythejoinisnotlossless.谢谢阅读Theprojectedrelationsare:感谢阅读ABCabcab1cBCDbcd1bcdb1cd1ACEace1aceThejoinedrelationis:**ABCDEabcd1e1abcde1ab1cd1e1abcd1eabcdeab1cd1eThejoinedrelationhasthreemoretuplesthantheoriginaltableau.精品文档放心下载Exercise3.4.1bThisistheinitialtableau:感谢阅读ABCDEabcd1e1a1bcde1ab1cd1eThisisthefinaltableauafterapplyingFDsACEandBCD感谢阅读ABCDEabcdea1bcde1ab1cd1eSincethereisanunsubscriptedrow,thedecompositionforRislosslessforthissetofFDs.感谢阅读Exercise3.4.1cThisistheinitialtableau:感谢阅读ABCDEabcd1e1a1bcde1**a b1 c d1 eThisisthefinaltableauafterapplyingFDsAD,DEandBD.精品文档放心下载ABCDEabcdea1bcdeab1cdeSincethereisanunsubscriptedrow,thedecompositionforRislosslessforthissetofFDs.谢谢阅读Exercise3.4.1dThisistheinitialtableau:精品文档放心下载ABCDEabcd1e1a1bcde1ab1cd1eThisisthefinaltableauafterapplyingFDsAD,CDEandED谢谢阅读ABCDEabcdea1bcdeab1cdeSincethereisanunsubscriptedrow,thedecompositionforRislosslessforthissetofFDs.感谢阅读Exercise3.4.2WhenwedecomposearelationintoBCNF,wewillprojecttheFDsontothedecomposedrelationstogetnewsetsofFDs.ThesedependenciesarepreservediftheunionofthesenewsetsisequivalenttotheoriginalsetofFDs.谢谢阅读**FortheFDsof3.4.1a,thedependenciesarenotpreserved.TheunionofthenewsetsofFDsisCEA.However,theFDBEisnotintheunionandcannotbederived.ThusthetwosetsofFDsarenotequivalent.谢谢阅读FortheFDsof3.4.1b,thedependenciesarepreserved.TheunionofthenewsetsofFDsisACEandBCD.ThisispreciselythesameastheoriginalsetofFDsandthusthetwosetsofFDsareequivalent.谢谢阅读FortheFDsof3.4.1c,thedependenciesarenotpreserved.TheunionofthenewsetsofFDsisBDandAE.TheFDsADandDEarenotintheunionandcannotbederived.ThusthetwosetsofFDsarenotequivalent.精品文档放心下载FortheFDsof3.4.1d,thedependenciesarenotpreserved.TheunionofthenewsetsofFDsisACE.However,theFDsAD,CDEandEDarenotintheunionandcannotbederived.ThusthetwosetsofFDsarenotequivalent.感谢阅读Exercise3.5.1aInthesolutiontoExercise3.3.1awefoundthatthereare14nontrivialdependencies.Theyare:CA,CD,DA,ABD,ABC,ACD,BCA,BCD,BDA,BDC,CDA,ABCD,ABDC,andBCDA.精品文档放心下载WealsolearnedthatthethreekeyswereAB,BC,andBD.SincealltheattributesontherightsidesoftheFDsareprime,thereareno3NFviolations.谢谢阅读Sincethereareno3NFviolations,itisnotnecessarytodecomposetherelation.感谢阅读Exercise3.5.1bInthesolutiontoExercise3.3.1bwefoundthatthereare8nontrivialdependencies.TheyareBC,BD,ABC,ABD,BCD,BDC,ABCDandABDC.精品文档放心下载WealsofoundoutthattheonlykeyisAB.FDswheretheleftsideisnotasuperkeyortheattributesontherightarenotpartofsomekeyare3NFviolations.The3NFviolationsareBC,BD,BCDandBDC.精品文档放心下载**Usingalgorithm3.26,wecandecomposeintorelationsusingtheminimalbasisBCand谢谢阅读BD.TheresultingdecomposedrelationswouldbeBCandBD.However,noneofthesetwosetsofattributesisasuperkey.ThusweaddrelationABtotheresult.ThefinalsetofdecomposedrelationsisBC,BDandAB.精品文档放心下载Exercise3.5.1cInthesolutiontoExercise3.3.1cwefoundthatthereare12nontrivialdependencies.TheyareABC,BCD,CDA,ADB,ABD,ADC,BCA,CDB,ABCD,ABDC,ACDBandBCDA.感谢阅读WealsofoundoutthatthekeysareAB,AD,BC,andCD.SincealltheattributesontherightsidesoftheFDsareprime,thereareno3NFviolations.精品文档放心下载Sincethereareno3NFviolations,itisnotnecessarytodecomposetherelation.感谢阅读Exercise3.5.1dInthesolutiontoExercise3.3.1dwefoundthatthereare28nontrivialdependencies.TheyareAB,BC,CD,DA,AC,AD,BD,BA,CA,CB,DB,DC,ABC,ABD,ACB,ACD,ADB,ADC,BCA,BCD,BDA,BDC,CDA,CDB,ABCD,ABDC,ACDBandBCDA.谢谢阅读WealsofoundoutthatthekeysareA,B,C,D.SincealltheattributesontherightsidesoftheFDsareprime,thereareno3NFviolations.精品文档放心下载Sincethereareno3NFviolations,itisnotnecessarytodecomposetherelation.谢谢阅读Exercise3.5.1eInthesolutiontoExercise3.3.1ewefoundthatthereare16nontrivialdependencies.TheyareABC,DEC,BD,ABD,BCD,BEC,BED,ABCD,ABDC,ABEC,ABED,ADEC,BCED,BDEC,ABCED,andABDEC.谢谢阅读**WealsofoundoutthattheonlykeyisABE.FDswheretheleftsideisnotasuperkeyortheattributesontherightarenotpartofsomekeyare3NFviolations.The3NFviolationsareABC,DEC,BD,ABD,BCD,BEC,BED,ABCD,ABDC,ADEC,BCEDandBDEC.谢谢阅读Usingalgorithm3.26,wecandecomposeintorelationsusingtheminimalbasisABC,感谢阅读DECandBD.TheresultingdecomposedrelationswouldbeABC,CDEandBD.However,noneofthesethreesetsofattributesisasuperkey.ThusweaddrelationABEtotheresult.ThefinalsetofdecomposedrelationsisABC,CDE,BDandABE.精品文档放心下载Exercise3.5.1fInthesolutiontoExercise3.3.1fwefoundthatthereare41nontrivialdependencies.Theyare:CB,CD,CE,DB,DE,ABC,ABD,ABE,ACB,ACD,ACE,ADB,ADC,ADE,BCD,BCE,BDE,CDB,CDE,CEB,CED,DEB,ABCD,ABCE,ABDC,ABDE,ABEC,ABED,ACDB,ACDE,ACEB,ACED,ADEB,ADEC,BCDE,BCED,CDEB,ABCDE,ABCED,ABDECandACDEB.精品文档放心下载WealsofoundoutthatthekeysareAB,ACandAD.FDswheretheleftsideisnotasuperkeyortheattributesontherightarenotpartofsomekeyare3NFviolations.The3NFviolationsareCE,DE,BCE,BDE,CDEandBCDE.谢谢阅读Usingalgorithm3.26,wecandecomposeintorelationsusingtheminimalbasisABC,CD,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《医学伦理学》课程教学大纲 2
- 辽宁省鞍山市重点高中2024-2025学年高一上学期10月月考化学试题含答案
- 2024年仿古摆摊车转让合同范本
- 2024年出售井盖合同范本大全
- 2024年出口导弹合同范本大全
- 剖宫产术前术后的护理常规
- 四川省德阳市中江县2024-2025学年七年级上学期11月期中历史试题(含答案)
- 乳癌的护理查房
- 商业综合体消防岗位培训
- 低血糖护理业务学习
- 乳房炎性肿物的护理查房
- 2024年中国中车招聘笔试参考题库附带答案详解
- 小班数学课件《5以内的点数》课件
- 宫腔镜诊疗麻醉管理的专家共识
- 于海明正当防卫
- 经济管理系大数据与会计大学生职业生涯规划书
- 论莫言《晚熟的人》中的晚熟 意蕴与“新人”形象
- 股票分析师职业规划
- 小学三年级上学期期中考试家长会课件
- 生物技术在精准医疗领域的应用与研究
- XXX-工厂制造业绩效考核方案(内含岗位职责及KPI指标)
评论
0/150
提交评论