资源描述:
《上海交通大学数据库原理陆朝俊复习》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、ERfrg/IfwetranslatethisdiagramtorelationsinthenormalwayforE/Rdiagramsdescribedinthetextbook,whichrelationschemawouldnotbeintheresultingdatabaseschema?(A)E(a,c,b)(B)S(a,c£g)(C)F(c,d)(D)R(a,c)Ifweinsteadusedthe“object-oriented"approachtotranslatingthisE/Rdiagram
2、torelations,howmanyrelationschemawouldbedifferent(whencomparedtotheE/R-to-relationstranslation),eitherintheirschema,ortheirsetoftuples,orboth?(A)1(B)2(C)3(D)4ConvertthefollowingE/Rdiagram(withdetailsomitted)toarelationaldatabaseschemausingtheobject-orientedmetho
3、d・Howmanyrelationschemaswillbeproduced?(Assumethateachentitysethasitsownspecialattributes.)BCD(A)1(B)4(C)5(D)6RelationalTheoryGivenarelationR(A,B,C,D,E)andFDsABtCE,BtD,andDtE,whichofthefollowingFD'scannotbeinferred?(A)ADtCE(B)BCtD(C)ABtA(D)BtEGivenarelationR(A,B
4、,C,D)withFD:AtBC,whichofthefollowingMVD'scannotbeinferred?(A)AttEC(B)AttB(C)AttBD(D)Noneoftheabove.SupposewehavearelationR(A,B,C,D,E)andtheFD'sAtDE,DtB,andE—>C.IfweprojectR(andthereforeitsFD,s)ontoschemaS(A,B,C),whatistrueaboutthekey(s)forS?(A)OnlyABCisakey(B)On
5、lyAisakey(C)OnlyDEisakey(D)A5B,andCareeachkeysSupposewearegivenarelationschemaR(A,B,C,D,E)withfunctionaldependenciesAtB,BCtDandEtC.IfweprojectRontoS(B,C,D,E),whichofthefollowingfunctionaldependenciesholdsinSandisnotaBCNFviolationforS?(A)BCtD(B)BEtD(C)BtE(D)EtCSu
6、pposethatR(A,B,C,D)satisfiesMVD:AttBanditisknownthatRhastuples(al,bl,cl,dl),(al,b2?c25d2)?and(a2,bl,cl,d2)・HowmanytuplesmustRhaveatleast?(A)3(B)4(C)5(D)6RelationalalgebraandDatalogInthefollowingquestion,assumeRandSarebags,andtheoperatorsarebagoperators.Q1:(RUS)-
7、(RAS)Q2:(S-R)U(R-S)(A)QIandQ2producethesameanswer.(B)TheanswertoQIisalwayscontainedintheanswertoQ2.(C)TheanswertoQ2isalwayscontainedintheanswertoQI.(D)QIandQ2producedifferentanswers.GivenrelationsP(A,B,C)andQ(C,D),whichofthefollowingrelationalalgebraexpressionsi
8、sequivalenttothisDatalogrule:Answer(x,w)P(x,y,z)ANDQ(y,w)ANDx