| |
| |
Foreword | |
| |
| |
Preface | |
| |
| |
Introduction | |
| |
| |
| |
The Basics | |
| |
| |
| |
Stored Procedure Primer | |
| |
| |
What Is a Stored Procedure? | |
| |
| |
Stored Procedure Advantages | |
| |
| |
Creating a Stored Procedure | |
| |
| |
Altering Stored Procedures | |
| |
| |
Executing Stored Procedures | |
| |
| |
Extended Stored Procedures | |
| |
| |
Environmental Issues | |
| |
| |
Parameters | |
| |
| |
Flow Control Language | |
| |
| |
Errors | |
| |
| |
Nesting | |
| |
| |
Recursion | |
| |
| |
Summary | |
| |
| |
| |
Suggested Conventions | |
| |
| |
Source Formatting | |
| |
| |
Coding Conventions | |
| |
| |
Summary | |
| |
| |
| |
Common Design Patterns | |
| |
| |
The Law of Parsimony | |
| |
| |
Idioms | |
| |
| |
Design Patterns | |
| |
| |
Summary | |
| |
| |
| |
Source Code Management | |
| |
| |
The Benefits of Source Code Management | |
| |
| |
The dt Procedures | |
| |
| |
Best Practices | |
| |
| |
Version Control from Query Analyzer | |
| |
| |
Automating Script Generation with Version Control | |
| |
| |
Summary | |
| |
| |
| |
Database Design | |
| |
| |
General Approach | |
| |
| |
Modeling Tools | |
| |
| |
The Sample Project | |
| |
| |
The Five Processes | |
| |
| |
The Five Phases Examined | |
| |
| |
Defining the Functions of the Application | |
| |
| |
Modeling Business Processes | |
| |
| |
Entity-Relationship Modeling | |
| |
| |
Relational Data Modeling | |
| |
| |
Summary | |
| |
| |
| |
Data Volumes | |
| |
| |
Approaches to Generating Data | |
| |
| |
Speed | |
| |
| |
Summary | |
| |
| |
| |
Objects | |
| |
| |
| |
Error Handling | |
| |
| |
Error Reporting | |
| |
| |
Handling Errors | |
| |
| |
Summary | |
| |
| |
| |
Triggers | |
| |
| |
Determining What Has Changed | |
| |
| |
Managing Sequential Values | |
| |
| |
Trigger Restrictions | |
| |
| |
Instead of Triggers | |
| |
| |
Triggers and Auditing | |
| |
| |
Transactions | |
| |
| |
Execution | |
| |
| |
Calling Stored Procedures | |
| |
| |
Nested Triggers | |
| |
| |
Disabling Triggers | |
| |
| |
Best Practices | |
| |
| |
Summary | |
| |
| |
| |
Views | |
| |
| |
Meta-data | |
| |
| |
Restrictions | |
| |
| |
Ansi SQL Schema Views | |
| |
| |
Updatable Views | |
| |
| |
The With Check Option Clause | |
| |
| |
Derived Tables | |
| |
| |
Parameterized Views | |
| |
| |
Dynamic Views | |
| |
| |
Partitioned Views | |
| |
| |
Indexed Views | |
| |
| |
Designing Modular Indexed Views | |
| |
| |
Summary | |
| |
| |
| |
User-Defined Functions | |
| |
| |
Scalar Functions | |
| |
| |
Table-Value Functions | |
| |
| |
Inline Functions | |
| |
| |
Limitations | |
| |
| |
Meta-data | |
| |
| |
Creating Your Own System Functions | |
| |
| |
UDF Cookbook | |
| |
| |
Summary | |
| |
| |
| |
HTML, XML, and .NET | |
| |
| |
| |
HTML | |
| |
| |
Origins | |
| |
| |
Producing HTML from Transact-SQL | |
| |
| |
Producing HTML from sp_makewebtask | |
| |
| |
Summary | |
| |
| |
| |
Introduction to XML | |
| |
| |
Wooden Nickels | |
| |
| |
XML: An Overview | |
| |
| |
HTML: Simplicity Comes at a Price | |
| |
| |
XML: A Brief History | |
| |
| |
XML versus HTML: An Example | |
| |
| |
Document Type Definitions | |
| |
| |
XML Schemas | |
| |
| |
Extensible Stylesheet Language Transformation (XSLT) | |
| |
| |
Document Object Model | |
| |
| |
Further Reading | |
| |
| |
Tools | |
| |
| |
Summary | |
| |
| |
| |
XML and SQL Server: HTTP Queries | |
| |
| |
Accessing SQL Server over HTTP | |
| |
| |
URL Queries | |
| |
| |
Template Queries | |
| |
| |
Summary | |
| |
| |
| |
XML and SQL Server: Retrieving Data | |
| |
| |
Select...For XML | |
| |
| |
RAW Mode | |
| |
| |
AUTO Mode | |
| |
| |
Elements | |
| |
| |
Explicit Mode | |
| |
| |
Mapping Schemas | |
| |
| |
Summary | |
| |
| |
| |
XML and SQL Server: OPENXML | |
| |
| |
The Flags Parameter | |
| |
| |
Edge Table Format | |
| |
| |
Inserting Data with OPENXML() | |
| |
| |
Web Release 1 | |
| |
| |
Limitations | |
| |
| |
Summary | |
| |
| |
| |
.NET and the Coming Revolution | |
| |
| |
.NET: The Future of Applications Development | |
| |
| |
What Is .NET? | |
| |
| |
On Microsoft Bashing | |
| |
| |
Microsoft Bigotry? | |
| |
| |
Summary | |
| |
| |
| |
Advanced Topics | |
| |
| |
| |
Performance Considerations | |
| |
| |
Indexing | |
| |
| |
Statistics | |
| |
| |
Query Optimization | |
| |
| |
Summary | |
| |
| |
| |
Debugging and Profiling | |
| |
| |
Debugging | |
| |
| |
Profiling | |
| |
| |
Stress Testing | |
| |
| |
Summary | |
| |
| |
| |
Automation | |
| |
| |
A Brief Overview of COM | |
| |
| |
SQL Server and COM Automation | |
| |
| |
Summary | |
| |
| |
| |
Extended Stored Procedures | |
| |
| |
Open Data Services | |
| |
| |
A Simple Example | |
| |
| |
A Better Example | |
| |
| |
Making Extended Procedures Easier to Use | |
| |
| |
Debugging Extended Procedures | |
| |
| |
Isolating Extended Procedures | |
| |
| |
xp_setpriority | |
| |
| |
Summary | |
| |
| |
| |
Administrative Stored Procedures | |
| |
| |
sp_readtextfile | |
| |
| |
sp_diff | |
| |
| |
sp_generate_script | |
| |
| |
sp_start_trace | |
| |
| |
sp_stop_trace | |
| |
| |
sp_list_trace | |
| |
| |
sp_proc_runner | |
| |
| |
sp_create_backup_job | |
| |
| |
sp_diffdb | |
| |
| |
Summary | |
| |
| |
| |
Undocumented Transact-SQL | |
| |
| |
What Defines Undocumented? | |
| |
| |
Undocumented Procedures | |
| |
| |
Creating Information_Schema Views | |
| |
| |
Creating System Functions | |
| |
| |
Undocumented DBCC Commands | |
| |
| |
Undocumented Functions | |
| |
| |
Undocumented Trace Flags | |
| |
| |
Summary | |
| |
| |
| |
Arrays | |
| |
| |
xp_array.dll | |
| |
| |
Array System Functions | |
| |
| |
The Piece de Resistance | |
| |
| |
Multidimensional Arrays | |
| |
| |
Summary | |
| |
| |
| |
Essays on Software Engineering | |
| |
| |
| |
Creating a Workable Environment | |
| |
| |
Get Rid of Distractions | |
| |
| |
Close the Door | |
| |
| |
Internal Distractions | |
| |
| |
Form Over Function | |
| |
| |
Silence Is Golden; Communication Divine | |
| |
| |
Conclusion | |
| |
| |
Epilogue | |
| |
| |
| |
Evolutionary Development | |
| |
| |
Kaizen | |
| |
| |
The Benefits of Small Changes | |
| |
| |
Software | |
| |
| |
Software Eutropy | |
| |
| |
Refactoring | |
| |
| |
Selling Management (or Yourself) on Refactoring | |
| |
| |
When Not to Refactor | |
| |
| |
Databases | |
| |
| |
Can You Refactor Instead of Design? | |
| |
| |
A House Built Upon the Sand | |
| |
| |
Extreme Programming | |
| |
| |
Conclusion | |
| |
| |
Epilogue | |
| |
| |
| |
The Gestalt of Testing | |
| |
| |
Where to Begin | |
| |
| |
The Futility of Testing | |
| |
| |
Types of Tests | |
| |
| |
When to Test | |
| |
| |
Testing Can Save Time | |
| |
| |
Testing in the Extreme | |
| |
| |
Other Types of Testing | |
| |
| |
Conclusion | |
| |
| |
Epilogue | |
| |
| |
References | |
| |
| |
Index | |