db2考试自测题1带答案选项.docx

上传人:b****9 文档编号:23361281 上传时间:2023-05-16 格式:DOCX 页数:17 大小:19.78KB
下载 相关 举报
db2考试自测题1带答案选项.docx_第1页
第1页 / 共17页
db2考试自测题1带答案选项.docx_第2页
第2页 / 共17页
db2考试自测题1带答案选项.docx_第3页
第3页 / 共17页
db2考试自测题1带答案选项.docx_第4页
第4页 / 共17页
db2考试自测题1带答案选项.docx_第5页
第5页 / 共17页
点击查看更多>>
下载资源
资源描述

db2考试自测题1带答案选项.docx

《db2考试自测题1带答案选项.docx》由会员分享,可在线阅读,更多相关《db2考试自测题1带答案选项.docx(17页珍藏版)》请在冰豆网上搜索。

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)

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)WhichofthefollowingDB2componentsallowsreferencetoOracleandDB2databasesinasinglequery?

a)DB2QueryPatroller

b)DB2WarehouseManager

c)DB2RelationalConnect

d)DB2ConnectEnterpriseEdition

27)Giventhetable:

STAFF

IDLASTNAME

1Jones

2Smith

WhenissuingthequerySE

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

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1