Table of Contents
Introduction 1
Book 1: SQL Concepts 9
Chapter 1: Understanding Relational Databases 11
Chapter 2: Modeling a System 31
Chapter 3: Getting to Know SQL 55
Chapter 4: SQL and the Relational Model 67
Chapter 5: Knowing the Major Components of SQL 77
Chapter 6: Drilling Down to the SQL Nitty-Gritty 99
Book 2: Relational Database Development 131
Chapter 1: System Development Overview 133
Chapter 2: Building a Database Model 149
Chapter 3: Balancing Performance and Correctness 167
Chapter 4: Creating a Database with SQL 199
Book 3: SQL Queries 211
Chapter 1: Values, Variables, Functions, and Expressions 213
Chapter 2: SELECT Statements and Modifying Clauses 239
Chapter 3: Querying Multiple Tables with Subqueries 281
Chapter 4: Querying Multiple Tables with Relational Operators 309
Chapter 5: Cursors 329
Book 4: Data Security 341
Chapter 1: Protecting Against Hardware Failure and External Threats 343
Chapter 2: Protecting Against User Errors and Conflicts 373
Chapter 3: Assigning Access Privileges 401
Chapter 4: Error Handling 413
Book 5: SQL and Programming 429
Chapter 1: Database Development Environments. 431
Chapter 2: Interfacing SQL to a Procedural Language 437
Chapter 3: Using SQL in an Application Program 443
Chapter 4: Designing a Sample Application 457
Chapter 5: Building an Application 477
Chapter 6: Understanding SQL’s Procedural Capabilities 493
Chapter 7: Connecting SQL to a Remote Database 509
Book 6: SQL, XML, and JSON 523
Chapter 1: Using XML with SQL 525
Chapter 2: Storing XML Data in SQL Tables 553
Chapter 3: Retrieving Data from XML Documents 577
Chapter 4: Using JSON with SQL 595
Book 7: Database Tuning Overview 609
Chapter 1: Tuning the Database 611
Chapter 2: Tuning the Environment 623
Chapter 3: Finding and Eliminating Bottlenecks 645
Book 8: Appendices 675
Appendix A: SQL: 2016 Reserved Words 677
Appendix B: Glossary 683
Index 691