Monday, October 12, 2009

Book Review – A Guide to the SQL Standard

This will be a different type of review than I normally do, because this book is more of a reference guide rather than a book you would read cover to cover. A Guide to the SQL Standard Fourth Edition by C.J. Date with Hugh Darwen is an in-depth examination of the SQL standard. It breaks down nearly every aspect of the standard with good examples.

I have used this book frequently as a reference or when I need more information about a particular aspect of SQL. The book is divided into five sections; Introduction, Some Preliminaries, Data Definition and Manipulation, Data Control and Advanced Topics.

The introduction is a very good summary of SQL and it covers many of the features of the SQL language. For anyone new to SQL chapter 2 is a must read, it is also a good review for any SQL veteran. This chapter paints the entire picture of the overall functionality of the SQL standard.

The preliminaries section is a pure reference section in my opinion. It provides lists of key words, operators and basic SQL concepts like schemas and transactions. This is a good section to refer to when you need to verify a keyword or look up a basic operator.

The data definition and manipulation section is the real heart of the book. This section contains seven chapters which cover many aspects of working with data using SQL statements. In particular chapter 10, Data Manipulation: Cursor Operations includes several examples on working with a set of data in an SQL script. Chapter 11, Table Expressions, provides an in depth discussion of table joins. This section is very useful in demonstrating techniques for retrieving data from a highly normalized relational database. Chapter 12, Conditional Expressions, provides a tremendous amount of useful information about filtering data.

The data control section provides discussions on data integrity and data security. The integrity section provides useful information about using constraints as well as referential integrity. The data security chapter covers information about the different types of operations which can be defined for database objects. This chapter includes information on the GRANT and REVOKE statements.

The advanced topics section contains detailed information about various topics. I found chapter 16, Missing Information and Nulls, to be very interesting. It is very valuable to understand what a NULL really means and the authors do a very good job demonstrating the impact of NULLs. Other chapters go more in depth about data types such as date and time values as well as character data.

The bottom line: this is a very good reference book. It provides a detailed look at the SQL standard which will give you a broader understanding of how SQL should be implemented. Keep in mind that not all database servers implement all aspects of the standard. If you are looking for a book that teaches you how to write SQL statements to retrieve your data there are better books. However, if you are looking for a better understanding of the SQL language this provides the in-depth view of how it works.

No comments: