An Interview with Bill Hamilton, Author of the Book ‘Programming SQL Server 2005’
To begin with, tell us about yourself.
I’ve been working for the last fifteen years in the software industry and have worked creating both COTS software and developing custom software solutions for companies in the manufacturing, retail, financial services, and professional services verticals. Over the last four years, I’ve been architecting enterprise solutions — both enterprise application integration and large custom software applications.
What is your book about?
Programming SQL Server 2005 is very different from programming SQL Server 2000. The introduction of CLR routines (the ability to program database objects such as stored procedures, functions, and triggers using the .NET Framework), the introduction of a new database management class library in SQL Server Management Objects (SMO) that replaces DMO, and extensive new functionality and enhancements to existing functionality. This book describes how to program all new aspects of SQL Server 2005 and includes extensive examples to get the reader started.
What’s not in the book is how to program using T-SQL, with the exception of a chapter that covers how to program new features. T-SQL programming was omitted because it is covered well in many other books.
Who should read your book?
The book is suitable for novice through experienced developers. Beginning SQL Server programmers will be able to learn how to program SQL Server 2005 through the explicit examples. Experienced developers will be able to use the book to quickly ramp up to the new programming model and features of SQL Server 2005.
How is your book different from similar titles?
Generally, I try to write books that are practical and show readers examples that are more complicated than simply “Hello World.” Of course there is never enough time to describe every aspect of a topic, I try to make sure that the reader is left understanding the problem domain well enough that he knows where to look for more detailed information than the book can supply, and how to apply that information.
Why did you decide to write this book?
I’m interested in the database and data access space, and with SQL Server 2005, Microsoft has created the best and easiest to use RDBMS with the most functionality. It’s a great product and I just wanted to write about it to help others program SQL Server 2005, and to give myself a chance to become even more familiar with the product.
From a developer’s perspective, what are the greatest differences between SQL Server 2000 and SQL Server 2005?
Here are some of the most significant:
- The .NET Framework Common Language Runtime (CLR) is now hosted in the SQL Server database engine, letting developers create database routines such as stored procedures, functions, and triggers in .NET languages such as C# and Visual Basic .NET. This lets developers more easily code complex logic in these objects that would otherwise be difficult to code in T-SQL. CLR integration also lets developers code User-Defined Types (UDTs) that can be used to encapsulate complex data structures and behaviors.
- Native XML Web Services: The SQL Server 2005 database engine can be configured with HTTP endpoints to which SOAP requests can be directly sent from applications.
- The new XML data type supports the storage and manipulation of typed and untyped XML documents and fragments.
- SQL Management Objects (SMO) extends and replaces Data Management Objects (DMO), providing an API for managing and configuring all aspects of the database engine.
- Significant enhancements to Analysis Services, Integration Services (which replaces Data Transformation Services (DTS)), Notification Services, Replication, Reporting Services, and the introduction of Service Broker.
- SQL Server Management Studio combines the functionality of a number of tools in SQL Server 2000 including Enterprise Manager, Query Analyzer, and Analysis Manager within a single integrated user interface.
What are some of the key performance enhancements, from a developer’s perspective, in SQL Server 2005?
Some of the biggest performance enhancements include:
- The snapshot isolation level lets users access data involved in a transaction as it existed when the transaction started, letting developers minimize locking and blocking problems in applications that require read-only data access.
- Persisted computed columns let you store computed values improving retrieval performance.
- Multiple Active Result Sets (MARS) lets you run multiple statements that return result sets on the same database connection.
- Indexing improvements including the ability to index XML data, control the level of index locking, and allowing non-key columns to be included in the index key.
- New query hints help developers optimize query plans.