Synopses & Reviews
A comprehensive, hands-on reference for database developers and administrators, this book focuses on advanced querying techniques using Transact-SQL (T-SQL), the database programming language built into SQL Server. Includes code and table examples. This thorough, hands-on reference for database developers and administrators delivers expert guidance on sophisticated uses of Transact-SQL (T-SQL)--one of the most familiar and powerful programming languages for SQL Server. Written by a T-SQL guru, this guide focuses on advanced querying techniques and how queries are interpreted and processed by the SQL Server execution engine. You'll get in-depth coverage of the sophisticated uses of T-SQL, including the differences between logical and physical processing, nesting of queries, and much more. The book explains and compares solutions to database-development problems in both SQL Server 2000 and SQL Server 2005, discussing the new T-SQL programming features added to SQL Server 2005 in detail. Includes extensive code samples, table examples, and logic puzzles to help database developers and administrators understand the intricacies and help promote mastery of T-SQL. SQL Server 2005 is Microsoft's next-generation data management and analysis solution that delivers enhanced scalability, availability, and security features to enterprise data and analytical applications while making them easier to create, deploy, and manage. Featuring key advances in enterprise data management, developer productivity, and business intelligence, SQL Server 2005 is part of the Microsoft Windows Server System, a comprehensive and integrated server infrastructure that simplifies the development, deployment, andoperations of flexible business solutions.
Take a detailed look at the internal architecture of T-SQL—and unveil the power of set-based querying—with comprehensive reference and advice from the experts. Database developers and administrators get best practices, sample databases, and code to master the intricacies of the programming language—solving complex problems with real-world solutions.
Discover how to:
- Understand logical and physical query processing
- Apply a methodology to optimize query tuning
- Solve relational division problems
- Use CTEs and ranking functions to simplify and optimize solutions
- Aggregate data with various techniques, including tiebreakers, pivoting, histograms, and grouping factors
- Use the TOP option in a query to modify data
- Query specialized data structures with recursive logic, materialized path, or nested sets solutions
- PLUS—Improve your logic and get to the heart of querying problems with logic puzzles
Get code and database samples on the Web
About the Author
Dejan Sarka is a mentor with SolidQ and focuses on development of database and business intelligence applications. He is a frequent speaker at international conferences such as TechEd, SqlDevCon, and PASS. He is the founder of the Slovenian SQL Server and .NET Users Group. As main author or coauthor, Dejan has written nine books about SQL Server. He has also developed three courses for SolidQ: Data Modeling Essentials, Data Quality and Master Data Management, and Data Mining.
Itzik Ben-Gan is a mentor and cofounder of SolidQ. A Microsoft MVP for SQL Server since 1999, Ben-Gan teaches and consults internationally on T-SQL querying, programming, and query tuning. He is the author of Microsoft SQL Server T-SQL Fundamentals and coauthor of Inside Microsoft SQL Server: T-SQL Querying and Inside Microsoft SQL Server:T-SQL Programming. He has written numerous articles for SQL Server Magazine and MSDN, and speaks at industry events such as Microsoft TechEd, DevWeek, PASS, and SQL Server Connections.
Lubor Kollar is group program manager with the SQL Server Customer Advisory Team at Microsoft, working on the most challenging SQL Server deployments worldwide. He has 13+ years of experience with SQL Server development.
Table of Contents
ForewordPrefaceAcknowledgmentsIntroductionChapter 1: Logical Query ProcessingChapter 2: Physical Query ProcessingChapter 3: Query TuningChapter 4: Subqueries, Table Expressions, and Ranking FunctionsChapter 5: Joins and Set OperationsChapter 6: Aggregating and Pivoting DataChapter 7: TOP and APPLYChapter 8: Data ModificationChapter 9: Graphs, Trees, Hierarchies, and Recursive QueriesAppendix A: Logic PuzzlesAppendix : About the Contributors