Previous Topic: Data Sharing AttributesNext Topic: Journal Buffers and Journal Files


Database Buffers

What Is a Database Buffer?

A database buffer is space allocated in memory to hold database pages while CA IDMS/DB accesses information on those pages. A buffer is divided into pages. If information on the page is updated, CA IDMS/DB writes the altered page back to the database when that buffer page is needed or when the transaction ends.

CA IDMS/DB Acquires Space When It Opens Associated File

CA IDMS/DB acquires a buffer when it first opens a file associated with the buffer. If, during execution of the runtime system, CA IDMS/DB opens no files associated with the buffer, CA IDMS/DB does not acquire space for that buffer.

CA IDMS/DB Searches Buffers Before Files

To satisfy a program's request for data, CA IDMS/DB first searches the buffers to see if the requested page already resides in main memory. If the page is there, CA IDMS/DB uses the in-core copy and avoids an I/O. If it isn't, CA IDMS/DB searches the database files for the requested page.

Every File Must Be Associated with a Buffer

A database buffer must be defined to a DMCL before you can add segments to the DMCL definition. Each file contained in the segments added to the DMCL must be associated with a buffer. You can associate a file with a buffer in one of three ways:

The page size of the buffer must be greater than or equal to the block size or (in the case of VSAM) control interval of all files associated with the buffer.

What a Database Buffer Defines

The definition of a database buffer includes these attributes:

When to Define a Database Buffer

You define a database buffer when: