DB2 Multisystem: Basic terms and concepts

 

A distributed file is a database file that is spread across multiple System i™ models. Here are some of the main concepts regarding the creation and use of distributed files by DB2® Multisystem.

Each system that has a piece of a distributed file is called a node. Each system is identified by the name that is defined for it in the relational database directory.

A group of systems that contains one or more distributed files is called a node group. A node group is a system object that contains the list of nodes across which the data is distributed. A system can be a node in more than one node group.

The following figure shows two node groups. Node group one contains systems A, B, and C. Node group two contains systems A, B, and D. Node groups one and two share systems A and B because a system can be a node in more than one node group. Figure 1. Node groups

Node group one contains systems A, B, and C. Node group two contains systems A, B, and D.

A file is distributed across all the systems in a node group through partitioning. Table partitioning, further described in Partitioned tables, applies to tables partitioned on a single system.

A partition number is a number from 0 to 1023. Each partition number is assigned to a node in the node group. Each node can be assigned many partition numbers. The correlation between nodes and partition numbers is stored in a partition map. The partition map is also stored as part of the node group object. You can provide the partition map when you create a node group; otherwise, the system generates a default map.

You define a partition map by using a partitioning file. A partitioning file is a physical file that defines a node number for each partition number.

A partitioning key consists of one or more fields in the file that is being distributed. The partitioning key is used to determine which node in the node group is to physically contain rows with certain values. This is done by using hashing, an operating system function that takes the value of the partitioning key for a record and maps it to a partition number. The node corresponding to that partition number is used to store the record.

The following example shows what partition number and nodes might look like for a distributed table for two systems. The table has a partitioning key of LASTNAME.

Table 1. Partition map
Partition number Node
0 SYSA
1 SYSB
2 SYSA
3 SYSB

In the partition map, partition number 0 contains SYSA, partition number 1 contains node SYSB, partition number 2 contains SYSA, and partition number 3 contains SYSB. This pattern is repeated.

The hashing of the partitioning key determines a number that corresponds to a partition number. For example, a record that has a value of Andrews might hash to partition number 1. A record that has a value of Anderson might hash to partition number 2. If you refer to the partition map shown in Table 1, records for partition number 1 are stored at SYSB, while records for partition number 2 are stored at SYSA.

 

Parent topic:

DB2 Multisystem overview

 

Related concepts


Partitioned tables