SQL Server and CLR Integeration
SQL Server 2005 will support: creating triggers, stored procedures, custom data type and custom aggregates using .NET code. While this is a really cool idea it’s a non-starter. It’s my belief that .NET code will be created and called from very few applications for a number of reasons.
The first being performance. There is just no way that the .NET Framework code will ever be as efficient as Transact SQL.
Second is the fact that most DBAs don’t have the time or desire to become experts in VB.NET or C#. Most DBAs I deal with are already overworked keeping their databases humming. I don’t see them encouraging developers to begin adding even more work to their already full agenda.
Finally I see some architectural nightmares coming. Developers will now run out and begin adding business logic to their databases in the form of clever stored procedures and triggers. The problem with this is that it moves the business logic behind the database instead of in front of the database. This kills the ability to scale your applications in any way, shape or form. You see SQL Server does not scale out very easily (the concept of scaling out is to add more machines to distribute load), In SQL Server it is best to scale up (buy a bigger machine). Well, if your business logic is behind the data any chance of scalability goes out the window.
There is one part of this I do really like. The idea of creating your own custom data types and aggregates. You can take VB.NET or C# code and create your own datatypes that act like objects in your database. I cannot wait to create a credit card datatype, phone number datatype, SSN data type. I think aggregates has some interesting uses too.
Thoughts ?