SQL and Relational Theory, 2nd Edition
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
Chapter 1. Setting the Scene
Chapter 2. Types and Domains
Chapter 3. Tuples and Relations, Rows and Tables
Chapter 4. No Duplicates, No Nulls
Chapter 5. Base Relvars, Base Tables
Chapter 6. SQL and Relational Algebra I: The Original Operators
Chapter 7. SQL and Relational Algebra II : Additional Operators
Chapter 8. SQL and Constraints
Chapter 9. SQL and Views
Chapter 10. SQL and Logic
Chapter 11. Using Logic to Formulate SQL Expressions
Chapter 12. Miscellaneous SQL Topics
Appendix. The Relational Model
Appendix. SQL Departures from the Relational Model
Appendix. A Relational Approach to Missing Information
Appendix. A Tutorial D Grammar
Appendix. Summary of Recommendations
Appendix. Answers to Exercises
Appendix. Suggestions for Further Reading
- Paperback: 446 pages
- Publisher: O’Reilly Media (December 2011)
- Language: English
- ISBN-10: 1449316409
- ISBN-13: 978-1449316402