Foreword | p. xix |
Introduction | p. xxi |
Basic Database Concepts | p. 1 |
DB2 Database Architecture | p. 3 |
The Relational Database | p. 4 |
Relational Database Objects | p. 4 |
DB2 Database Directories | p. 17 |
Database Consistency Mechanisms | p. 23 |
What Is Data Consistency? | p. 24 |
Transactions | p. 24 |
Concurrency and Transaction Isolation Levels | p. 25 |
Locking | p. 29 |
Application Development Fundamentals | p. 43 |
Getting Started with DB2 Application Development | p. 45 |
What Is a DB2 Database Application? | p. 46 |
Designing a DB2 Database Application | p. 46 |
Elements of a DB2 Database Application | p. 48 |
Establishing the DB2 Database Application Development Environment | p. 55 |
Establishing the DB2 Database Application Testing Environment | p. 56 |
Managing Transactions | p. 57 |
Creating and Preparing Source Code Files | p. 58 |
Writing Embedded SQL Applications | p. 61 |
A Word About Prototyping Embedded SQL Statements | p. 62 |
The Main Parts of an Embedded SQL Source-Code File | p. 62 |
Creating and Using a Common Error-Handling Routine | p. 70 |
Using Exception, Signal, and Interrupt Handlers | p. 71 |
Creating Executables and Packages | p. 72 |
A Word about Timestamps | p. 76 |
Running, Testing, and Debugging Embedded SQL Applications | p. 77 |
Summary | p. 77 |
Programming in Complex Environments | p. 79 |
National Language Support | p. 80 |
Japanese and Traditional Chinese EUC Code Set Support | p. 84 |
Working with Multiple Databases Using Two-Phase Commit Processing | p. 85 |
How the Two-Phase Commit Process Works | p. 86 |
DRDA Server Access | p. 90 |
Multiple-Thread Database Access | p. 90 |
Concurrent Transactions | p. 93 |
X/Open XA Interface Support | p. 94 |
Movement of Large Volumes of Data in a Network Environment | p. 97 |
Nodegroups and Data Partitioning | p. 98 |
Summary | p. 107 |
Improving Application Performance | p. 109 |
Tuning Embedded SQL Queries | p. 110 |
Index Management | p. 112 |
Table-Space Management | p. 114 |
Using the Precompiler Optimization Feature | p. 115 |
Row Blocking | p. 117 |
Locks and Application Performance | p. 117 |
Code-Page Selection | p. 119 |
Data Partitioning | p. 119 |
Summary | p. 120 |
SQL Statements | p. 123 |
Application Programming Language Construct Statements | p. 125 |
SQL Precompiler Directives | p. 126 |
Dynamic SQL Support | p. 127 |
Dynamic SQL and Parameter Markers | p. 127 |
Caching | p. 132 |
The DB2 Programming Language Construct SQL Statements | p. 134 |
Begin Declare Section | p. 135 |
End Declare Section | p. 138 |
Free Locator | p. 138 |
Include | p. 141 |
Whenever | p. 142 |
Begin Compound | p. 147 |
End Compound | p. 153 |
Prepare | p. 153 |
Describe | p. 159 |
Execute | p. 165 |
Execute Immediate | p. 170 |
Explain | p. 174 |
Database Connection and Transaction Control Statements | p. 179 |
Connection Management | p. 180 |
Application States | p. 181 |
Application States | p. 182 |
Connection States | p. 182 |
SQL Precompiler Options That Affect Connection Management | p. 183 |
Transaction Management | p. 185 |
DB2 Database Connection and Transaction Control SQL Statements | p. 186 |
Connect | p. 187 |
Set Connection | p. 198 |
Release | p. 199 |
Disconnect | p. 202 |
Lock Table | p. 203 |
Commit | p. 206 |
Data Access and Modification Control | p. 215 |
Authorities and Privileges | p. 216 |
Instance-Level Authorities | p. 216 |
Database-Level Authorities | p. 217 |
Privileges | p. 218 |
Granting and Revoking Authorities and Privileges | p. 221 |
The DB2 Data Access and Modification Control SQL Statements | p. 221 |
Grant (Database Authorities) | p. 222 |
Grant (Database Authorities) | p. 223 |
Grant (Table, View, and Nickname Privileges) | p. 228 |
Grant (Index Privileges) | p. 234 |
Grant (Package Privileges) | p. 239 |
Grant (Schema Privileges) | p. 243 |
Revoke (Database Authorities) | p. 248 |
Revoke (Table, View, and Nickname Privileges) | p. 250 |
Revoke (Index Privileges) | p. 253 |
Revoke (Package Privileges) | p. 254 |
Revoke (Schema Privileges) | p. 256 |
Data Definition Language (DDL) Statements | p. 259 |
Data Definition Language (DDL) Statements | p. 260 |
The DB2 DDL SQL Statements | p. 269 |
Create Bufferpool | p. 270 |
Create Nodegroup | p. 275 |
Create Tablespace | p. 280 |
Create Table (Normal) | p. 290 |
Create Table (Typed) | p. 312 |
Create Table (Summary) | p. 331 |
Create View (Normal) | p. 342 |
Create View (Typed) | p. 349 |
Create Index | p. 360 |
Create Schema | p. 367 |
Create Alias | p. 372 |
Comment on | p. 377 |
Drop | p. 385 |
Modifying Data Object Definitions | p. 397 |
Altering Nodegroups | p. 398 |
Altering Table Spaces | p. 398 |
Altering Tables | p. 398 |
Renaming Tables | p. 399 |
Controlling Integrity Checking | p. 399 |
The DB2 Data Definition Modification SQL Statements | p. 400 |
Alter Bufferpool | p. 401 |
Alter Nodegroup | p. 406 |
Alter Tablespace | p. 411 |
Alter Table | p. 419 |
Alter View | p. 441 |
Rename Table | p. 448 |
Refresh Table | p. 453 |
Set Integrity | p. 458 |
Data Manipulation Language (DML) Statements | p. 473 |
Queries | p. 474 |
The Select Statement and Its Clauses | p. 474 |
A Word About Subqueries | p. 482 |
Retrieving Multiple Rows Using a Cursor | p. 482 |
Adding Data -- the INSERT Statement | p. 484 |
The DB2 Data Manipulation Language (DML) SQL Statements | p. 486 |
Select Into | p. 487 |
Values Into | p. 490 |
Declare Cursor | p. 493 |
Open | p. 499 |
Fetch | p. 502 |
Close | p. 506 |
Insert | p. 506 |
Update | p. 513 |
Delete | p. 522 |
User-Defined Data Types, User-Defined Functions, and Stored Procedures | p. 529 |
User-Defined Data Types | p. 530 |
Why Use User-Defined Data Types? | p. 531 |
User-Defined Functions | p. 532 |
Why Use User-Defined Functions? | p. 536 |
Stored Procedures | p. 537 |
The DB2 User Defined Data Type, User Defined Function and Stored Procedure Definition SQL Statements | p. 541 |
Create Distinct Type | p. 542 |
Create Type (Structured) | p. 550 |
Alter Type (Structured) | p. 562 |
Create Function (Source or Template) | p. 568 |
Create Function (External Scalar) | p. 578 |
Create Function (External Table) | p. 601 |
Create Function (OLE DB External Table) | p. 623 |
Create Procedure | p. 633 |
Call | p. 653 |
Triggers | p. 661 |
Defining and Using Triggers | p. 662 |
Using Transition Variables | p. 667 |
Handling Errors in Triggers | p. 667 |
Trigger Cascading | p. 668 |
Recursive Triggers | p. 668 |
Comparing Constraints and Triggers | p. 669 |
Interaction Among Constraints and Triggers | p. 669 |
DBZ Trigger Definition SOL Statements | p. 671 |
Create Trigger | p. 672 |
Set (Transition Variable) | p. 681 |
Signal Sqlstate | p. 683 |
Database Event Monitors | p. 687 |
Event Monitors | p. 688 |
Creating Event Monitors | p. 688 |
The DB2 Database Event Monitor Control SQL Statements | p. 691 |
Create Event Monitor | p. 692 |
Set Event Monitor State | p. 701 |
Flush Event Monitor | p. 705 |
Setting DB2's Special Registers | p. 709 |
DB2's Special Registers | p. 710 |
The DB2 Special Register Modification SQL Statements | p. 714 |
SQL Data Structures | p. 745 |
SQL Functions | p. 757 |
Federated Systems | p. 775 |
The DB2 Data Links Manager | p. 783 |
Developing JDBC Applications And Applets | p. 791 |
How The Example Programs Were Developed | p. 809 |
Bibliography | p. 821 |
Index | p. 823 |
SQL Statements Index | p. 835 |
Table of Contents provided by Syndetics. All Rights Reserved. |