Microsoft SQL Server 2019: A Beginner's Guide, 7th Ed

Author: Dusan Petkovic
Publisher: McGraw-Hill 
Pages: 864
ISBN: 978-1260458879
Print: 1260458873
Kindle: B082K92PL7
Audience: DBAs/Devs
Rating: 4.5
Reviewer: Ian Stirk 

This book aims “…to provide a comprehensive introduction to SQL Server that is friendly to beginners.” How does it fare? 

 

The book’s introduction suggests that both new and existing SQL Server users could find the book useful, being suitable for such diverse roles as developers, admins, Business Intelligence, and Data Scientists.  

A brief look at the table of contents gives an indication of the scope and depth of topics covered. This ranges from the basics such as SQL database recovery and an introduction to normal forms, to the use of Machine Learning Services (Python/R), and from simple SQL syntax to Multi-version Concurrency Control.

The book consists of 33 chapters, grouped into six parts. Below is an exploration of the topics covered in the various parts, together with any salient observations.

Banner

Part I      Basic Concepts and Installation

The first part of this book covers basic database concepts, these include: 

  • An overview of relational databases (e.g. normalization, backup and recovery)

  • Installing SQL Server (e.g. planning, implementation, Windows/Linux)

  • Front-end tools (e.g. SSMS, Azure Data Studio) 

This part will take you from a level of little database awareness to a fair level of confidence within a short number of pages. I’m not sure this book is for absolute beginners, but someone with a basic understanding of databases (e.g. 6-months experience) should be able to increase their knowledge. Each chapter ends with exercises based on the chapter’s content (and answers are provided at the end of the book). 

The book might also be appropriate for university students learning about database systems in general, and SQL Server in particular. Additionally, existing database professionals coming from another vendor or those wanting an update of what’s in SQL Server 2019, will also benefit from this book.

The part is well written, having useful diagrams and explanations, with an easy flow within and between chapters. These traits apply to the whole book.    

Part II     Transact-SQL Language

This part explores the traditional language elements that most developers will associate with SQL Server. The elements covered include: 

  • SQL Components (e.g. syntax, datatypes, functions)

  • Data Definition Language (e.g. create/alter table, Referential Integrity)

  • Queries (e.g. SELECT, WHERE, GROUP BY, CASE, JOIN)

  • Modification of a Table’s Contents (e.g. INSERT, UPDATE, DELETE, MERGE)

  • Stored Procedures and User-Defined Functions (e.g. exception handling, UDFs)

  • System Catalog (e.g. DMVs/DMFs, system stored procedures)

  • Indices (e.g. clustered, nonclustered, filtered, covering, missing)

  • Concurrency Control (e.g. transactions, locking, isolation levels) 

This part provides a comprehensive overview of the major elements of SQL Server’s version of SQL (T-SQL). This section should form the central pillar of a SQL Server developer’s toolkit. Useful examples to illustrate the topic being discussed are given throughout (e.g. SELECT REPLICATE(‘a’,10) = ‘aaaaaaaaaa’). Sometimes, a chapter is too wordy, and lacking suitable examples (e.g. chapter 13 Concurrency Control). 

Part III   SQL Server: System Administration

Having looked at features that are largely developer-focused, this section now swaps to topics that are largely in the realm of the database administrator, and these include: 

  • System Environment of the Database Engine (system databases, utilities, DBCC, PBM)

  • Backup, Recovery, and System Availability (the most important DBA task)

  • Automating System Administration Tasks (SQL Agent, jobs, logs)

  • Query Optimizer (query analysis, execution plans, DMVs, hints)

  • Performance Tuning (monitoring, profiler, extended events, DTA, resource governor)

  • In-Memory OLTP (tables and stored procedures, concurrency model, tools) 

Each of the topics is discussed in enough detail to take you from novice to around intermediary level. However, be aware that some topics are just described rather than explained with examples (e.g. AlwaysOn), so it is sometimes more of a starting point in understanding the concepts rather than in gaining practical experience. 

I’m not sure why replication was the High Availability (HA) method discussed in detail, AlwaysOn is generally the preferred method. Again the chapter was largely a talk-through rather than a practical example.

There are a few errors but the intent is generally correct: eg example 19.10, “…ordered by the count of their execution times.” - but it is ordered by the number of times it has executed. 

Part IV    SQL Server and Business Intelligence

This section now looks at the growing area of Business Intelligence (BI). The areas covered include:  

  • Business Intelligence: An Introduction (OLTP v BI, Data Warehouse design/architecture)

  • SQL Server Analysis Services (Multidimensional v Tabular models, security)

  • Business Intelligence and Transact-SQL (windowing functions, standard and proprietary)

  • SQL Server Reporting Services (architecture, configuration, creating reports, security)

  • Intelligent Query Processing (Adaptive Query Processing, batch mode, UDF inlining) 

The content is wider than traditional BI usage alone, although BI does run through each topic. The chapters should provide enough practical information to get you started in creating viable projects of your own. I enjoyed the last chapter, which contains many of the newer 2019 features.

A key component of BI is SQL Server Integration Services (SSIS), used to extract, transform, and load data. I’m astounded this very popular component isn’t included.

Part V   Beyond Relational Data

The core of SQL Server is based around its relational database capabilities. Increasingly, the product is incorporating additional non-relational functionality. Some are illustrated here, including:  

  • JSON Integration in the Database Engine (storing, querying, presenting JSON)

  • Spatial and Temporal Data (spatial data, temporal tables)

  • SQL Server Graph Databases (nodes, edges, querying, modifying) 

Each of the three highlighted features is discussed with useful example code showing its practical usage. In many ways these features illustrate the scope of this book, although aimed at ‘beginners’, there are many traditional SQL Server developers/admins that are still unfamiliar with these unusual features – so this book should be useful for them.

Part VI    Machine Learning

The increasing use of Artificial Intelligence (a very contentious term!), and specifically Machine Learning (i.e. applied statistics and pattern matching) via R and Python libraries is highlighted in the latest versions of SQL Server. This section provides a good general practical introduction to Machine Learning and might provide you with some ideas for your own ideas.

I must admit, I have problems running R and Python within the confines of SQL Server. If there are errors (especially at the start of coding) it can be difficult to debug (cf: debugging dynamic SQL). I often have to drop into Visual Studio to create the code that I need (much better debugging etc), and then adapt it to run as R/Python inside SQL Server. Perhaps this could have been pointed out. 

Conclusion

This ambitious book covers a lot of topics. Although the title may suggest it’s for beginners, it is probably more appropriate for database staff with at least 6 months experience. It should allow SQL Server devs and admins to update their knowledge to the latest version. Another useful audience would be devs and admins coming to SQL Server from other environments (e.g. Oracle). The book might also be appropriate for university students learning about database systems in general, and SQL Server in particular.

So, in the context of the above target audience, the book is generally well written, with helpful discussions and useful examples provided. Helpful tips/hints are provided throughout the book. There are good links within and between chapters.

Sometimes, the topics are devoid of examples, being general discussions around a topic (e.g. AlwaysOn). I’m not sure who would read the whole book, for example devs are often unconcerned with admin topics. 

Most of the topics are discussed in enough detail to take you from novice to intermediary level or so. There is much more to learn, but this book, overall, is a great place to start. 

Last Updated ( Tuesday, 02 March 2021 )