Yukon and User Defined Types (UDTs)

February 3, 2005
No Comments.


In response to Sahil Malik’s recent post on CLR Types as UDT’s in Yukon, I have to say I prefer the Typed Xml in Yukon to CLR Types.

In Yukon there are two paths to creating User Defined Types.  The CLR path has some limitations, (primarily the 8K size limititation).  I am a big fan of the XML Type path.  Typed XML inside the server is a better way to create complex types in the database IMHO.  Typed XML is schema based.  This means the types in your database can be exposed externally as well if needed (like through web services <some of you might be seeing a pattern emerge here>).

In addition, Microsoft’s extensions to XQuery (which I hope the standards board adopt) allow you to do in-place editing of Typed XML which means you don’t have to do wholesale replacement of xml documents any longer (or wholesale changes to CLR based UDF’s).  The syntax allows you to do insert, updates and deletes to individual nodes (or series’ of nodes).