Advanced Search
Start Your Free Trial

Overview

Other Readers Also Read...
The Art of SQL

The Art of SQL
by Stephane Faroult; Peter Robson

Database in Depth

Database in Depth
by C.J. Date

Top Sellers in this Category

Head First PHP & MySQL

Head First PHP & MySQL
by Lynn Beighley; Michael Morrison

Head First SQL

Head First SQL
by Lynn Beighley

SQL Cookbook, 1st Edition

SQL Cookbook, 1st Edition
by Anthony Molinaro

Understanding SQL's underlying theory is the best way to guarantee that your SQL code is correct and your database schema is robust and maintainable. On the other hand, if you're not well versed in the theory, you can fall into several traps. In SQL and Relational Theory, author C.J. Date demonstrates how you can apply relational theory directly to your use of SQL. With numerous examples and clear explanations of the reasoning behind them, you'll learn how to deal with common SQL dilemmas, such as:

  • Should database access granted be through views instead of base tables?

  • Nulls in your database are causing you to get wrong answers. Why? What can you do about it?

  • Could you write an SQL query to find employees who have never been in the same department for more than six months at a time?

  • SQL supports "quantified comparisons," but they're better avoided. Why? How do you avoid them?

  • Constraints are crucially important, but most SQL products don't support them properly. What can you do to resolve this situation?

Database theory and practice have evolved since Edgar Codd originally defined the relational model back in 1969. Independent of any SQL products, SQL and Relational Theory draws on decades of research to present the most up-to-date treatment of the material available anywhere. Anyone with a modest to advanced background in SQL will benefit from the many insights in this book.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 4.5 out of 5 rating Based on 7 Ratings

My mind was blown, my head has grown, my SQL has entered the zone - 2009-06-23
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I have spent the last three or four weeks struggling through this book. Never content to know only the "how" of something, I wanted to learn some of the "why" behind SQL databases. This book covers that in depth, with a steep learning curve for someone like me who has a bit of experience using SQL in various applications, but who has never formally studied it. That is not a bad thing.

First, a bit of background. The author, C. J. Date, is well known in the field for his classic textbook An Introduction to Database Systems, which has gone through at least eight editions. He began working on databases in 1970 at IBM and worked with the inventor of the relational theory of database design, E. F. Codd. There is no doubt that this is a man who knows what he is talking about.

What this book sets out to do, in about 400 pages, is describe and define the relational model in greater depth and compare how SQL is currently used in many database applications like Oracle and MySQL to the theoretical ideal. As he does this, Date points out several inconsistencies with the SQL adaptation of the relational model and makes suggestions for how to adjust common usage to more closely conform to the ideal while acknowledging that at times perfect syncronization will be impossible using SQL. He also gives numerous examples of how it could be done in Tutorial D, which is an interesting study in itself.

I submit that this book is ideal for theorists, for highly qualified and experienced database administrators who want to learn at the feet of a sometimes emphatic and slightly dogmatic master who has been instrumental in the creation and spread of the relational database idea, but whose theory has not been perfectly implemented. If you merely want to know how to work within current implementation constraints without the larger picture, skip this book. If you want some fascinating, and sometimes difficult to grasp background and theory that will likely make you a better database wizard, this book is likely to help you get there.

Here are some highlights, sample questions and topics discussed in the book:

* What are the differences between the relational model and the various product implementations available today and in the past?
* Should a relational database allow duplicate entries?
* Why are null values a bad idea?
* What do relational expressions mean?
* Why must database constraint checking be immediate, at least in theory, and why is it often deferred in practice?

Seriously, that is just the beginning. There are excellent examples of SQL code throughout the book, great discussions of the mathematics behind the genesis of relational theory, and more. Beware, though, you may have to work to understand it, but it will be worthwhile for those who do.

Perfect theory, perfectly apart from reality - 2009-10-10
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Date is a serious thinker, for his continuous think (and re-think) on relation theory these years, he deserves very much respect.
But as he said, his perspective changes over time, that is not a problem by itself. A big truth he do not want to recognize is people's life is limited. We want to use relation theory to DO SOMETHING MEANINGFUL, not only play with the mathematics. In order to DO SOMETHING MEANINGFUL, we have to depends on 2 things Date seldom respect:
First, the physical storage engine. His theory is perfect in the theory domain, but when it needs a physical implementation, some condition changes. For example, logically, NULL can be avoided totally, but if you want to avoid NULL definition in your modeling at all, you need many many tables to model 1 to (0..1) cardinality. Something like a vertical database.
Second, the vendor. We'll all die after some limited years. If there really are something the vendor can improve after reading Date's theory, can it be improved in our career years? Can I say sorry to my clients: the vendor do not respect relation theory, so the performance is poor.
From a practical point, I do recommend you read this book, but do not overweight this. Fabian Pascal's Practical Issues in Database Management System also deserves a read.
For SQL Server related guys, I highly recommend Itzik Ben-Gan's series book:
Inside Microsoftr SQL Serverr 2008: T-SQL Fundamentals (Pro-Developer)
Inside Microsoftr SQL Serverr 2008: T-SQL Querying (Pro-Developer)
Inside Microsoftr SQL Serverr 2008: T-SQL Programming (Pro-Developer)
These books come from practical and dives into practical, also contains a fair amount of theory as well. For these reasons, I want to say: Ben-Gan is a more respectful author, for he make the REAL world better, not the imaginary/theortical world.

Theory Behind Practical - 2009-11-12
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Theory Behind Practical

I have been a SQL guy for a long time especially specializing in writing better sql code. This notion was with me until I read this book. However, after reading this book, I felt that so many things I was missing behind my working on SQL. The book well covers the theory behind relational database management. I have read few books of the same author who can be arguably called as one of the pioneers in Relational Theory in database management. Anytime, I ventured to read any of books authored by him, I get fascinated by his way of explaining the SQL in relation to mathematics, set theory etc.

Initially, while reading the book I struggled to concentrate and relate the information to my daily working on SQL. The book really related the theory behind of working of various concepts in SQL such as constraints, views, operators, joins etc. The author has particularly stressed upon the reason behind various theories in SQL in various database platforms.

I was impressed on the topic on using logic to formulate sql expressions. It opens up the idea in readers mind on how to approach to a sql deduction.

I suggest this book to all the database professionals who want to know the why's of database theories. Trust me, it really helps and you will be amazed to know how much more you will know on SQL.

Best SQL Book - 2009-10-09
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
SQL and Relational Theory How to Write Accurate SQL Code
C.J. Date / O'REILLY
This is the best SQL book I have read so far! I have read many SQL books but this one beats every single one of them. This book is about how you can apply relational theory directly to your use of SQL. My favorite chapter was chapter 1 it teaches SQL terminology. It talks about The Relational Model, Principles, Structural Features and many more. Another good chapter is chapter 11 where it shows how to formulate logic. This book is great if you want to learn SQL and its logic, I have read this book twice. After using SQL Server for many years this book opened up my eyes to some of the struggles I have come across, I have learned to use SQL logic wisely. I am ready to go out into the real world I felt I was trapped inside a box and there was no other way to do things in sql, I thought my way was the best way. But after reading and talking with some people I realized I am not the only one using sql there are many ways of writing sql to do the same thing but better performance and now that I met a few sql people I felt small because they are way smarter than me when it comes to sql. I recommend this book!

It's like broccoli; you may not like it, but it's good for you... - 2009-05-14
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This is a tough read; I've been working with databases for over 10 years, and I found this material challenging in places. Date is a theorist, and he does a good job of trying to explain the theory of relational design as opposed to the implementation of SQL; however, at times the material felt very dry and difficult to comprehend. I wish he had done more visual comparisons of the terms used in the relational model as opposed to SQL; it would have helped me understand the contrast between the two.

This is not a book to be read once, and put away; it's a book that should be revisited periodically, and carefully explored.

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2009 Safari Books Online. All rights reserved.