A Developer's Guide to SQL Server 2005

Overview

"I come from a T-SQL background, so when I first laid my eyes on SQL Server 2005, I was shocked--and then, I was scared! I didn't have a CLR or XML background and suddenly had an urgent need to learn it. SQL Server 2005 is too big of a release to learn from the books online. Fortunately, now there is a book for developers who need to go from SQL Server 2000 to SQL Server 2005 and to do it as painlessly as possible. Basically, it's one-stop shopping for serious developers who have to get up to speed quickly. I'll keep this one on my desk--not on ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (37) from $1.99   
  • New (7) from $6.82   
  • Used (30) from $1.99   
Close
Sort by
Page 1 of 1
Showing 1 – 6 of 7
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$6.82
Seller since Mon Jan 01 01:01:01 EST 2007

Feedback rating:

(180)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand New. Remainder mark. Ship daily. Pack carefully. E-mail when shipped. 55A

Ships from: Denver, CO

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$7.31
Seller since Thu Jan 01 01:01:01 EST 2009

Feedback rating:

(2476)

Condition: New
2006-05-08 Paperback 1 New 0321382188 Ships Within 24 Hours. Tracking Number available for all USA orders. Excellent Customer Service. Upto 15 Days 100% Money Back Gurantee. Try ... Our Fast! ! ! ! Shipping With Tracking Number. Read more Show Less

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$61.74
Seller since Fri Jan 01 01:01:01 EST 2010

Feedback rating:

(731)

Condition: New
PAPERBACK New 0321382188! ! ! ! BEST PRICES WITH A SERVICE YOU CAN RELY! ! !

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$61.74
Seller since Fri Jan 01 01:01:01 EST 2010

Feedback rating:

(976)

Condition: New
PAPERBACK New 0321382188 Friendly Return Policy. A+++ Customer Service!

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$61.74
Seller since Sat Jan 01 01:01:01 EST 2011

Feedback rating:

(789)

Condition: New
PAPERBACK New 0321382188 SERVING OUR CUSTOMERS WITH BEST PRICES. FROM A COMPANY YOU TRUST, HUGE SELECTION. RELIABLE CUSTOMER SERVICE! ! HASSLE FREE RETURN POLICY, SATISFACTION ... GURANTEED**** Read more Show Less

Ships from: Philadelphia, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$61.74
Seller since Tue Aug 05 20:11:20 EDT 2014

Feedback rating:

(446)

Condition: New
PAPERBACK New 0321382188! ! KNOWLEDGE IS POWER! ! ENJOY OUR BEST PRICES! ! ! Ships Fast. All standard orders delivered within 5 to 12 business days.

Ships from: Southampton, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing 1 – 6 of 7
Close
Sort by
A Developer's Guide to SQL Server 2005

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac

Want a NOOK? Explore Now

NOOK Book (eBook)
$29.99
BN.com price
(Save 42%)$51.99 List Price

Overview

"I come from a T-SQL background, so when I first laid my eyes on SQL Server 2005, I was shocked--and then, I was scared! I didn't have a CLR or XML background and suddenly had an urgent need to learn it. SQL Server 2005 is too big of a release to learn from the books online. Fortunately, now there is a book for developers who need to go from SQL Server 2000 to SQL Server 2005 and to do it as painlessly as possible. Basically, it's one-stop shopping for serious developers who have to get up to speed quickly. I'll keep this one on my desk--not on my bookshelf. Well done, Bob and Dan!"

--Dr. Tom Moreau

SQL Server MVP and Monthly Columnist

SQL Server Professional, Brockman Moreau Consulting Inc.

"A SQL book truly for developers, from two authorities on the subject. I'll be turning to this book first when I need to understand a component of SQL Server 2005."

--Matt Milner

Instructor

Pluralsight

"An excellent book for those of us who need to get up to speed on what's new in SQL Server 2005. The authors made sure this book includes the final information for the release version of the product. Most other books out now are based on beta versions. It covers key areas from XML and SQLCLR to Notification Services. Although the wide variety of information is great, my favorite part was the advice given on when to use what, and how performance is affected."

--Laura Blood

Senior Software Developer

Blue Note Computing, Inc.

"SQL Server 2005 is a massive release with a large number of new features. Many of these features were designed to make SQL Server a great application development platform. This book provides comprehensive information about the SQL Server features of most interest to application developers. The lucid text and wealth of examples will give a developer a clear understanding of how to use SQL Server 2005 to a whole new class of database applications. It should be on every SQL Server developer's bookshelf."

--Roger Wolter

Solutions Architect

Microsoft Corporation

"While there will be a lot of good books on SQL Server 2005 development, when people refer to the 'bible,' they'll be talking about this book."

--Dr. Greg Low

Senior Consultant

Readify Pty Ltd

"SQL Server 2005 is loaded with new features and getting a good overview is essential to understand how you can benefit from SQL Server 2005's features as a developer. Bob and Dan's book goes beyond enumerating the new SQL Server 2005 features, and will provide you with lots of good examples. They did a good job striking a balance between overview and substance."

--Michiel Wories

Senior Program Manager, SQL Server

Microsoft Corporation

Few technologies have been as eagerly anticipated as Microsoft SQL Server 2005. Now, two SQL Server insiders deliver the definitive hands-on guide--accurate, comprehensive, and packed with examples. A Developer's Guide to SQL Server 2005 starts where Microsoft's documentation, white papers, and Web articles leave off, showing developers how to take full advantage of SQL Server 2005's key innovations. It draws on exceptional cooperation from Microsoft's SQL Server developers and the authors' extensive access to SQL Server 2005 since its earliest alpha releases.

You'll find practical explanations of the new SQL Server 2005 data model, built-in .NET hosting, improved programmability, SQL:1999 compliance, and much more. Virtually every key concept is illuminated via sample code that has been fully updated for and tested with the shipping version of the product.

Key coverage includes

  • Using SQL Server 2005 as a .NET runtime host: extending the server while enhancing security, reliability, and performance
  • Writing procedures, functions, triggers, and types in .NET languages
  • Exploiting enhancements to T-SQL for robust error-handling, efficient queries, and improved syntax
  • Effectively using the XML data type and XML queries
  • Implementing native SQL Server 2005 Web Services
  • Writing efficient, robust clients for SQL Server 2005 using ADO.NET, classic ADO, and other APIs
  • Taking full advantage of user-defined types (UDTs), query notifications, promotable transactions, and multiple active result sets (MARS)
  • Using SQL Management Objects (SMO), SQL Service Broker, and SQL Server Notification Services to build integrated applications
Read More Show Less

Product Details

  • ISBN-13: 9780321382184
  • Publisher: Addison-Wesley
  • Publication date: 5/16/2006
  • Series: Microsoft .NET Development Series
  • Pages: 997
  • Product dimensions: 6.98 (w) x 9.25 (h) x 1.88 (d)

Meet the Author

Bob Beauchemin is a database-centric application practitioner and architect, DBA, instructor, course author, and writer. He's Director of Developer Skills at SQLskills (www.sqskills.com), and teaches his SQL Server 2005 courses around the world. Bob has written extensively on SQL Server and other databases, database security, ADO.NET, and OLE DB.

Dan Sullivan runs his own consulting company, does training for Pluralsight (www.pluralsight.com), and has worked with SQL Server since it was first distributed by Microsoft and ran on OS/2. Dan speaks and writes widely on SQL Server.

Read More Show Less

Read an Excerpt

Bob Beauchemin

Wow. I can't believe it's been almost two years since I was writing the preface for our first book, A First Look at SQL Server 2005 for Developers. Those two years, and the two years before, have been a whirlwind of working with the SQL Server product, including teaching, consulting, writing, and conferences. I still haven't stopped to catch my breath. SQL Server 2005 was officially launched in September 2005. And we've been working on enhancements to the First Look book since it was published in mid-2004. As with any book on a beta version of a product, the product itself changed after the book was published. In fact, one of the first changes was a feature cut that came two weeks after the book shipped. Keeping up has been a high-energy endeavor, because since beta 2, there were an order of magnitude more additions and enhancements than cuts. This book is the product of the great response we got to the First Look book and the answer to the frequently asked question, "When are you guys going to do an update?" I'd say that this is quite a bit more than an update, however. We've included lots of new and revised material; there are too many changes to enumerate. There is even a section on best practices because at this point in time, the early adopters who shipped revised versions of their software that works with SQL Server 2005 have already had a few years to practice.

We did, however, wait for the "golden bits" to appear before embarking on the last of the series of revisions. This turned out to be a good move, as the implementation details of a few of the features changed slightly up until the last candidate release. This is aSisyphus-like strategy for the most part, however, as the software keeps improving. As I write this, Service Pack 1 has been announced and may indeed change things slightly. Work has begun on the next release of SQL Server, code-named Katamai, and the next version of the .NET Framework is currently available in beta. Software products are never static. Dan and I will be including the code samples from the book and updates on our Web sites:

http://www.SQLskills.com (Books section)
http://www.pluralsight.com

We'll also be writing about SQL Server 2005 features and enhancements in our blogs.

The ANSI SQL 2003 specification "shipped," too, and included a slightly different version of Part 14:

First Look book was published, both of Microsoft's biggest competitors in the database space have released .NET Framework procedure inclusion (although integration is not as tight) and have announced or released XQuery support.

By now, you probably have heard about the .NET Framework-based procedures, the inclusion of the

next series of .NET Framework enhancements. When this framework functionality is integrated with Service Broker's robust transport and built-in transactional and database support, it should make for a powerful combination. This architecture is a quantum change because it enables building scalable, robust, distributed database applications by designing distribution of processing in from the ground up.

It's still my conclusion that there's quite a bit in SQL Server 2005 for just about every developer, DBA, application designer, business analyst, and data miner. I'm still reading in some places (though not as many as in 2002) that the new features just aren't that interesting; they're more like a recitation of glitzy acronyms than substance. So I'll end this with the same mid1981 personal history lesson.

I'm working for an insurance company in Seattle, and we're planning to convert our indexed file data, which we'd just converted from ISAM (indexed sequential access method) to VSAM (virtual storage access method), to a better, more robust database engine. The one we had in mind was IMS (IBM's Information Management System product). The salesperson, however, wants us to look at some newfangled database called SQL/DS (which eventually became DB2). After designing some tables and playing around with some queries, we asked some tough questions like "Why does it matter that a database engine is built on a mathematical theory?" and "Why would you want to learn a foreign query language called SQL rather than using nice, fast assembly language or COBOL programs?" and "Why did you just decompose our 2 nice, understandable records into 30 little tables just to join them back together again?" and "Why does it go so slow?" It was the beginning of the relational era. Relational engines weren't all that optimized yet, and smart programmers with custom navigation-based code could beat the engine every time.

In 1981, we sent the product back, and I didn't learn SQL until 1987. By then, I was a bit behind on the learning curve, but relational engines were a heck of a lot faster, and programmers wrote a little SQL and much less procedural and navigational code. And they got much more work done. So I smile when I see folks shake their heads about the

head-shakers are right, but I'm not waiting until 2010 to learn XQuery or how to integrate messaging and databases. It doesn't matter whether you choose to wait, however, or use relational exclusively. SQL Server 2005 and .NET Framework 2.0 have the enabling engines for all these data storage, messaging, and query technologies. And the future portends even more work in these areas.

Portland, Oregon
March 2006 Dan Sullivan

This journey started well over two years ago, when Bob asked me whether I would be interested in joining him in creating a course and book about the "new" version of SQL Server that Microsoft was working on. He said that this would be the biggest release of SQL Server to date and that it would make both

One of the first things I realized when I started digging into it was that

Direct support of

Likewise, the direct integration of the CLR into the SQL Server runtime gives you a choice of how to implement an operation based on the needs of the application, not the limitations of the platform.

To carry

SQL Server 2005 opens your choices and widens its applicability to business problems.

But my favorite comes last: Service Broker, the framework for implementing business transactions. The first time I looked at Service Broker, I did a flashback to projects I had worked on in the past and was bowled over by it. It is right on target. All those busywork details I had to code just to move a few things around to match a business process or control resources are now done for me by Service Broker. Service Broker truly is the best thing since sliced bread.

Taken as whole or in pieces, SQL Server 2005 is a huge step forward. Working on the book and explaining to developers as it was changing underneath my feet was a challenge, but well worth it. I couldn't have met that challenge, of course, without the patience, understanding, and love of my wife, Alberta.

Bolton, Massachusetts
March 2006

Read More Show Less

Table of Contents

Figures xxv

Tables xxxix

Foreword by Roger Wolter xliii

Foreword by Gert E. R. Drapers xlv

Preface xlix

Acknowledgments lv

About the Authors lvii

Chapter 1: Introduction 1

The .NET Framework and the Microsoft Platform 1

The .NET Framework's Effects on SQL Server 3

The SQL:1999 Standard: Extending the Relational Model 8

User-Defined Types and SQL Server 11

XML: Data and Document Storage 14

Web Services: XML As a Marshaling Format 20

Client Access . . . And Then There Are Clients 22

Extending SQL Server into the Platform: Service Broker and Notification Services 24

Where Are We? 26

Chapter 2: Hosting the Runtime: SQL Server As a Runtime Host 27

Why Care How Hosting Works? 27

What Is a .NET Framework Runtime Host? 29

SQL Server As a Runtime Host 31

Loading the Runtime: Processes and AppDomains 40

Safe Code: How the Runtime Makes It Safer to Run "Foreign" Code 43

Where the Code Lives: Storing .NET Framework Assemblies (CREATE ASSEMBLY) 46

Assembly Dependencies: When Your Assemblies Use Other Assemblies 49

Assemblies and SQL Schemas: Who Owns Assemblies (Information Schema) 51

Maintaining User Assemblies (ALTER ASSEMBLY, DROP ASSEMBLY) 55

Specification Compliance 58

Conclusions 60

Where Are We? 60

Chapter 3: Procedures and Functions in .NET CLR Languages 61

Extending SQL Server 61

CLR Extension Basics 63

CLR Extension Details 74

System.Data.SqlTypes 77

Parameters and Return Value 93

User-Defined Functions 93

Table-Valued Functions 99

Stored Procedures 106

Triggers 109

Where Are We? 110

Chapter 4: In-Process Data Access 111

Programming with SqlClient 111

Context: The SqlContext Class 115

Connections 118

Commands: Making Things Happen 121

Obtaining Results 124

Transactions 128

Pipe 135

Creating and Sending New Rowsets 137

Using the WindowsIdentity 139

Calling a Web Service from SQLCLR 140

Exception Handling 143

SqlTriggerContext 149

SqlClient Classes That You Can't Use on the Server 150

Where Are We? 151

Chapter 5: User-Defined Types and Aggregates 153

Why Do We Need User-Defined Types? 153

Overview of User-Defined Types 154

Creating a User-Defined Type 157

Where Are We? 217

Chapter 6: Security 219

New Security Features in SQL Server 2005 219

Optional Features Are Turned Off by Default 221

A Quick Review of SQL Server Security Concepts with Enhancements 224

SQL Server Password Policies and Credentials 235

Encryption Keys and Built-In Encryption Functions 238

Encryption Functions 242

Separation of Users and Schemas 248

Synonyms 252

Specifying Execution Context for Procedural Code 253

Code Signing 259

SQL Server Permissions and SQLCLR Objects 261

Assembly Permissions: Who Can Catalog and Use an Assembly? 262

What .NET Framework Code Can Do from within SQL Server: Safety Levels 268

Where Are We? 275

Chapter 7: SQL Engine Enhancements 277

Improvements to the SQL Engine 277

SNAPSHOT Isolation 278

Data Definition Language Triggers 289

Event Notifications 294

Large Value Data Types 298

Loading Data with the New BULK Provider 301

Statement-Level Recompilation 301

Query Hints, Plan Guides, and Plan Forcing 303

Where Are We? 309

Chapter 8: T-SQL Language Enhancements 311

Improvements to Transact-SQL 311

Error Handling 312

INTERSECT and EXCEPT 326

TOP 329

ON DELETE and ON UPDATE 333

OUTPUT 336

APPLY Operators 340

Common Table Expressions 343

Recursive Queries 351

PIVOT and UNPIVOT Operators 359

Ranking and Partitioning 366

TABLESAMPLE 376

Where Are We? 381

Chapter 9: XML in the Database: The XML Data Type 383

The XML Data Type 383

Using XML Data Type in Tables 384

Using XML Data Variables and Parameters 390

Typed and Untyped XML: Cataloguing and Using XML SCHEMA COLLECTIONs 392

Creating an Index on an XML Column 401

XML Type Functions 402

SELECT . . . FOR XML Enhancements 403

Mapping SQL and XML Data Types 414

OpenXML Enhancements 418 Loading XML into the Database from Files 420

ANSI SQL Standard Compliance 422

Where Are We? 426

Chapter 10: XML Query Languages: XQuery and XPath 429

What Is XQuery? 429

An Introduction to XQuery 431

Comparing and Contrasting XQuery and SQL 446

Using XQuery with the XML Data Type 449

XQuery Functions Supported by SQL Server 463

XQuery Operators Supported by SQL Server 464

XML DML: Updating XML Columns 468

Special Considerations When Using XQuery Inside SQL Server 475

Where Are We? 480

Chapter 11: SQL Server Service Broker 481

Messaging Applications 481

Processing Messages 494

Business Transactions 499

Where Are We? 559

Chapter 12: SQL Server As a Platform for Web Services 561

Mixing Databases and Web Services 561

Where Are We? 640

Chapter 13: SQL Server 2005 and Clients 641

SQL Native Client 641

New Data Types and Data Type Compatibility Mode 645

User-Defined Types and Relational Data Access APIs 646

Using .NET Framework UDTs in ADO.NET 647

Fetching UDT Data from a DataReader 648

Using .NET Framework UDTs in ODBC, OLE DB, and ADO Clients 654

Supporting the XML Data Type on the Client 657

Supporting the Large Value Data Types on the Client 667

Query Notification Support 670

Multiple Active Resultsets 689

New Transaction and Isolation Features in ADO.NET 695

Changes Related to SQL Server 2005 Login 699

Comparing the Client and Server Model for Stored Procedures 703

Where Are We? 704

Chapter 14: ADO.NET 2.0 and SqlClient 705

Generic Coding with the ADO.NET 2.0 Base Classes and Factories 705

Provider Factories 709

Specifying Configuration Information 712

Enumerating Data Sources and Building Connection Strings 714

Other Generic Coding Considerations 717

Schemas in ADO.NET 2.0 719

Tracing Data Access 731

Asynchronous Support 743

Bulk Import in SqlClient 749

Client Statistics 752

.NET Framework DataSet and SqlDataAdapter Enhancements 753

Where Are We? 758

Chapter 15: SQL Server Management Objects 761

Introduction 761

Object Model 769

SMO Projects 772

Connections 778

Server 787

SMO Objects 790

Create, Alter, and Drop 802

Scripts 807

Configuration Management 815

Where Are We? 818

Chapter 16: Notification Services 819

What Is SQL Server Notification Services? 819

Notification Applications 821

Components of SQL Server Notification Services 824

Notification Applications Design Patterns 828

Notification Services Delivery Features 829

Terms Used in Notification Services 829

Designing, Coding, and Generating a Notification Services Application 831

A Sample Notification Application 833

Instance and Application Configuration Files 834

Events 846

Subscribers and Subscriptions 858

Notifications 867

Distributor and Formatters 871

Delivery 873

Where Are We? 878

Chapter 17: Wrap-Up: Service-Oriented Database Applications 879

Lots of New Features: How to Use Them 879

Data Models, Programming, and SQL Server 880

Any Functionality at Any Tier 881

What Are the Best Practices? 882

Toward a Service-Oriented Database Architecture 891

The Database As Part of the Platform 894

Appendix A .NET Framework 101 897

The Common Language Runtime 897

Assemblies and Modules 901

The CLR Type System 905

Members of Types 914

Memory Management 918

Appendix B SQL Server Management Studio 923

Introduction 923

Solutions and Projects 924

Templates 937

Object Explorer 944

Appendix C Visual Studio 2005 Integration: SQL Server Projects 949

Visual Studio 2005 949

References 963

Index 965

Read More Show Less

Preface

Bob Beauchemin

Wow. I can't believe it's been almost two years since I was writing the preface for our first book, A First Look at SQL Server 2005 for Developers. Those two years, and the two years before, have been a whirlwind of working with the SQL Server product, including teaching, consulting, writing, and conferences. I still haven't stopped to catch my breath. SQL Server 2005 was officially launched in September 2005. And we've been working on enhancements to the First Look book since it was published in mid-2004. As with any book on a beta version of a product, the product itself changed after the book was published. In fact, one of the first changes was a feature cut that came two weeks after the book shipped. Keeping up has been a high-energy endeavor, because since beta 2, there were an order of magnitude more additions and enhancements than cuts. This book is the product of the great response we got to the First Look book and the answer to the frequently asked question, "When are you guys going to do an update?" I'd say that this is quite a bit more than an update, however. We've included lots of new and revised material; there are too many changes to enumerate. There is even a section on best practices because at this point in time, the early adopters who shipped revised versions of their software that works with SQL Server 2005 have already had a few years to practice.

We did, however, wait for the "golden bits" to appear before embarking on the last of the series of revisions. This turned out to be a good move, as the implementation details of a few of the features changed slightly up until the last candidate release. This is a Sisyphus-like strategy for the most part, however, as the software keeps improving. As I write this, Service Pack 1 has been announced and may indeed change things slightly. Work has begun on the next release of SQL Server, code-named Katamai, and the next version of the .NET Framework is currently available in beta. Software products are never static. Dan and I will be including the code samples from the book and updates on our Web sites:

http://www.SQLskills.com (Books section)
http://www.pluralsight.com

We'll also be writing about SQL Server 2005 features and enhancements in our blogs.

The ANSI SQL 2003 specification "shipped," too, and included a slightly different version of Part 14: XML Related Specifications (SQL/XML). The W3C XQuery committee is closing in on becoming a recommendation. As an additional point of note, since the First Look book was published, both of Microsoft's biggest competitors in the database space have released .NET Framework procedure inclusion (although integration is not as tight) and have announced or released XQuery support.

By now, you probably have heard about the .NET Framework-based procedures, the inclusion of the XML data type and XQuery language, the enhancements to T-SQL to support robust error handling and queries against hierarchical data and open-schema based designs, and versioningbased transaction isolation. These features, however, combined with inclusion of an asynchronous messaging system, SQL Server Service Broker, permit SQL Server to move toward a Service Oriented Database Architecture. Event Notifications, Query Notifications, and database mail are the first manifestations of this type of architecture; it moves SQL Server toward being more of a system that responds asynchronously to external events, rather than being strictly connection-and-statement-based. Service Broker, combined with CLR procedural code and XML data support, enables database programmers to build their own service-based applications. The inclusion of support for Web Services as an alternate client stack is another manifestation of this architecture. This is such a compelling programming model that Microsoft plans to include similar functionality as part of the

next series of .NET Framework enhancements. When this framework functionality is integrated with Service Broker's robust transport and built-in transactional and database support, it should make for a powerful combination. This architecture is a quantum change because it enables building scalable, robust, distributed database applications by designing distribution of processing in from the ground up.

It's still my conclusion that there's quite a bit in SQL Server 2005 for just about every developer, DBA, application designer, business analyst, and data miner. I'm still reading in some places (though not as many as in 2002) that the new features just aren't that interesting; they're more like a recitation of glitzy acronyms than substance. So I'll end this with the same mid1981 personal history lesson.

I'm working for an insurance company in Seattle, and we're planning to convert our indexed file data, which we'd just converted from ISAM (indexed sequential access method) to VSAM (virtual storage access method), to a better, more robust database engine. The one we had in mind was IMS (IBM's Information Management System product). The salesperson, however, wants us to look at some newfangled database called SQL/DS (which eventually became DB2). After designing some tables and playing around with some queries, we asked some tough questions like "Why does it matter that a database engine is built on a mathematical theory?" and "Why would you want to learn a foreign query language called SQL rather than using nice, fast assembly language or COBOL programs?" and "Why did you just decompose our 2 nice, understandable records into 30 little tables just to join them back together again?" and "Why does it go so slow?" It was the beginning of the relational era. Relational engines weren't all that optimized yet, and smart programmers with custom navigation-based code could beat the engine every time.

In 1981, we sent the product back, and I didn't learn SQL until 1987. By then, I was a bit behind on the learning curve, but relational engines were a heck of a lot faster, and programmers wrote a little SQL and much less procedural and navigational code. And they got much more work done. So I smile when I see folks shake their heads about the XML data models or the XQuery Formal Semantics. I saw the same raised eyebrows when mixing service-oriented concepts and data first came on the scene. Maybe the

head-shakers are right, but I'm not waiting until 2010 to learn XQuery or how to integrate messaging and databases. It doesn't matter whether you choose to wait, however, or use relational exclusively. SQL Server 2005 and .NET Framework 2.0 have the enabling engines for all these data storage, messaging, and query technologies. And the future portends even more work in these areas.

Portland, Oregon March 2006

Dan Sullivan

This journey started well over two years ago, when Bob asked me whether I would be interested in joining him in creating a course and book about the "new" version of SQL Server that Microsoft was working on. He said that this would be the biggest release of SQL Server to date and that it would make both XML and the Common Language Runtime first-class citizens of Microsoft's database platform. That sounded good to me, so here I am writing a preface for a book about the shipping version of SQL Server 2005.

One of the first things I realized when I started digging into it was that XML and the CLR integration are just the tip of the iceberg. Just the enhancements to T-SQL are worth upgrading a server. The enhancements in ADO.NET, such as SqlDependency, which keeps an application and a database in sync, are in tune with the needs of applications, and having the same programming model on the client and server made life much simpler, too.

Direct support of XML as a first-class data type in the database gives you the choice of shredding XML data into tables, storing it natively, or even doing some of each based on the needs of the application, not the limitations of the platform.

Likewise, the direct integration of the CLR into the SQL Server runtime gives you a choice of how to implement an operation based on the needs of the application, not the limitations of the platform.

To carry XML and CLR further as first-class citizens, SQL Server 2005 hosts Web Services. Again, this lets you choose how an application connects to SQL Server 2005 based on applications' needs. Applications that connect to a Web Service don't need ADO.NET, ADO, OLE DB, or any other library to make the connections.

SQL Server 2005 opens your choices and widens its applicability to business problems.

But my favorite comes last: Service Broker, the framework for implementing business transactions. The first time I looked at Service Broker, I did a flashback to projects I had worked on in the past and was bowled over by it. It is right on target. All those busywork details I had to code just to move a few things around to match a business process or control resources are now done for me by Service Broker. Service Broker truly is the best thing since sliced bread.

Taken as whole or in pieces, SQL Server 2005 is a huge step forward. Working on the book and explaining to developers as it was changing underneath my feet was a challenge, but well worth it. I couldn't have met that challenge, of course, without the patience, understanding, and love of my wife, Alberta.

Bolton, Massachusetts March 2006

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted Fri Jun 02 00:00:00 EDT 2006

    integrate Web Services with SQL Server

    There is a heck of a lot stuffed between the covers of this book. It shows improvements on many fronts to SQL Server. Quite possibly, any given reader won't need every new feature, or even most. But Microsoft clearly hopes that the broad sweep will have broad appeal to developers. On one front, there is integration with Web Services. So that in SQLCLR, you can invoke a Web Service. To this ends, the text has a quick explanation of Web Services Description Language, and how various utilities are offered, to make stubs or proxies. It may be worth noting that a proxy can be implemented as synchronous or asynchronous. Why is this significant? Some of you might have written client-server code using Sun's Remote Procedure Calls. By default, these used to be synchronous. Which led to very brittle code. A client could hang, waiting for a tardy server to respond. In SQL Server, you might want to consider favouring asynchronous methods, which can give more robust, loosely-coupled systems. There is an extensive discussion of how the entire rubric of Web Services can be deeply integrated with the SQL Server. Impressive. Though some readers might wonder if this seems to be a 2 tier implementation, rather than the common 3 tiers often promulgated in this business. Well, a 2 tier system can be more responsive and scale better than a 3 tier. With the drawback that since your business logic is embedded in the database, you are tied to that database. But if you are already a SQL Server house, and have no plans to migrate, then this should not be a problem. Of course, the book talks about much else. But it was the Web Services that caught my eye.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)