DB2 Version 9.7 for Linux, UNIX, and Windows

Database partition groups

A database partition group is a set of one or more database partitions defined as belonging to a database. When you want to create tables for the database, you first create the database partition group where the table spaces will be stored, then you create the table space where the tables will be stored.

You can define named subsets of one or more database partitions in a database. Each subset you define is known as a database partition group. Each subset that contains more than one database partition is known as a multiple partition database partition group. Multiple partition database partition groups can only be defined with database partitions that belong to the same instance. A database partition group can contain as few as one database partition, or span all of the database partitions in the database.

Figure 1 shows an example of a database with five database partitions in which:
Figure 1. Database partition groups in a database
Five database partitions are grouped into three database partition groups.

You create a new database partition group using the CREATE DATABASE PARTITION GROUP statement. You can modify it using the ALTER DATABASE PARTITION GROUP statement. Data is divided across all the database partitions in a database partition group, and you can add or drop one or more database partitions from a database partition group. If you are using a multiple partition database partition group, you must look at several database partition group design considerations.

Each database partition that is part of the database system configuration must already be defined in a database partition configuration file called db2nodes.cfg. A database partition group can contain as few as one database partition, or as many as the entire set of database partitions defined for the database system.

When a database partition group is created or modified, a distribution map is associated with it. A distribution map with a distribution key and a hashing algorithm is used by the database manager to determine which database partition in the database partition group will store a given row of data.

In a nonpartitioned database, no distribution key or distribution map is required. A database partition is a part of the database; it includes user data, indexes, configuration files, and transaction logs. Default database partition groups that were created when the database was created are used by the database manager. IBMCATGROUP is the default database partition group for the table space containing the system catalogs. IBMTEMPGROUP is the default database partition group for system temporary table spaces. IBMDEFAULTGROUP is the default database partition group for the table spaces containing the user-defined tables that you might choose to put there. A user temporary table space for a declared temporary table or a created temporary table can be created in IBMDEFAULTGROUP or any user-created database partition group but not in IBMTEMPGROUP.

When working with database partition groups you can: