SQL and Relational Theory and over one million other books are available for Amazon Kindle. Learn more

Have one to sell? Sell yours here
Start reading SQL and Relational Theory on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

SQL and Relational Theory: How to Write Accurate SQL Code [Paperback]

C.J. Date
4.1 out of 5 stars  See all reviews (15 customer reviews)


Available from these sellers.


Free Two-Day Shipping for College Students with Amazon Student

Formats

Amazon Price New from Used from
Kindle Edition $17.27  
Paperback --  
Like this book? Find similar titles in the O'Reilly Bookstore.
There is a newer edition of this item:
SQL and Relational Theory: How to Write Accurate SQL Code SQL and Relational Theory: How to Write Accurate SQL Code 3.3 out of 5 stars (3)
$32.39
In Stock.

Book Description

January 30, 2009 0596523068 978-0596523060 1

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.



Editorial Reviews

About the Author

C.J. Date has a stature that is unique within the database industry. C.J. is a prolific writer, and is well-known for his best-selling textbook: An Introduction to Database Systems (Addison Wesley). C.J. is an exceptionally clear-thinking writer who can lay out principles and theory in a way easily understood by his audience.


Product Details

  • Paperback: 428 pages
  • Publisher: O'Reilly Media; 1 edition (January 30, 2009)
  • Language: English
  • ISBN-10: 0596523068
  • ISBN-13: 978-0596523060
  • Product Dimensions: 7 x 1.1 x 9.1 inches
  • Shipping Weight: 1.5 pounds
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (15 customer reviews)
  • Amazon Best Sellers Rank: #886,133 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Most Helpful Customer Reviews
28 of 28 people found the following review helpful
4.0 out of 5 stars Mathematics and Database Design March 21, 2009
Format:Paperback
In this book the author argues that the only database model that will endure is the relational model, because it is "rock solid" and "right." Other models such as the "hierarchic model" or the "object oriented model" or the "semistructured model" are doomed to fail because there is no consensus on what they actually represent.

The relational model of databases is based on the pioneering work of E.F. Codd, a mathematician working for IBM who published his initial seminal paper in 1969. A language to support queries in relational databases was subsequently developed, which was ultimately named SQL, and variants of that language are used to extract data from relational databases.

This book gives an excellent review of SQL; it includes many examples of SQL code. The book is written as a technical treatise and would not be an easy read for someone who isn't familiar with the use of SQL. The original description of relational databases was mathematical in nature, and this book follows in that vein, using mathematical "proofs" to illustrate the best approach to the use of SQL in relational databases. There are many exercises given at the end of each chapter, and the answers to the exercises are given at the end of the book. There is a seven page index. Appendices A & B provide a somewhat simplified, easier to read discussion of the primary goals of the book than the book chapters do, for those wishing a simplified synopsis of the main points, I'd suggest reading those appendices first.

For those who would appreciate a theoretical discussion of database design and SQL development that will "bullet proof" their code, this is an excellent book. For those who'd like a more nuanced discussion of why there should only be one instance of any data set in their tables, this book provides the answers. But for the mathematically challenged, it may be tough going.
Comment | 
Was this review helpful to you?
20 of 20 people found the following review helpful
Format:Paperback
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.
Comment | 
Was this review helpful to you?
18 of 19 people found the following review helpful
4.0 out of 5 stars The "Code Complete" of SQL Books March 16, 2009
Format:Paperback
C. J. Date has just released what I would say is the "Code Complete" manual for SQL. Not for the layman, this work explains [in intricate detail] the whys and wherefores of SQL, and how to over its many idiosyncrasies. From Keys and Constraints, to using joins, to all the types of normalization, this is a great reference for everyone.

If you read this book, please follow the author's instructions and don't skip over sections because of some familiarity. The detail in which he delves into even "simple" functionality in SQL are useful to see the big picture.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
2.0 out of 5 stars Should be called "Relational Theory and What Is Wrong with SQL"(there...
I was extremely disappointed by the author's lack of ability to actually write to sentient human beings. Read more
Published 3 months ago by rob2D
3.0 out of 5 stars Great content, terrible writing
I purchased this book to get a good grasp on the theory behind database systems, which I use in my regular work. In terms of content, it's all here. Read more
Published 11 months ago by Dan P
4.0 out of 5 stars Ask Felgall - Book Review
This book doesn't cover any specific database and it doesn't teach SQL. Instead what this book does is to examine the relational data model and looks at what parts of SQL do and... Read more
Published 17 months ago by Stephen Chapman
5.0 out of 5 stars Leverage your current SQL skills to make the *theory* attainable and...
NOTE TO COMPARISON SHOPPERS:
The author himself (as stated in the Preface) intends for this book to REPLACE his earlier "Database in Depth" book. You need not buy both. Read more
Published 19 months ago by Kelly Jones
5.0 out of 5 stars Great book to learn te fundamental again
This is a great book to dive into fundamentals of SQL theory.
I like this quote from the book:
"The gap between theory and practice is not as wide in theory as it is in... Read more
Published 19 months ago by Kaveh
5.0 out of 5 stars What's not to love about Date?
Well, lots. He is a true believer, but what the hell, when he writes on anything relational, he is fascinating.
Published on October 28, 2010 by L. Hassell
3.0 out of 5 stars Thick & dry but worth the read
To start, this book is about theory and is not for anyone looking for a specific vendor implementation. Read more
Published on September 12, 2010 by Dustin Davis
5.0 out of 5 stars Back to school treatise on what's behind the SQL
First, disclaimer: this book is not for everyone. If you are beginner in database programming and SQL, there are plenty of other books to read. Read more
Published on April 8, 2010 by Sergey Malgin
5.0 out of 5 stars Theory Behind Practical
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. Read more
Published on November 11, 2009 by Sudheer K. Maharana
3.0 out of 5 stars Perfect theory, perfectly apart from reality
Date is a serious thinker, for his continuous think (and re-think) on relation theory these years, he deserves very much respect. Read more
Published on October 10, 2009 by Baoshan Sheng
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 



So You'd Like to...


Create a guide


Look for Similar Items by Category