资源描述:
《吉大春学期数据库应用技术在线作业一》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、吉大17春学期《数据库应用技术》在线作业一一、单选题(共25道试题,共100分。)1.Giventhetables:EMPLOYEEDEPTemp_numemp_namedeptdept_iddept_name1Adams11Planning2Jones12Support3Smith24Williams1andthestatement:ALTERTABLEemployeeADDFOREIGNKEY(dept)REFERENCESdept(dept_id)ONDELETECASCADEHowmanyrowswillbedeletedwhenthefollowingstatem
2、entisexecuted?DELETEFROMemployeeWHEREdept=1A.0B.1C.3D.4正确答案:2.Giventhefollowingcode:BEGINATOMICUPDATEcountrySETcities=:countWHERECURRENTOFC1;INSERTINTOcountryVALUES(:co11,:co12,:co13);INSERTINTOcountryVALUES(:co14,:co15,:co16);INSERTINTOcountryVALUES(:co17,:co18,:co19);INSERTINTOcountryVAL
3、UES(:co110,:co111,:co112);COMMIT;ENDGiventhatallstatementssucceedexceptthefollowing:INSERTINTOcountryVALUES(:co17,:co18,:co19);HowmanyrowswillbeaffectedintableCOUNTRY?A.0B.3C.4D.5正确答案:3.HowmanyrowscanberetrievedusingasingleSELECTINTOstatement?A.OnlyonerowB.AsmanyasareintheresultC.Asmanyasa
4、rehostvariablesusedinthecallD.Asmanyashostvariablearraystructurescanhold正确答案:4.实体是信息世界中的术语,与之对应的数据库术语为:()A.文件B.数据库C.字段D.记录正确答案:5.如果开发人员在AIX操作系统上开发访问后台AS400上的DB2数据库,则需要在AIX开发环境中安装:()A.DB2个人开发版(PDE)B.DB2通用开发版(UDE)正确答案:6.关系模型中的关系模式至少是()A.1NFB.2NFC.3NFD.BCNF正确答案:7.若用如下的SQL语句创建一个student表:CREATE
5、TABLEstudent(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)NOTNULLPRIMARYKEY,c2int,c3char(10),c4char(10)NOTNULL,CONSTRAIN
6、Tc4UNIQUE(c1,c4))//自动创建索引CREATEINDEXIndex1ONt1(c2ASC)表t1上有几个索引?A.0B.1C.2D.3E.4正确答案:9.Giventhecode:EXECSQLWITHmost_citiesAS(SELECTb.id,b.name,a.citiesFROMcountrya,staffbWHEREa.person=b.idANDcities>:threshold)SELECTid,name,citiesFROMmost_citiesINTO:id,:name,:citiesWHEREcitiesIN(SELECTMAX(cit
7、ies)FROMmost_cities)WhichofthefollowingcanreferenceMOST_CITIES?A.ThecurrentstatementB.StatementsfromanyapplicationC.AllstatementswithinthisapplicationD.Allstatementswithinthecurrentunitofwork正确答案:10.AnapplicationusesstaticSQLtoconnecttoaremoteDB2serverandinser