db2考试自测题1.docx

上传人:b****1 文档编号:589340 上传时间:2023-04-29 格式:DOCX 页数:18 大小:20.46KB
下载 相关 举报
db2考试自测题1.docx_第1页
第1页 / 共18页
db2考试自测题1.docx_第2页
第2页 / 共18页
db2考试自测题1.docx_第3页
第3页 / 共18页
db2考试自测题1.docx_第4页
第4页 / 共18页
db2考试自测题1.docx_第5页
第5页 / 共18页
db2考试自测题1.docx_第6页
第6页 / 共18页
db2考试自测题1.docx_第7页
第7页 / 共18页
db2考试自测题1.docx_第8页
第8页 / 共18页
db2考试自测题1.docx_第9页
第9页 / 共18页
db2考试自测题1.docx_第10页
第10页 / 共18页
db2考试自测题1.docx_第11页
第11页 / 共18页
db2考试自测题1.docx_第12页
第12页 / 共18页
db2考试自测题1.docx_第13页
第13页 / 共18页
db2考试自测题1.docx_第14页
第14页 / 共18页
db2考试自测题1.docx_第15页
第15页 / 共18页
db2考试自测题1.docx_第16页
第16页 / 共18页
db2考试自测题1.docx_第17页
第17页 / 共18页
db2考试自测题1.docx_第18页
第18页 / 共18页
亲,该文档总共18页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

db2考试自测题1.docx

《db2考试自测题1.docx》由会员分享,可在线阅读,更多相关《db2考试自测题1.docx(18页珍藏版)》请在冰点文库上搜索。

db2考试自测题1.docx

db2考试自测题1

1)WhichofthefollowingproductsisrequiredtobeinstalledinordertobuildanapplicationonAIX,whichwillaccessaDB2UDBforOS/390database?

a)DB2ConnectPersonalEdition

b)DB2UniversalDatabaseWorkgroupEdition

c)DB2PersonalDeveloper'sEdition

d)DB2UniversalDeveloper'sEdition

2)Whichofthefollowingtoolscanbeusedtocatalogadatabase?

a)Journal

b)AlertCenter

c)LicenseCenter

d)ClientConfigurationAssistant

3)Whichofthefollowingutilitieswouldyouruntoorderdataandreclaimspacefromdeletedrowsinatable:

a)reorg

b)db2look

c)db2move

d)runstats

4)ThepurposeoftheUSEprivilegeisto:

a)querydatainatable.

b)loaddataintoatable.

c)createtableswithinatablespace.

d)createtablespaceswithinadatabase.

5)Whichtwoofthefollowingauthoritiescancreateadatabase?

a)DBADM

b)SYSADM

c)DBCTRL

d)SYSCTRL

e)SYSMAINT

6)Catalogingaremotedatabaseis:

a)PerformedonaPCorUNIXmachinetoidentifytheservertheDB2databasemanagerison.

b)PerformedonaPCorUNIXmachinetoidentifytheDB2databasetousersandapplications.

c)NeverperformedinDB2,asonlyonedatabasepernodeisallowed,socataloginganodeautomaticallycatalogsthedatabaseatthatnode.

d)PerformedonaPCorUNIXmachinetoopenthecatalogsintheDB2databaseandpresentauserwithalistofallaccessibletablesinthatdatabase.

 

7)Giventhecreatestatements:

CREATEDISTINCTTYPEkphASINTEGERWITHCOMPARISONS

CREATEDISTINCTTYPEmphASINTEGERWITHCOMPARISONS

CREATETABLEspeed_limits

(route_numSMALLINT,

canada_slKPHNOTNULL,

us_slMPHNOTNULL)

Whichofthefollowingisavalidquery?

a)SELECTroute_numFROMspeed_limitsWHEREcanada_sl>80

b)SELECTroute_numFROMspeed_limitsWHEREcanada_sl>kph

c)SELECTroute_numFROMspeed_limitsWHEREcanada_sl>us_sl

d)SELECTroute_numFROMspeed_limitsWHEREcanada_sl>kph(80)

假設您正在撰寫的應用程式須處理不同的貨幣,而您希望確保DB2不允許此類貨幣直接與另一貨幣相比較或進行處理。

請記得,每當您想要比較不同貨幣的價值時,便須執行換算。

因此您定義了所需數目的UDT;每種需要用到的貨幣各有一種UDT:

CREATEDISTINCTTYPEUS_DOLLARASDECIMAL(9,2)

CREATEDISTINCTTYPECANADIAN_DOLLARASDECIMAL(9,2)

CREATEDISTINCTTYPEGERMAN_MARKASDECIMAL(9,2)

 

8)If,foragiventable,theControlCenterdoesnotshowthechoiceGenerateDDL,whichofthefollowingdescribesthereason?

a)Thetableisasystemobject.

b)Thetableisasummarytable.

c)ThetableisinLOADPENDING.

d)Thetableisareplicatedtable.

e)Thetablewascreatedbyadifferentuser.

9)Giventhetables:

COUNTRY

IDNAMEPERSONCITIES

1Argentina110

2Canada220

3Cuba210

4Germany10

5France75

STAFF

IDLASTNAME

1Jones

2Smith

WhichofthefollowingstatementsremovestherowsfromtheCOUNTRYtable

thathavePERSONSintheSTAFFtable?

a)DELETEFROMcountryWHEREidIN(SELECTidFROMstaff)

b)DELETEFROMcountryWHEREidIN(SELECTpersonFROMstaff)

c)DELETEFROMcountryWHEREpersonIN(SELECTidFROMstaff)

d)DELETEFROMcountryWHEREpersonIN(SELECTpersonFROMstaff)

 

10)ThetableSTOCKhasthefollowingcolumndefinitions:

typeCHAR

(1)

statusCHAR

(1)

quantityINTEGER

priceDEC(7,2)

ItemsareindicatedtobeoutofstockbysettingSTATUStoNULLandQUANTITYandPRICEtozero.WhichofthefollowingstatementsupdatestheSTOCKtabletoindicatethatalltheitemsexceptforthosewithTYPEof"S"aretemporarilyoutofstock?

a)UPDATEstockSETstatus='NULL',quantity=0,price=0WHEREtype<>'S'

b)UPDATEstockSET(status,quantity,price)=(NULL,0,0)WHEREtype<>'S'

c)UPDATEstockSET(status,quantity,price)=('NULL',0,0)WHEREtype<>'S'

d)UPDATEstockSETstatus=NULL,SETquantity=0,SETprice=0WHEREtype<>'S'

11)WhichofthefollowingproductscanbeusedtostoreimagedatainaDB2database?

a)Net.Data

b)NetSearch

c)DB2AVIExtenders

d)DB2XMLExtenders

e)DB2TextExtenders

12)WhichofthefollowingCANNOThaveanautocommitsetting?

a)EmbeddedSQL

b)TheCommandCenter

c)TheCommandLineProcessor

d)TheDB2CallLevelInterface

13)Whichofthefollowingstatementseliminatesallbutoneofeachsetofduplicaterowsinthefinalresulttable?

a)SELECTUNIQUE*FROMt1

b)SELECTDISTINCT*FROMt1

c)SELECT*FROMDISTINCTT1

d)SELECTUNIQUE(*)FROMt1

e)SELECTDISTINCT(*)FROMt1

14)Giventhetable:

STAFF

IDLASTNAME

1Jones

2Smith

3

WhichofthefollowingstatementsremovesallrowsfromthetablewherethereisaNULLvalueforLASTNAME?

a)DELETEFROMstaffWHERElastnameISNULL

b)DELETEALLFROMstaffWHERElastnameISNULL

c)DELETEFROMstaffWHERElastname='NULL'

d)DELETEALLFROMstaffWHERElastname='NULL'

15)Giventhefollowingtabledefinitions:

DEPARTMENT

deptnoCHAR(3)

deptnameCHAR(30)

mgrnoINTEGER

admrdeptCHAR(3)

EMPLOYEE

empnoINTEGER

firstnameCHAR(30)

midinitCHAR

lastnameCHAR(30)

workdeptCHAR(3)

Whichofthefollowingstatementswilllisteveryemployee'snumberandlastnamewith

theemployeenumberandlastnameoftheirmanager,includingemployeeswithouta

manager?

a)SELECTe.empno,e.lastname,m.empno,m.lastnameFROMemployeeeLEFTINNER

JOINdepartmentINNERJOINemployeemONmgrno=m.empnoONe.workdept=deptno

b)SELECTe.empno,e.lastname,m.empno,m.lastname,FROMemployeeeLEFTOUTERJOIN

departmentINNERJOINemployeemONmgrno=m.empnoONe.workdept=deptno

c)SELECTe.empno,e.lastname,m.empno,m.lastnameFROMemployeeeRIGHTOUTERJOIN

departmentINNERJOINemployeemONmgrno=m.empnoONe.workdept=deptno

d)SELECTe.empno,e.lastname,m.empno,m.lastnameFROMemployeeeRIGHTINNERJOIN

departmentINNERJOINemployeemONmgrno=m.empnoONe.workdept=deptno

16)Giventhefollowingtables:

NAMES

NameNumber

WayneGretzky99

JaromirJagr68

BobbyOrr4

BobbyHull23

BrettHull16

MarioLemieux66

SteveYzerman19

ClaudeLemieux19

MarkMessier11

MatsSundin13

 

POINTS

NamePoints

WayneGretzky244

JaromirJagr168

BobbyOrr129

BobbyHull93

BrettHull121

MarioLemieux189

PIM

NamePIM

MatsSundin14

BobbyOrr12

MarkMessier32

BrettHull66

MarioLemieux23

JoeSakic94

Whichofthefollowingstatementswilldisplaytheplayer'sNames,numbers,pointsandPIMforallplayerswithanentryinallthreetables?

a)SELECTnames.name,names.number,points.points,pim.pimFROMnamesINNERJOINpoints

ONnames.name=points.nameINNERJOINpimONpim.name=names.name

b)SELECTnames.name,names.number,points.points,pim.pimFROMnamesOUTERJOINpoints

ONnames.name=points.nameOUTERJOINpimONpim.name=names.name

c)SELECTnames.name,names.number,points.points,pim.pimFROMnamesLEFTOUTERJOIN

pointsONnames.name=points.nameLEFTOUTERJOINpimONpim.name=names.name

d)SELECTnames.name,names.number,points.points,pim.pimFROMnamesRIGHTOUTERJOIN

pointsONnames.name=points.nameRIGHTOUTERJOINpimONpim.name=names.name

17)Giventhetables:

EMPLOYEE

emp_numemp_namedept

1Adams1

2Jones1

3Smith2

4Williams1

DEPT

dept_iddept_name

1Planning

1Support

andthestatement:

ALTERTABLEemployee

ADDFOREIGNKEY(dept)REFERENCES(dept_id)

ONDELETECASCADE

Howmanyunitsofworkwillbeneededtoprocessthisstatement:

DELETEFROMdeptWHEREdept_id=1

a)0

b)1

c)2

d)3

e)4

f)6

18.Giventherequirementstostorenames,employeenumbers,andwhentheemployeeswerehired,whichofthefollowingDB2datatypesCANNOTbeusedtocontainthedaytheemployeewashired?

a)CLOB

b)TIME

c)VARCHAR

d)TIMESTAMP

19)Giventhetransaction:

"CREATETABLEt1(idINTEGER,CONSTRAINTchkidCHECK(id<100))"

"INSERTINTOt1VALUES(100)"

"COMMIT"

Whichofthefollowingresultsfromthetransaction?

a)TherowisinsertedwithaNULLvalue

b)Therowisinsertedwithavalueof100

c)Therowinsertionwithavalueof100isrejected

d)Thetriggercalledchkidisfiredtovalidatethedata

20)Ifatableisdefinedwithacheckconstraintforoneormorecolumns,whichofthefollowingwillperformthedatavalidationafterthetableisloadedwiththeloadutility.

a)Reorg

b)Check

c)Runstats

d)ImageCopy

e)SetIntegrity

21)Giventhestatement:

CREATEVIEWv1ASSELECTc1FROMt1WHEREc1='a'WITHCHECKOPTION

WhichofthefollowingSQLstatementswillinsertdataintothetable?

a)INSERTINTOv1VALUES(a)

b)INSERTINTOv1VALUES(b)

c)INSERTINTOv1VALUES('b')

d)INSERTINTOv1VALUES('a')

e)INSERTINTOv1VALUES('ab')

22)Anupdatelockgetsreleasedbyanapplicationusingtherepeatablereadisolationlevelduringwhichofthefollowing?

a)Ifthecursoraccessingtherowisclosed.

b)IfthetransactionissuesaROLLBACKstatement.

c)Ifthecursoraccessingtherowismovedtothenextrow.

d)IfthetransactionchangesaremadeviaanUPDATEstatement.

23)Whichofthefollowingisolationlevelsismostlikelytoacquireatablelevellockduringanindexscan?

a)ReadStability

b)RepeatableRead

c)CursorStability

d)UncommittedRead

24)Whichofthefollowingreleasesalockbyanapplicationusingthecursorstabilityisolationlevel?

a)Ifthecursoraccessingtherowismovedtothenextrow

b)Ifthecursoraccessingtherowisusedtoupdatetherow

c)Iftheapplication'scurrentrowisdeletedbytheapplication

d)Iftheapplication'scurrentrowneedstobeupdatedbyanotherapplic

ation

25)WhichofthefollowingprocessesisNOTperformedbyDB2WarehouseManager?

a)Query

b)Loading

c)Extraction

d)Transformation

26)WhichofthefollowingDB2

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 初中教育 > 政史地

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2