SQL and Relational Theory, 2nd Edition
How to Write Accurate SQL Code
Publisher: O'Reilly Media
Final Release Date: December 2011
Pages: 448

SQL is full of difficulties and traps for the unwary. You can avoid them if you understand relational theory, but only if you know how to put the theory into practice. In this insightful book, author C.J. Date explains relational theory in depth, and demonstrates through numerous examples and exercises how you can apply it directly to your use of SQL.

This second edition includes new material on recursive queries, “missing information” without nulls, new update operators, and topics such as aggregate operators, grouping and ungrouping, and view updating. If you have a modest-to-advanced background in SQL, you’ll learn how to deal with a host of common SQL dilemmas.

  • Why is proper column naming so important?
  • Nulls in your database are causing you to get wrong answers. Why? What can you do about it?
  • Is it possible to 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 the relational model was developed more than 40 years ago. SQL and Relational Theory draws on decades of research to present the most up-to-date treatment of SQL available.

C.J. Date has a stature that is unique within the database industry. A prolific writer well known for the bestselling textbook An Introduction to Database Systems (Addison-Wesley), he has an exceptionally clear style when writing about complex principles and theory.

Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillySQL and Relational Theory, 2nd Edition
 
3.3

(based on 4 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (1)

  • 1 Stars

     

    (1)

50%

of respondents would recommend this to a friend.

Pros

No Pros

Cons

No Cons

Best Uses

  • Intermediate (3)
    • Reviewer Profile:
    • Developer (3), Sys admin (3)

Reviewed by 4 customers

Sort by

Displaying reviews 1-4

Back to top

 
2.0

Not the style of book traditionally from O'Reilly

By Ben

from South Bend, IN

About Me Developer, Sys Admin

Verified Buyer

Pros

  • Broad Topics

Cons

  • Not comprehensive enough
  • Not Concise
  • Repetitive

Best Uses

  • Intermediate

Comments about oreilly SQL and Relational Theory, 2nd Edition:

The book is different from other O'Reilly books since it focuses on a critique of SQL with regards to the relational model, rather than a practicioner's guide. This sounds interesting, but the execution left much to be desired. In many ways, it felt like good information was hidden behind rants, that just came one after another. For example, the ever present rant is referering to attributes with numbers rather than with names. I can see from where the author is coming from, but even mathematically that is not even a big deal, as both representations are equivalent when representing relations (in fact the common definition of a tuple nowadays is that of ordered elements).

Another dissapointing issue was the focus on Tutorial D, the author's pet query language. There were several places were the author simply show the example in tutorial D, mentioning that in SQL it would be too difficult. From a practical perspective, this leaves the flavor that the relational model is too academic, and may lead the reader to conclude that it is not worth studying in a practial setting. Rather than tutorial D, a quick introduction to set theory and first order calculus would have been much more interesting.

In summary, it seems that the book tried to serve both theoretical and practical views of SQL, but it failed on both accounts.

(0 of 1 customers found this review helpful)

 
5.0

The back cover description is reliable

By Highlander

from Scotland

About Me Designer, Sys Admin

Verified Buyer

Pros

  • Accurate
  • Well-written

Cons

    Best Uses

    • Expert
    • Intermediate
    • Student

    Comments about oreilly SQL and Relational Theory, 2nd Edition:

    Provides a thorough analysis of Relational Theory and of where SQL differs.

    (4 of 8 customers found this review helpful)

     
    1.0

    Do yourself a favour, keep looking!

    By Marc Fearby

    from Tamworth, NSW, Australia

    About Me Developer

    Pros

      Cons

      • Difficult to understand
      • Useless In The Real World

      Best Uses

      • Academics

      Comments about oreilly SQL and Relational Theory, 2nd Edition:

      If you're a cloistered academic with absolutely no need to use a real-world SQL-based DBMS to solve problems, then you might find this book useful. On the other hand, if you use SQL Server, Oracle, DB2, etc to design databases for end-users and applications, then this book isn't going to help you design better database ER models.

      You will get to read endless pages of repetitive nonsense about how tables are or are not relvars and rows are or are not tuples, and countless variations on this same theme. Who cares whether SQL has no concept of a 0-tuple, or that field names should be called headings, etc?

      I read the first four chapters of this book, progressively reluctantly but by the time I got to the fifth chapter it began to dawn on me that I wasn't going to learn a thing, and since much of it is based on Tutorial D (and entirely theoretical language, as far as I can tell), and not SQL, it was even more pointless.

      My only saving grace is that I did not have to pay for it myself, since my boss bought it (at my request, I am ashamed to say). I also spent six or so hours of the past two days recovering from an appendectomy reading it when I could have done something more useful, like count grains of rice in a jar.

      I am now going to see if there is such a thing as an SQL Cookbook, with real-world problems and suggested solutions to same.

      (5 of 10 customers found this review helpful)

       
      5.0

      Execellent Book for Database Learning

      By surachart

      from Bangkok, Thailand

      About Me DBA, Developer, Educator, Sys Admin

      Pros

      • Accurate
      • Concise
      • Helpful examples
      • Well-written

      Cons

      • Difficult to understand

      Best Uses

      • Expert
      • Intermediate
      • Novice
      • Student

      Comments about oreilly SQL and Relational Theory, 2nd Edition:

      It's about Relational model and SQL. Someone who interest about Database, SQL and relational model, that should read it. You will learn SQL and Relational theory from Professional. When you read each chapter finish, you will see "Exercise", that will help you memorize and understand more. It has well-formed paragraphs and many references; it's good for readers.
      It can be reference book in the college or university.

      Displaying reviews 1-4

      Back to top

       
      Buy 2 Get 1 Free Free Shipping Guarantee
      Buying Options
      Immediate Access - Go Digital what's this?
      Ebook: $31.99
      Formats:  DAISY, ePub, Mobi, PDF
      Print & Ebook: $43.99
      Print: $39.99