Show TOC

XML Data Types (SQL Server)Locate this document in the navigation structure

SQL Server 2005 and higher allows you to store XML documents and fragments in a database. PowerDesigner supports this feature through new column properties and the XML schema collection object.

Using an XML Data Type in a Table Column
To specify a column for storing XML, you must have already created an XML schema collection:
  1. Create a standard column and, on the General tab, select XML in the Data type field.
  2. Click the Microsoft tab, select an XML schema collection and content type.
XML Table Column Properties

You can modify an object's properties from its property sheet. To open an XML table column property sheet, double-click its Browser entry.

The following extended attributes are available on the Microsoft tab:

Name

Description

XML schema collection

Specifies an XML schema collection for the type.

Scripting name: XMLSchemaCollection

Content type

Specifies the nature of the content to be stored in the column. You can choose between:

  • CONTENT – [default] the data can contain multiple top-level elements.

  • DOCUMENT – the data can contain only one top-level element.

Scripting name: ContentType