Feeds

Programmability of SQL Server 2005

The programmibility of a database is often what matters most to developers

  • alert
  • submit to reddit

Build a business case: developing custom apps

T-SQL is Microsoft’s own version of SQL. Like most database companies, Microsoft supports most of the standards and extends the standards where it feels there is a lack.

So, SQL Server 2005 supports almost all of the ANSI 99 and 2003 SQL standards. As Euan Garden, product unit manager for SQL Server Tools, said back in 2004: "We have implemented the pieces of the standards that we feel were most appropriate."

[Which, some of us might think, means that they haven't really implemented standards at all; but a sort of "standards... but" instead - Ed.]

Without doubt, the biggest programming news is that SQL Server 2005 supports the use of languages other than SQL for writing stored procedures and triggers. This is implemented via the Common Language Runtime (CLR) and .NET integration. So these components can be written in any CLR language such as C#, Visual C++ and Visual Basic .NET.

When this capability was announced it received a very mixed reception. SQL programmers were instantly up in arms saying that SQL was the one true language for set-based operations and it was heresy to replace it with a procedural language (of any flavour whatsoever). Microsoft has subsequently spent a great deal of time and effort trying to get over the message that there was never any intention to replace SQL. These languages are simply an alternative that can be used as and when the programmer deems fit.

I am a SQL programmer, I love the language. But I also know that there are certain operations that I need to perform which are inherently much easier to write in a procedural language; so I welcome the addition of the CLR capability here.

Will people misuse this new capability? Undoubtedly. But then humans also misuse virtually everything they are given, so this isn't a good reason to fear it.

SQL Server 2005 also boasts some new data types that include Varchar(max), nvarchar(max), and varbinary(max). These are alternatives to text, ntext, and image datatypes; and can store up to 2 GB of data. The new datatypes are likely to be used mainly in data warehouse applications to store extended metadata and other descriptive information. User-defined custom datatypes are also supported.

There is also a range of new analytic functions such as ROW_NUMBER, RANK, and DENSE_RANK, which are return values to do with row numbers. There is also NTILE, which can split an ordered set into a specific number of groups of approximately equal size.

And then, of course, there is XML. No self-respecting database engine can afford to ignore XML, so SQL Server 2005 doesn’t. It is supported as a native data type; indexing and full-text searching are supported and there is also XQuery for querying XML.

Return to Page 1 of main article here - otherwise use "back" button.

Boost IT visibility and business value

More from The Register

next story
The Return of BSOD: Does ANYONE trust Microsoft patches?
Sysadmins, you're either fighting fires or seen as incompetents now
Munich considers dumping Linux for ... GULP ... Windows!
Give a penguinista a hug, the Outlook's not good for open source's poster child
Intel's Raspberry Pi rival Galileo can now run Windows
Behold the Internet of Things. Wintel Things
Linux Foundation says many Linux admins and engineers are certifiable
Floats exam program to help IT employers lock up talent
Microsoft cries UNINSTALL in the wake of Blue Screens of Death™
Cache crash causes contained choloric calamity
Eat up Martha! Microsoft slings handwriting recog into OneNote on Android
Freehand input on non-Windows kit for the first time
Linux kernel devs made to finger their dongles before contributing code
Two-factor auth enabled for Kernel.org repositories
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
7 Elements of Radically Simple OS Migration
Avoid the typical headaches of OS migration during your next project by learning about 7 elements of radically simple OS migration.
BYOD's dark side: Data protection
An endpoint data protection solution that adds value to the user and the organization so it can protect itself from data loss as well as leverage corporate data.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?