Distributed files allow a database file to be spread across multiple OS/400systems, while retaining the look and capability of a single database. Performance of large queries can be enhanced by splitting database requests across multiple systems. Distributed files behave in much the same way as DATABASE files. However, since files are distributed across multiple systems, the arrival sequence or relative number cannot be relied upon, and additional time is required for the data link to pass the data between the systems whenever the remote system is accessed.
A distributed file is created like other database files, with the Create Physical File (CRTPF) command. This command has two new parameters that relate to a distributed file:
The first parameter has a value of *NONE for regular files, and the name of a node group for a distributed file. A node group is a new system object type (type *NODGRP) that specifies the names of the relational databases that will contain the records of the file. A node group is created with the Create Node Group (CRTNODGRP) command.
The records of a distributed file are divided amongst the various relational databases based on a partitioning key. The partitioning key is a field, or set of fields, from the distributed file whose value will determine in which relational database each record will be stored.
An existing physical file can be changed into a distributed file by using the Change Physical File (CHGPF) command. The two new parameters, node group and partitioning key, that were added to the CRTPF command were also added to the CHGPF command.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.