




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
DB2ViperTechnology
PureXMLIntegrationWorldwideInformationManagementTechnicalPresalesDisclaimer/TrademarksInformationconcerningnon-IBMproductswasobtainedfromthesuppliersofthoseproducts,theirpublishedannouncements,orotherpubliclyavailablesources.IBMhasnottestedthoseproductsandcannotconfirmtheaccuracyofperformance,compatibility,oranyotherclaimsrelatedtonon-IBMproducts.Questionsonthecapabilitiesofnon-IBMproductsshouldbeaddressedtothesuppliersofthoseproducts.AllstatementsregardingIBM'sfuturedirectionorintentaresubjecttochangeorwithdrawalwithoutnotice,andrepresentgoalsandobjectivesonly.Thisinformationmaycontainexamplesofdataandreportsusedindailybusinessoperations.Toillustratethemascompletelyaspossible,theexamplesincludethenamesofindividuals,companies,brands,andproducts.Allofthesenamesarefictitious,andanysimilaritytothenamesandaddressesusedbyanactualbusinessenterpriseisentirelycoincidental.TrademarksThefollowingtermsaretrademarksorregisteredtrademarksofothercompaniesandhavebeenusedinatleastoneofthepagesofthepresentation:ThefollowingtermsaretrademarksofInternationalBusinessMachinesCorporationintheUnitedStates,othercountries,orboth:AIX,AS/400,DataJoiner,DataPropagator,DB2,DB2Connect,DB2Extenders,DB2OLAPServer,DB2UniversalDatabase,DistributedRelationalDatabaseArchitecture,DRDA,eServer,IBM,IMS,iSeries,MVS,Net.Data,OS/390,OS/400,PowerPC,pSeries,RS/6000,SQL/400,SQL/DS,Tivoli,VisualAge,VM/ESA,VSE/ESA,WebSphere,z/OS,zSeriesMicrosoft,Windows,WindowsNT,andtheWindowslogoaretrademarksofMicrosoftCorporationintheUnitedStates,othercountries,orboth.
IntelandPentiumaretrademarksofIntelCorporationintheUnitedStates,othercountries,orboth.
UNIXisaregisteredtrademarkofTheOpenGroupintheUnitedStatesandothercountries.
JavaandallJava-basedtrademarksaretrademarksofSunMicrosystems,IheUnitedStates,othercountries,orboth.
Othercompany,product,orservicenamesmaybetrademarksorservicemarksofothers.PureXMLinDB2Standardscompliant+drivingthestandardsXML,XQuery,SQL/XML,XMLSchema…100%integratedinDB2leveragingperformance,scalability,reliability,availability…100%integratedwithSQLXMLisanewSQLtypeAccessrelationalandXMLdatainsamestatement100%integratedwithapplicationAPIs:JDBC,ODBC,.NET,embeddedSQL,PHP PureXMLinDB2FlexibilitybecausethatiswhatXMLisallabout..Anydocument,Anyschema,NotjusttheonesthataremappedtorelationaltablesXMLstorage:severaloptions:Native:XMLisparsedandstoredhierarchical.Shredded:usingannotatedSchemaBLOBSophisticatedXMLindexing"XANDORjoin"toevaluatemanypredicatesconcurrentlyBroadXQuerysupportBothembeddedinSQLandasaprimarylanguageSupportsDigitalSignaturesSignaturescanbevalidatedonretrieveddocumentsIntegrationofXML&RelationalCapabilitiesApplicationscombineXML&relationaldataNativeXMLdatatype(server&clientside)XMLCapabilitiesinallDB2componentsDB2SERVERCLIENTSQL/XMLXQueryDB2EngineXMLInterfaceRelationalInterfaceRelationalXMLDB2Storage:DB2Client/CustomerClientApplicationNativeXMLStorageDB2storesXMLinparsedhierarchicalformat(~DOM)
createtabledept(deptIDchar(8),…,deptdocxml);Relationalcolumns
arestoredinrelational
format(tables)XMLcolumnsare
storednatively
NoXMLparsing
forqueryevaluation!deptID…deptdoc"PR27"…<dept>…<emp>…</emp></dept>………DB2Storage<dept><employeeid=901><name>JohnDoe</name><phone>4085551212</phone><office>344</office></employee><employeeid=902><name>PeterPan</name><phone>4085559918</phone><office>216</office></employee></dept>Parsedeptnameemployeephoneid=901JohnDoeoffice408-555-1212344nameemployeephoneid=902PeterPanoffice408-555-9918216XMLtextrepresented
asdocumenttreeTheDocumentTreeEfficientDocumentTreeStoragedeptnameemployeephoneid=901JohnDoeoffice408-555-1212344nameemployeephoneid=902PeterPanoffice408-555-991821601425=901JohnDoe3408-555-12123441425=902PeterPan3408-555-99182160dept4employee1name5id2phone3officeStringtableSYSIBM.SYSXMLSTRINGSReducedstorageFastcomparisons&navigation"Compression"Tagnamesencoded
asuniqueintegersHowtouseXMLinDB2?createtableT(iint,docxml)insertintoTvalues(22,?)selecti,docfromT
StorageDocumentisstoredinparsedrepresentationIBM’sversionofopen-sourceXercesisused.TheXQueryDataModelispersistedAlldataisstoredinUTF-8RegardlessofthedocumentencodingRegardlessofthelocaleRegardlessofthecodepageofthedatabaseAllXMLnodesaretypeannotated,accordingtotheXQueryspecXMLSchematypesifvalidatedDefaulttypesotherwise.OnenodeinthetreeCanbeelement,attribute,text…Contains:Name,namespace,namespaceprefix(stringIDs)Typeannotation(pathID)"pointer"toparentListof"pointerstochildren"Possiblyinlinedvalues(attribute/textvalues)XMLNodeStorageLayoutNodehierarchyofanXMLdocstoredonDB2pagesDocumentsthatdon’tfiton1page:splitintopages/regionsExample:Documentsplitinto3regions,storedon3pagesXMLStorage:"RegionsIndex"NodesarephysicallyconnectedRegionsarelogicallyconnectedKeyinRegionsindexisNIDE.g.Nid=pagepagepageRegionsindexnotuserdefined,defaultcomponentofXMLstorageConcurrencyControlAlltheSQLisolationlevelsaresupportedConcurrencycontrolperrow(asinSQL)Underthecover:DocumentsareversionedbecauseXQueryreferencesemanticsNeedtoavoidcopyingNeedtoseeconsistentdocumentsRegionsindexisusedtolocateversionsofdocsVersionsthatarenotneededanymorearereclaimedTransparentlymanagedbythesystemUseronlyseesSQLisolationlevelsXMLIndexesforHighQueryPerformanceDefine0,1ormultipleXMLValueIndexesperXMLcolumnXMLindexmaps:(pathID,value)(nodeID,rowID)Indexanyelementsorattributes,incl.mixedcontentIndexdefinitionusesanXMLpatterntospecifywhichelements/attributestoindex(andwhichnotto)Canindexallelements/attributes,
butnotforcedtodosoCanindexrepeatingelements
0,1ormultipleindexentriesperdocumentNewXML-specificjoinandqueryevaluationmethods,evaluatemultiplepredicatesconcurrentlywithminimalindexI/Oxmlpattern=XPath
withoutpredicates,
onlychildaxis(/)and
descendent-or-selfaxis(//)
XMLValuesIndexCREATEINDEXChangesUsesexistingCREATEINDEXstatementmodifiedforXMLsupportCompositekeysconsistingofmultiplecolumnswithdifferentdatatypesarenotsupportedUsesanXMLpatternexpressiontoindexpathsandvaluesinXMLdocumentsstoredinasingleXMLcolumnOnlyindexesdocumentnodesthatsatisfytheXMLpatternexpressionXMLindexspecificationGENERATEKEYUSINGXMLPATTERNkeywordsXMLpatternexpressionOptionalnamespacedeclarationDatatypeCreateindexAgeUnitIndexont1(XMLDoc)generatekeysusingxmlpattern'/Person/Age/@unit'assqlvarchar(16);ASSQLVARCHAR(integer)CREATEindex-nameONtable-name(xml-column-name)GENERATEKEYUSINGXMLPATTERNxmlpatternUNIQUEtext()@attribute-tag@*///element-tag*///INDEXDOUBLEDATETIMESTAMPVARCHAR(HASHED)xmlpattern:xmlpattern
=XPath
withoutpredicates,
onlychildaxis(/)and
descendent-or-selfaxis(//)
CreateXMLIndexcreateindexxmlindex1ondept(deptdoc) generatekeyusingxmlpattern‘/dept/name’asvarchar(30);Declaration&useofnamespaceprefixsupported(notshownabove)XMLIndexing:Examplescreatetabledept(deptIDchar(8)primarykey,deptdoc
xml);
createuniqueindexidx1ondept(deptdoc)generatekeyusingxmlpattern'/dept/@bldg'assqldouble;createuniqueindexidx2ondept(deptdoc)generatekeyusingxmlpattern'/dept/employee/@id'assqldouble;createindexidx3ondept(deptdoc)generatekeyusingxmlpattern'/dept/employee/name'assqlvarchar(35);…xmlpattern'//name'assqlvarchar(35); (IndexonALL"name"elements)…xmlpattern'//@*'assqldouble; (IndexonALLnumericattributes)…xmlpattern'//text()‘assql
varchar(hashed); (IndexonALLtextnodes,hashcode)…xmlpattern‘/dept//name'assqlvarchar(35);…xmlpattern'/dept/employee//text()'assqlvarchar(128);(Alltextnodesunderemployee)<deptbldg=101><employeeid=901><name>JohnDoe</name><phone>4085551212</phone><office>344</office></employee><employeeid=902><name>PeterPan</name><phone>4085559918</phone><office>216</office></employee></dept>XMLFullTextSearchDB2NetSearchExtenderenhancedforXMLFullXML-awareindexofentiredocCreateindexmyIndexfortext
onmyTable(xmlcol);CanalsoindexpartialdocumentsSimpleusageselectxmlcolfrommyTablewhere
contains(xmlcol,‘sections("/book/section")"Brazil"')=1ComplexsearchcriteriaalsosupportedManagementisintegratedintheDB2ControlCenterImportingDataSimilartoIMPORTofLobs1)Filewithsqldata2)DirectorywhichcontainsXMLdatafiles1000,"<XDSFIL='C1.xml'/>"1001,"<XDSFIL='C2.xml'/>"1002,"<XDSFIL='C3.xml'/>"1003,"<XDSFIL='C4.xml'/>"1004,"<XDSFIL='C5.xml'/>"SampleInputoffileforimportingtoCUSTOMERXMLtableCIDINFOValueofCIDPointertoassociatedXMLDocumentFileName:s:\shared\IBM\data\import_customer.delImportCommandimportfroms:\shared\IBM\data\import_customer.delofdel
XMLfroms:\shared\IBM\data\customerdocs
ModifiedbyXMLCHAR
replaceintoXMLCUSTOMERFileToInputTheDirectorythatincludestheXMLFilesarethatarereferencedintheinputfileImportFlow1000,"<XDSFIL='C1.xml'/>"1001,"<XDSFIL='C2.xml'/>"1002,"<XDSFIL='C3.xml'/>"1003,"<XDSFIL='C4.xml'/>"1004,"<XDSFIL='C5.xml'/>"importfroms:\shared\IBM\data\import_customer.delofdel
XMLfroms:\shared\IBM\data\customerdocs
ModifiedbyXMLCHAR
replaceintoXMLCUSTOMERs:\shared\IBM\data\import_customer.dels:\shared\IBM\data\customerdocs\C1.xmls:\shared\IBM\data\customerdocs\C2.xmls:\shared\IBM\data\customerdocs\C3.xmls:\shared\IBM\data\customerdocs\C4.xmls:\shared\IBM\data\customerdocs\C5.xmlTable:XMLCustomer1000<?xmlversion="1.0"encoding="UTF-8"?><customerinfo><name>AmirMalik</name><addrcountry="UnitedStates"><street>555BaileyAve</street><city>SanJose</city><prov-state>California</prov-state><pcode-zip>95141</pcode-zip></addr><phonetype="work">408-555-1358</phone></customerinfo>1001<?xmlversion="1.0"encoding="UTF-8"?><customerinfo><name>KathySmith</name>…1002<?xmlversion="1.0"encoding="UTF-8"?><customerinfo><name>JimNoodle….1003<?xmlversion="1.0"encoding="UTF-8"?><customerinfo><na…1004<?xmlversion="1.0"encoding="UTF-8"?><customerinfo><name>BertandErnieInc………….XMLSchemaRepository(XSR)DatabaseneedsaSchemarepository:Stable&highperformanceaccesstoSchemasforvalidationatXMLinsert/updatetimeSupportforXMLSchemamanagementXSRXMLSchemasareregistered:Consistentsetof.xsddocumentAlsoDTDsandExternalentitiesUsedforentityreferenceresolutionanddefaultsNOTusedforvalidationRegisteredSchemaidentification:ASQL2-partnameTheURLtheSchemaisexternallyknownas(e.g.usedinschemaLocationattributes)The"primarynamespace"AlsousedbyShredStoresannotatedSchemaInternalformatstomakeShreddingefficient.Implementation:AlldataisstoredintheDB2CatalogBinaryrepresentationoftheSchemaforfastvalidationSchemaRegistrationSchemaRegistrationREGISTERXMLSCHEMA 'http://myPOschema/PO'FROM 'file://c:/TEMP/PO.xsd'AS user1.POschemaADDXMLSCHEMADOCUMENTTOuser1.POschemaADD'http://myPOschema/address'FROM'file://c:/TEMP/address.xsd'
COMPLETEXMLSCHEMA
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 内蒙古包头市百灵庙中学2024-2025学年高三下学期月考二英语试题含解析
- 山东省海阳市美宝校2025届初三下第二次测试(化学试题文)试题含解析
- 咸阳师范学院《自然资源管理》2023-2024学年第二学期期末试卷
- 江苏省宜兴市实验中学2024-2025学年中考数学试题一轮复习模拟试题含解析
- 山西省朔州市右玉二中学、三中学联考2025年初三下学期五调考试生物试题含解析
- 江西管理职业学院《电子政务导论》2023-2024学年第二学期期末试卷
- 上海旅游高等专科学校《室内空间色彩设计》2023-2024学年第二学期期末试卷
- 新疆科信职业技术学院《信号分析与处理基础》2023-2024学年第二学期期末试卷
- 山东省临朐县重点名校2024-2025学年初三第二学期期末质量检测试题化学试题试卷含解析
- 二零二五评估合作协议
- GB/T 5530-2005动植物油脂酸值和酸度测定
- 《职业病防治法》宣传周职业健康防护知识培训
- 二次消防改造工程合同协议书范本
- 某智慧城市政务云平台项目建设方案
- 德勤业务管理流程优化咨询报告课件
- 深静脉导管维护流程
- 班级管理(第3版)教学课件汇总全套电子教案(完整版)
- TCVN-2622-越南建筑防火规范(中文版)
- 不负韶华只争朝夕-一模考试反思 课件-2021-2022学年高中主题班会(共17张PPT)
- DB13(J)∕T 256-2018 农村气代煤工程技术规程
- 金属非金属矿山从业人员安全生产培训教材课件(PPT 75页)
评论
0/150
提交评论