DB2 Developer's Guide, 5/e

Craig S. Mullins

  • 出版商: SAMS
  • 出版日期: 2004-05-21
  • 售價: $2,930
  • 貴賓價: 9.5$2,784
  • 語言: 英文
  • 頁數: 1512
  • 裝訂: Paperback
  • ISBN: 0672326132
  • ISBN-13: 9780672326134
  • 已絕版
    無現貨庫存(No stock available)



Marketshare for DB2 has been growing steadily over the past 5 years and with the announcement of DB2 Universal Database V8 (T-Rex), the product has never had more momentum. DB2 owns about 30 percent of the database market--the same as Oracle. Not only is the product used in many Fortune 500 companies, but it is becoming very popular in small to medium sized businesses as well. This book provides the reader with a comprehensive reference and research tool for DB2 for the mainframe. Official material is awkwardly written, spans over a dozen manuals in PDF format, and lacks real-world guidance. Author, Craig Mullins, consistently hears from readers of past editions that they rely on this book as their primary reference for DB2. Craig Mullins is constantly being asked when it will support a new release. "This is an excellent book . . . It is chock full of DB2 technical information, design and tuning approaches and database administration guidelines . . .Mullins seems to have dumped his entire DB2 life experience into DB2 Developer's Guide."- Jonathon Sayles in Relational Database Journal

Table of Contents:


1. The Magic Words.

An Overview of SQL. SQL Tools of the Trade. Static SQL. Dynamic SQL. SQL Performance Factors.

2. Data Manipulation Guidelines.

A Bag of Tricks. SQL Access Guidelines. Complex SQL Guidelines. Common Table Expressions and Recursion. Working with NULLs. Date and Time Guidelines. Data Modification Guidelines.

3. Using DB2 Functions.

Column Functions. Scalar Functions. The RAISE_ERROR Function. MQSeries Built-in Functions. XML Publishing Built-in Functions. Built-in Function Guidelines.

4. Using DB2 User-Defined Functions and Data Types.

What Is a User-Defined Function? Types of User-Defined Functions. What Is a User-Defined Data Type? User-Defined Data Types and Strong Typing.

5. Data Definition Guidelines.

An Overview of DB2 Database Objects. DB2 Databases. Creating and Using DB2 Table Spaces. DB2 Storage and STOGROUPs. Table Guidelines. Normalization and Denormalization. Assuring Data Integrity in DB2. Views, Aliases, and Synonyms. Index Guidelines. Naming Conventions. Miscellaneous DDL Guidelines.

6. DB2 Indexes.

Creating Indexes. Index Guidelines.

7. Database Change Management and Schema Evolution.

Online Schema Changes.

8. Using DB2 Triggers for Integrity.

What Is a Trigger? Trigger Guidelines.

9. Large Objects and Object/Relational Databases.

Defining the Term "Object/Relational". What Is a Large Object? LOB Guidelines. DB2 Extenders.

10. DB2 Security and Authorization.

Granting and Revoking Privileges.


11. Using DB2 in an Application Program.

Embedded SQL Basics. Embedded SQL Guidelines. Host Variables. Programming with Cursors. Embedded SELECT and Cursor Coding Guidelines. Modifying Data with Embedded SQL. Application Development Guidelines. Batch Programming Guidelines. Online Programming Guidelines. General SQL Coding Guidelines.

12. Dynamic SQL Programming.

Dynamic SQL Performance. Dynamic SQL Guidelines. Reasons You Should Know Dynamic SQL. EXECUTE IMMEDIATE. Non-SELECT Dynamic SQL. Fixed-List SELECT. Varying-List SELECT.

13. Program Preparation.

Program Preparation Steps. Running a DB2 Program. Preparing a DB2 Program. What Is a DBRM? What Is a Plan? What Is a Package? What Is a Collection? Versions. Program Preparation Objects. Program Preparation Guidelines. DCLGEN Guidelines. Precompiler Guidelines. BIND Guidelines. Linkage Editor Guidelines.

14. Alternative DB2 Application Development Methods.

Developing Applications Using Only SQL. Using Client/Server Programming Languages. Using Fourth-Generation Languages. Using CASE. Using Report Writers. Using ODBC (Call Level Interface). Using Java and DB2. Using REXX and DB2.

15. Using DB2 Stored Procedures.

What Is a Stored Procedure? Implementing DB2 Stored Procedures. The Procedural DBA. Procedural SQL. DB2 Development Center.

16. The Procedural DBA.

The Classic Role of the DBA. The Role of the Procedural DBA.

17. DB2 and the Internet.

The Internet Phenomenon. Accessing DB2 over the Internet. Using XML and DB2. Finding DB2 Information Using the Internet.


18. The Doors to DB2.

TSO (Time-Sharing Option). CICS (Customer Information Control System). IMS (Information Management System). CAF (Call Attach Facility). RRSAF (Recoverable Resource Manager Services Attach Facility). Comparison of the Environments. The Critical Mass.

19. Data Sharing.

Data Sharing Benefits. Data Sharing Requirements. The DB2 Coupling Facility. Data Sharing Naming Conventions. Data Sharing Administration. Data Sharing Application Development Guidelines. Data Sharing Administration Guidelines.

20. DB2 Behind the Scenes.

The Physical Storage of Data. What Makes DB2 Tick.

21. The Optimizer.

Physical Data Independence. How the Optimizer Works. Filter Factors. Access Path Strategies. Other Operations Performed by the Optimizer. Access Path Strategy Compatibility.

22. The Table-Based Infrastructure of DB2.

The DB2 Catalog. The DB2 Directory.

23. Locking DB2 Data.

How DB2 Manages Locking. Locks Versus Latches. Lock Duration. Table Space Locks. Table Locks. Page Locks. Row Locks. Lock Suspensions, Timeouts, and Deadlocks. Partition Independence. Lock Avoidance. Data Sharing Global Lock Management. LOBs and Locking. DB2 Locking Guidelines. Other DB2 Components. The Big Picture.


24. Traditional DB2 Performance Monitoring.

DB2 Traces. Trace Destinations. Tracing Guidelines. DB2 Performance Monitor (DB2 PM). Using DB2 PM. Online DB2 Performance Monitors. Viewing DB2 Console Messages. Displaying the Status of DB2 Resources. Monitoring z/OS and OS/390.

25. Using EXPLAIN.

How EXPLAIN Works. Access Paths and the PLAN_TABLE. Cost Estimates and the DSN_STATEMNT_TABLE. Function Resolution and the DSN_FUNCTION_TABLE. EXPLAIN Guidelines.

26. DB2 Object Monitoring Using the DB2 Catalog and RTS.

DB2 Catalog Queries. Real Time Statistics. Reviewing the Rules for an Effective Monitoring Strategy.


27. Tuning DB2's Environment.

Tuning the z/OS and OS/390 Environment. Tuning the Teleprocessing Environment.

28. Tuning DB2's Components.

Tuning the DB2 Subsystem. Tuning the Database Design. Tuning the Application. The Causes of DB2 Performance Problems.

29. DB2 Resource Governing.

The Resource Limit Facility. The QMF Governor.


30. An Introduction to DB2 Utilities.

Generating Utility JCL. Monitoring DB2 Utilities. Version 7 and the State of IBM DB2 Utilities. Using LISTDEF and TEMPLATE. Issuing SQL Statements in DB2 Utilities.

31. Data Consistency Utilities.

The CHECK Utility. The CHECK DATA Option. The CHECK LOB Option. The CHECK INDEX Option. The REPAIR Utility. The REPAIR DBD Option. The REPAIR LOCATE Option. The REPAIR SET Option. REPAIR and Versions. The REPORT Utility. The DIAGNOSE Utility.

32. Backup and Recovery Utilities.

The COPY Utility. The COPYTOCOPY Utility. The MERGECOPY Utility. The QUIESCE Utility. The RECOVER Utility. The RECOVER Utility. The REBUILD INDEX Utility. The REPAIR Utility. The REPORT RECOVERY Utility. Backing Up and Restoring the System.

33. Data Organization Utilities.

The LOAD Utility. The UNLOAD Utility. The REORG Utility.

34. Catalog Manipulation Utilities.

The CATENFM Utility. The CATMAINT Utility. The DSNJCNVB Utility. The MODIFY Utility. The RUNSTATS Utility. The STOSPACE Utility.

35. Stand-alone Utilities and Sample Programs.

The Stand-alone Utilities. DB2 Sample Programs.

36. DB2 Commands.

DB2 Environment Commands. Information-Gathering Commands. Administrative Commands. Environment Control Commands. DSN Commands. IMS Commands. CICS Commands. TSO Commands. IRLM Commands.

37. DB2 Utility and Command Guidelines.

Utility Guidelines. The Pending States.

38. DB2 Contingency Planning.

What Is a Disaster? DB2 Environmental Considerations. DB2 Contingency Planning Guidelines.


39. Components of a Total DB2 Solution.

DB2 Tools. DB2 Tools Vendors.

40. Organizational Issues.

Education. Standards and Procedures. Operational Support. Political Issues. Environmental Support. Tool Requirements.


41. DRDA.

What Is DRDA? DRDA Functions. DRDA Architectures and Standards. The Five DRDA Levels. Putting It All Together. Distributed DB2.

42. Distributed DB2.

Distributing Data Using DB2. DB2 Support for the DRDA Levels. Methods of Accessing Distributed Data. System-Directed Versus Application-Directed. Packages for Static SQL. Two-Phase Commit. Miscellaneous Distributed Topics.

43. DB2 Connect.

An Overview of IBM DB2 Connect.

44. Distribution Guidelines.

Distribution Behind the Scenes. Block Fetch. Dynamic Cursor Pre-Open. Distributed Performance Problems. Distributed Database Design Issues. Distributed Data Placement. Distributed Optimization. Distributed Security Guidelines. Miscellaneous Distributed Guidelines.

45. Data Warehousing with DB2.

Defining the Basic Terms. Designing a Data Warehouse. Populating a Data Warehouse. Accessing the Data Warehouse. Managing the Data Warehouse. The Big Picture. DB2 Data Warehouse Center. Materialized Query Tables. General Data Warehouse Guidelines. DB2-Specific Data Warehousing Guidelines.


Web 1. Special Consideration for DB2 Version 6. PDF.

Type 1 Indexes. PDF. Shared Read Only Data. PDF. RECOVERINDEX. PDF. Host Variables Without Colons. PDF. Dataset Passwords. PDF. Stored Procedure Registration. PDF. Synopsis. PDF.

Web 2. Short Summary of DB2 V4 Through V6 Changes. PDF.

DB2Version 6 Features. PDF. DB2Version 5 Features. PDF. DB2Version 4 Features. PDF.

Web 3. Type 1 Indexes. PDF.

Basic Index Structure. PDF.


Appendix A. DB2 Sample Tables. PDF.

Appendix B. DB2 Tools Vendors. PDF.

The Vendor List. PDF.

Appendix C. Valid DB2 Data Types. PDF.

Appendix D. DB2 Limits. PDF.

Appendix E. DB2 on Other Platforms. PDF.

The DB2 Family. PDF. Packaging and Naming Issues. PDF.

Appendix F. DB2 Version 7 Overview. PDF.

E-Business Enhancements. PDF. Application Development Enhancements. PDF. Data Management Enhancements. PDF. Business Intelligence Enhancements. PDF. Additional V7 Information. PDF.

Appendix G. DB2 Version 8 Overview. PDF.

Architecture. PDF. Database Administration. PDF. Programming and Development. PDF. Migration to DB2 V8. PDF.

Appendix H. Reorganizing the DB2 Catalog. PDF.

When Should the DB2 Catalog and Directory Be Reorganized? PDF.