SQL and Relational Theory How to Write Accurate SQL Code 1st Edition by C J Date – Ebook PDF Instant Download/Delivery:0596523068, 978-0596523060
Full download SQL and Relational Theory How to Write Accurate SQL Code 1st Edition after payment
Product details:
ISBN 10: 0596523068
ISBN 13: 978-0596523060
Author: C J Date
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.
Table of contents:
Chapter 1: Setting the Scene
1.1 THE RELATIONAL MODEL IS MUCH MISUNDERSTOOD
1.2 SOME REMARKS ON TERMINOLOGY
1.3 PRINCIPLES NOT PRODUCTS
1.4 A REVIEW OF THE ORIGINAL MODEL
1.5 MODEL vs. IMPLEMENTATION
1.6 PROPERTIES OF RELATIONS
1.7 BASE vs. DERIVED RELATIONS
1.8 RELATIONS vs. RELVARS
1.9 VALUES vs. VARIABLES
1.10 CONCLUDING REMARKS
1.11 EXERCISES
Chapter 2: Types and Domains
2.1 TYPES AND RELATIONS
2.2 EQUALITY COMPARISONS
2.3 DATA VALUE ATOMICITY
2.4 WHAT’S A TYPE?
2.5 SCALAR vs. NONSCALAR TYPES
2.6 SCALAR TYPES IN SQL
2.7 TYPE CHECKING AND COERCION IN SQL
2.8 COLLATIONS IN SQL
2.9 ROW AND TABLE TYPES IN SQL
2.10 CONCLUDING REMARKS
2.11 EXERCISES
Chapter 3: Tuples and Relations, Rows and Tables
3.1 WHAT’S A TUPLE?
3.2 ROWS IN SQL
3.3 WHAT’S A RELATION?
3.4 RELATIONS AND THEIR BODIES
3.5 RELATIONS ARE n-DIMENSIONAL
3.6 RELATIONAL COMPARISONS
3.7 TABLE_DUM AND TABLE_DEE
3.8 TABLES IN SQL
3.9 COLUMN NAMING IN SQL
3.10 CONCLUDING REMARKS
3.11 EXERCISES
Chapter 4: No Duplicates, No Nulls
4.1 WHAT’S WRONG WITH DUPLICATES?
4.2 DUPLICATES: FURTHER ISSUES
4.3 AVOIDING DUPLICATES IN SQL
4.4 WHAT’S WRONG WITH NULLS?
4.5 AVOIDING NULLS IN SQL
4.6 A REMARK ON OUTER JOIN
4.7 CONCLUDING REMARKS
4.8 EXERCISES
Chapter 5: Base Relvars, Base Tables
5.1 UPDATING IS SET LEVEL
5.2 RELATIONAL ASSIGNMENT
5.3 MORE ON CANDIDATE KEYS
5.4 MORE ON FOREIGN KEYS
5.5 RELVARS AND PREDICATES
5.6 RELATIONS vs. TYPES
5.7 EXERCISES
Chapter 6: SQL and Relational Algebra I: The Original Operators
6.1 SOME PRELIMINARIES
6.2 MORE ON CLOSURE
6.3 RESTRICTION
6.4 PROJECTION
6.5 JOIN
6.6 UNION, INTERSECTION, AND DIFFERENCE
6.7 WHICH OPERATORS ARE PRIMITIVE?
6.8 FORMULATING EXPRESSIONS ONE STEP AT A TIME
6.9 WHAT DO RELATIONAL EXPRESSIONS MEAN?
6.10 EVALUATING SQL TABLE EXPRESSIONS
6.11 EXPRESSION TRANSFORMATION
6.12 THE RELIANCE ON ATTRIBUTE NAMES
6.13 EXERCISES
Chapter 7: SQL and Relational Algebra II: Additional Operators
7.1 EXCLUSIVE UNION
7.2 SEMIJOIN AND SEMIDIFFERENCE
7.3 EXTEND
7.4 IMAGE RELATIONS
7.5 DIVIDE
7.6 AGGREGATE OPERATORS
7.7 IMAGE RELATIONS bis
7.8 SUMMARIZATION
7.9 SUMMARIZATION bis
7.10 GROUP, UNGROUP, AND RELATION VALUED ATTRIBUTES
7.11 “WHAT IF” QUERIES
7.12 A NOTE ON RECURSION
7.13 WHAT ABOUT ORDER BY?
7.14 EXERCISES
Chapter 8: SQL and Constraints
8.1 TYPE CONSTRAINTS
8.2 TYPE CONSTRAINTS IN SQL
8.3 DATABASE CONSTRAINTS
8.4 DATABASE CONSTRAINTS IN SQL
8.5 TRANSACTIONS
8.6 WHY DATABASE CONSTRAINT CHECKING MUST BE IMMEDIATE
8.7 BUT DOESN’T SOME CHECKING HAVE TO BE DEFERRED?
8.8 CONSTRAINTS AND PREDICATES
8.9 MISCELLANEOUS ISSUES
8.10 EXERCISES
Chapter 9: SQL and Views
9.1 VIEWS ARE RELVARS
9.2 VIEWS AND PREDICATES
9.3 RETRIEVAL OPERATIONS
9.4 VIEWS AND CONSTRAINTS
9.5 UPDATE OPERATIONS
9.6 WHAT ARE VIEWS FOR?
9.7 VIEWS AND SNAPSHOTS
9.8 EXERCISES
Chapter 10: SQL and Logic
10.1 WHY DO WE NEED LOGIC?
10.2 SIMPLE AND COMPOUND PROPOSITIONS
10.3 SIMPLE AND COMPOUND PREDICATES
10.4 QUANTIFICATION
10.5 RELATIONAL CALCULUS
10.6 MORE ON QUANTIFICATION
10.7 SOME EQUIVALENCES
10.8 CONCLUDING REMARKS
10.9 EXERCISES
Chapter 11: Using Logic to Formulate SQL Expressions
11.1 SOME TRANSFORMATION LAWS
11.2 EXAMPLE 1: LOGICAL IMPLICATION
11.3 EXAMPLE 2: UNIVERSAL QUANTIFICATION
11.4 EXAMPLE 3: IMPLICATION AND UNIVERSAL QUANTIFICATION
11.5 EXAMPLE 4: CORRELATED SUBQUERIES
11.6 EXAMPLE 5: NAMING SUBEXPRESSIONS
11.7 EXAMPLE 6: MORE ON NAMING SUBEXPRESSIONS
11.8 EXAMPLE 7: DEALING WITH AMBIGUITY
11.9 EXAMPLE 8: USING COUNT
11.10 EXAMPLE 9: JOIN QUERIES
11.11 EXAMPLE 10: UNIQUE QUANTIFICATION
11.12 EXAMPLE 11: ALL OR ANY COMPARISONS
11.13 EXAMPLE 12: GROUP BY AND HAVING
11.14 EXERCISES
Chapter 12: Miscellaneous SQL Topics
12.1 SELECT *
12.2 EXPLICIT TABLES
12.3 NAME QUALIFICATION
12.4 RANGE VARIABLES
12.5 SUBQUERIES
12.6 “POSSIBLY NONDETERMINISTIC” EXPRESSIONS
12.7 EMPTY SETS
12.8 A SIMPLIFIED BNF GRAMMAR
12.9 EXERCISES
The Relational Model
THE RELATIONAL MODEL vs. OTHERS
THE SIGNIFICANCE OF THEORY
THE RELATIONAL MODEL DEFINED
DATABASE VARIABLES
OBJECTIVES OF THE RELATIONAL MODEL
SOME DATABASE PRINCIPLES
WHAT REMAINS TO BE DONE?
SQL Departures from the Relational Model
A Relational Approach to Missing Information
VERTICAL DECOMPOSITION
HORIZONTAL DECOMPOSITION
WHAT DO THE SHADED ENTRIES MEAN?
CONSTRAINTS
QUERIES
MORE ON PREDICATES
EXERCISES
A Tutorial D Grammar
Summary of Recommendations
Answers to Exercises
CHAPTER 1
CHAPTER 2
CHAPTER 3
CHAPTER 4
CHAPTER 5
CHAPTER 6
CHAPTER 7
CHAPTER 8
CHAPTER 9
CHAPTER 10
CHAPTER 11
CHAPTER 12
APPENDIX C
Suggestions for Further Reading
People also search for:
sql and relational theory
sql and relational theory book
what does relational mean in a relational database
the relational model and sql are closed under their operations
Tags: C J Date, SQL, Relational Theory