Prerequisites
What You Need to Know Before Starting
This book teaches DB2 from the ground up. You do not need prior SQL experience, and you do not need prior DB2 experience. However, you do need a baseline of computing literacy that allows you to focus on the database material rather than struggling with the environment around it.
Required Background
Basic computing literacy. You should be comfortable with files and directories, understand what an operating system does at a conceptual level, and be able to install software on your computer. If you can install an application, navigate a file system, and open a terminal or command prompt, you have enough.
Command line familiarity. You do not need to be a command line expert, but you should not be afraid of one. DB2 administration involves typing commands, not clicking buttons. If you have never used a command line, spend an afternoon with a basic tutorial for your operating system before starting Chapter 4. Any terminal tutorial for Linux, macOS, or Windows PowerShell will do.
Familiarity with at least one programming language. COBOL, Java, Python, C, JavaScript, Go -- any language is fine. You will not be writing application code until Part VII, but having the mental model of "programs are instructions that execute in sequence, with variables, conditions, and loops" helps you understand stored procedures, triggers, and application access patterns when they appear. If you are coming from the DataField.Dev COBOL trilogy, you are well prepared.
A conceptual understanding of what a database is. You should understand, at a high level, that a database is a system that stores and retrieves structured data, and that applications interact with databases to persist information. You do not need to understand how databases work -- that is what this book teaches. If someone says "we store customer records in a database," that sentence should make sense to you even if you have never created a table.
What You Do NOT Need
Let me be explicit about what this book does not assume, because many DB2 resources assume far too much:
- No prior SQL experience. Part II teaches SQL from SELECT onward. Every concept is introduced, explained, and demonstrated before it is used in exercises.
- No prior DB2 experience. Chapter 1 starts with "What is DB2?" and Chapter 3 explains the architecture from scratch.
- No prior database administration experience. Part IV introduces administration concepts as if you have never run a utility or configured a backup.
- No mainframe experience (for the LUW track). If you are following the LUW path, you do not need to know anything about z/OS, JCL, or mainframe operations.
- No Linux/UNIX experience (for the z/OS track). If you are following the z/OS path, you do not need to know Linux commands or Docker.
- No advanced mathematics. The optimizer and performance chapters involve some quantitative reasoning (cost calculations, cardinality estimation, buffer pool hit ratio math), but everything is presented with concrete numbers and real DB2 scenarios. If you can multiply, divide, and understand percentages, you have enough math.
Software Requirements
To get the most out of this book, you need a running DB2 instance where you can create databases, execute SQL, and experiment. Chapter 4 walks you through the setup in detail. Here is what you need to prepare.
For the LUW Track
Option 1: Docker (recommended). The fastest path to a running DB2 instance. You need: - A computer with at least 8 GB of RAM (16 GB recommended) - Docker Desktop installed (available free for Linux, macOS, and Windows) - Approximately 5 GB of free disk space - The IBM Db2 Community Edition Docker image (free, available from Docker Hub)
Chapter 4 provides the exact commands to pull the image, configure the container, and create your first database.
Option 2: Native installation. If you prefer a native install: - Linux: Db2 Community Edition runs on most modern Linux distributions. You need root access and approximately 2 GB of disk space for the installation plus space for your databases. - Windows: Db2 Community Edition supports Windows 10/11 and Windows Server. Administrative privileges required. - macOS: Use the Docker approach. There is no native macOS DB2 installation.
SQL client tool. You need a way to write and execute SQL. Options include: - The DB2 command line processor (CLP) -- installed with DB2, no additional software needed - DBeaver Community Edition (free, cross-platform, connects to DB2 via JDBC) - IBM Data Studio (free, full-featured DB2 IDE from IBM)
For the z/OS Track
Access to a z/OS system with DB2 installed is required for hands-on z/OS exercises. Options include:
- Employer's z/OS development system. If you work at an organization that runs z/OS, ask your systems programming team about development or training LPARs. Many shops have sandboxed environments for learning.
- IBM Z Development and Test Environment (ZD&T). A z/OS emulation environment that runs on x86 Linux. Available through IBM academic programs and some employer licenses. This is the closest thing to a personal z/OS system.
- IBM Wazi as a Service. Cloud-hosted z/OS development environment. IBM offers trial access.
- Zowe CLI and Zowe Explorer. If you have remote access to a z/OS system, the open-source Zowe project provides modern command-line and VS Code interfaces for interacting with z/OS resources including DB2.
If you do not have z/OS access, you can still learn the z/OS concepts by reading the [z/OS] sections -- the SQL and design content is the same, and the administration concepts transfer even if you cannot execute the commands. Many professionals learn z/OS DB2 concepts on LUW first and then apply them when they gain mainframe access.
For Both Tracks
A text editor. For writing SQL scripts, reviewing output, and taking notes. Any editor works: VS Code, Notepad++, vim, Sublime Text, or your preferred tool.
Git (optional but recommended). The Meridian National Bank project produces a significant amount of SQL and configuration files across 37 chapters. Tracking your work in a Git repository lets you review changes, revert mistakes, and maintain a portfolio of your DB2 work. If you are not familiar with Git, it is not a prerequisite -- but Chapter 4 briefly shows how to set one up for your project files.
Platform-Specific Prerequisites
If You Are Following the z/OS Track
The following knowledge is helpful but not strictly required -- Chapter 4 covers enough to get you started:
- TSO/ISPF navigation. If you can log in to TSO, navigate ISPF panels, and edit a dataset, you are ahead of the curve. If not, Chapter 4 provides orientation.
- JCL basics. DB2 utilities on z/OS are executed via JCL. Familiarity with JOB, EXEC, and DD statements helps, but the book provides complete JCL examples with explanations. If you have read Foundations of COBOL or any JCL introduction, you are prepared.
- Understanding of the z/OS environment. Knowing what an LPAR is, what datasets are, and how batch jobs work gives you a head start. If these terms are unfamiliar, the glossary and Chapter 3's architecture discussion will bring you up to speed.
If You Are Following the LUW Track
The following knowledge is helpful but not strictly required:
- Basic Linux command line. If your DB2 instance runs on Linux (including Docker), commands like
ls,cd,cat, andpswill appear in examples. If you are running on Windows, the DB2 command line processor is the same -- the OS-level commands are the only difference. - Basic networking concepts. Understanding IP addresses, ports, and client-server communication helps when configuring remote connections to DB2. Chapter 4 covers the specifics.
How to Verify You Are Ready
If you can answer "yes" to all of the following, you are ready to start Chapter 1:
- I can open a terminal or command prompt on my computer.
- I have written at least a simple program in some programming language (even "Hello, World" counts).
- I understand that databases store data and applications retrieve it.
- I have (or can obtain) enough disk space and RAM to run a DB2 instance.
- I am willing to type commands, make mistakes, read error messages, and try again.
That last one matters more than any technical prerequisite. DB2 is learned by doing, and doing means making mistakes. Every error message is a lesson. Every broken query is a step toward understanding. The willingness to experiment is the only prerequisite that cannot be installed from a download.
Let's set up your environment in Chapter 4.