SQL CLR Types

The last SQL CLR feature for us to explore is user-defined types (UDTs). This feature is perhaps the most interesting facet of SQL CLR integration, yet also the most controversial. It’s interesting because, technically, it allows for storage of objects in the database. It’s controversial because it’s prone to abuse. SQL CLR types were not implemented to allow developers to create object-oriented databases; they were created to allow multi-value or multi-behavior data types to be stored, retrieved, and easily manipulated.

SQL CLR types have certain indexing limitations, and their entire value must be updated when any of their individual property/field values is updated.

Note

More information about SQL CLR UDTs is available in the MSDN ...

Get Programming Microsoft® SQL Server® 2012 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.