Skip to main content

The Unique Benefits of z/OS-Native Database Systems

TechChannel Data Management

This is the first of two “z/OS and Friends” articles on database management systems. I am focused on z/OS because there are families of products, like the Db2 family, that run on different platforms, and because of platform differences, the products consume CPU cycles and utilize memory and storage in different ways. There are many important differences besides consumption patterns.

The beauty of products designed and programmed to run on z/OS is that they are optimized for the environment. This matters because z/OS has an extraordinary set of powerful and useful properties that have been refined over many releases. Db2 is written by people that know the intimate details of programming in z /Architecture, which has a complex instruction set with amazing flexibility.

At a level higher than the architecture and instruction set, z/OS has around 50 built-in software functions (BCP and Base Elements) and 20 optional features that have significant functionality to utilize. The Db2 designers and developers know the intimacies of the z/OS access methods too. So, let’s get going on database systems on z/OS.

Let’s Use My IMS DB Model for Db2 for z/OS and See How It Fits

In the first part of May, my article on IMS DB was published on TechChannel. That article had a figure in it as shown below. Note—the figure is about IMS DB, not Db2.

I wondered what this figure would look like for Db2 if I used a similar model. Let me start with the words and ideas for the relational model and Db2. Then, I’ll paste the labels and phrases into a new figure. The framework for the discussion is around structure, elements and fields; language used to access the data, types and advantages; and a customer example.

What Is the Focus of Db2 in Simple Terms?

Relational Structure

IMS organizes data in a tree-like structure, with each level representing a relationship between data segments. However, Db2 organizes data in tables with rows and columns, representing relationships between data entities through common fields. 

Elements and Fields

Elements and fields are not the same in Db2, although the terms are sometimes used interchangeably by practitioners. Elements are a component of the database used in Db2. You can access and use these elements to organize your data. Examples of elements include tables, table spaces, indexes, index spaces, keys, views and databases. Fields are associated with a column in the database. The fields have values which can contain a variety of different types of data.

SQL

Db2 mainly uses the Structured Query Language (SQL) as its data manipulation language. SQL is a standard language used for defining, manipulating and accessing data within relational databases like Db2. Introduced in the 1970s, SQL offered two main advantages over older APIs. First, it introduced the concept of accessing many records with one single command; second, it eliminates the need be specific about how to reach a record.

Database Types

Db2 includes various components (sometimes products) for different data management needs, including:

  • Operational databases: For transactional processing and day-to-day operations.
    • Data warehouses: For storing and analyzing historical data. The IBM Warehouse product reveals what is the state-of-the-art in this product category, including: “unifies data across hybrid clouds, enabling fast, governed access for analytics and AI. It integrates with Db2, data lakes, and watsonx.data, runs on low-cost cloud object storage, and delivers 4x faster performance with caching”.Data Lakes: For storing raw data in various formats. IBM Db2 Warehouse makes possible the use of data lake tables. This means that users can define “external” tables stored in formats like Iceberg and other open data formats, and query them directly from Db2 Warehouse.
    • Fast Data: The IBM Fast Data Movement feature enables users to quickly transfer data between Hadoop and Db2 Warehouse environments.

Access Entry Point

While IMS relies on the hierarchical structure and root segments for data access, Db2 makes use of a relational model with optimized access paths, indexes and SQL statements to access data. 

Advantages

IBM DB2 offers several key advantages. These include enhanced performance and scalability, comprehensive data security, flexibility in ways to deploy and support for a variety of data types and industry standards. Db2 is well known for its reliability and availability, making it a suitable choice for organizations with demanding data management needs.

An Industry Example

Many banks and financial organizations around the world utilize Db2 on z/OS to manage their core financial operations. These functions include many application areas, like credit card transactions, ATM withdrawals and stock market trades. This is because Db2 on this platform is known for its high availability, scalability and security, crucial for processing millions of transactions daily. Banks make up nearly 43% of Db2’s user base, according to some measures. Among them are American Express, Bank of America, Citibank and Deutsche Bank.

The Updated Figure—This Time for Db2

So now, the figure for Db2 looks like this:

The Importance of Atomicity, Consistency, Isolation and Durability

In the database management system (DBMS) discipline, there is a set of characteristic called ACID, which stands for Atomicity, Consistency, Isolation and Durability. These four properties ensure that database transactions are processed reliably and accurately, even if there is a processing error or the database has concurrent user access.  The acronym ACID was coined by Andreas Reuter and Theo Härder in 1983. While these two computer scientists are credited with the acronym itself, Jim Gray’s earlier work had already identified the core properties of Atomicity, Consistency and Durability within the context of transactions. Gray was a computer scientist who won the Turing Award in 1998.

Here’s a breakdown of each property:

  • Atomicity: A transaction is treated as an undividable unit. Either all changes within the transaction are made successfully, or none of them are. If any part of the transaction fails, the entire transaction is rolled back. The roll-back ensures data integrity.
  • Consistency: A transaction brings the database from one consistent state to another. This means that after the transaction, the database remains in a valid state, respecting all defined rules, constraints and relationships.
  • Isolation: Concurrent transactions are isolated from each other. This means that the effects of one transaction are not visible to other transactions until it has been committed. Interference between transactions is prevented and thus ensures that each transaction sees a consistent view of the data.
  • Durability: Once a transaction is committed, its changes are permanently stored in the database. The changes must survive even system failures, such as crashes or power outages. This ensures that data loss is minimized and the database can recover to a consistent state after failures.

What Is Special About IBM’s Implementation of the Relational Model on z/OS?

At this point in time, since the 1985 availability of the first release of Db2, many changes have been made to the product. IBM has developed and rewrote and revised and extended the product. At first, there was a thrust to get a product into the marketplace that had a wealth of functionality. Over time, the functionality was more and more driven by what customers needed to support their enterprises. The largest users of Db2 often have special needs due to their number of customers or special circumstances of their industry or product set.  High transaction rates can also drive challenging customer requirements.

At present, IBM offers various channels for Db2 customers to provide feedback and input about the product, including an ideas portal for submitting enhancement requests. IBM also supports technical advisory boards (TABs) and user groups like IDUG. IBM has product reviews and feedback programs for sharing experiences and identifying improvements. There is IBM support for reporting problems and seeking assistance. By leveraging these diverse channels, Db2 customers can actively contribute to the product’s development and improvement.

What Does IBM Write About Db2 on z/OS? What matters …

Here’s what makes it special in three specific pockets of value.

1.      Integration With z/OS and zSystems

Db2 for z/OS is designed to exploit the features and capabilities of the z/OS operating system, such as its advanced memory management, I/O capabilities (like MIDAW and FICON channels) and parallel processing features. Additionally, tight integration with the IBM zSystems hardware creates a powerful synergy, enabling Db2 to achieve high performance, scalability and availability for mission-critical workloads. In parallel sysplex environments, multiple Db2 subsystems can concurrently access and modify the same data with high integrity, performance and scalability. It is evident that this high degree of integration matters in customer value.

2.      Focus on Enterprise-Grade Features

Db2 for z/OS is built to handle massive transaction volumes and complex workloads efficiently, with advanced query optimization and parallel processing capabilities. Regarding availability, in a parallel sysplex environment, other subsystems can take over the workload if one becomes unavailable. Data security through column-level encryption and access controls, and adherence to industry standards, are effective for enterprise workloads. Referential integrity regarding data is ensured through referential constraints, check constraints and triggers, providing reliability and data validity. It is evident that Db2 for z/OS is focused on key features that are important to the most demanding enterprise customers.

3.      Support for Hybrid Environments and Current Tools

Db2 for z/OS has evolved to embrace hybrid cloud architectures and supports the use of RESTful APIs for accessing data. Db2 integrates with AI technologies like SQL Data Insights to enhance data management, optimize performance and enable AI application development. Data Gate allows for the continuous synchronization of mainframe data from Db2 for z/OS with cloud services, enabling analytics and machine learning while maintaining the security of the mainframe systems. Db2 for z/OS can deliver enterprise-scale Hybrid Transactional and Analytical Processing (HTAP), enabling high ingestion rates and supporting analytical workloads while maintaining data consistency. It is evident that Db2 for z/OS is embracing the most compelling open technologies and adding them to the possible implementation styles so they can be made use of as needed.

What Is the Relationship of Db2 and the z/OS Access Methods?

If you don’t work with Db2 frequently, you probably have this question. You might guess that Db2 gets a lot of support from the Virtual Storage Access Method (VSAM) because, after all, VSAM is perfect for virtualized environments like z/OS. VSAM has inside its code all the learnings from the access methods from which it was derived, like sequential and indexed implementations.

Sure enough, Db2 uses VSAM to store tables. Specifically, Db2 stores tables in VSAM Linear Data Sets (LDS) within table spaces. A table space is a set of one or more VSAM data sets that hold Db2 tables or indexes. In a nutshell, Db2 on z/OS relies on VSAM to manage the physical storage of its data, including tables, indexes and other database objects. Here is a summary list in the table below:

Table 1. The “what” and “how” of Db2 and VSAM.

VSAM Data SetsDb2 uses VSAM to manage the storage of its tables and indexes.
Linear Data SetsDb2 tables are physically stored as VSAM Linear LDS, a type of VSAM data set.
Table SpacesA table space is a logical grouping of VSAM data sets that hold a specific set of tables.
Storage StructuresTable spaces and index spaces are the primary types of storage structures in Db2 for z/OS. VSAM data sets are used to hold both table and index spaces.
VSAM Media ManagerDb2 uses VSAM’s Media Manager for all I/O operations.
Index SpacesLike tables, indexes are also stored in VSAM LDS within index spaces.

Are Other Access Methods, Like QSAM, Used for Db2?

As previously discussed, Db2 for z/OS can use VSAM to store and manage data, including for its catalog and log data sets. It can also interact with VSAM files for data migration or data sharing.

Queued Sequential Access Method (QSAM) is another access method for sequential data sets on z/OS. Db2 for z/OS can use QSAM to import and export data, as well as to access data stored in QSAM files for various purposes like data loading and migration.

Additionally, IBM File Manager and the VSAM-to-Db2 conversion tool from VirtualZ can be used to copy data between VSAM/QSAM files and Db2 tables. Organizations can share data between VSAM and Db2, leveraging industry-standard tools and SQL for more efficient data access.

What Is Next?

In the next article, I will discuss open-source databases supported through z/OS UNIX. That is the main exploration, but I also have a few things I want to share about IMS DB.


Key Enterprises LLC is committed to ensuring digital accessibility for techchannel.com for people with disabilities. We are continually improving the user experience for everyone, and applying the relevant accessibility standards.