Monday, October 25, 2010

Book Review – Database in Depth

DatabaseInDepth-Date[3]In keeping with my "Back to Basics" theme for this year I picked up a copy of Database In Depth by C.J. Date. This book includes a basic introduction into the relational database model and how it is different than many of the many implementations currently available. This book discusses the relational theory as developed by E.F. Codd and how this theory has become the basis for how data is manipulated today.

C.J. Date covers this very complex topic using many examples and discussions. I found it very enlightening and useful although it took some effort to get through the book. The material is explained and examples are given, however, sometimes I had to do the provided exercises in order to really get a firm grasp on the information. This is definitely a book that requires some effort by the reader.

The first chapter of the book is a quick introduction into the terminology used in relational theory and how some of it is different than the SQL model which gets more attention. The following four chapters go into these various types and relationships in much more detail. The next two chapters focus more on how the relational theory is applied with respect to constraints and database design. The final chapter defines the relational model and compares it to other data models.

Terminology is a major factor in this book. I tend to think of databases in a SQL sense which is slightly different than the relational sense. SQL is based on rowsets or resultsets whereas relational theory uses relvars and tuples to define data. Once I was comfortable with the differences the information was easier to digest.

Of particular note is the fact that Mr. Date does not support the implementation of nulls in databases. He makes some convincing arguments in chapter three. Essentially, it boils down to the complexity of three value logic. Because a boolean result can now return three values ( true, false or unknown ) instead of just two. I agree with his point, however, in the real world I see practical uses for allowing null.

The final chapter does a good job of wrapping up the information presented in the book as well as provides a definition of the relational model. Below are the five components of the relational model ( from chapter eight page 164 ):

    1. An open-ended collection of scalar types, including the particular type BOOLEAN (truth values)
    2. A relation type generator and an intended interpretation for relations of types generated thereby
    3. Facilities for defining relation variables of such generated relation types
    4. A relational assignment operator for assigning relation values to such relation variables
    5. An open-ended collection of generic relational operators for deriving relation values from other relation values.

The bottom line: this book contains a lot of useful information on the foundations of modern database systems. It is highly technical and covers the topics in a very textbook manner.  Although the book is not an "easy read" there is a ton of good information in the 200 pages. This isn't the kind of book you read straight through. It takes time to get through the material and it even includes many exercises used to reinforce the information.

No comments: