SQLServer2000andXMLErikVeermanConsultantIntellinetBusinessIntelligenceObjectivesGiveanoverviewonthenewXMLcapabilitiesinSQLServer2000DemonstrateratherthanpresentProvidebaseknowledgefor…XMLarchitecturedecisionsResearchstartingpointsProsandconsofparallelXMLtechnologyimplementationsDatainteractionleveragingSQL'sXMLcapabilitiesAgendaTheabilitytoretrieveandwriteXMLdata:RetrieveXMLdatausingtheSELECTstatementandtheFORXMLclause.
WriteXMLdatausingOPENXMLrowsetprovider.
TheabilitytoaccessSQLServerusingHTTP.
IISConfigurationTemplateQueriesXSLStylesheetsAgendaSupportforXDRschemas/XMLViewsXPathqueriesagainsttheseschemas.
XMLforSQLWebReleaseBulkLoadUpdategramADOprogrammingmethods(ChrisHagen)XMLinuse(ChrisHagen)Agenda:SQLServer2000XMLSELECTHowhasSQLServerextendedtheSELECTparadigmtosupportXMLSELECTStatementSyntax:SELECT………FORXML{RAW|AUTO|EXPLICIT}[,XMLDATA][,ELEMENTS][,BINARYBase64]SimpleXMLQuery:SELECToh.
CustomerID,oh.
OrderId,od.
ProductID,od.
UnitPrice,od.
QuantityFROMOrdersohINNERJOIN[OrderDetails]odONoh.
orderid=od.
orderidFORXML{RAW|AUTO}FORXMLRAWFormatTakesthequeryresultandtransformseachrowintheresultsetintoanXMLelementwithagenericidentifierastheelementtag.
FORXMLAUTOFormatReturnsqueryresultsinasimple,nestedXMLtree.
EachtableintheFROMclauseforwhichatleastonecolumnislistedintheSELECTclauseisrepresentedasanXMLelement.
ThecolumnslistedintheSELECTclausearemappedtotheappropriateelementattributes.
FORXMLEXPLICITFormatBasedontheconceptofaUniversalTablecontainingalltheinformationabouttheresultingXMLtree.
ContainsTagandParentmeta-dataTag:TagnumberofcurrentelementParent:TagnumberofparentelementColumnnamesareXMLGenericidentifiers.
Identifier!
TagNumber!
AttributeNameEXPLICITSampleQuerySELECT1ASTag,NULLASParent,oh.
CustomerID[Order!
1!
CustomerID],oh.
OrderId[Order!
1!
OrderId],NULL[OrderDetail!
2!
ProductId],NULL[OrderDetail!
2!
UnitPrice],NULL[OrderDetail!
2!
Quantity]FROMOrdersohWHEREoh.
CustomerId='ANTON'UNIONALLSELECT2,1,oh.
CustomerID,oh.
OrderId,od.
ProductID,od.
UnitPrice,od.
QuantityFROMOrdersohINNERJOIN[OrderDetails]odONoh.
orderid=od.
orderidWHERECustomerId='ANTON'ORDERBY[Order!
1!
CustomerID],[Order!
1!
OrderId],[OrderDetail!
2!
ProductId]FORXMLEXPLICITSELECTXMLFormatsDEMOAgenda:SQLServer2000OpenXMLAllowsonetoparseandutilizeanXMLdocumentOpenXMLProcessInputanXMLdocumentProcessaninternalrepresentationexecsp_xml_preparedocumentParsetheXMLdocumentOpenXMLRowsetfunctionRemoveinternalrepresentationfrommemoryEXECsp_xml_removedocumentOpenXMLProcessOpenXMLSyntaxOPENXML(idocint[in],rowpatternnvarchar[in],[flagsbyte[in]])[WITH(SchemaDeclaration|TableName)]OpenXMLProcessDEMOAgenda:SQLServer2000IISIntegrationHowdoesoneuseIISforretrievingXMLdata.
UsingIIS,theprocess.
ConfigureanIISVirtualRootDefinetemplatequeriesDefinestylesheetsMakeHTTPrequestConfigureanIISVirtualRootDEMOHTTPAccesstoDataURLQueryhttp://sqlserver/vrootparametersParametersSql=SELECT+*+FROM+Sku+FOR+XML+RAWEncoding=UTF-8Root=rootHTTPAccesstoDataDirectQueryGoodforasingleselectofasinglecolumnValueisreturnedinnativeformat,notXMLEnablesdirectretrievalofobjectslikeimages,OLEobjects,etc.
http://sqlserver/vroot/dbobject/xpathWhatareTemplateQueriesTheseareXMLdocumentsthatdefinequeriesCanbebounddirectlytoStyleSheetsCalledbyreferencingtheXMLdocumentintheURLWhatareTemplateQueriesTemplatehttp://sqlserver/vroot/vnameparamsVnameisacompletepathtothetemplateXMLfileParametersmaybexsl,encoding,orcontenttype;oruserdefined.
ProvidesaneasywaytoperformcomplexquerieswithlittlenetworktrafficWhyuseTemplateQueriesCanusedynamicSQLbutnorestrictionsonwhatisexecutedAutomaticformattingoftheXMLheaderinformationTemplatessimplifytheHTTPrequestTemplateshavebettersupportparametersDefineandUseStyleSheetsCanbeaddedtotheURLXSL=stylesheet.
xslContentType=text/htmlCanbedefinedintheTemplateWhatdoesatemplatequerylooklikeandhowisitrunDEMOAgenda:XMLXDRSchemaXMLViews|UpdategramMappingrelationaldatathroughanXMLschemaWhatisanXMLViewDefinesanXML-formattedviewonthedatabaseAnnotationsspecifytheXMLtorelationaldatabasemappingforcolumnvaluesandrelationshipsUsesXpathtoquerytheXMLViewHowtouseXMLViewshttp://server/vroot/vname/xpathparametersVnameisadirectreferencetotheschemafileXpathisthexpathqueryParametersmaybexsl,encoding,contenttype,oruserdefinedHowdoIselectdatafromanXMLViewDEMOXMLforSQLWebReleaseXMLforSQLWebRelease1UpdateGramsBulkLoadXMLsupportXMLforSQLWebRelease2(July2001)XMLViewswithXSDSupportforDiffGramsClientSideXMLformattingUpdategramSchemamapping,UpdategramsyntaxInserts,Updates,DeletesUsingandblocksPassingParametersWritingDatawithUpdateGramsUpdategrams(example)MiscellaneousDataRetreival:OLAPdatasp_makewebsqlDEMOAgenda:ADOProgrammingMethodsforSQLServer2000XMLHowdoesonewritecomponentsutilizingthenewSELECTFORXMLandIISUtilizeADOFunctionalityCallsmadethroughADOCommandUsesADOStreamObjectRequiresADO2.
6StreamObjectdefinedasapropertyoftheCommandObjectXMLDataplacedintheStreamObjectObtainedusingReadTextADOsupportsXMLRecordsetscanbepersistedtoXMLFileStreamObjectDOMIntegrationIIS5ResponseObjectAlsosupportforADTGAdvancedDataTableGramformatSupportHierarchicalRecordsetsADOXMLStreamSupportCanpersistdirectlytoanADOStreamObjectXMLextractedusingStreamReadTextXMLdatacanthenbeutilizedinmemoryPassXMLbacktoclientTransformtoHTMLusingXSLADOandDOMIntegrationCanpersistXMLdirectlyintotheXMLDOMDocumentRecordset.
SaveMSXML.
DOMDocument,adPersistXMLCanperformdirectXSLtransformforHTMLbasedcomponentsADOandIIS5ResponseResponseObjectexposesandIStreamInterfaceRecordset.
SaveResponse,adPersistXMLDisplaysXMLinbrowserAvoidsexpensivediskoperationsADOXMLProgrammingDEMOForfurtherInformationXMLwebsitehttp://msdn.
microsoft.
com/xmlSQLServer2000andIIShttp://msdn.
microsoft.
com/msdnmag/issues/0300/sql/sql.
aspSQLServer2000http://www.
microsoft.
com/sqlADOhttp://www.
microsoft.
com/adoFeedback/Questions
RAKsmart 商家这几年还是在做事情的,虽然他们家顺带做的VPS主机并不是主营业务,毕竟当下的基础云服务器竞争过于激烈,他们家主营业务的独立服务器。包括在去年开始有新增多个数据中心独立服务器,包括有10G带宽的不限流量的独立服务器。当然,如果有需要便宜VPS主机的他们家也是有的,比如有最低月付1.99美元的美国VPS主机,而且可选安装Windows系统。这里商家有提供下面六款六月份的活动便宜V...
raksmart作为一家老牌美国机房总是被很多人问到raksmart香港服务器怎么样、raksmart好不好?其实,这也好理解。香港服务器离大陆最近、理论上是不需要备案的服务器里面速度最快的,被过多关注也就在情理之中了。本着为大家趟雷就是本站的光荣这一理念,拿了一台raksmart的香港独立服务器,简单做个测评,分享下实测的数据,仅供参考!官方网站:https://www.raksmart.com...
物语云计算(MonogatariCloud)是一家成立于2016年的老牌国人商家,主营国内游戏高防独服业务,拥有多家机房资源,产品质量过硬,颇有一定口碑。本次带来的是美国圣何塞 Equinix 机房的高性能I9-10980XE大带宽VPS,去程CN2GIA回程AS9929,美国原生IP,支持解锁奈飞等应用,支持免费安装Windows系统。值得注意的是,物语云采用的虚拟化技术为Hyper-V,资源全...
sqlserver2000挂起为你推荐
重庆网络公司一九互联重庆本地的网约车平台有哪些?如何识别比较正规的网约车平台?asp.net什么是asp.net重庆400年老树穿楼生长重庆轻轨穿过居民楼在哪里,从解放碑怎么去internetexplorer无法打开Internet Explorer 无法打开?申请支付宝账户如何申请支付宝账户邮件eset密码cuteftp闪拍网闪拍网之类的网站怎么回事?青岛网通测速网通,联通,长城这三个宽带哪个网速最快?我是青岛的300051三五互联170号段和三五互联什么关系
免费域名 南通服务器租用 最新代理服务器ip 中文域名交易中心 服务器配置技术网 独享100m 国外主机 便宜域名 哈喽图床 京东商城双十一活动 宁波服务器 老左正传 泉州电信 vip购优惠 能外链的相册 广州虚拟主机 lamp什么意思 注册阿里云邮箱 阿里云邮箱登陆 中国联通宽带测速 更多