Skip to content

Developer's Guide to DB2 for OS2 and DB2 for AIX

Best in textbook rentals since 2012!

ISBN-10: 0070577250

ISBN-13: 9780070577251

Edition: 1997

Authors: Roger E. Sanders

List price: $79.50
Blue ribbon 30 day, 100% satisfaction guarantee!
Out of stock
We're sorry. This item is currently unavailable.
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Reviewed for technical accuracy by a team of IMB analysts, this is an authoritative reference to developing DB2/2 and DB2/6000, covering the latest tools for object-oriented programming.
Customers also bought

Book details

List price: $79.50
Copyright year: 1997
Publisher: McGraw-Hill Companies, The
Binding: Hardcover
Pages: 1088
Size: 8.00" wide x 9.75" long x 2.25" tall
Weight: 4.290
Language: English

Forewordp. xvii
Acknowledgmentsp. xix
Introductionp. xxi
Basic Database Concepts
DB2 Database Architecturep. 3
The Relational Databasep. 3
Relational Database Objectsp. 4
Databasesp. 4
Table Spacesp. 4
Tablesp. 6
Indexesp. 8
Viewsp. 9
Packages (Access Plans)p. 10
Triggersp. 11
Aliasesp. 11
Event Monitorsp. 12
Schemasp. 12
System Catalog Viewsp. 13
Recovery Log Filep. 13
Configuration Filesp. 14
DB2 Database Directoriesp. 14
Physical Database Directoryp. 14
Volume Directoryp. 14
System Directoryp. 15
Workstation Directoryp. 16
Database Connection Services Directoryp. 16
Summaryp. 17
Database Consistency Mechanismsp. 18
What is Database Consistency?p. 18
Transactionsp. 19
Concurrency and Isolation Levelsp. 19
Repeatable Readp. 20
Read Stabilityp. 20
Cursor Stabilityp. 21
Uncommitted Readp. 21
Specifying the Isolation Levelp. 21
Lockingp. 21
Lock Attributesp. 22
Lock Statesp. 22
Locks and Application Performancep. 24
Transaction Loggingp. 27
Summaryp. 29
Application Development Fundamentals
The Application Development Processp. 33
What is a DB2 Database Application?p. 33
Designing a DB2 Database Applicationp. 35
Elements of a DB2 Database Applicationp. 35
High-Level Programming Languagep. 35
Structured Query Language (SQL) Statementsp. 36
Call-Level Interface (CLI) Function Callsp. 37
Application Programming Interface (API) Function Callsp. 39
Establishing the DB2 Database Application Development Environmentp. 40
Establishing the DB2 Database Application Testing Environmentp. 42
Creating a Testing Databasep. 42
Creating Testing Tables and Viewsp. 42
Generating Test Datap. 43
Managing Transactionsp. 43
Creating and Preparing Source-Code Filesp. 44
Summaryp. 44
Writing Embedded SQL Applicationsp. 45
Prototyping Embedded SQL Statementsp. 45
The Main Parts of an Embedded SQL Source-Code Filep. 46
Creating the Prologp. 47
Creating the Bodyp. 49
Creating the Epilogp. 50
Creating and Using a Common Error-Handling Routinep. 52
Using Exception, Signal, and Interrupt Handlersp. 53
Creating Executables and Packagesp. 53
Precompiling Source-Code Filesp. 53
Compiling Source-Code Filesp. 55
Linking Object Modulesp. 56
Creating and Binding Packagesp. 56
A Word About Timestampsp. 56
Running, Testing, and Debugging Embedded SQL Applicationsp. 57
Summaryp. 57
Writing CLI Applicationsp. 59
Differences Between Embedded SQL and CLI Function Callsp. 59
Prototyping CLI Function Callsp. 60
The Main Parts of a CLI Source-Code Filep. 61
The Initialization Taskp. 61
The Transaction Processing Taskp. 62
The Termination Taskp. 67
Error Handlingp. 68
Evaluating Return Codesp. 68
Evaluating SQLSTATEs (Diagnostic Messages)p. 68
Evaluating SQLCA Return Codesp. 69
Creating Executable Applicationsp. 69
Running, Testing, and Debugging CLI Applicationsp. 70
Advantages and Disadvantages of Using CLI Function Callsp. 70
Summaryp. 72
Writing API Applicationsp. 73
The Basic Structure of an API Source-Code Filep. 73
Types of API Function Callsp. 74
API Naming Conventionsp. 76
API Data Structuresp. 77
Error Handlingp. 78
Evaluating Return Codesp. 79
Evaluating SQLCA Return Codesp. 79
Evaluating SQLSTATEsp. 79
Creating Executable Applicationsp. 79
Running, Testing, and Debugging API Applicationsp. 80
Summaryp. 81
Improving Application Performancep. 83
Tuning Embedded SQL Queriesp. 83
Queries Containing SELECT SQL Statementsp. 83
Queries That Access Two or More Tablesp. 84
Compound Queriesp. 85
Index Managementp. 85
Guidelines for Creating Indexesp. 85
Optimizing Index Performancep. 86
Table-Space Managementp. 86
Using the Precompiler Optimization Featurep. 87
Specifying the Optimization Classp. 88
Determining Which Optimization Class to Usep. 88
Row Blockingp. 89
Locks and Application Performancep. 89
Code-Page Selectionp. 90
Summaryp. 90
Structured Query Language (SQL) Statements
Application Programming Language Construct Statementsp. 101
SQL Precompiler Directivesp. 101
Dynamic SQL Supportp. 101
Dynamic SQL and Parameter Markersp. 103
Cachingp. 103
Begin Declare Sectionp. 108
End Declare Sectionp. 112
Includep. 112
Wheneverp. 116
Begin Compoundp. 119
End Compoundp. 123
Preparep. 123
Describep. 131
Executep. 138
Execute Immediatep. 146
Set Current Query Optimizationp. 148
Set Current Packagesetp. 151
Set Current Explain Snapshotp. 154
Data Control Statementsp. 159
Connection Managementp. 159
States of an Applicationp. 159
States of a Connectionp. 162
SQL Precompiler Options That Affect Connection Managementp. 163
DB2's SQL Authorization Facilityp. 165
Connectp. 166
Set Connectionp. 176
Releasep. 177
Disconnectp. 181
Commitp. 182
Rollbackp. 184
Lock Tablep. 187
Grant (database authorities)p. 189
Grant (index privileges)p. 190
Grant (package privileges)p. 191
Grant (table/view privileges)p. 192
Revoke (database authorities)p. 194
Revoke (index privileges)p. 199
Revoke (package privileges)p. 203
Revoke (table/view privileges)p. 208
Data Definition Statementsp. 214
Creating Table Spacesp. 215
Creating Tablesp. 215
Creating Indexesp. 215
Creating Viewsp. 216
Creating Aliasesp. 217
Creating Distinct Typesp. 217
Creating User-Defined Functionsp. 218
Create Tablespacep. 218
Alter Tablespacep. 225
Create Tablep. 230
Alter Tablep. 241
Create Indexp. 251
Create Viewp. 256
Create Aliasp. 262
Create Distinct Typep. 267
Set Constraintsp. 274
Comment Onp. 280
Dropp. 287
Create Functionp. 291
Set Current Function Pathp. 302
Data Manipulation Statementsp. 305
Adding Datap. 306
Changing Datap. 306
Deleting Datap. 306
Retrieving Datap. 306
The Basic SELECTp. 306
Retrieving Multiple Rows Using a Cursorp. 308
Types of Cursorsp. 308
Insertp. 309
Updatep. 316
Deletep. 323
Declare Cursorp. 329
Openp. 331
Fetchp. 333
Closep. 342
Select Intop. 342
Values Intop. 344
Free Locatorp. 346
Event Monitor, Trigger, and Stored Procedure Processing Statementsp. 349
Using Event Monitorsp. 349
Event Countingp. 351
Defining and Using Triggersp. 352
Using Stored Proceduresp. 355
Create Event Monitorp. 356
Set Event Monitor Statep. 366
Create Triggerp. 368
Setp. 378
Signal SQLSTATEp. 381
Callp. 384
Call Level Interface (CLI) Functions
CLI/ODBC Data Source Connection Control Functionsp. 397
Data Sourcesp. 398
Environment and Connection Handlesp. 398
Connecting to a Data Sourcep. 398
SQLAllocEnvp. 399
SQLAllocConnectp. 402
SQLConnectp. 403
SQLDriverConnectp. 405
SQLSetConnectionp. 412
SQLDisconnectp. 416
SQLFreeConnectp. 416
SQLFreeEnvp. 417
CLI/ODBC Driver and Data Source Option Control Functionsp. 419
Obtaining Information About a Data Sourcep. 420
Environment, Connection, and SQL Statement Optionsp. 420
SQLDataSourcesp. 421
SQLGetInfop. 425
SQLGetFunctionsp. 445
SQLGetTypeInfop. 450
SQLGetEnvAttrp. 458
SQLSetEnvAttrp. 463
SQLGetConnectOptionp. 467
SQLSetConnectOptionp. 476
SQLGetStmtOptionp. 480
SQLSetStmtOptionp. 489
SQL Statement Processing Functionsp. 494
Allocating a SQL Statement Handlep. 494
Setting Parameter Valuesp. 494
Executing SQL Statementsp. 496
Data-at-Execution Valuesp. 496
Completing Transactionsp. 497
SQLAllocStmtp. 497
SQLPreparep. 502
SQLBindParameterp. 504
SQLBindFileToParamp. 514
SQLSetParamp. 518
SQLParamOptionsp. 526
SQLGetCursorNamep. 532
SQLSetCursorNamep. 534
SQLExecutep. 537
SQLExecDirectp. 538
SQLNativeSqlp. 540
SQLNumParamsp. 543
SQLParamDatap. 545
SQLPutDatap. 551
SQLCancelp. 553
SQLTransactp. 554
SQLFreeStmtp. 558
SQL Statement Results Retrieval Functionsp. 561
Result Data Setsp. 561
Assigning Application Storage Areas to Result Data Set Columns (Binding)p. 562
Determining the Characteristics of a Result Data Setp. 562
Assigning Application Storage Areas for Rowsets (Binding)p. 563
Fetching Result Data Set Datap. 564
Retrieving Data From Unbound Columnsp. 564
Retrieving Status, Warning, and Error Informationp. 564
SQLRowCountp. 565
SQLNumResultColsp. 570
SQLDescribeColp. 572
SQLColAttributesp. 575
SQLSetColAttributesp. 584
SQLBindColp. 590
SQLBindFileToColp. 598
SQLFetchp. 604
SQLExtendedFetchp. 606
SQLGetDatap. 612
SQLMoreResultsp. 619
SQLErrorp. 623
SQLGetSQLCAp. 628
SQLGetLengthp. 632
SQLGetPositionp. 637
SQLGetSubStringp. 639
CLI/ODBC Data Source System Catalog Query Functionsp. 641
Obtaining System Catalog Informationp. 641
Controlling Catalog Function Results with Parameter Valuesp. 642
Obtaining Information About Existing Stored Proceduresp. 643
Stored Procedures Catalog Tablep. 643
SQLTablesp. 644
SQLTablePrivilegesp. 650
SQLColumnsp. 656
SQLColumnPrivilegesp. 665
SQLSpecialColumnsp. 671
SQLStatisticsp. 679
SQLPrimaryKeysp. 687
SQLForeignKeysp. 692
SQLProceduresp. 699
SQLProcedureColumnsp. 705
Application Programming Interface (API) Functions
Program Preparation and General Application Programming API'sp. 719
Embedded SQL Application Preparationp. 719
Exception, Signal, and Interrupt Handlersp. 720
Pointer Manipulation and Memory Copy Functionsp. 721
Evaluating SQLCA Return Codes and SQLSTATE Valuesp. 721
Precompile Programp. 721
Bindp. 731
Rebindp. 734
Get Instancep. 738
Install Signal Handlerp. 739
Interruptp. 741
Get Addressp. 745
Copy Memoryp. 746
Dereference Addressp. 747
Get Error Messagep. 748
Get SQLState Messagep. 750
Get Authorizationsp. 752
DB2 Database Manager Control and Database Control API'sp. 755
The DB2 Database Manager Server Processesp. 755
Creating, Deleting, and Restarting DB2 Databasesp. 756
Specifying Connection Accounting Stringsp. 756
Retrieving and Setting Other Connection Setting Valuesp. 757
Controlling DB2 Database Manager Connection Instancesp. 758
Start Database Managerp. 758
Stop Database Managerp. 759
Create Databasep. 761
Restart Databasep. 767
Drop Databasep. 769
Attachp. 770
Detachp. 773
Set Accounting Stringp. 773
Query Clientp. 775
Set Clientp. 778
Force Applicationp. 779
DB2 Database Manager and Database Configuration API'sp. 783
Configuring DB2p. 783
DB2 Database Manager Configuration Parametersp. 784
DB2 Database Configuration Parametersp. 785
Get Database Manager Configurationp. 785
Get Database Manager Configuration Defaultsp. 793
Update Database Manager Configurationp. 795
Reset Database Manager Configurationp. 798
Get Database Configurationp. 801
Get Database Configuration Defaultsp. 808
Update Database Configurationp. 811
Reset Database Configurationp. 814
Database, Node, and DCS Directory Management API'sp. 817
DB2 Directoriesp. 817
The System Database Directoryp. 818
Volume Directoriesp. 819
The Workstation (Node) Directoryp. 819
The Database Connection Services (DCS) Directoryp. 819
Registering/Deregistering DB2 Database Servers with NetWare Serversp. 820
Catalog Databasep. 820
Uncatalog Databasep. 823
Change Database Commentp. 825
Open Database Directory Scanp. 826
Get Next Database Directory Entryp. 828
Close Database Directory Scanp. 830
Catalog Nodep. 831
Uncatalog Nodep. 835
Open Node Directory Scanp. 836
Get Next Node Directory Entryp. 838
Close Node Directory Scanp. 840
Catalog DCS Databasep. 840
Uncatalog DCS Databasep. 842
Open DCS Directory Scanp. 844
Get DCS Directory Entriesp. 846
Get DCS Directory Entry for Databasep. 847
Close DCS Directory Scanp. 848
Registerp. 848
Deregisterp. 851
Table and Table Space Management API'sp. 853
Table Spaces and Table Space Containersp. 853
Reorganizing Table Datap. 854
Updating Table Statisticsp. 855
Open Tablespace Queryp. 855
Fetch Tablespace Queryp. 858
Close Tablespace Queryp. 860
Tablespace Queryp. 860
Single Tablespace Queryp. 863
Get Tablespace Statisticsp. 865
Open Tablespace Container Queryp. 868
Fetch Tablespace Container Queryp. 870
Close Tablespace Container Queryp. 871
Tablespace Container Queryp. 872
Free Memoryp. 874
Reorganize Tablep. 875
Run Statisticsp. 878
Database Migration and Recovery API'sp. 881
Database Migrationp. 881
Creating Backup Imagesp. 881
Restoring from Backup Imagesp. 883
Roll-forward Recoveryp. 883
Recovery History Filesp. 883
Migrate Databasep. 885
Backup Databasep. 886
Restore Databasep. 894
Set Tablespace Containersp. 901
Rollforward Databasep. 908
Open Recovery History File Scanp. 917
Get Next Recovery History File Entryp. 920
Close Recovery History File Scanp. 924
Update Recovery History Filep. 925
Prune Recovery History Filep. 928
Data Handling API'sp. 933
Exporting Datap. 933
Importing Datap. 934
Loading Datap. 934
Supported Export, Import, and Load File Formatsp. 936
Exportp. 936
Importp. 943
Loadp. 954
Load Queryp. 966
Quiesce Tablespaces for Tablep. 967
Database Monitor and Indoubt Transaction Processing API'sp. 970
The DB2 Snapshot Monitorp. 970
Working with Multiple Databasesp. 973
Understanding the Two-Phase Commit Processp. 973
Get/Update Monitor Switchesp. 976
Reset Monitorp. 979
Estimate Database System Monitor Buffer Sizep. 981
Get Snapshotp. 983
List Indoubt Transactionsp. 989
Commit an Indoubt Transactionp. 983
Rollback an Indoubt Transactionp. 995
Forget Transaction Statusp. 997
SQL Data Structuresp. 999
The SQL Communications Area (SQLCA) Structurep. 999
The SQL Descriptor Area (SQLDA) Structurep. 1001
The SQLCHAR Structurep. 1006
SQL Functionsp. 1007
SQLSTATE Cross-Referencep. 1016
Bibliographyp. 1029
Indexp. 1031
About the Authorp. 1046
Table of Contents provided by Syndetics. All Rights Reserved.