资源描述:
《吉大春秋学期数据库应用技术在线作业一》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、谋学网www.mouxue.com一、单选题(共25道试题,共100分。)V1.Giventhetables:EMPLOYEEDEPTemp_numemp_namedeptdept_iddept_name1Adams11Planning2Jones12Support3Smith24Williams1andthestatement:ALTERTABLEemployeeADDFOREIGNKEY(dept)REFERENCESdept(dept_id)ONDELETECASCADEHowmanyrowswillbedeletedwhenthefoll
2、owingstatementisexecuted?DELETEFROMemployeeWHEREdept=1A.0B.1C.3D.42.Giventhefollowingcode:BEGINATOMICUPDATEcountrySETcities=:countWHERECURRENTOFC1;INSERTINTOcountryVALUES(:co11,:co12,:co13);INSERTINTOcountryVALUES(:co14,:co15,:co16);INSERTINTOcountryVALUES(:co17,:co18,:co19);
3、INSERTINTOcountryVALUES(:co110,:co111,:co112);COMMIT;ENDGiventhatallstatementssucceedexceptthefollowing:INSERTINTOcountryVALUES(:co17,:co18,:co19);HowmanyrowswillbeaffectedintableCOUNTRY?A.0B.3C.4D.53.HowmanyrowscanberetrievedusingasingleSELECTINTOstatement?A.OnlyonerowB.Asma
4、nyasareintheresultC.AsmanyasarehostvariablesusedinthecallD.Asmanyashostvariablearraystructurescanhold4.实体是信息世界中的术语,与之对应的数据库术语为:()A.文件B.数据库C.字段D.记录5.如果开发人员在AIX操作系统上开发访问后台AS400上的DB2数据库,则需要在AIX开发环境中安装:()A.DB2个人开发版(PDE)B.DB2通用开发版(UDE)6.关系模型中的关系模式至少是()A.1NFB.2NFC.3NFD.BCNF谋学网www.m
5、ouxue.com7.若用如下的SQL语句创建一个student表:CREATETABLEstudent(NOCHAR(4)NOTNULL,NAMECHAR(8)NOTNULL,SEXCHAR(2),AGENUMBERIC(2))可以插入到student表中的是哪一项?A.(‘1031’,‘曾华’,男,23)B.(‘1031’,‘曾华’,NULL,NULL)C.(NULL,‘曾华’,‘男’,‘23’)D.(‘1031’,NULL,‘男’,23)8.执行下面两条SQL语句后:CREATETABLEt1(c1char(10)NOTNULLPRIMAR
6、YKEY,c2int,c3char(10),c4char(10)NOTNULL,CONSTRAINTc4UNIQUE(c1,c4))//自动创建索引CREATEINDEXIndex1ONt1(c2ASC)表t1上有几个索引?A.0B.1C.2D.3E.49.Giventhecode:EXECSQLWITHmost_citiesAS(SELECTb.id,b.name,a.citiesFROMcountrya,staffbWHEREa.person=b.idANDcities>:threshold)SELECTid,name,citiesFROMm
7、ost_citiesINTO:id,:name,:citiesWHEREcitiesIN(SELECTMAX(cities)FROMmost_cities)WhichofthefollowingcanreferenceMOST_CITIES?A.ThecurrentstatementB.StatementsfromanyapplicationC.AllstatementswithinthisapplicationD.Allstatementswithinthecurrentunitofwork10.AnapplicationusesstaticS
8、QLtoconnecttoaremoteDB2serverandinsertsdataintotheCUST.ORDERStableon