PART Ⅰ PRELIMINARIES 1
CHAPTER1 An Overview of Database Management 3
1.1 Introduction 3
1.2 What Is a Database System? 6
1.3 What Is a Database? 11
1.4 Why Database? 16
1.5 Data Independence 20
1.6 Relational Systems and Others 26
1.7 Summary 28
Exercises 29
References and Bibliography 31
CHAPTER2 Database System Architecture 33
2.1 Introduction 33
2.2 The Three Levels of the Architecture 34
2.3 The External Level 37
2.4 The Conceptual Level 39
2.5 TheInternal Level 40
2.6 Mappings 41
2.7 The Database Administrator 42
2.8 The Database Management System 44
2.9 Data Communications 48
2.10 Client/Server Architecture 49
2.11 Utilities 51
2.12 Distributed Processing 51
2.13 Summary 55
Exercises 56
References and Bibliography 56
CHAPTER3 An Introduction to Relational Databases 59
3.1 Introduction 59
3.2 An Informal Look at the Relational Model 60
3.3 Relations and Relvars 64
3.4 What Relations Mean 66
3.5 Optimization 69
3.6 The Catalog 71
3.7 Base Relvars and Views 72
3.8 Transactions 76
3.9 The Suppliers-and-Parts Database 77
3.10 Summary 79
Exercises 81
References and Bibliography 81
CHAPTER4 An Introduction to SQL 85
4.1 Introduction 85
4.2 Overview 86
4.3 The Catalog 89
4.4 Views 90
4.5 Transactions 91
4.6 Embedded SQL 91
4.7 Dynamic SQL and SQL/CLI 97
4.8 SQL Is Not Perfect 100
4.9 Summary 101
Exercises 102
References and Bibliography 104
PART Ⅱ THE RELATIONAL MODEL 109
CHAPTER5 TYPES 111
5.1 Introduction 111
5.2 Values vs.Variables 112
5.3 Types vs.Representations 115
5.4 Type Definition 119
5.5 Operators 122
5.6 Type Generators 127
5.7 SQL Facilities 128
5.8 Summary 136
Exercises 137
References and Bibliography 139
CHAPTER6 Relations 141
6.1 Introduction 141
6.2 Tuples 141
6.3 Relation Types 146
6.4 Relation Values 148
6.5 Relation Variables 156
6.6 SQL Facilities 161
6.7 Summary 167
Exercises 168
References and Bibliography 170
CHAPTER7 Relational Algebra 173
7.1 Introduction 173
7.2 Closure Revisited 175
7.3 The Original Algebra:Syntax 177
7.4 The Original Algebra:Semantics 180
7.5 Examples 190
7.6 What Is the Algebra For? 192
7.7 Further Points 194
7.8 Additional Operators 195
7.9 Grouping and Ungrouping 203
7.10 Summary 206
Exercises 207
References and Bibliography 209
CHAPTER8 Relational Calculus 213
8.1 Introduction 213
8.2 Tuple Calculus 215
8.3 Examples 223
8.4 Calculus vs.Algebra 225
8.5 Computational Capabilities 230
8.6 SQL Facilities 231
8.7 Domain Calculus 240
8.8 Query-By-Example 242
8.9 Summary 247
Exercises 248
References and Bibliography 250
CHAPTER9 Integrity 253
9.1 Introduction 253
9.2 A Closer Look 255
9.3 Predicates and Propositions 258
9.4 Relvar Predicates and Database Predicates 259
9.5 Checking the Constraints 260
9.6 Internal vs.External Predicates 261
9.7 Correctness vs.Consistency 263
9.8 Integrity and Views 265
9.9 A Constraint Classification Scheme 266
9.10 Keys 268
9.11 Triggers(a Digression) 277
9.12 SQL Facilities 279
9.13 Summary 284
Exercises 285
References and Bibliography 288
CHAPTER10 Views 295
10.1 Introduction 295
10.2 What Are Views For? 298
10.3 View Retrievals 302
10.4 View Updates 303
10.5 Snapshots(a Digression) 318
10.6 SQL Facilities 320
10.7 Summary 323
Exercises 324
References and Bibliography 325
PART Ⅲ DATABASE DESIGN 329
CHAPTER11 Functional Dependencies 333
11.1 Introduction 333
11.2 Basic Definitions 334
11.3 Trivial and Nontrivial Dependencies 337
11.4 Closure of a Set of Dependencies 338
11.5 Closure of a Set of Attributes 339
11.6 Irreducible Sets of Dependencies 341
11.7 Summary 343
Exercises 344
References and Bibliography 345
CHAPTER12 Further Normalization Ⅰ:1NF,2NF,3NF,BCNF 349
12.1 Introduction 349
12.2 Nonloss Decomposition and Functional Dependencies 353
12.3 First,Second,and Third Normal Forms 357
12.4 Dependency Preservation 364
12.5 Boyce/Codd Normal Form 367
12.6 A Note on Relation-Valued Attributes 373
12.7 Summary 375
Exercises 376
References and Bibliography 378
CHAPTER13 Further Normalization Ⅱ:Higher Normal Forms 381
13.1 Introduction 381
13.2 Multi-valued Dependencies and Fourth Normal Form 382
13.3 Join Dependencies and Fifth Normal Form 386
13.4 The Normalization Procedure Summarized 391
13.5 A Note on Denormalization 393
13.6 Orthogonal Design(a Digression) 395
13.7 Other Normal Forms 398
13.8 Summary 400
Exercises 401
References and Bibliography 402
CHAPTER14 Semantic Modeling 409
14.1 Introduction 409
14.2 The Overall Approach 411
14.3 The E/R Model 414
14.4 E/R Diagrams 418
14.5 Database Design with the E/R Model 420
14.6 A Brief Analysis 424
14.7 Summary 428
Exercises 429
References and Bibliography 430
PART Ⅳ TRANSACTION MANAGEMENT 443
CHAPTER15 Recovery 445
15.1 Introduction 445
15.2 Transactions 446
15.3 Transaction Recovery 450
15.4 System Recovery 453
15.5 Media Recovery 455
15.6 Two-Phase Commit 456
15.7 Savepoints(a Digression) 457
15.8 SQL Facilities 458
15.9 Summary 459
Exercises 460
References and Bibliography 460
CHAPTER16 Concurrency 465
16.1 Introduction 465
16.2 Three Concurrency Problems 466
16.3 Locking 470
16.4 The Three Concurrency Problems Revisited 472
16.5 Deadlock 474
16.6 Serializability 476
16.7 Recovery Revisited 478
16.8 Isolation Levels 480
16.9 Intent Locking 483
16.10 Dropping ACID 485
16.11 SQL Facilities 490
16.12 Summary 491
Exercises 492
References and Bibliography 494
PART Ⅴ FURTHER TOPICS 501
CHAPTER17 Security 503
17.1 Introduction 503
17.2 Discretionary Access Control 506
17.3 Mandatory Access Control 511
17.4 Statistical Databases 513
17.5 Data Encryption 519
17.6 SQL Facilities 523
17.7 Summary 527
Exercises 528
References and Bibliography 529
CHAPTER18 Optimization 531
18.1 Introduction 531
18.2 A Motivating Example 533
18.3 An Overview of Query Processing 534
18.4 Expression Transformation 539
18.5 Database Statistics 544
18.6 A Divide-and-Conquer Strategy 545
18.7 Implementing the Relational Operators 548
18.8 Summary 553
Exercises 554
References and Bibliography 557
CHAPTER19 Missing Information 575
19.1 Introduction 575
19.2 An Overview of the 3VL Approach 577
19.3 Some Consequences of the Foregoing Scheme 582
19.4 Nulls and Keys 586
19.5 Outer Join(a Digression) 589
19.6 Special Values 591
19.7 SQL Facilities 592
19.8 Summary 597
Exercises 598
References and Bibliography 600
CHAPTER20 Type Inheritance 605
20.1 Introduction 605
20.2 Type Hierarchies 610
20.3 Polymorphism and Substitutability 613
20.4 Variables and Assignments 617
20.5 Specialization by Constraint 621
20.6 Comparisons 623
20.7 Operators,Versions,and Signatures 626
20.8 Is a Circle an Ellipse? 630
20.9 Specialization by Constraint Revisited 634
20.10 SQL Facilities 636
20.11 Summary 641
Exercises 642
References and Bibliography 644
CHAPTER21 Distributed Databases 647
21.1 Introduction 647
21.2 Some Preliminaries 648
21.3 The Twelve Objectives 652
21.4 Problems of Distributed Systems 660
21.5 Client/Server Systems 671
21.6 DBMS Independence 674
21.7 SQL Facilities 679
21.8 Summary 680
Exercises 681
References and Bibliography 682
CHAPTER22 Decision Support 689
22.1 Introduction 689
22.2 Aspects of Decision Support 691
22.3 Database Design for Decision Support 693
22.4 Data Preparation 701
22.5 Data Warehouses and Data Marts 704
22.6 Online Analytical Processing 709
22.7 Data Mining 717
22.8 SQL Facilities 719
22.9 Summary 720
Exercises 721
References and Bibliography 722
CHAPTER23 Temporal Databases 727
23.1 Introduction 727
23.2 What Is the Problem? 732
23.3 Intervals 737
23.4 Packing and Unpacking Relations 743
23.5 Generalizing the Relational Operators 754
23.6 Database Design 758
23.7 Integrity Constraints 764
23.8 Summary 770
Exercises 771
References and Bibliography 772
CHAPTER24 Logic-Based Databases 775
24.1 Introduction 775
24.2 Overview 776
24.3 Propositional Calculus 778
24.4 Predicate Calculus 783
24.5 A Proof-Theoretic View of Databases 789
24.6 Deductive Database Systems 793
24.7 Recursive Query Processing 798
24.8 Summary 803
Exercises 806
References and Bibliography 807
PART Ⅵ OBJECTS,RELATIONS,AND XML 811
CHAPTER25 Object Databases 813
25.1 Introduction 813
25.2 Objects,Classes,Methods,and Messages 817
25.3 A Closer Look 822
25.4 A Cradle-to-Grave Example 830
25.5 Miscellaneous Issues 840
25.6 Summary 847
Exercises 850
References and Bibliography 851
CHAPTER26 Object/Relational Databases 859
26.1 Introduction 859
26.2 The First Great Blunder 862
26.3 The Second Great Blunder 870
26.4 Implementation Issues 874
26.5 Benefits of True Rapprochement 876
26.6 SQL Facilities 878
26.7 Summary 885
Exercises 885
References and Bibliography 886
CHAPTER27 The World Wide Web and XML 895
27.1 Introduction 895
27.2 The Web and the Internet 896
27.3 An Overview of XML 897
27.4 XML Data Definition 908
27.5 XML Data Manipulation 917
27.6 XML and Databases 925
27.7 SQL Facilities 928
27.8 Summary 932
Exercises 934
References and Bibliography 935
APPENDIXES 939
Appendix A The TransRelationalTM Model 941
A.1 Introduction 941
A.2 Three Levels of Abstraction 943
A.3 The Basic Idea 946
A.4 Condensed Columns 952
A.5 Merged Columns 956
A.6 Implementing the Relational Operators 960
A.7 Summary 966
References and Bibliography 966
Appendix B SQL Expressions 967
B.1 Introduction 967
B.2 Table Expressions 968
B.3 Boolean Expressions 973
Appendix C Abbreviations,Acronyms,and Symbols 977