This chapter discussed the new features of SQL Server 2005 as they are related with CLR functionality. The CLR is hosted by SQL Server, so it is possible to create user-defined types, aggregates, stored procedures, functions, and triggers with C#.
User-defined types have some strict requirements to the .NET class for conversion to and from a string. How the data is stored internally in SQL Server depends on the format that is defined with the type. User-defined aggregates make it possible to do a custom accumulation using .NET classes. With stored procedures and functions it is possible to make use of CLR classes for server-side code.
Using CLR with SQL Server doesn't mean that T-SQL is obsolete. You've seen that T-SQL has advantages because of less code if just data-intensive queries are done. CLR classes can add advantages to data- processing if .NET features such as cryptography come into play.
You've also seen a glance into the XML data type of SQL Server to combine XQuery expressions with T-SQL statements.