SQL Server 2000 XML Upgrades Dwindle Ty MCDBA, MCSE, MCP SB Innovation Authority Microsoft Hong Kong Ltd. peterty@micros.


61 views
Uploaded on:
Description
SQL Server 2000 joining with different devices through XML ... Utilize any database distributed strategy in SQL Server 2000. When the Document Is Initialized, ...
Transcripts
Slide 1

SQL Server 2000 XML Enhancements Peter Ty MCDBA, MCSE, MCP+SB Technology Specialist Microsoft Hong Kong Ltd. peterty@microsoft.com

Slide 2

What You Will See Today XML Support in Microsoft SQL Server 2000 XML/XSLT essentials Available elements Development systems used to exploit these components SQL Server 2000 incorporation with different apparatuses through XML

Slide 3

Session Prerequisites XML Basics Transact-SQL (T-SQL) Language Microsoft Visual Basic Language (Basics) Microsoft Visual Basic Development Environment SQL Server Tools

Slide 4

Agenda XML Overview XML in SQL Server 2000 Database Publishing OpenXML Rowsets SQL Server 2000 XML Solutions BizTalk Server 2000 Integration

Slide 5

XML Overview Origin of XML SGML Originated as a Markup Language for Documents Many different dialects get from it XML, HTML, and so on. The Main Goal Is to Unify the Data and Document Transport Format XML is a W3C standard

Slide 6

SGML XML HTML CSS XSLT XML Overview Origin of XML Originated as a Standard Language for Data Representation

Slide 7

XML Overview XML Basics XML Structures the Content In HTML: <p> Jan 15, 2000 </p> In XML: <OrderDate> Jan 15, 2000 <OrderDate> XML Does Not Display or Transform Data XML isolates information from organizing and changing HTML and XML are gotten from SGML

Slide 8

XML Overview XML Syntax XML Is Composed of Tags and Attributes Tags can be settled Representing elements, substance properties, and element chain of importance <ROOT> <Orders OrderID="10643" CustomerID="ALFKI" EmployeeID="6" OrderDate="1997-08-25T00:00:00" RequiredDate="1997-09-22T00:00:00" ShippedDate="1997-09-02T00:00:00"/> </ROOT>

Slide 9

Document Elements } Attributes Text ... Content Text XML Overview Node Structure of XML Documents XML Is Parsed into a Tree Structure Nodes of the tree contain the information

Slide 10

Namespace uri="… " root Comment client list client id 345 120 name arranges first last request date Jane Doe 07/16/98 07/23/98 XML Overview Node Structure of XML Documents Parsing XML into Nodes

Slide 11

XML Overview XML Basics Use XSLT to Display and Transform Data For instance, XSLT can advise Internet Explorer how to design every tag and in the long run how to change it <?xml-template type="text/xsl" href="t12.xsl"?>

Slide 12

XML Overview XSLT Basics XSLT Rules Are Applied toward the End of the Process Once the XML Document Is Parsed and the DOM Is Instantiated with Document Data, XSLT Transformations Are Applied XML Final Output (HTML) DOM XSLT

Slide 13

XML Overview XSLT Basics Example This XSLT code first sets the table organizing, then it characterizes the substance of every table cell ... <TABLE STYLE="border:1px strong black"> <xsl:for-each select="ROOT/customers"> <TR > <TD><xsl:value-of select="CustomerID"/></TD> <TD ><xsl:value-of select="ContactName"/></TD> <TD><xsl:value-of select="CompanyName"/></TD> </TR> </xsl:for-each> </TABLE> ...

Slide 14

XML Overview XSLT Basics ... <TABLE STYLE="border:1px strong black"> <xsl:for-each select="ROOT/customers"> <TR > <TD><xsl:value-of select="CustomerID"/></TD> <TD ><xsl:value-of select="ContactName"/></TD> <TD><xsl:value-of select="CompanyName"/></TD> </TR> </xsl:for-each> </TABLE> ...

Slide 15

#1: Draw a vacant table X #2: Select all components from ROOT/Customers hub #3: Populate every cell in the HTML table with the component\'s content worth XML Overview XSLT Basics Three Basic Steps for XSLT Transformation Table X

Slide 16

XML Overview XPath Basics A XPath Provides a Simple Mechanism for Finding and Addressing Specific Parts of a XML Document The XPath Selects Element Nodes from a Document Specifies a way in the hub tree Filters hubs with a choice criteria taking into account component and property estimations

Slide 17

XML Overview XML Schemas XML Schemas Describe the Structure of a XML Document XML constructions depict the tag and characteristic determinations XML patterns additionally portray requirements on the contained content XML compositions and the DTD are totally unrelated

Slide 18

XML Overview DOM Basics Document Object Model World Wide Web Consortium (W3C) Language-Independent Interface Provides Access to XML Structure Through an Object-Oriented Model Implemented in msxml.dll Microsoft.XMLDOM

Slide 19

XML Overview Microsoft DOM Implementation XMLDOMDocument/XMLDOMNode – XMLDOMNodeList – XMLDOMNode – XMLDOMNodeList – XMLDOMAttribute – XMLDOMElement – XMLDOMNodeList – XMLDOMNodeMap – XMLDOMNamedNodeMap – XMLDOMAttribute

Slide 20

XML Overview Microsoft DOM Implementation XMLDOM = XML Document Object Model XMLDOMDocument – top hub in the tree XMLDOMNode – speaks to a hub in the tree XMLDOMNodeList – gathering of hubs XMLDOMNamedNodeMap – accumulation of trait hubs

Slide 21

parentNode nodeType = Element nodeName = client nodeValue = invalid hasChildNodes = genuine previousSibling nextSibling qualities firstChild childNodes NamedNodeMap lastChild NodeList ... ... XML Overview Anatomy of an Element Node

Slide 22

XML Overview Using DOM in Visual Basic Obtain a Reference to a XML Document Load or Create the Document Navigate Through Its Nodes Document Elements Attributes Retrieve and Modify the XML Data

Slide 23

XML Overview Getting Data from a XML Source Load the Object with loadXML XML String Parameter Allows Any URL That Returns a Valid XML Document Use any database distributed strategy in SQL Server 2000 Once the Document Is Initialized, It Can Be Navigated

Slide 24

Agenda XML Overview XML in SQL Server 2000 Database Publishing OpenXML Rowsets SQL Server 2000 XML Solutions BizTalk Server 2000 Integration

Slide 25

XML in SQL Server 2000 Business Scenarios Web Applications with Dynamic Data Browser-based applications that require information from a database Business-to-Business Data Processing Data exchange utilizing XML as a Ubiquitous Extensible Platform-autonomous information transport instrument

Slide 26

XML in SQL Server 2000 Areas of Support Publishing a Database Provides HTTP access through URLs to layouts and clarified diagrams T-SQL Language Extensions FOR XML Clause in a SELECT Statement Retrieves XML information from the database motor New OpenXML Syntax in T-SQL Stores information into SQL Server

Slide 27

XML in SQL Server 2000 Publishing a Database Many Forms of HTTP Access – Each with a Different Purpose URL inquiries are planned for troubleshooting and simple access being developed or testing situations They are not proposed for generation destinations Templates and explained constructions are expected for creation locales They give safe access by concealing T-SQL code

Slide 28

XML in SQL Server 2000 FOR XML Clause SELECT Statements Now Have a New Clause FOR XML provision tells SQL Server 2000 the outcomes Should be designed as XML FOR XML condition underpins a few modifiers: AUTO, RAW, EXPLICIT Example SELECT * FROM clients FOR XML AUTO

Slide 29

XML in SQL Server 2000 OpenXML Syntax OpenXML Clause Provides a Rowset View of a XML Document Can be utilized wherever a rowset supplier, for example, a table, perspective, or OpenRecordset shows up T-SQL Provides Stored Procedures and Clauses to Manipulate XML Data With T-SQL, you can alter information

Slide 30

Agenda XML Overview XML in SQL Server 2000 Database Publishing OpenXML Rowsets SQL Server 2000 XML Solutions BizTalk Server 2000 Integration

Slide 31

Database Publishing Setting Up HTTP Access HTTP Access Is Provided by an ISAPI Filter that Maps the Request to SQL Server 2000 Through OLE DB A MMC Snap-In Provides the HTTP Configuration Support with a Graphical Interface This device makes the Microsoft Internet Information Server virtual subdirectory with the ISAPI channel

Slide 32

4 9 8 5 7 6 2 1 3 ISAPI Filter Customer OLE DB SQL Internet IIS Then Data Goes Back to Customer Database Publishing Setting Up HTTP Access Example User sends HTTP solicitation to recover SQL Server 2000 information

Slide 33

Database Publishing Setting Up HTTP Access HTTP URL Format http://space/vroot/vname/… SQL IIS Admin Features Managing the virtual root Security and settings Virtual root physical way Registering virtual names Restarting HTTP access to SQL Server 2000 Managing various servers

Slide 34

Database Publishing Setting Up HTTP Access Demo Create HTTP Access for the Northwind Database Allow URL Queries to this Virtual Root Browse the Customers Table Shows What HTTP Access Is and How To Set It Up on a Particular Server Demo…

Slide 35

Database Publishing FOR XML Clause Besides the ISAPI Application and Its Virtual Directory, the Engine Has to Know Which Data Format to Use SELECT Clause Now Supports the FOR XML Clause It Requests XML Results from SQL Server 2000 SELECT * FROM clients FOR XML AUTO

Slide 36

Database Publishing FOR XML Clause FOR XML Clause Supports Three Different Modifiers Raw Transforms every line in the outcome set into a XML component with the non specific identifier line Auto Returns question brings about a straightforward, settled XML tree Explicit Specifies the state of the XML tree

Slide 37

Database Publishing FOR XML Clause Supports Two Optional Arguments SchemaOption Uses XMLData Schema detail With this choice, XMLData mapping will be returned Elements Columns are returned as sub-components rather than XML qualities Auto mode just

Slide 38

Database Publishing FOR XML Modes EXPLICIT Allows complete control over XML arrangement of XML result Values in segments can be

Recommended
View more...