资源描述:
《上海交通大学 数据库原理 陆朝俊 复习》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ERadchgHfSeGFisaRbEIfwetranslatethisdiagramtorelationsinthenormalwayforE/Rdiagramsdescribedinthetextbook,whichrelationschemawouldnotbeintheresultingdatabaseschema?(A)E(a,c,b)(B)S(a,c,f,g)(C)F(c,d)(D)R(a,c)Ifweinsteadusedthe“object-oriented”approachtotranslatingthisE/Rdiagramt
2、orelations,howmanyrelationschemawouldbedifferent(whencomparedtotheE/R-to-relationstranslation),eitherintheirschema,ortheirsetoftuples,orboth?(A)1(B)2(C)3(D)415of9ConvertthefollowingE/Rdiagram(withdetailsomitted)toarelationaldatabaseschemausingtheobject-orientedmethod.Howmanyr
3、elationschemaswillbeproduced?(Assumethateachentitysethasitsownspecialattributes.)ACBDisaisaisa(A)1(B)4(C)5(D)615of9RelationalTheoryGivenarelationR(A,B,C,D,E)andFDsAB®CE,B®D,andD®E,whichofthefollowingFD’scannotbeinferred?(A)AD®CE(B)BC®D(C)AB®A(D)B®EGivenarelationR(A,B,C,D)with
4、FD:A®BC,whichofthefollowingMVD’scannotbeinferred?(A)A®®BC(B)A®®B(C)A®®BD(D)Noneoftheabove.SupposewehavearelationR(A,B,C,D,E)andtheFD’sA®DE,D®B,andE®C.IfweprojectR(andthereforeitsFD’s)ontoschemaS(A,B,C),whatistrueaboutthekey(s)forS?(A)OnlyABCisakey(B)OnlyAisakey(C)OnlyDEisakey
5、(D)A,B,andCareeachkeysSupposewearegivenarelationschemaR(A,B,C,D,E)withfunctionaldependenciesA®B,BC®DandE®C.IfweprojectRontoS(B,C,D,E),whichofthefollowingfunctionaldependenciesholdsinSandisnotaBCNFviolationforS?(A)BC®D(B)BE®D(C)B®E(D)E®CSupposethatR(A,B,C,D)satisfiesMVD:A®®Ban
6、ditisknownthatRhastuples(a1,b1,c1,d1),(a1,b2,c2,d2),and(a2,b1,c1,d2).HowmanytuplesmustRhaveatleast?(A)3(B)4(C)5(D)615of9RelationalalgebraandDatalogInthefollowingquestion,assumeRandSarebags,andtheoperatorsarebagoperators.Q1:(R∪S)–(R∩S)Q2:(S–R)∪(R–S)(A)Q1andQ2producethesameansw
7、er.(B)TheanswertoQ1isalwayscontainedintheanswertoQ2.(C)TheanswertoQ2isalwayscontainedintheanswertoQ1.(D)Q1andQ2producedifferentanswers.GivenrelationsP(A,B,C)andQ(C,D),whichofthefollowingrelationalalgebraexpressionsisequivalenttothisDatalogrule:Answer(x,w)¬P(x,y,z)ANDQ(y,w)AND
8、x