DB2 30236810.docx

上传人:b****6 文档编号:3786957 上传时间:2022-11-25 格式:DOCX 页数:31 大小:27.13KB
下载 相关 举报
DB2 30236810.docx_第1页
第1页 / 共31页
DB2 30236810.docx_第2页
第2页 / 共31页
DB2 30236810.docx_第3页
第3页 / 共31页
DB2 30236810.docx_第4页
第4页 / 共31页
DB2 30236810.docx_第5页
第5页 / 共31页
点击查看更多>>
下载资源
资源描述

DB2 30236810.docx

《DB2 30236810.docx》由会员分享,可在线阅读,更多相关《DB2 30236810.docx(31页珍藏版)》请在冰豆网上搜索。

DB2 30236810.docx

DB230236810

pureXML

1.Whichofthefollowingistrueaboutawell-formedXMLdocument?

A.Hasoneormorerootnodes

B.Tagscanhaveatmostoneattribute

C.Alwayshasasingledocumentnode

D.Endtagsareoptional

Answer:

C

 

2.Whichofthefollowingisawell-formedXMLdocument?

A.

//"Gender="MALE">

Amitabh

Patel

B.

Amitabh

Patel

C.

AmitabhPatel

D.

Jaya

Patel

Answer:

A

 

3.WhatisSQL/XML?

A.SQL/XMLisacommunicationprotocolforDB2databases

B.A.SQL/XMLispartoftheXQuerystandardandprovidesvariouspublishingfunctions

totransformXMLdataintorelationalformandviceversa

C.SQL/XMLisalanguagethatprovidesvariouspublishingfunctionstotransformXML

dataintorelationalformandviceversa

D.SQL/XMLisanextensiontoSQLstandardandprovidesvariouspublishingfunctionsto

transformXMLdataintorelationalformandviceversa

Answer:

D

 

4.WhichofthefollowingisnotpartoftheXQueryFLWORexpression:

A.FORclause

B.LETclause

C.ORDERBYclause

D.WITHclause

Answer:

D

5.ConsiderthefollowingXMLdocument:

JohnSmith

Fourth

Calgary

Alberta

M1T2A9

963-289-4136

ConsiderthefollowingUPDATEexpression:

updatexmlcustomer

setinfo=xmlquery('transform

copy$new:

=$i

modify(

doinsert777-555-3333after$new/customerinfo/addr,

for$jin$new/customerinfo/addr/phone

returndorename$jas"telephone"

return$new'passinginfoas"i")

wherecid=1000;

WhichofthefollowingrepresentstheXMLdocumentaftertheTRANSFORMexpressionhasbeenexecuted:

A.

JohnSmith

Fourth

Calgary

Alberta

M1T2A9

777-555-3333

963-289-4136

B.

JohnSmith

Fourth

Calgary

Alberta

M1T2A9

777-555-3333

963-289-4136

C.

JohnSmith

Fourth

Calgary

Alberta

M1T2A9

777-555-3333

963-289-4136

D.

JohnSmith

Fourth

Calgary

Alberta

M1T2A9

777-555-3333

963-289-4136

Answer:

A

 

6.WhichofthefollowingisanXML-basedlanguagefortransformingXMLdocuments?

A.XHTML

B.XSLT

C.HTML

D.Java

Answer:

B

 

7.WhichofthefollowingisNOTaSQL/XMLfunctioninDB29.7?

A.XMLQUERY

B.XMLEXISTS

C.EXISTS

D.XMLCAST

Answer:

C

 

8.WhichofthefollowingXMLfragmentcorrectlyindicatestheresultofthegivenstatementbelow:

values(XMLELEMENT(name"Name",

XMLNAMESPACES(DEFAULT'htpp:

//'),

XMLATTRIBUTES('MALE'as"Gender"),

XMLCONCAT(

XMLELEMENT(name"FirstName",'Amitabh'),

XMLELEMENT(name"LastName",'Patel'))))

A.

//"Gender="MALE">

Amitabh

Patel

B.

//">

MALE

Amitabh

Patel

C.

AmitabhPatel

D.Noneoftheabove

Answer:

B

 

9.InDB29.7,whichofthefollowingfunctionscanbeusedtocreatetablesfromXMLdocuments?

A.XMLTABLE

B.TABLEXML

C.XML2RELATIONAL

D.XML2TABLE

Answer:

A

 

10.WhichofthefollowingbestdescribesthebenefitsofsupportingXQuery’sTRANSFORMexpressioninDB2:

A.ItcanbeusedtomodifybothXMLandrelationaldata,providingacommonlanguage

fordeveloperstohandlethedatabasedata.

B.WhenusedinaUPDATEstatement,itsimplifiestheupdateofXMLdocumentsstored

inthedatabase,sinceallprocessingisdonebytheDB2engine.

C.ItisveryusefultochangeXMLnodeswhentheXMLdocumentisloadedintheclient

application.

D.ItcanbeusedtoautomaticallycleanupunnecessarytagsinaXMLdocument,

providingsmallerdocumentsthussavingspaceinthedatabase.

Answer:

B

 

11.WhichoneofthefollowingSQLstatementswillinlineXMLdocumentssmallerthan1000bytes,storedwithintheEMPINFOcolumn?

A.CREATETABLEEMPLOYEES(empidchar(8),empinfoXMLinlinelength(1024))

B.ALTERTABLEEMPLOYEESALTERCOLUMNempinfoSETINLINELENGTH

1000

C.CREATETABLEEMPLOYEES(empidchar(8),empinfoXML)SETINLINING

(1000)

D.CREATETABLEEMPLOYEES(empidchar(8),empinfoXMLDEFAULTINLINE

1000)

Answer:

B

12.WhichofthefollowingstatementsbestdescribestheXMLRegionsIndexinDB2?

A.TheRegionsIndexisadescriptorforreferencinglargeobjectsintheLOBstoragearea.

B.TheRegionsIndexisanewtypeofXMLindexavailableinDB29.7.

C.TheRegionsIndexfacilitatesaccesstodocumentregionsintheXMLdataarea.

D.TheRegionsIndexcanbecompressedbyissuinganofflinereorgoperationonthetable.

Answer:

C

13.WhichofthefollowingisNOTavalidapproachforstoringXMLdocuments?

A.ShreddingXMLdocumentsintotablesinaRDBMS

B.StoringXMLdocumentsinCLOBcolumns

C.InsertingXMLdocumentsinanintegercolumn

D.UsinganexternalXML-onlydatabase

Answer:

C

14.WhichoneofthefollowingisavalidXPATHexpressiontoretrieveanattributevaluewithinanXMLdocument?

A./customerinfo/name/cid

B./customerinfo/name/text(@cid)

C./customerinfo/name/data(@cid)

D./customerinfo/name/”cid”

Answer:

C

15.WhichofthefollowingisthecorrectsyntaxforusingtheXMLTRANSFORMSQL/XMLfunction?

A.UPDATEXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,

XMLTRANSWHEREID=1andXSLID=2;

B.SELECTFROMXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,

XMLTRANSWHEREID=1andXSLID=2;

C.SELECTINTOXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,

XMLTRANSWHEREID=1andXSLID=2;

D.SELECTXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,

XMLTRANSWHEREID=1andXSLID=2;

Answer:

D

16.WhatisSAX?

A.Aparsingmechanism,whichusesstreameventstoprocessXMLnodes.

B.Aparsingmechanism,whichusesabinarytree-basedalgorithmtoprocessXMLnodes.

C.Aparsingmechanism,whichusesacharacter-basedalgorithmtoprocessXMLnodes.

D.Aparsingmechanism,whichusesthePHPSAXinterfacetoprocessXMLnodes.

Answer:

A

17.WhichisatruestatementaboutNamespaces?

A.NamespacesarethesameasarootnodewithinanXMLdocument.

B.NamespacesaretypesofnodeswithinXMLdocuments.

C.Namespaceshelptodistinguishbetweensameelementnamesindifferentdomains.

D.NamespaceshelptouniquelyidentifyXMLelementsbyassociatingthemtoanURL,

whichisavalidwebpage.

Answer:

C

18.ConsiderthefollowingIMPORTstatement:

IMPORTFROM/data/dept.delofDEL

XMLFROM/data/xmlfiles

INSERTINTOdept

Thetabledeptcontainsthreecolumns:

CID(INTEGER),NAME(VARCHAR(10)),INFO(XML).Whichofthefollowing/data/dept.delimportfileswillbeacceptedbyDB2:

A.1000,“JohnSmith”,

1001,”JaneDoe”,

1002,“MaryDavid”,

B.1000,“JohnSmithson”,""

1001,”JaneDoe”,""

1002,“MaryDavid”,""

C.1000,“JohnSmith”,""

1001,”JaneDoe”,""

1002,“MaryDavid”,""

D.1000,“JohnSmith”,""

1001,”JaneDoe”,""

1002,“MaryDavid”,""

Answer:

D

WorkingwithDatabaseObjects

1.Considerthefollowingscenario.Youhave3tableswiththesamename(TABLE_1)under3differentschemas(SYSIBM,DEFAULTandDB2INST1).YouareconnectedtoaDB2databaseinyourLinuxserverasdb2inst1andissuethefollowingstatement:

SELECT*FROMtable_1

Whichtablewillyoubeselectingdatafrom:

A.Yougetanerrorbecauseyourqueryisambiguous,asthetableschemaisnotspecified

B.SYSIBM.table_1

C.DEFAULT.table_1

D.DB2INST1.table_1

Answer:

D

 

2.WhichofthefollowingisNOTasupportedtypeoftrigger?

A.AFTER

B.BEFORE

C.DURING

D.INSTEADOF

Answer:

C

3.Whenattemptingtoestablishaconnectiontoadatabaseresidingonyourlocalmachine,whichcommandcanhelpyoudeterminewhythefollowingmessagewasdisplayed:

SQL1013NThedatabasealiasnameordatabasename"SAMPLE"couldnotbefound.SQLSTATE=42705

A.listdatabasedirectory

B.listadminnodedirectory

C.listnodedirectory

D.listdcsdirectory

Answer:

A

4.WhichofthefollowingisFALSEaboutviews?

A.Donotcontainrealdata

B.Anyviewcanbeupdated,independentofitsdefinition

C.Whenchangesaremadetodatathroughaview,thedataischangedintheunderlying

table

D.Canb

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

当前位置:首页 > 考试认证 > IT认证

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

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