版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、课题整理上海财经大学数据库系统课程考试卷(A)20052006学年第二学期姓名学号班级得分1. TrueorFalse.(20points)1) .External/ConceptuaMappingisthekeytophysicaldataindependence.2) .DAisthepersonwhoprovidesthenecessarytechnicalsupportforimplementingthosedecisions.3) .ItisthejoboftheDMLprocessortochooseanefficientwaytoimplementuser'request
2、.4) .Relationaldatamodelrepresentsthedatainadatabaseasacollectionoftables.5) .Indexesallowthedatabasemanagementsystemtodirectlyaccesstherowsofthetableonwhichtheindexhasbeendefined.6) .Sincethelogicaldatastructuresareintendedfortheapplicationprogrammers,thedatabasedesignerisnotinvolvedintheirdevelopm
3、ent.7) .Viewsareonlydescriptionsofdata.Theyarenotrealtables.8) .Denormalizationcausestheredundantstorageofinformation.9) .Horizontalsplittingofarelationalvariablealwayscreatesrelationalvariablesfordifferentprimarykeyrangesoftheoriginalrelationalvariable.10) .Foranunorderedretrievalrequest,differente
4、xecutionsoftherequestmayreturntheretrievedrowsinadifferentsequence.11) .Arelationshiptypecanagainbethesourceortargetofarelationshiptype.12) .Abusinessrelationshiptypecanalwaysbetranslatedintoarelationshiptypeoftheentityrelationshipmodelfortheapplicationdomain.13) .Theupdatingofredundantinformationfo
5、rviolationsoftheThirdNormalFormcannotbecontrolledbytriggers.14) .SQLdoesnotpermituserstodefinetheirowntypes,columnsmustbedefinedintermsofbuilt-intypesonly.15) .Onceatransactioncommits,itsupdatesmaynotsurviveinthedatabasewhenthereisasubsequentsystemcrash.16) .Anytransactionwhichwasinprogressatthetime
6、ofthesystemfailuremustberedoatrestarttime.Thecheckpointrecordgivesalistofalltransactionsthatwereinprogressatthetimethecheckpointwastaken.IftransactionAholdsanSlockontuplet,thenarequestfromsomedistincttransactionBforaXlockontwillbedenied.Breakingthedeadlockinvolveschoosingoneofthedeadlockedtransactio
7、nsandcommitit.20) .Ifalltransactionsobeythe"two-phaselockingprotocol,"allpossibleinterleavedschedulesareserializable.2. Choosetherightanswerofthefollowingexercises.(30points)1) .Giventhetables:CustomeNorAccount oC001A101C002A105C002A107CustomerAccountl oNBalanceA101100A105170AccountThestat
8、ement:SELECTFROMCustomerAccountwillreturnhowmanyrows?A.2B.3C.5D.62) .Giventhetables:EMPINCOMEINCOMwasdefEmiNaEmpMonthiInccinedasfollows:CREATEABLEpidmeidNomeNCOME(EmpidCHAR1JOE115000(3),MonthNoCHAR2BO12550(3),B0IncomeDECIMAL3SMTHI2110000(6,2),CONSTRAINT!st1FOREIGKEY(Empid)800REFERENCESP220(Empid)OND
9、ELETCASCADE);would be deleted from IHowmanyrowsNCOMEthefollowingcommandisissued?DELETFROMEMPWHEREmpid='2'A. 0B. 1 C. 2 D. 3页脚内容233) .Giventhefollowingtables:2Jones3Smith4BOB2590261007130Thefollowingresultsaredesired:SncSnameS#C#Grade1Smith11802Jones25902Jones2610c3Smith4BOBWhichofthefollowin
10、gjoinswillyieldthedesiredresults?A.SELECTFROMStud,SCWHEREStud.Sno=SC.S#B.SELECTFROMStud,SCWHERStud.Sno=SC.S#(+)C.SELECTFROMStud,SCWHEREStud.Sno(+)=SC.S#D.SELECTFROMStud,SCWHERStud.Sno(+)=SC.S#(+)4) .GiventhetableT1,createdby:CREATEABLEEMP(IDCHAR(3PRIMARYKEY,NameCHAR(8),AgeInteger,CONSTRAINTnst1CHECK
11、Age>18andAge<60);ThefollowingSQLstatementsareissued:INSERTNTOEMP(IDAge)VALUESD01',25);INSERTNTOEMP(IDAge)VALUES'002',35);INSERTNTOEMP(IDAge)VALUES'003',15);COMMIT;HowmanyrowsareinsertedintoTableEMP?A.0B.1C.2D.35) .Giventhefollowingtables:Whichofthefollowingstatementsremoves
12、therowsfromtheStudtablethathavecoursesintheSCtable?A. DELETFROMStudWHERSnoIN(SELECSnoFROMSC);B. DELETFROMStudWHERE#IN(SELECT#FROMSC);C. DELETFROMStudWHERSnoIN(SELECS#FROMSC);D. DELETFROMStudWHERE#IN(SELECSnoFROMSC);6) .RelvarR(A,B,C,D,E,F)satisfieiefollowingFDs:AaBCBaEFWhichofthefollowingisthecandid
13、atekey?A.nullsetB.ACC.ADD.ABD7) .RelvarACCOUNT(CCname,AccountNoBalance)satisfieShefollowingFDs:CnoaCnameAccountNoaCno,BalanceWhichofthefollowingisthebestanswer?A.R1NFB.R2NFC.R3NFD.RBCNF8) .RelvarR(A,B,C,D,E)satisfiehefollowingFDs:AaBCDEWhichofthefollowingisthebestanswer?A.R1NFB.R2NFC.R3NFD.RBCNF9) .
14、RelvarR(S#,SNAME,#,QTY)satisfiesthefollowingFDs:Whichofthefollowingisthebestanswer?A.RC1NFB.RC2NFC.RC3NFD.RCBCNF10) .RelvarR(S#,STATUS,CITY(isfiesthefollowingFDs:S#aCITYCITYaSTATUSReplaceRbythetwoprojectionsR1andR2asfollows:R1(S#,CITY)withPrimaryKeyS#R2(S#,STATUS)ithPrimaryKeyS#Whichofthefollowingis
15、therightanswer?A. ProjectionsRIandR2ofrelvarRareindependent.B. Thedecompositionisdependencypreservation.C. Thedecompositionsanonlossdecomposition.D. Thedecompositionisdependencypreservationandnonlossdecomposition11) .Whichtwoofthefollowingchoicesareobjectivesthenormalizationofrelationvariablewantsto
16、achieve?A. Removeredundancieswithinrelationvariables.B. Improvetheperformanceofthedatabasebeingdesigned.C. Reducethesizeoftherelationvariables.D. Removeredundanciesacrossrelationvariables.E. Avoiddatainconsistenciesandotherproblemsresultingfrominsert,update,ordeleteoperations.12) .LettransactionsT1,
17、T2bedefinedtoperformthefollowingoperations:T1:AddfourtoBT2:TrebleBSupposetransactionsT1andT2areallowedtoexecuteconcurrently.IfBhasinitialvaluethree.Howmanypossiblecorrectresultsarethere?A.1B.2C.3D.413) .Whencantupletypesbemerged?A. Tupletypeswithalwayscorrespondingforeignkeyvaluescanbemerged.B. Tupl
18、etypeswithalwayscorrespondingprimarykeyvaluescanbemerged.C. Tupletypeswithdifferentforeignkeyvaluescanbemerged.D. Tupletypeswithdifferentprimarykeyvaluescanbemerged.14) .AssumethatthedeleteruleforareferentialconstraintisCASCADEhooseacaseforwhichthedeletionofaparentrowwouldstillfail.A. Theparenttable
19、hasanotherforeignkey.B. AnotherreferentialconstraintwithdeleteruleRESTRICpreventsthedeletionoftheparentrow.C. Itsreferentialtablehasmorethanonecandidatekeys.D. Theparenttablehasmorethanonecandidatekeys.15) .WhichtwoofthefollowingmethodscanensurethecorrectnessofderivabledataA. Notstoringthemandderivi
20、ngthemeachtimetheyareneeded.B. Revaluatingandstoringthedatawhichaffectthederivabledata.C. Triggersreevaluatingandstoringthedatawhichaffectthederivabledata.D. Triggersreevaluatingandstoringthederivabledataeachtimedataaffectingthederivabledataareinserted,updated,ordeleted.3. Assumethatyouhavethefollow
21、ingentity-relationshipmodel:Furthermore,assumethattheentitytypesandrelationshiptypeshavethefollowinginstances:WhichinstanceswillbedeletedafterentityinstanceC20fentitytypeChasbeendeleted?(8points)4. ConsiderthefollowingfourrelationsforanOrderdatabase:CREATEABLEProduct(PnoCHAR(4PRIMARYKEY,PnameVARCHAR
22、2(40),PriceNUMBER(7,2),Inventoryint);CREATEABLdstomer(CnoCHAR(5pRIMARYKEY,CnameCHAR(20),CompanyCHAR(30),CityCHAR(20),TelCHAR(15);CREATTABLEDrders(OnoCHAR(5),Order_dateDATE,CnoCHAR(5),FreightINT,Shipment_dateDATE,PRIMARYKEY(Ono),FOREIGNEY(CnoREFERENCEUStomer(Cno);CREATEABLEDrderJtems(OnoCHAR(5),PnoCH
23、AR(4),Qtyint,DiscountNUMBER(4,2),PRIMARYKEY(Ono,Pno);Specifythefollowingqueriesinrelationalalgebra:(10points)1) .GetthenameandtelephonenumberforallcustomerswhoislocatedinShanghai.2) .GettheOrdernumber,productnameandquantityforallorders.3) .GettheOrderNumberforwhoseorderswhichorderedalltheproducts.4)
24、 .Gettheproductnumberwhichisorderedbycustomer'C001'.5. Basedontheabovedatabase,specifythefollowingoperateinSQL.(18points)1) .Getordernumber,orderdateandfreightofallorders.2) .Forallorders,getordernumber,productname,quantityandprice.Ordertheresultbyordernumberandproductname.3) .Findtheordernu
25、mberofallorderswhichdidnorderP00product.4) .Findallthecustomernamesandthetotalnumberoforderstheyordered.5) .Addaforeignkeyreferenceontheorderjtemstablewhichensurethattheorderwillnotorderannonexistentproduct.6) .Deleteallorderitemsoforder'O001.6. AssumethatRandRithroughRarerelationalvariablessati
26、sfyingthefollowingconditions:Theyallhavethesameprimarykey.Atalltimes,eachprimarykeyvalueofRthroughRoccursinR.WhichfurtherconditionmustbesatisfiedforRthroughRbeingaperfectdecompositionofR?(3Points)7. RelvarRA,B,C,D,E,F,G,HsiatisfiesthefollowingFDs:A一EAB一CEG一HComputetheclosureABG+underthissetofFDs.(4P
27、oints)8. ArelvarTIMETABLiEdefinedwiththefollowingattributes:D:Dayoftheweek(1to5)P:Periodwithinday(1to8)C:ClassroomnumberT:TeachernameL:LessonnameThetupleD:d,P:p,C:c,T:t,L:lappearsinthisrelvarifandonlyifattimeD:d,P:plessonlistaughtbyteachertinclassroomc.Youcanassumethatlessonsareoneperiodindurationandthateverylessonhasanamethatisuniquewithrespecttoalllessonstaughtintheweek.1) .WhatarethecandidatekeysofrelvarTIMETABLE?2) .IsrelvarTIMETABLiE3NF?(7points)上海财经大学数据库系统课程考试卷(A)标准答案20052006学年第二学期1、是非题答案填入下面的表格中。(共20分)(“表示相应题目的描述是正确,"F'表示
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026冀中职业学院诚聘非全日制校外兼课教师5名考前冲刺试卷及参考答案详解【研优卷】
- 2026安徽合肥长丰县某国企招聘养老服务人员35人备考题库附完整答案详解【必刷】
- 2026陕西延长县高级中学和延长县职业教育中心招聘教师21人笔试题库含答案详解【夺分金卷】
- 四川文理学院2026年公开招聘科研助理第二批的模拟试卷(B卷)附答案详解
- 2026广东汕头市潮南区银龄教师招募9人备考题库附参考答案详解(培优B卷)
- 2026云南玉溪市人民医院第二批就业见习岗位招募52人考前冲刺密卷附参考答案详解【典型题】
- 2026年枣庄山亭区青年见习招募(第五批)考前冲刺密卷汇编附答案详解
- 2026浙江丽水市莲都区青少年宫外聘辅导员招聘5人备考题库(考点精练)附答案详解
- 2026年新疆兵团第十三师淖毛湖农场幼儿园招聘编外专任教师(2人)考前冲刺密卷附完整答案详解(典优)
- 2026中山医学院寄生虫学特诊助理劳务派遣招聘2人考前冲刺密卷含完整答案详解【有一套】
- 与建设单位的协调沟通机制及配合措施
- HY/T 0465-2024红树林修复与利用地埋管网系统技术指南
- T/CTRA 01-2020废轮胎/橡胶再生油
- T/CECS 10237-2022绿色建材评价供暖空调输配系统用风机、风管、水泵
- 铁路信号设计与施工铁道信号自动控制专业教学17课件
- 教研员考试试题及答案
- 呼吸衰竭的抢救和护理
- DL∕T 5344-2018 电力光纤通信工程验收规范
- DL∕T 1342-2014 电气接地工程用材料及连接件
- 个人宾馆转让合同
- 《JGJT473-2019建筑金属围护系统工程技术标准》贯标培训资料
评论
0/150
提交评论