SystemDefinitionModel and Databases

I'd like to be able to store SDM Models in an SQL Server database.

However, the SDM Schema uses a processContents='lax' in a couple of places. this is not a supported schema element for use in Xml schema collection within SQL Server 2005. Aside from not assigning an Xml Schema to the column in the database table, are there any recommendations for an approach to be taken here?

Regards

Stef Shoffren

[410 byte] By [StefShoffren] at [2008-1-28]
# 1
Stef,
It is a very good question. I am looking into it right now and it will take me a day or two to verify the solution with SQL Server team. I'll keep you posted.
Best Regards,
Dmitriy Nikonov
Dmitriy_Nikonov_MSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Architecture & Design...
# 2

Stef,

First of all, your workaround (i.e. not assigning the XML Shema..) is a valid approach. The problem you presented has already been noted, and planned for a future release. However, we hope that the workarounds are acceptable.

Here is what was suggested by SQL team:

"The recommendations depend on what you want to achieve with the schema:

  1. If you want to use it for validation, the recommendation is that you do not associate the schema with the XML datatype through a schema collection. Instead, validate the XML on the client-side before passing it into the table or write a CLR UDF that performs the validation as a constraint check.
  2. If you want to use it for typing of the other part of the data, we recommend to do 1 to get the validation and then use a schema that replaces the lax with skip to get the other parts of the schema typed correctly."

I will post more feedback from MS as it becomes available, but let me know if this is not sufficient.

Best Regards,
Dmitriy Nikonov

Dmitriy_Nikonov_MSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Architecture & Design...

Visual Studio Team System

Site Classified