Query and Manage XML Data

Practice Labs Module
Time
40 minutes
Difficulty
Intermediate

The "Query and Manage XML Data" module provides you with the instruction and server hardware to develop your hands on skills in the defined topics. This module includes the following exercises: XML Data Type, Create XML Schema Collection in a Database.

Join over 3 million cybersecurity professionals advancing their career
Sign up with
or

Already have an account? Sign In »

Overview

Introduction

The Query and Manage XML Data module provides you with the instruction and server hardware to develop your hands on skills in the defined topics. This module includes the following exercises:

  • XML Data Type
  • Create XML Schema Collection in a Database

Lab time: It will take approximately 30 minutes to complete this lab.

Exercise 1 - XML Data Type

In this exercise, you will learn the following using SQL Server 2012:

  • Use XML data type
  • Demonstrate how to create XML schema collection in a database
  • Specify Xquery to query XML data
  • Demonstrate the use of FOR XML clause and OPENXML function
  • Create XML index

Exercise 2 - Create XML Schema Collection in a Database

An XML schema collection is a metadata entity that is similar to a table. You can use XML schema collection to associate XSD schemas with a variable or column of XML type. You can create an XML schema collection using the CREATE XML SCHEMA COLLECTION statement. Once you create the schema collection, you can then bind the schema collection with the respective variables or columns of type XML data. You can alter the XML schema collection using the ALTER XML SCHEMA COLLECTION statement to add additional schemas or modify components in the existing schema. You can use the DROP XML SCHEMA COLLECTION statement to drop the entire schema in a collection.

Learning Partner
Comprehensive Learning

See the full benefits of our immersive learning experience with interactive courses and guided career paths.