Chapter 1 Introduction 1
11 Database-System Applications1
12 Purpose of Database Systems5
13 View of Data8
131 Data Models8
132 Relational Data Model9
133 Data Abstraction9
134 Instances and Schemas12
14 Database Languages 13
141 Data-Definition Language 13
142 The SQL Data-Definition Language 14
143 Data-Manipulation Language 15
144 The SQL Data-Manipulation Language 16
145 Database Access from Application Programs 16
15 Database Design 17
16 Database Engine 18
161 Storage Manager 19
162 The Query Processor 20
163 Transaction Management 20
17 Database and Application Architecture 21
18 Database Users and Administrators 23
181 Database Users and User Interfaces 24
182 Database Administrator 24
19 History of Database Systems 25
110 Summary 29
Review Terms 30
Practice Exercises 31
Exercises 32
Tools 33
Further Reading 33
Bibliography 33
PART 1 RELATIONAL LANGUAGES
Chapter 2 Introduction to the Relational Model 37
21 Structure of Relational Databases37
22 Database Schema41
23 Keys43
24 Schema Diagrams46
25 Relational Query Languages47
26 Summary48
Review Terms49
Practice Exercises49
Exercises50
Further Reading51
Bibliography51
Chapter 3 Introduction to SQL 53
31 Overview of the SQL Query Language53
32 SQL Data Definition54
321 Basic Types55
322 Basic Schema Definition 56
33 Basic Structure of SQL Queries 59
331 Queries on a Single Relation 59
332 Queries on Multiple Relations 62
34 Additional Basic Operations 67
341 The Rename Operation 67
342 String Operations 70
343 Attribute Specification in the Select Clause 71
344 Ordering the Display of Tuples 71
345 Where-Clause Predicates 72
35 Set Operations 73
351 The Union Operation 74
352 The Intersect Operation 75
353 The Except Operation 76
36 Null Values 77
37 Aggregate Functions 79
371 Basic Aggregation 79
372 Aggregation with Grouping 80
373 The Having Clause 83
374 Aggregation with Null and Boolean Values 84
38 Nested Subqueries 86
381 Set Membership 86
382 Set Comparison 87
383 Test for Empty Relations 89
384 Test for the Absence of Duplicate Tuples 91
385 Subqueries in the From Clause 92
386 The With Clause 93
387 Scalar Subqueries 94
388 Scalar Without a From Clause 95
39 Modification of the Database 96
391 Deletion 96
392 Insertion 98
393 Updates 99
310 Summary 102
Review Terms 103
Practice Exercises 103
Exercises 107
Tools 111
Further Reading 112
Bibliography 112
Chapter 4 Intermediate SQL 113
41 Join Expressions113
411 The Natural Join114
412 Join Conditions118
413 Outer Joins119
414 Join Types and Conditions124
42 Views125
421 View Definition126
422 Using Views in SQL Queries126
423 Materialized Views128
424 Update of a View128
43 Transactions131
44 Integrity Constraints133
441 Constraints on a Single Relation134
442 Not Null Constraint134
443 Unique Constraint135
444 The Check Clause135
445 Referential Integrity137
446 Assigning Names to Constraints139
447 Integrity Constraint Violation During a Transaction139
448 Complex Check Conditions and Assertions 140
45 SQL Data Types and Schemas 141
451 Date and Time Types in SQL 142
452 Type Conversion and Formatting Functions 143
453 Default Values 144
454 Large-Object Types 144
455 User-Defined Types 146
456 Generating Unique Key Values 148
457 Create Table Extensions 150
458 Schemas, Catalogs, and Environments 150
46 Index Definition in SQL 152
47 Authorization 153
471 Granting and Revoking of Privile