SQL Server XML

SQ-IN-XML-301-EN (4 Days Course)

 Download PDF version

Introduction

This course intends to help attendees to gain a deep understanding of the XML Processing capabilities of SQL Server 2000, 2005 and 2008. This course focuses on SQL Server XML from basic to advanced levels. Key XML features such as XQuery, XML Schema Collections, XML Indexes, XML Optimization techniques etc are discussed in great detail.

Prerequisites

This course assumes that the attendees have a  basic understanding of XML in general. Knowledge of any of the SQL Server XML features is not mandatory. The course assumes that the attendees know what is an XML document and the basic characteristics of an XML document.

Training Method

This is a 4 day course which includes a number of theoretical sessions, demos and hands-on-labs. There is a total of 11 theoretical sessions and each of these sessions is followed by dozens of demos. The hands-on-labs that are part of each session will make sure that the attendees understand each feature and are able to use those features by themselves.


Agenda

Day 1:

Module 1: Introduction to SQL Server XML

This session examines the XML Processing capabilities of SQL Server in detail.  It provides a brief overview of various XML processing features such as Generating XML output, loading XML documents, querying XML documents, Validating XML Documents, XML DML for modifying XML documents and XML Indexes.

Module 2: Generating XML documents

This session focuses on explaining how to generate XML documents using FOR XML along with RAW, AUTO, PATH and EXPLICIT directives and all the supported extensions. The session focuses not only on generating XML, but also on shaping the XML output to the required structure and format.

Module 3: Understanding XQuery

This session focuses on learning the XQuery implementation in SQL Server. The XML data type supports a limited subset of XQuery specification and a detailed over view of the XQuery support is provided in this session. Session focuses on the XML Data type methods, XML DML and FLWOR operations. 


Day 2:

Module 4: Understanding XML Schema Collections

This session focuses on learning XML Schema Collections. It focuses on helping the attendees to learn the basics of XSD and make them capable of creating and using XML Schema collections to validate their TYPED XML data.

Module 5: Understanding XML Data Type Methods

This session focuses on learning the XML Data Type methods. Attendees will learn to use the XML data type methods: value(), query(), exist(), nodes() and modify(). This session will also focus on optimizing XQuery expressions and will give a detailed overview of XML Primary and Secondary Indexes that can be used to optimize various XQuery expressions. It also demonstrates how to work with variables, columns,  join XML nodes with relational tables and examines all the XQuery built-in functions supported by SQL Server.

Module 6: Mastering XML DML

This session focuses on learning XML DML. It explains how to modify an XML document stored in an XML data type column or variable. XML modification operations such as inserting elements or attributes, deleting elements or attributes and updating values of elements or attributes are discussed in detail. This session discusses the performance benefits of performing in-place updates, benefits of using TYPED XML etc.


Day 3:

Module 7: Understanding XQuery FLWOR operations

This session helps the attendees to learn the XQuery FLWOR operations: for, let, where, order by and return. It starts with the basics of FLWOR operations and then turns into a deep dive session that focuses on building and using complex FLWOR expressions.

Module 8: Understanding Schema Components

This session will take the attendees deeper into the building blocks of XSD.  A very detailed over view of simple types, complex types, attribute groups and modal groups is given in this session. This session examines the attributes of element and attribute declarations in detail.

Module 9: XSD and Type Derivation

This session starts with understanding XSD primitive and derived data types. It further walks the attendees through creating and using user defined simple and complex types.  Finally it demonstrates type derivation in XSD and helps the attendees to derive types from simple and complex types, having different content models and deriving by extension and restriction.


Day 4:

Module 10: Advanced Schema Concepts

This session focuses on some of the advanced schema concepts. It starts with a detailed discussion on the regular expression language supported by XSD, which can be used to perform a variety of pattern restrictions.  It further takes the attendees into detailed discussion on the attributes of schema element declaration, element and attribute wild card declarations, lax validation support added in SQL Server 2008, XML Schema Collection metadata and the limitations of the XSD implementation in SQL Server.

Module 11: Performance Optimization, Best Practices and XML Indexes

This is a 60 minute session that focuses on the various performance optimization tips for using the XML Data Type along with the recommended best practices. It also discusses XML Indexes and explains how XML Primary and Secondary indexes can be used to optimize XQuery expressions.


Login