DB2 30236810Word下载.docx
《DB2 30236810Word下载.docx》由会员分享,可在线阅读,更多相关《DB2 30236810Word下载.docx(31页珍藏版)》请在冰豆网上搜索。
/LastName>
/Name>
B.<
"
MALE="
Gender"
/name>
C.<
NameGender="
Amitabh<
D.<
NameGender=FEMALE>
Jaya<
A
3.WhatisSQL/XML?
A.SQL/XMLisacommunicationprotocolforDB2databases
B.A.SQL/XMLispartoftheXQuerystandardandprovidesvariouspublishingfunctions
totransformXMLdataintorelationalformandviceversa
C.SQL/XMLisalanguagethatprovidesvariouspublishingfunctionstotransformXML
dataintorelationalformandviceversa
D.SQL/XMLisanextensiontoSQLstandardandprovidesvariouspublishingfunctionsto
transformXMLdataintorelationalformandviceversa
D
4.WhichofthefollowingisnotpartoftheXQueryFLWORexpression:
A.FORclause
B.LETclause
C.ORDERBYclause
D.WITHclause
5.ConsiderthefollowingXMLdocument:
<
customerinfo>
name>
JohnSmith<
addrcountry=“Canada"
street>
Fourth<
/street>
city>
Calgary<
/city>
prov-state>
Alberta<
/prov-state>
pcode-zip>
M1T2A9<
/pcode-zip>
/addr>
phonetype="
work"
963-289-4136<
/phone>
/customerinfo>
ConsiderthefollowingUPDATEexpression:
updatexmlcustomer
setinfo=xmlquery('
transform
copy$new:
=$i
modify(
doinsert<
cell"
777-555-3333<
after$new/customerinfo/addr,
for$jin$new/customerinfo/addr/phone
returndorename$jas"
telephone"
)
return$new'
passinginfoas"
i"
)
wherecid=1000;
WhichofthefollowingrepresentstheXMLdocumentaftertheTRANSFORMexpressionhasbeenexecuted:
A.<
<
phonetype=“cell"
telephonetype="
/telephone>
6.WhichofthefollowingisanXML-basedlanguagefortransformingXMLdocuments?
A.XHTML
B.XSLT
C.HTML
D.Java
B
7.WhichofthefollowingisNOTaSQL/XMLfunctioninDB29.7?
A.XMLQUERY
B.XMLEXISTS
C.EXISTS
D.XMLCAST
8.WhichofthefollowingXMLfragmentcorrectlyindicatestheresultofthegivenstatementbelow:
values(XMLELEMENT(name"
Name"
XMLNAMESPACES(DEFAULT'
//'
),
XMLATTRIBUTES('
MALE'
as"
XMLCONCAT(
XMLELEMENT(name"
FirstName"
'
Amitabh'
LastName"
Patel'
))))
Gender>
MALE<
/Gender>
D.Noneoftheabove
9.InDB29.7,whichofthefollowingfunctionscanbeusedtocreatetablesfromXMLdocuments?
A.XMLTABLE
B.TABLEXML
C.XML2RELATIONAL
D.XML2TABLE
10.WhichofthefollowingbestdescribesthebenefitsofsupportingXQuery’sTRANSFORMexpressioninDB2:
A.ItcanbeusedtomodifybothXMLandrelationaldata,providingacommonlanguage
fordeveloperstohandlethedatabasedata.
B.WhenusedinaUPDATEstatement,itsimplifiestheupdateofXMLdocumentsstored
inthedatabase,sinceallprocessingisdonebytheDB2engine.
C.ItisveryusefultochangeXMLnodeswhentheXMLdocumentisloadedintheclient
application.
D.ItcanbeusedtoautomaticallycleanupunnecessarytagsinaXMLdocument,
providingsmallerdocumentsthussavingspaceinthedatabase.
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)
12.WhichofthefollowingstatementsbestdescribestheXMLRegionsIndexinDB2?
A.TheRegionsIndexisadescriptorforreferencinglargeobjectsintheLOBstoragearea.
B.TheRegionsIndexisanewtypeofXMLindexavailableinDB29.7.
C.TheRegionsIndexfacilitatesaccesstodocumentregionsintheXMLdataarea.
D.TheRegionsIndexcanbecompressedbyissuinganofflinereorgoperationonthetable.
13.WhichofthefollowingisNOTavalidapproachforstoringXMLdocuments?
A.ShreddingXMLdocumentsintotablesinaRDBMS
B.StoringXMLdocumentsinCLOBcolumns
C.InsertingXMLdocumentsinanintegercolumn
D.UsinganexternalXML-onlydatabase
14.WhichoneofthefollowingisavalidXPATHexpressiontoretrieveanattributevaluewithinanXMLdocument?
A./customerinfo/name/cid
B./customerinfo/name/text(@cid)
C./customerinfo/name/data(@cid)
D./customerinfo/name/”cid”
15.WhichofthefollowingisthecorrectsyntaxforusingtheXMLTRANSFORMSQL/XMLfunction?
A.UPDATEXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,
XMLTRANSWHEREID=1andXSLID=2;
B.SELECTFROMXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,
C.SELECTINTOXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,
D.SELECTXSLTRANSFORM(XMLDOCUSINGXSLT)FROMXMLDATA,
16.WhatisSAX?
A.Aparsingmechanism,whichusesstreameventstoprocessXMLnodes.
B.Aparsingmechanism,whichusesabinarytree-basedalgorithmtoprocessXMLnodes.
C.Aparsingmechanism,whichusesacharacter-basedalgorithmtoprocessXMLnodes.
D.Aparsingmechanism,whichusesthePHPSAXinterfacetoprocessXMLnodes.
17.WhichisatruestatementaboutNamespaces?
A.NamespacesarethesameasarootnodewithinanXMLdocument.
B.NamespacesaretypesofnodeswithinXMLdocuments.
C.Namespaceshelptodistinguishbetweensameelementnamesindifferentdomains.
D.NamespaceshelptouniquelyidentifyXMLelementsbyassociatingthemtoanURL,
whichisavalidwebpage.
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”,<
XDSFIL=C1.xml/>
1001,”JaneDoe”,<
XDSFIL=C2.xml/>
1002,“MaryDavid”,<
XDSFIL=C3.xml/>
B.1000,“JohnSmithson”,"
XDSFIL=‘C1.xml'
/>
1001,”JaneDoe”,"
XDSFIL=‘C2.xml'
1002,“MaryDavid”,"
XDSFIL=‘C3.xml'
C.1000,“JohnSmith”,"
XDS=‘C1.xml'
XDS=‘C2.xml'
XDS=‘C3.xml'
D.1000,“JohnSmith”,"
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
2.WhichofthefollowingisNOTasupportedtypeoftrigger?
A.AFTER
B.BEFORE
C.DURING
D.INSTEADOF
3.Whenattemptingtoestablishaconnectiontoadatabaseresidingonyourlocalmachine,whichcommandcanhelpyoudeterminewhythefollowingmessagewasdisplayed:
SQL1013NThedatabasealiasnameordatabasename"
SAMPLE"
couldnotbefound.SQLSTATE=42705
A.listdatabasedirectory
B.listadminnodedirectory
C.listnodedirectory
D.listdcsdirectory
4.WhichofthefollowingisFALSEaboutviews?
A.Donotcontainrealdata
B.Anyviewcanbeupdated,independentofitsdefinition
C.Whenchangesaremadetodatathroughaview,thedataischangedintheunderlying
table
D.Canb