MAJOR COMPONENTS OF DB2 - IBM Mainframe

Since DB2 is a huge and state-of-the-art Relational Database Management System, its internal structure is very complex and contains a large number of components. But form a high-level point of view, DB2 can be considered as consisting of 4 major components, each of which contains thousands of sub-­components.

DB2 Structure and Components

DB2 Structure and Components

The 4 major components are:

  • System services component, which supports system operation, operator communication, logging and similar functions.
  • Locking services component, which provides the necessary controls for managing concurrent access to data.
  • Database services component, which supports the definition, retrieval and update of user and system data.
  • Distributed data facility component, which provides DB2's, distributed database support.

System Services Component

The system services component handles all system-wide tasks like:

  • Controlling connections to other MVS subsystems like CICS, IMS/DC, TSO, etc.
  • Handling system start-up and shutdown and operator communication.
  • Managing the system log, which records the information necessary for recovering user and system data in case of a system failure. When the active log becomes full, the system switches to a new dataset and copies the old data to the archive log. Information regarding the log datasets is recorded in a system dataset called Bootstrap Dataset. Dual copies of all the three datasets, active log, archive log and boot strap datasets are kept in order to- recover data if an error occurs on one copy of the log.
  • Gathering system-wide statistics, performance auditing and accounting information. The information, which is collected by the DB2 Instrumentation Facility, is either written to the System Management Facility (SMF) or Generalized Trace Facility (GTF) datasets or is passed to some third party performance monitoring programs. DB2 has a separate performance-monitoring program, DB2PM (DB2 Performance Monitor) that produces batch reports and interactive graphics form SMF or GTF.

Locking Services Component

The locking services are provided by an MVS subsystem called IMS Resource Lock Manager (IRLM). This is a general-purpose lock manager, which is used to control concurrent access to DB2 data. IRLM handles locking services. DB2 treats data as a shared resource and, therefore, allows any number of transactions (users) to access the same data simultaneously. A concurrency control mechanism, called locking, is required to isolate different users from each other and to maintain data integrity. The IRLM provides this mechanism. The locking and locking mechanisms are described in more details in later chapters.

Database Services Component

The Database Services Component controls the overall DB2 execution environment. This includes managing the log data sets, gathering statistics for performance monitoring; handling system startup and shutdown, and providing DB2 command support. At the center of the architecture is the Data Base Services, whose functions are most relevant to you as a programmer and user. They support the functions of the SQL language, i.e., definition, access control, retrieval, and update of user and system data. This component has several sub-components, among them the Relational Data System (RDS), the Data Manager, and the Buffer Manager. The RDS is the interface to your application program or your interactive query. It manages the execution of each SQL request by making calls to the Data Manager. It also includes the Optimizer and BIND functions, which we will look at in a moment. The Data Manager supervises access to the physical database. It can be thought of as a high-level access mechanism to the VSAM datasets where the data is actually stored. It interfaces with the RDS, which passes it your re-quests, the IRLM and System Services for locking and logging, respectively, and the Buffer Manager for I/O. The Buffer Manager controls the actual transfer of data from secondary storage (DASD) to virtual storage buffer pools. The buffering techniques employed are intended to maximize performance by minimizing the amount of physical I/O required.

DB2 Application Program Preparation and Execution

DB2 Application Program Preparation and Execution

The database services component implements the functions of the SQL language that is the definition, retrieval and update of database data. This is achieved by 5 sub-components, which together support the preparation of application program for execution, and does the subsequent execution of the program. These components are:

  • Pre-compiler, which is a pre-processor for the host programming language. Its function is to analyze the source code, find out all the SQL statements, comment them out and replace them by the host language CALL statements. At run time these CALL statements will pass control to the Runtime supervisor. Form the SQL statements the Pre-compiler constructs a Database Request Module (DBRM), which becomes input to the next operation, which is Bind.
  • Bind component has two functions. It is used to 'bind' a given DBRM to produce a 'package' and also to bind together all the 'packages' to produce an 'application plan' or 'plan'.
  • Runtime Supervisor is resident in the main memory when the application program is executing. Its job is to oversee that execution. When the program requests some database operation to be performed, control first goes to the runtime supervisor, which uses the control information in the application plan to request the appropriate oh the part of the Data Manager.
  • Data Manager performs all the normal access method functions - search, retrieval, update, index maintenance, etc. It also manages the physical database(s). It invokes other system components as necessary in order to perform detailed functions such as locking, logging, i/o operations, etc.
  • Buffer Manager is the component responsible for physically transferring data between external storage and virtual memory. It employs sophisticated techniques such as 'read-ahead-buffering' and 'look-aside buffering' to get the best performance out of the buffer pools under its care and to minimize the amount of physical i/o actually performed.

The above figure shows the flow of events during the DB2 application program preparation and execution.

The database services component also maintains certain control and descriptor information regarding the database tables and their columns database backup operations, indexes, etc. This information is divided into two groups and is kept in two different places, the catalog and the directory.

The catalog consists of regular tables, and is accessible by means of SQL data retrieval statements. This information can be used to produce reports for the used of the data base administrators. But the directory cannot be accessed by the SQL statements and is intended for DB2's internal use.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics