Today on Blogcritics
Home » Books » Book Reviews » Book Review: Microsoft SQL Server 2008: T-SQL Fundamentals By Itzik Ben-Gan

Book Review: Microsoft SQL Server 2008: T-SQL Fundamentals By Itzik Ben-Gan

Please Share...Tweet about this on Twitter0Share on Facebook0Share on Google+0Share on LinkedIn0Pin on Pinterest0Share on TumblrShare on StumbleUpon0Share on Reddit0Email this to someone

Microsoft SQL Server 2008: T-SQL Fundamentals is a guide that is aimed those beginning to learn the Microsoft SQL Server dialect of the standard ANSI-SQL language. The goal of this book is to teach you the theory behind T-SQL (also known as Transact-SQL) while showing you how to use it in real world situations.

While most of Microsoft SQL Server 2008: T-SQL Fundamentals is not version specific, it does introduce new elements that have been introduced to recent versions. The author makes note of these differences and what version they were added in. The book is 688 pages long and is divided into 10 chapters.

Chapter One, “Background to T-SQL Querying and Programming,” provides a theoretical background about SQL, set theory, and predicate logic. It provides an overview to the SQL architecture and demonstrates how to use T-SQL to create tables and define data integrity.

Chapter Two, “Single-Table Queries,” now looks at the fundamentals of the SELECT statement for working with single tables. This chapter introduces some of the most fundamental points of working with SQL Server, but ones that will be needed later.

Chapter Three, “Joins,” are very important for working with multiple tables. A JOIN operator operates on two input tables and there are three fundamental types: cross, inner, and outer. This chapter also covers composite joins, non-equi joins, and multi-table joins. More advanced aspects are also covered in an optional reading section.

Chapter Four, “Subqueries,” are queries within queries. This is also referred to as nesting queries. You will look at self-contained sub-queries, scalar and multi-valued subqueries. There is also an advanced reading section on returning previous and next values, running aggregates, and misbehaving subqueries.

Chapter Five, “Table Expressions,” are named query expressions that represent a valid relational table. They can be used in data manipulation statements as you would use other tables. They can simplify your code, improve maintainability, and encapsulate query logic.

Chapter Six, “Set Operations,” are operations between two input sets resulting from two input queries. Covered here is the general syntax and requirements of set operations as well as how to use each supported set operation: UNION, INTERSECT, and EXCEPT. Also explained are the two types of each set operation -– DISTINCT, and ALL — as well as providing alternatives to the missing INTERSECT ALL, and EXCEPT ALL.

Chapter Seven, “Pivot, Unpivot, and Grouping Sets,” provide both standard and nonstandard techniques to pivot and unpivot data. This chapter also covers several important features that are introduced in SQL 2008 that makes the handling of groups more flexible and efficient. These include GROUPING SETS, CUBE, and ROLLUP.

Chapter Eight, “Data Modification,” now examines the set of statements known as Data Manipulation Language (DML) for dealing with the manipulation of data. This not only includes statements that modify data, but also ones that involve data retrieval. These include INSERT, UPDATE, DELETE, and MERGE

Chapter Nine, “Transactions and Concurrency,” looks at how SQL Server handles concurrent users trying to access the same data at the same time. It also delves into how transactions work. Keep in mind that this can become a pretty complex topic and so this chapter provides just an introduction to these workings.

Chapter Ten, “Programmable Objects,” is a brief overview of what is another more advanced topic, objects that can be used within the programming environment. The chapter covers items such as variables, flow statements, cursors, temporary tables, stored procedures, and dynamic SQL.

Microsoft SQL Server 2008: T-SQL Fundamentals is listed as a book for beginners and for that purpose it provides an excellent introduction to working with T-SQL. Where it also shines is that in providing such a solid foundation to T-SQL that it will also benefit more seasoned users of T-SQL.

I have used T-SQL for a long time, almost ten years, and sprinkled thought the book I found many things that I was either unaware of, or really did not understand as well as I thought I did. Microsoft SQL Server 2008: T-SQL Fundamentals will definitely help fill in the gaps to your understanding.

The author, in a very systematic method, explains the language, but also gives enough theory to help you to understand why it happens. I also like the advance reading in some of the chapters so as not to overwhelm the more novice reader, but yet allow them to come back as their experience develops. I think that it should be mandatory reading for anyone who is trying to learn, or advance their learning in T-SQL, and I very highly recommend this book.

Powered by

About T. Michael Testi

Photographer, writer, software engineer, educator, and maker of fine images.