A distributed database management system

Abstract: A distributed database management system includes a plurality of computers, each including a database for storing data to be processed. The plurality of computers are interconnected by communication lines. Each computer has stored data names, and corresponding address area and location information for all databases, and measures data retrieval time from the databases. A retrieval time memory section stores data retrieval times corresponding to the address areas of data stored in the databases. A retrieval time prediction section retrieves the data retrieval time for data corresponding to a data name requested by a user when the requested data is stored in at least two databases, utilizing stored data retrieval times and corresponding address areas and location information on where the data is stored. A data retrieval optimization section selects the database location information and the address area associated with the requested data name according to the retrieval result by the retrieval time prediction section, and retrieves the requested data from the appropriate database according to the location information and address area. The system can also register input data according to a desired retrieval time.

Description: The present invention relates to a distributed database management system for retrieving and registering data effectively. Recently, distributed database systems have been developed to use cooperatively distributed databases. Such distributed database systems have a plurality of computers, which are interconnected by communication lines. Each of the computers includes a database. (Each computer typically is called "site") It is assumed that three computers A, B, and C are interconnected and include databases A, B, and C, respectively. When a data operation request is supplied to computer A through an input device, computer A checks which database includes the necessary data for the operation request. Each computer has previously had a table stored therein, including the name and location information of all data for databases A, B, and C. If the necessary data is included in database A, computer A processes the request using that data. If the necessary data is included in database B, computer A sends the data request signal to computer B. After receiving the necessary data from computer B, computer A processes the data. If the necessary data is included in database A and computer A is busy with another operation, computer A sends the necessary data and operation request signal to computer B or C. Upon receiving the operation request signal, computer B or C processes the data by using the necessary data received from computer A. Then, computer B or C sends the operation result to computer A. In this way, in the distributed database system, if the computer is busy when the data operation request is supplied, the computer requests another computer to process the data. Accordingly, the load of each computer can be distributed. As mentioned above, if computer A is busy and includes the necessary data in database A, computer A must send the operation request signal and the necessary data to computer B or C. Because the necessary data must be sent to the other computer through a communication line with the operation request signal, traffic on the communication line becomes heavy. Therefore, data which is repeatedly used or data which must be more reliable (for example, a bank account balance) is copied into plural databases. In the above example, the reliable data in database A would have been previously copied into database B. Accordingly, if computer A is busy, computer A must send only request operation signals to computer B. After receiving the request operation signal from computer A, computer B processes the data by using the necessary data in database B. In the following example, it is assumed that a data request signal is supplied to the computer C and computer C decides that all necessary data for the operation is included in both database A and database B. In the prior art, during manufacture of the distributed database system the order in which computer C would request data from another computer was fixed. For example, it may be predetermined that computer C sends a request to computer A when the necessary data is included in both database A and database B. However, it is not necessarily true that the time to send the data from computer A to computer C is shorter than the time to send the data from computer B to computer C. After design of a distributed database system, it often happens that input/output devices or disk apparatus are connected to a specific computer in the distributed database system. In addition, because of the process situation at a given time, it often happens that one computer is busy while another computer is free. As a result, the particular computer in a system that may be able to send the data fastest is changeable continuously. In the prior art, when one computer supplied with a data request signal by a user must obtain the data from another computer, and the desired data is stored in a plurality of other databases, the data request signal is sent only in accordance with the pre-arranged order, without regard to the time of transmission or the processing state of the other computers. U.S. 4,769,772 discloses a distributed database management system comprising a plurality of computers, each including a database for storing data to be processed, the plurality of computers being interconnected by communication lines. Each computer further includes input means for inputting a data name corresponding to specific data to be processed, the specific data being stored in at least one of the databases; and memory management means for storing a plurality of predetermined data names and a corresponding address area and location information for each data name and especially retrieval time measurement means for measuring a data retrieval time corresponding to the time necessary to retrieve the specific data corresponding to the input data name from one of the databases so as selection means for selecting the data copies used in the query having minimum transmission time (GENERAL (RESPONSE) OR GENERAL (TOTAL)). In this system the retrieval time is predicted on the basis of the size of each database. Accordingly, it is one object of the present invention to provide a distributed database management apparatus which can retrieve data for use by one computer from another of a plurality of computers based on which computer can send the data faster. It is another object of the present invention to provide a distributed database management apparatus which can register data from one of a plurality of computers to another of the plurality of computers based on which computer can retrieve the data according to a desired retrieval time. Additional objects and advantages of the invention will be apparent from the description which follows. These and other objects of the present invention are accomplished by a distributed database management system as defined in claim 1 and having a plurality of interconnected computers, each including a database for processing by the plurality of computers. Each computer includes input means for inputting a data name corresponding to specific data to be processed, the specific data being stored in at least one of the databases; memory management means for storing a plurality of predetermined data names and a corresponding address area and location information for each data name; retrieval time measurement means for measuring a data retrieval time corresponding to the time necessary to retrieve the specific data corresponding to the input data name from one of the databases; retrieval time memory means for storing the data retrieval time measured by the retrieval time measurement means in association with a corresponding address area where the specific data is stored; and selection means for retrieving the specific data to be processed corresponding to the input data name, when the same data is stored in at least two of the databases, from one of the databases containing an address area which is associated with one of the data retrieval times stored in the retrieval time memory means corresponding to the same data name. The selection means also includes retrieval optimization means for selecting the location information corresponding to the address area associated with the shortest data retrieval time among the data retrieval times associated with address areas corresponding to the input data name. It is also preferred that the retrieval time measurement means include means for updating the data retrieval time corresponding to the address area based on the data retrieval time retrieved by the selecting means. Brief Description of the Drawings The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate the presently preferred embodiments of the invention, and, together with the description, serve to explain the principles of the invention. Of the drawings: Figure 1 is a block diagram of a distributed database management apparatus according to the present invention; Figure 2 is a block diagram of a computer of the distributed database management apparatus according to the present invention; Figure 3 is a flow chart of the process for retrieving data in the computer of Figure 2; Figure 4 is a chart showing an example of the content of the memory management section of the computer of Figure 2; and Figure 5 is a chart showing an example of the content of the retrieval time memory section of the computer in Figure 2. Best Mode for Carrying Out the Invention Reference will now be made in detail to the present preferred embodiment of the invention, examples of which are illustrated in the accompanying drawings. Figure 1 is a block diagram of a distributed database management apparatus according to the present invention. In this example, the distributed database management apparatus includes three computers 1a, 1b and 1c, each of which may be, for example, an IBM-Computer (System R*). These computers 1a, 1b and 1c are interconnected by a communication line 2. These computers 1a, 1b and 1c include distributed database management sections 3a, 3b and 3c, respectively, to manage retrieving and registering of distributed data in each computer. In general, these distributed database management sections 3a, 3b and 3c are respectively realized by software, which comprises database management programs in each computer. These computers 1a, 1b and 1c are equipped with databases 4a, 4b and 4c, respectively. The databases 4a, 4b and 4c store data corresponding to address areas. Figure 2 shows a block diagram of the computer of the distributed database management apparatus of Figure 1. The computer includes CPU 10, a main storage 12, a database (external storage) 14, an input/output control section 16 and a distributed database management section 21. The input/output control section 16 is connected to an input section (keyboard) 18 for the input of data name requests by a user, and output section (display) 20 for the display of retrieved data or operation results. The input/output control section 16 is connected to other computers through communication lines 2. The distributed database management section 21 is particularly important to with the present invention. This section includes a memory management section 22, a retrieval time measurement section 24, a retrieval time memory section 26, a retrieval time prediction section 28, and a data retrieval optimization section 30. The data management section 22 stores a data name (data items name) and a corresponding address area and location information (the kind of database) for all the databases. The retrieval time measurement section 24 measures time referred data from the database according to the data name request. The retrieval time memory section 26 stores the time (it is called the data retrieval time), measured by the retrieval time section 24, corresponding to the address area in which the requested data is stored. Prior to operation, the retrieval time memory section 26 stores the data retrieval times according to test results. Thus, during initialization, this computer experimentally transfers data from each address area in all databases. The retrieval time measurement section 24 measures the data retrieval time for each address area and the retrieval time memory section 26 stores the data retrieval times. In the execute mode, the retrieval time measurement section 24 measures the data retrieval time corresponding to the data name request by a user. The retrieval time memory section 26 updates the stored time with the most recent actual data retrieval time. When a data name request is supplied to the computer through the input section 18 by a user, the retrieval time prediction section 28 searches for a data name, which coincides with the data name request, in the memory management section 22. If at least two data names coincide with the data name request, the retrieval time prediction section 28 retrieves the data retrieval time of each coincident data from the data retrieval times stored in the retrieval time memory section 26, and selects the data retrieval time of one coincident data, as the data retrieval time of the request data. The data retrieval optimization section 30 retrieves the location information of the selected coincident data, as the location information of the requested data, in the memory management section 22. The data retrieval optimization section 30 retrieves the requested data from the database through CPU 10, according to the retrieved location information. Next, the operation of the distributed database management section will be explained in detail. Figure 3 shows a flow chart of the process for retrieving data in the computer of Figure 2. It is assumed that a data name request of data name "L" is supplied to the computer A through the input device (step 100 in Fig. 3). If the data "L" is stored in one computer's database and a copy of the data "L" is stored in another computer's database, the computer which was supplied with the data name request by the user, cannot determine instantly the database to be retrieved. Therefore, the computer (the retrieval time prediction section 28) first checks whether the data "L" is stored in only one database according to the memory management section 22 (step 102 in Fig. 3). If the data "L" is only stored in one database, the computer (the data retrieval optimization section 30) retrieves the data "L" from the database (step 104 in Fig. 3). At that time, the retrieval time measurement section 24 measures the retrieval time and the retrieval time memory section 26 stores the retrieval time corresponding to the address area (described below). If the data "L" is stored in at least two databases, the data retrieval optimization section 30 retrieves the location information and the address area corresponding to each coincident data "L", respectively, from the memory management section 22 (step 106 in Fig. 3). Figure 4 shows the content of the memory management section 22. The memory management section 22 stores the data name and its corresponding address area and location information. The address area indicates the storage unit and typically is assigned to each group of ten thousand addresses for all databases. The location information indicates the particular database in which the data is stored. As shown in Figure 4, the data "L" is stored in an address area (0--9999) of the database B (the computer B) and the copied data "L'" is stored in an address area (12000--12999) of the database C (the computer C). Then the retrieval time prediction section 28 retrieves the data retrieval time corresponding to each address area of the data name "L" and "L'" (step 108 in Fig. 3). Figure 5 shows the content of the retrieval time memory section 26. The retrieval time memory section 26 stores the data retrieval time corresponding to the address area. As shown in Figure 5, the data retrieval time corresponding to the address area (0--9999) of the data name "L" is 25000 (µS) and the data retrieval time corresponding to the address area (12000--12999) of the data name "L'" is 500000 (µS). The retrieval time prediction section 28 receives the two data retrieval times (25000 (µS) and 500000 (µS)) and selects the data name "L" corresponding to the data retrieval time 25000 (µS), because that data "L" is retrieved faster than the other data "L'". The section 28 sends the data name "L" as the prediction result to the data retrieval optimization section 30. The section 30 retrieves the location information and the address area corresponding to the data name "L" from the memory management section 22. The data retrieval optimization section 30 retrieves the data "L" according to the address area (0--9999) and the database B through the CPU 10 (step 110 in Fig. 3). The content shown in Figure 5 is that of the retrieval time memory section 26 of the computer A. This content indicates the data retrieval times for computer A. Accordingly, for the computers B and C, the content of the retrieval time memory section is different from the content for computer A. The data retrieval times shown in the example of Figure 6 are the latest retrieval times, but, optionally, the data retrieval times may be as shown below. (1) an average time of the retrieval times in the past; (2) the maximum retrieval time or the minimum retrieval time in the past; (3) a variable retrieval time based on incremental time. For example, the retrieval time may be measured by the hour. If so, according to the present time, the data retrieval time can be predicted. In these ways, when the data retrieval optimization section 30 retrieves the data "L", the retrieval time measurement means 24 measures the retrieval time (step 112 in Figure 3) and the retrieval time memory section 26 stores the retrieval time corresponding to the address area (0--9999) of the data "L" (step 114 in Figure 3). Then, the data retrieval optimization section 30 sends the retrieved data "L" to the output section 20 through the CPU 10 (step 116 in Fig. 3). The output section 20 displays the data "L" for the user.

Claims: A distributed database management system, comprising: a plurality of computers (1a, 1b, 1c), each including a database (14) for storing data to be processed, the plurality of computers being interconnected by communication lines (2), each computer including: input means (18) for inputting a data name corresponding to specific data to be processed, the specific data being stored in at least one of the databases; and memory management means (22) for storing a plurality of predetermined data names and a corresponding address area and location information for each data name; characterised in that each of said computers further comprises : retrieval time measurement means (24) for measuring a data retrieval time corresponding to the time necessary to retrieve the specific data corresponding to the input data name from one of the databases; retrieval time memory means (26) for storing the data retrieval time measured by the retrieval time measurement means in association with a corresponding address area where the specific data is stored; and retrieval optimization means (30) for selecting the location information corresponding to the address area associated with the shortest data retrieval time among the data retrieval times associated with address areas corresponding to the input data name when the same data corresponding to the input data name is stored in at least two of the databases, and for retrieving the specific data to be processed corresponding to the address area associated with the shortest data retrieval time from one database corresponding to the location information. The distributed database management system of claim 1, wherein the retrieval time measurement means (24) measures the latest retrieval time necessary to retrieve the specific data when the retrieval optimization means (30) retrieves the specific data corresponding to the address area associated with the shortest data retrieval time, and updates the shortest data retrieval time in the retrieval time memory means (26) to the latest retrieval time. The distributed database management system of claim 1, further including output means (20) for outputting the specific data retrieved by the retrieval optimization means (30).

Inventors: KATO NOBUHIRO, MORIMOTO YOJIRO, MURANAGA MIHO, SEKIGUCHI KOICHI, KATO, NOBUHIRO, MORIMOTO, YOJIRO, MURANAGA, MIHO, SEKIGUCHI, KOICHI, KATO, NOBUHIRO, C/O INTELLECTUAL PROPERTY DIV., MORIMOTO, YOJIRO, C/O INTELLECTUAL PROPERTY DIV., MURANAGA, MIHO, C/O INTELLECTUAL PROPERTY DIV., SEKIGUCHI, KOICHI, C/O INTELLECTUAL PROPERTY DIV.
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1991
Main classification: G06F17
IPC codes: G06F17, G06F12