Learning Visually with Examples [Electronic resources]

Raul F. Chong, Clara Liu, Sylvia F. Qi, Dwaine R. Snow

نسخه متنی -صفحه : 312/ 108
نمايش فراداده

8.1. The DB2 Storage Model: The Big Picture

This section provides an overview of the DB2 storage model. In Figure 8.1 you can see the interaction between the different database objects as they relate to the DB2 storage model. This figure presents a combination of physical and logical views of the primary database objects.

Figure 8.1. A view of the DB2 database objects

[View full size image]

Figure 8.1 illustrates a user retrieving some data from the table

t2 . From this user's perspective, the information he needs is stored in a table, and how and where it is stored on disk is irrelevant. When this user issues the SQL statement:

SELECT ProdId FROM t2 WHERE ProdName = 'Plum'

the column from the specified rows in the table is retrieved by DB2 and returned to the user. Behind the scenes, DB2 may need to read a number of pages of data from one or more physical disks or from memory to provide this information to the user.

DB2 stores table and index data on pages, which are the smallest unit of storage in a DB2 database. extents and read multiple pages with each I/O request. In Containers are the physical storage for the table spaces.

To optimize performance, DB2 lets you specify the table spaces in which you want your tables and indexes stored. You can also associate buffer pools with specific table spaces so that you can optimize the placement of tables and indexes within memory.