Preface

Why This Book Exists

Let me be direct with you: there is no free, comprehensive, modern IBM DB2 textbook. Not one.

IBM's official DB2 training courses run $2,000 to $5,000 per course, and you will need several of them to cover what a working DBA needs to know. Certification exam fees add another $200 or more per attempt. The existing DB2 books on the market -- the ones that are any good -- were mostly written in the DB2 9 or DB2 10 era, cover either z/OS *or* LUW but never both coherently, and cost $50 to $80 each. IBM's Knowledge Center documentation is comprehensive and free, but it is massive, fragmented, and nearly impossible for someone learning DB2 to navigate in any structured way. It is a reference, not a teacher.

That gap is why this book exists. If you want to learn DB2 from the ground up -- or if you already know DB2 on one platform and need to understand the other -- you should not have to spend thousands of dollars or piece together knowledge from a dozen disconnected sources. You need a single volume that takes you from your first SQL query through database design, administration, performance tuning, high availability, and application development patterns, covering both the mainframe and distributed worlds in a way that makes the similarities and differences clear.

This is that volume.

The Dual-Platform Approach

Here is the decision I wrestled with most when designing this book: should it cover DB2 for z/OS, DB2 for LUW, or both?

The purist argument says to write two separate books. DB2 for z/OS and DB2 for LUW are, after all, separate products with separate codebases, separate installation procedures, separate administration tools, and separate architectural assumptions. A z/OS DBA uses JCL, SPUFI, and DSNZPARM. A LUW DBA uses the command line processor, db2pd, and database manager configuration parameters. The daily work feels different.

But here is what I have observed over twenty-plus years in this field: the concepts are the same. SQL is SQL. Normalization is normalization. The optimizer makes cost-based decisions on both platforms. Buffer pools serve the same purpose. Indexes are B+ trees. Backup and recovery follow the same logical principles even when the commands differ. And increasingly, organizations run both -- core banking on z/OS, digital channels on LUW, with data flowing between them.

So this book covers both, with a dual-track approach:

  • Universal content (SQL, relational theory, database design, optimizer concepts) applies to both platforms and is presented once without platform markers.
  • Platform-specific content (architecture internals, installation, administration commands, utility syntax, HA mechanisms) is clearly marked with [z/OS] and [LUW] tags. You read the sections for your platform, skip the other, or read both if you work in a mixed environment.

The result is a book that serves the z/OS DBA, the LUW DBA, the application developer who needs to understand what the DBA team does, and the professional migrating between platforms -- all without requiring two purchases or two reading commitments.

Who This Book Is For

I wrote this for several audiences, and I want to be honest about which parts will matter most to each:

If you are new to databases entirely -- perhaps a COBOL programmer who has been handed DBA responsibilities, or a computer science student who wants to learn a production database system -- start at Chapter 1 and read sequentially. Parts I and II (Foundations and SQL Mastery) are written with you in mind. The tone is patient, the examples start simple, and every concept is demonstrated before it is abstracted.

If you are an experienced Oracle or SQL Server DBA migrating to DB2 -- you already know relational databases. You do not need me to explain what a foreign key is. Use the Fast Track learning path described in the "How to Use This Book" section. You will move quickly through Parts I and II, spend serious time in Parts III through V where the DB2-specific design, administration, and performance content lives, and cherry-pick from Parts VI and VII based on your deployment requirements.

If you are a mainframe professional who knows z/OS but not DB2 -- you understand JCL, TSO/ISPF, and the mainframe operational environment. What you need is the DB2 layer on top of that. This book gives you that layer, with all the z/OS-specific content presented in terms you already understand.

If you are a data engineer building pipelines that touch DB2 -- Chapters 33 (JDBC, ODBC, and Python Access) and 35 (RESTful APIs and Modern Access Patterns) are where your primary interest lives, but understanding how DB2 thinks about data (Parts I-III) and how performance works (Part V) will make you dramatically more effective at writing efficient data extraction and transformation logic.

If you are preparing for IBM DB2 certification exams -- the chapter structure maps to exam objectives, and Chapter 37 provides a complete certification-to-chapter mapping. The exercises and quizzes throughout are calibrated to the knowledge level the exams expect.

The Connection to the COBOL Trilogy

This book is the database companion to the DataField.Dev COBOL trilogy (Foundations of COBOL, Intermediate COBOL, and Advanced COBOL). If you are coming from that series, here is what you should know:

The Advanced COBOL book includes seven chapters on DB2 from the COBOL programmer's perspective -- embedded SQL syntax, the precompiler, cursor management, SQLCA processing, and performance-aware coding patterns. That material teaches you to use DB2 from COBOL. This book teaches you to understand, design, administer, and optimize DB2 as a platform. The overlap is intentional and complementary, not redundant.

Chapter 32 of this book (Embedded SQL for COBOL and C) connects directly to the Advanced COBOL material, and cross-references are provided throughout where topics intersect. But you do not need to have read any of the COBOL books to use this text. This book stands completely on its own.

The Meridian National Bank Progressive Project

Learning database administration by reading about it is like learning surgery by reading about it -- necessary but insufficient. You have to do the work.

Throughout this book, you will design, build, populate, optimize, secure, and administer a complete enterprise database system for Meridian National Bank, a fictional mid-size commercial bank with 2 million customers, 500 million annual transactions, and the full complexity of a real banking operation: core accounts, lending, payments, compliance reporting, and fraud detection.

The project starts in Chapter 4 when you create the Meridian Bank database. Each subsequent chapter adds a component:

  • In Part II, you write the SQL that powers the bank's operations -- customer queries, transaction processing, analytical reporting.
  • In Part III, you design the logical and physical schema, choose tablespace strategies, and create the index architecture.
  • In Part IV, you set up the utility schedule, backup procedures, security model, and monitoring infrastructure.
  • In Part V, you tune the system -- finding and fixing the slow queries, configuring buffer pools, resolving lock contention.
  • In Part VI, you architect for high availability and plan the cloud deployment.
  • In Part VII, you build the application access layer -- embedded SQL for batch processing, JDBC for the web tier, REST APIs for the mobile app.
  • In Part VIII, you stress-test the whole system and run a disaster recovery drill.

By the end, you have architected a production-grade DB2 system with hundreds of tables, realistic data volumes, and a complete operational runbook. The project includes both z/OS and LUW implementation tracks, so you follow your platform throughout.

This is not a toy project. It is designed to be the kind of work you would actually do in your first year as a DB2 DBA -- compressed into a structured learning experience.

A Note on How This Book Was Created

This textbook was generated with the assistance of artificial intelligence (Anthropic's Claude). I want to be transparent about this for several reasons.

First, honesty. AI-assisted content generation is a reality of modern publishing, and readers deserve to know when it has been used. This book was designed, structured, and reviewed by human expertise in DB2 and database administration, but the prose, code examples, and exercises were generated with AI assistance and refined through human review.

Second, a quality note. AI-generated technical content carries specific risks: plausible-but-incorrect syntax, fabricated citations, and confident assertions about version-specific behavior that may not be accurate. I have taken significant steps to mitigate these risks:

  • All SQL examples are written in IBM DB2 dialect and have been reviewed for syntactic validity.
  • Citations follow a three-tier system (Verified, Attributed Claim, and Illustrative) -- no citation in this book is fabricated. Where exact publication details could not be confirmed, the text uses attribution without inventing bibliographic information.
  • Version-specific claims are hedged appropriately. When a feature's introduction version could not be confirmed with certainty, the text says so.
  • Platform-specific behavior is noted explicitly rather than presenting one platform's behavior as universal.

Third, an invitation. If you find errors -- and in a book of this scope, there will be some -- the source is available under CC-BY-SA-4.0. File an issue, submit a correction, or fork and improve. The goal is a living resource that gets better over time, and that requires a community.

Conventions Used in This Book

Throughout this text, you will encounter several formatting conventions:

  • [z/OS] marks content specific to DB2 for z/OS (mainframe)
  • [LUW] marks content specific to DB2 for LUW (Linux, UNIX, Windows)
  • Content without a platform marker applies to both platforms
  • Monospaced text indicates SQL statements, commands, file names, and technical terms when first introduced
  • Code blocks show complete, executable examples whenever possible
  • Bold text marks key terms at their first definition
  • Callout boxes (Check Your Understanding, Productive Struggle, DB2 Clinic, Threshold Concept) serve specific pedagogical functions described in "How to Use This Book"

One Last Thing Before You Start

DB2 is not glamorous. It does not trend on social media. It does not get breathless conference keynotes. It just runs -- quietly, reliably, at enormous scale -- processing the transactions that keep the world's financial systems, governments, and supply chains functioning.

The people who keep DB2 running are among the most skilled and least celebrated professionals in technology. If you are becoming one of those people, or if you already are one and want to get better, this book is for you.

Let's get to work.


DataField.Dev March 2026