<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>morty@home - SQL Server 2005</title>
    <link>http://blog.morty.info/</link>
    <description>The Future is a Mix of Violet and Blue</description>
    <language>en-us</language>
    <copyright>morty</copyright>
    <lastBuildDate>Mon, 26 Jul 2004 15:48:38 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>spam@morty.info</managingEditor>
    <webMaster>spam@morty.info</webMaster>
    <item>
      <trackback:ping>http://blog.morty.info/Trackback.aspx?guid=6003c12e-c41d-473c-b730-3ff7de6b701b</trackback:ping>
      <pingback:server>http://blog.morty.info/pingback.aspx</pingback:server>
      <pingback:target>http://blog.morty.info/PermaLink.aspx?guid=6003c12e-c41d-473c-b730-3ff7de6b701b</pingback:target>
      <dc:creator>Morten Abrahamsen</dc:creator>
      <wfw:comment>http://blog.morty.info/CommentView.aspx?guid=6003c12e-c41d-473c-b730-3ff7de6b701b</wfw:comment>
      <wfw:commentRss>http://blog.morty.info/SyndicationService.asmx/GetEntryCommentsRss?guid=6003c12e-c41d-473c-b730-3ff7de6b701b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SQL Server 2005 Beta 2 Developer Edition is available for download at <a href="http://msdn.microsoft.com/subscriptions/downloads/">MSDN
Subscriber downloads</a>. Go fetch ;)
</p>
      </body>
      <title>SQL Server 2005 Beta 2 at MSDN Subscriber Downloads</title>
      <guid isPermaLink="false">http://blog.morty.info/PermaLink.aspx?guid=6003c12e-c41d-473c-b730-3ff7de6b701b</guid>
      <link>http://blog.morty.info/PermaLink.aspx?guid=6003c12e-c41d-473c-b730-3ff7de6b701b</link>
      <pubDate>Mon, 26 Jul 2004 15:48:38 GMT</pubDate>
      <description>&lt;p&gt;
SQL Server 2005 Beta 2 Developer Edition is available for download at &lt;a href="http://msdn.microsoft.com/subscriptions/downloads/"&gt;MSDN
Subscriber downloads&lt;/a&gt;. Go fetch ;)
&lt;/p&gt;</description>
      <comments>http://blog.morty.info/CommentView.aspx?guid=6003c12e-c41d-473c-b730-3ff7de6b701b</comments>
      <category>SQL Server 2005</category>
    </item>
    <item>
      <trackback:ping>http://blog.morty.info/Trackback.aspx?guid=440fb513-9a72-4e70-b44f-ecdb46811313</trackback:ping>
      <pingback:server>http://blog.morty.info/pingback.aspx</pingback:server>
      <pingback:target>http://blog.morty.info/PermaLink.aspx?guid=440fb513-9a72-4e70-b44f-ecdb46811313</pingback:target>
      <dc:creator>Morten Abrahamsen</dc:creator>
      <wfw:comment>http://blog.morty.info/CommentView.aspx?guid=440fb513-9a72-4e70-b44f-ecdb46811313</wfw:comment>
      <wfw:commentRss>http://blog.morty.info/SyndicationService.asmx/GetEntryCommentsRss?guid=440fb513-9a72-4e70-b44f-ecdb46811313</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ve seen a lot of posts about the CLR Hosting support in SQL Server 2005, and
quite a few of them discuss the possibility of moving business code into the SQL Server
engine. I think it is time to establish some balance here, and I’m going to
throw in my 2 cents.
</p>
        <p>
CLR Hosting has a few obvious use cases, but it is in no way a replacement for T-SQL.
If you are writing extended stored procedures then this is definitely the only logical
way to go. It has a much better and safer programming model than the native one. If
you are writing complex algorithms that can severely limit your result set then it
is probably a good idea to put that into the server as well. T-SQL stored procedures
that have massive amounts a non-dataset related code like encryption, conversions
and extensive string manipulations could probably benefit from being completely or
partially turned into managed CLR functions.
</p>
        <p>
If you on the other hand are writing classical dataset manipulation and selection
procedures, then T-SQL is a language that is highly optimized and specifically designed
for just that purpose. You should keep in mind that managed stored procedures still
use T-SQL to interact with the relational database engine; look at some code samples!
</p>
        <p>
If you take a step back, you will see that you are making a decision about when it
makes sense to utilize the database server processor over the application server processor.
Clearly, application servers are a lot cheaper and usually a lot easier to scale out.
At the end of the day, in any well designed distributed architecture, the database
server is going to be your bottleneck. It would probably make sense to keep whatever
processing you can away from that precious resource.
</p>
        <p>
However, if you are using an algorithm to determine what records to return to the
client, and you expect that it may severely limit the amount of records returned to
the client, then it probably makes sense to put it on the database server. Returning
2GB of data to the application server, and then filtering away 98% before returning
it to the client may be a massive waste of resources. You’ll have to make an
informed tradeoff decision.
</p>
        <p>
There are no absolute rules, but you will need to evaluate every single case for yourself.
My advice is to stick with the way you’ve been writing applications with SQL
Server 2000 and keep the T-SQL stored procedures the way they are. At least then you
will know that whenever you utilize managed code in the SQL Server, you’ve made
a conscious tradeoff rather then blindly following the ever popular anti T-SQL movement.
Regarding business logic, keep it on your application tier where it has been living
so happily over the last few years. Once again, if you do decide to move it to the
SQL Server make sure it you’ve made a well informed decision that works with
both your application and your business requirements.
</p>
        <p>
Leave your defaults the way they are; it’s an evolution not a revolution.
</p>
      </body>
      <title>SQL Server 2005: CLR Hosting – Establishing Balance</title>
      <guid isPermaLink="false">http://blog.morty.info/PermaLink.aspx?guid=440fb513-9a72-4e70-b44f-ecdb46811313</guid>
      <link>http://blog.morty.info/PermaLink.aspx?guid=440fb513-9a72-4e70-b44f-ecdb46811313</link>
      <pubDate>Wed, 14 Jul 2004 14:30:06 GMT</pubDate>
      <description>&lt;p&gt;
I&amp;#8217;ve seen a lot of posts about the CLR Hosting support in SQL Server 2005, and
quite a few of them discuss the possibility of moving business code into the SQL Server
engine. I think it is time to establish some balance here, and I&amp;#8217;m going to
throw in my 2 cents.
&lt;/p&gt;
&lt;p&gt;
CLR Hosting has a few obvious use cases, but it is in no way a replacement for T-SQL.
If you are writing extended stored procedures then this is definitely the only logical
way to go. It has a much better and safer programming model than the native one. If
you are writing complex algorithms that can severely limit your result set then it
is probably a good idea to put that into the server as well. T-SQL stored procedures
that have massive amounts a non-dataset related code like encryption, conversions
and extensive string manipulations could probably benefit from being completely or
partially turned into managed CLR functions.
&lt;/p&gt;
&lt;p&gt;
If you on the other hand are writing classical dataset manipulation and selection
procedures, then T-SQL is a language that is highly optimized and specifically designed
for just that purpose. You should keep in mind that managed stored procedures still
use T-SQL to interact with the relational database engine; look at some code samples!
&lt;/p&gt;
&lt;p&gt;
If you take a step back, you will see that you are making a decision about when it
makes sense to utilize the database server processor over the application server processor.
Clearly, application servers are a lot cheaper and usually a lot easier to scale out.
At the end of the day, in any well designed distributed architecture, the database
server is going to be your bottleneck. It would probably make sense to keep whatever
processing you can away from that precious resource.
&lt;/p&gt;
&lt;p&gt;
However, if you are using an algorithm to determine what records to return to the
client, and you expect that it may severely limit the amount of records returned to
the client, then it probably makes sense to put it on the database server. Returning
2GB of data to the application server, and then filtering away 98% before returning
it to the client may be a massive waste of resources. You&amp;#8217;ll have to make an
informed tradeoff decision.
&lt;/p&gt;
&lt;p&gt;
There are no absolute rules, but you will need to evaluate every single case for yourself.
My advice is to stick with the way you&amp;#8217;ve been writing applications with SQL
Server 2000 and keep the T-SQL stored procedures the way they are. At least then you
will know that whenever you utilize managed code in the SQL Server, you&amp;#8217;ve made
a conscious tradeoff rather then blindly following the ever popular anti T-SQL movement.
Regarding business logic, keep it on your application tier where it has been living
so happily over the last few years. Once again, if you do decide to move it to the
SQL Server make sure it you&amp;#8217;ve made a well informed decision that works with
both your application and your business requirements.
&lt;/p&gt;
&lt;p&gt;
Leave your defaults the way they are; it&amp;#8217;s an evolution not a revolution.
&lt;/p&gt;</description>
      <comments>http://blog.morty.info/CommentView.aspx?guid=440fb513-9a72-4e70-b44f-ecdb46811313</comments>
      <category>Architecture</category>
      <category>SQL Server 2005</category>
    </item>
  </channel>
</rss>