SQL 2014 Developer, Part 13 of 13: Working with XML
Interactive

SQL 2014 Developer, Part 13 of 13: Working with XML

BizLibrary
Updated Feb 04, 2020

In this course we’ll explore SQL Server’s support for XML and how it’s improved since being introduced in SQL Server 2000. We’ll discuss SQL Server’s native XML data type—how to declare it as a variable or table column, how it differs from other data types, and how to load data into it using SELECT…FOR XML and the OPENROWSET function. Next you’ll learn the importance of indexing XML columns and that SQL Server supports multiple types of XML indexes including primary, secondary, and the Selective XML index. Then we’ll talk about XML Schemas—how they’re used to validate XML documents, SQL Server’s support for Lax Validation, how to register XML schemas and associate them with XML columns for validation. You’ll learn how to use the XML data type’s native XQuery methods as well as an introduction to FLWOR (flower) expressions. Finally, we’ll wrap up with some best practices and points to consider when you’re deciding if storing data as XML is an appropriate solution for your database application.


Lesson 1:

  • The XML Data Type
  • Declaring XML Objects
  • Demo: XML Type Variable
  • Loading Data into XML Objects
  • Using SELECT...FOR XML
  • Bulk Loading
  • Demo: Direct Assignment
  • Demo: FOR XML
  • Demo: Bulk Loading
  • Indexing XML Columns
  • Primary XML Indexes
  • Secondary XML Indexes
  • Selective XML Indexes
  • Demo: Indexing XML.

Lesson 2:

  • XML Schema Collections
  • Typed and Untyped XML
  • Schema Basics
  • Demo: XML Schema
  • Lax Validation
  • Registering Schemas
  • Demo: Registering Schemas
  • Viewing Stored Schemas
  • sys.xml_schema
  • xml_schema_namespace
  • Demo: Catalog Views.

Lesson 3:

  • Querying XML
  • Using XQuery
  • XQuery Methods
  • XQuery FLWOR Statement
  • Demo: XQuery Methods
  • Demo: FLWOR Expressions
  • FOR XML
  • Demo: FOR XML
  • OPENXML
  • Demo: OPENXML.

Lesson 4:

  • Best Practices
  • Relational vs. XML Data Model
  • Reasons to Index XML Columns
  • Querying.
;