About the Author |
|
xi | |
About the Technical Reviewer |
|
xiii | |
Acknowledgments |
|
xv | |
Introduction |
|
xvii | |
|
Chapter 1 An Introduction to SQL |
|
|
1 | (10) |
|
The Relational Model and SQL |
|
|
2 | (2) |
|
|
4 | (1) |
|
SQL Commands Classification |
|
|
5 | (1) |
|
|
5 | (2) |
|
|
7 | (4) |
|
Chapter 2 Getting Your Database Ready |
|
|
11 | (14) |
|
|
12 | (2) |
|
|
14 | (2) |
|
Creating Your Own Database |
|
|
16 | (1) |
|
|
17 | (3) |
|
|
20 | (1) |
|
|
21 | (4) |
|
Chapter 3 The Benefit of Constraints |
|
|
25 | (12) |
|
|
26 | (2) |
|
|
28 | (2) |
|
|
30 | (2) |
|
|
32 | (2) |
|
|
34 | (2) |
|
Differences Between a Primary Key and a Unique Key |
|
|
36 | (1) |
|
Chapter 4 Operations on Tables |
|
|
37 | (10) |
|
|
37 | (2) |
|
Creating New Tables from Existing Tables |
|
|
39 | (3) |
|
|
42 | (1) |
|
Showing Table Information in PostgreSQL |
|
|
43 | (2) |
|
Showing Table Information in SQLite |
|
|
45 | (1) |
|
Showing Table Information in Other DBMS's |
|
|
46 | (1) |
|
Chapter 5 Writing Basic Queries |
|
|
47 | (10) |
|
Selecting a Limited Number of Columns |
|
|
47 | (2) |
|
|
49 | (1) |
|
Ordering Using Field Abbreviations |
|
|
50 | (1) |
|
Ordering by Multiple Columns |
|
|
51 | (2) |
|
Putting Conditions with WHERE |
|
|
53 | (2) |
|
|
55 | (2) |
|
Chapter 6 Manipulating Data |
|
|
57 | (8) |
|
Inserting Data into a Table from Another Table |
|
|
57 | (3) |
|
|
60 | (3) |
|
Deleting Data from Tables |
|
|
63 | (2) |
|
Chapter 7 Organizing Your Data |
|
|
65 | (10) |
|
|
65 | (2) |
|
|
67 | (1) |
|
|
68 | (1) |
|
|
69 | (6) |
|
Chapter 8 Doing More with Queries |
|
|
75 | (12) |
|
Counting the Records in a Table |
|
|
75 | (2) |
|
Using DISTINCT with COUNT |
|
|
77 | (2) |
|
|
79 | (3) |
|
Order of Execution of SELECT Queries |
|
|
82 | (1) |
|
|
83 | (4) |
|
Chapter 9 Calculated Fields |
|
|
87 | (8) |
|
Mathematical Calculations |
|
|
87 | (2) |
|
|
89 | (3) |
|
|
92 | (3) |
|
Chapter 10 Aggregation and Grouping |
|
|
95 | (14) |
|
|
95 | (3) |
|
Using the Extreme Functions - MAX and MIN |
|
|
98 | (2) |
|
|
100 | (3) |
|
Grouping and Aggregate Functions |
|
|
103 | (2) |
|
|
105 | (4) |
|
Chapter 11 Understanding Joins |
|
|
109 | (14) |
|
|
111 | (1) |
|
Resolving Ambiguity in Join Columns |
|
|
112 | (1) |
|
|
113 | (2) |
|
|
115 | (3) |
|
|
118 | (2) |
|
|
120 | (3) |
|
|
123 | (10) |
|
|
124 | (1) |
|
Existence Tests in Subqueries |
|
|
125 | (2) |
|
Using Subqueries in INSERT Statements |
|
|
127 | (2) |
|
|
129 | (4) |
|
Chapter 13 Working in Sets |
|
|
133 | (8) |
|
|
133 | (3) |
|
|
136 | (2) |
|
|
138 | (3) |
|
|
141 | (10) |
|
|
141 | (1) |
|
|
142 | (3) |
|
Modifying Data Through Views |
|
|
145 | (4) |
|
|
149 | (2) |
|
|
151 | (14) |
|
|
152 | (2) |
|
Using EXPLAIN to See Indexes at Work |
|
|
154 | (4) |
|
|
158 | (2) |
|
|
160 | (1) |
|
|
161 | (2) |
|
|
163 | (2) |
|
Chapter 16 Access Control Statements |
|
|
165 | (10) |
|
Creating New Users in PostgreSQL |
|
|
166 | (3) |
|
Grant Privileges to Users |
|
|
169 | (3) |
|
|
172 | (3) |
|
Appendix A Further Reading |
|
|
175 | (4) |
|
Appendix B Database Management Systems and Tools |
|
|
179 | (4) |
|
Relational Database Management Systems |
|
|
179 | (2) |
|
SQL Development Environments |
|
|
181 | (2) |
|
Appendix C A History of SQL and Relational Databases |
|
|
183 | (6) |
|
The Rise of Sophisticated File-Oriented Systems |
|
|
183 | (1) |
|
The Entry of Database Systems |
|
|
184 | (1) |
|
Genesis of the Relational Model |
|
|
185 | (1) |
|
The Hard Fought Battle of Query Languages |
|
|
186 | (3) |
Index |
|
189 | |