Introducing SQL Server
Introducing SQL Server
Article Index
Introducing SQL Server
Chapter 10 onwards

Author: Mike McQuillan
Publisher: Apress
Pages: 388
ISBN: 978-1484214206
Print: 148421420X
Kindle: B0142D693W

Audience: Database developers
Rating: 4.0
Reviewer: Ian Stirk 

  

This book aims to get the newcomer started in SQL Server development, how does it fare? 

SQL Server is one of the most popular databases in the world, so breaking into this area should be rewarding. This book is targeted at the beginner, it should also be helpful to others wanting to improve their database knowledge.

Below is a chapter-by-chapter exploration of the topics covered.

Chapter 1 What Is SQL Server?

This chapter opens with a brief review of SQL Server’s history, from the original Sybase/Microsoft offering through to SQL Server 2014 – and the major features of each version are listed. Next, the major components of SQL Server are briefly described (e.g. database engine, SQL Agent). Business Intelligence (BI) components (SSIS, SSAS, SSRS) are briefly described – these allow the import, analysis and reporting of data.

The chapter continues with a look at the various editions of SQL Server, highlighting their major features. The chapter ends with a brief overview of some useful SQL Server tools including: SQL Server Management Studio (SSMS), SQL Server Data Tools (SSDT), Configuration Manager, and SQLCMD.

This chapter puts SQL Server into context, its history, editions, and tools are briefly described. There’s a very good point about buying the developer edition of SQL Server, this gives enterprise functionality at a cheap cost.

The chapter is easy to read, starts with the basics, and has good explanations and discussions. The author has a relaxed manner – including some humour, and gives positive feedback, which should be reassuring for beginners. Subsequent chapters have useful screenshots, step-by-step walkthroughs, and helpful T-SQL code. These traits apply to all the chapters of the book.

Chapter 2 Obtaining and Installing SQL Server

This very useful chapter opens with detail on where to download SQL server Express, the free version of SQL Server that is used throughout the book. The various steps of the Installation Wizard are explained in a step-by-step manner, items covered include: license, update, feature selection, instance configuration, server configuration, and database engine configuration. After installation, there’s a quick tour of SSMS, the environment where most SQL work is undertaken. For beginners, this level of detail and guidance are especially important, since if you can’t install the product correctly you will not be able to use it. 

 

Chapter 3 Database Basics

The previous chapters were largely background chapters. This chapter describes what a database is (a container) together with its major components (tables, views, stored procedures, and functions). The 5 system databases are briefly described (master, MSDB, model, resource, and tempdb), before creating a user database.

The creation of a user database is shown using both SSMS and T-SQL code. Various relevant properties are discussed including: owner, logical name, file type (row data or log), and filegroup. Similarly, dropping (deleting) of the database is also described. Scripting out the definition of an existing data is illustrated.

This chapter provides everything you’d want to know to start creating a SQL Server database.

Chapter 4 Tables

This chapter starts with a look at creating a table, using both SSMS and T-SQL code. Next, the various types of table are briefly explained (e.g. heap, clustered, temp). The various column data types are discussed (e.g. int, varchar), followed by a discussion of Primary and Foreign Keys.

Chapter 5 Putting Good Tables Together

Tables should follow certain rules to eliminate duplicate data, and to make data changes easier. These rules are known as database normalization, and this chapter discusses the first, second, and third normal forms. The importance of getting this design step correct is emphasised, since changes made later are almost always more costly.

The section about the primary key mentions foreign keys, but this is before they have been discussed. The eventual foreign key description given is longwinded. Additionally, I felt this chapter should have been clearer and simpler, with fewer tables and less repetitive script changes – this is an introductory book, let’s make it simple.

Chapter 6 Automating Deployment with SQLCMD

SQLCMD allows the execution of T-SQL code via the command line or SQLCMD mode in SSMS. It’s used in this chapter to execute multiple scripts in one go, and its use is illustrated with a set of rollback scripts.

I do wonder if a chapter on SQLCMD is needed in an introductory book. It is possible to separate sections of a SQL script with GO statements, rather than use SQLCMD.

Chapter 7 NULLs and Table Constraints

This chapter is concerned with ensuring only valid data is entered into tables, by using constraints. The first constraint examined is the null constraint – this specifies if a column value is mandatory, or not. Next, default constraints are discussed - these populate a column when no value is supplied. The next section looks at table and column constraints (check constraints) - these determine what values a column can (or can’t) have. The chapter ends with a look at unique constraints. In each case, plenty of examples and code is supplied.

Chapter 8 DML (or Inserts, Updates, and Deletes)

This chapter looks at Data Manipulation Language (DML) i.e. SQL statements that INSERT, UPDATE and DELETE data in tables. T-SQL code, and screenshots are provided for each example.

Chapter 9 Bulk Inserting Data

This chapter looks at the BULK INSERT statement, this allows the mass insert of data from an external file. The chapter prepares an external file before importing it using the BULK INSERT statement. Various errors are examined, together with their solution. The chapter ends with a look at truncating tables, this quickly deletes data from a table.

 

Banner



Last Updated ( Tuesday, 09 February 2016 )
 
 

   
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.