Dynamic Schema :: SQL Server 2012

You need to provide a solution for a dynamic schema for the Products table in your company. All products have the same basic attributes, like product ID, product name, and list price. However, different groups of products have different additional attributes. Besides dynamic schema for the variable part of the attributes, you need to ensure at least basic constraints, like data types, for these variable attributes.
  1. How would you make the schema of the Products table dynamic?

  2. How would you ensure that at least basic constraints would be enforced?
Answers
  1. You could use the XML data type column to store the variable attributes in XML format.

  2. You could validate the XML against an XML schema collection.