版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 燃气计量器具使用监管规范
- 消化性溃疡的预防
- T∕CSF 0117-2025 无人机激光雷达森林地上碳储量估测技术规范
- 上饶心理咨询师专项训练卷
- 宿州市埇桥区高中教师招聘考试真题2025
- 《数控机床加工零件》课件-车床钻孔加工要领1
- 2025年内蒙古大学创业学院招聘教师考试真题
- 2025年都江堰市实验中学教师招聘真题
- 2026年脊髓小脑通路病变诊疗试题及答案(神经内科版)
- 2026年博尔塔拉蒙古市工会系统事业单位人员招聘考试备考试题及答案详解
- 实施指南《G B-T36713-2018能源管理体系能源基准和能源绩效参数》实施指南
- 设备搬迁及安装方案
- 消防安全重点单位档案管理
- 2025年贵州省委党校在职研究生招生考试(政治经济学原理)历年参考题库含答案详解(5卷)
- 心理健康接纳自己课件
- 癫痫共患偏头痛诊断治疗
- 江西省农发种业有限公司招聘考试真题2024
- 储备土地巡查管理办法
- JJG 688-2025汽车排放气体测试仪检定规程
- 【15万吨日供水量水厂设计中反应沉淀池设计计算过程案例2300字】
- 《铁路线路养护与维修》课件 2.1.5垫板修正作业
评论
0/150
提交评论