Method for storing records of a distributed database by plural processors to provide a host processor with sorted records belonging to one of a plurality of key sections

- Hitachi, Ltd.

A sorting method used with a distributed database having a plurality of first processors for holding partial records of a database that is divided into a plurality of portions and a host processor for accessing to each of the first processors. The method comprises the steps of: assigning a plurality of sections into which the distribution range of key values of records of the database is partitioned to a plurality of second processors in the first processors, and information for representing storage positions of the records to the second processors to which the sections of the key values, to which the records belong, are assigned; and sorting the plurality of key values, which have been received, in the second processors to produce key tables in which the information for representing the storage positions of the records which has been received is registrated together with the sorted key values, as the sorting result.

Skip to:  ·  Claims  ·  References Cited  · Patent History  ·  Patent History

Claims

1. A method for determining a key distribution range of records of a distributed database system, executable on a computer system comprised of a plurality of processors and a host processor connected thereto, wherein records of a database are held by said plurality of processors, said method comprising the steps of:

(a) determining by each of said plurality of processors, a local key distribution range of key values of records held by said each processor;
(b) exchanging among different ones of said plurality of processors, the local key distribution range determined thereby;
(c) combining in each of said plurality of processor, the local key distribution range determined thereby with at least one local key distribution range given by at least one other processor within said plurality of processors by the exchanging step, to generate a combined key distribution range of a key distribution range for key values of records held in said each processor and a key distribution range for key values of records held in said at least one other processor; and
(d) repeating the steps (b) and (c) until each of said plurality of processors generates a global key distribution range of key values of records held in said plurality of processors, wherein at each repetition of the step (b) each of the plurality of processors exchanges one combined key distribution range generated thereby by preceding execution of the steps (b) and (c) with another of said plurality of processors which has generated another combined distribution range which includes information which has not yet been reflected to the one key distribution range.

2. A sorting method for a distributed database system, executable on a computer system comprised of a plurality of processors and a host processor connected thereto, wherein records of a database are held by a first group of processors included in the plurality of processors, said method comprising the steps of:

assigning different key sections within a key distribution range to a second group of processors included in the plurality of processors, in response to a sort request from said host processor, wherein said key distribution range includes a range of key values within the records of said database with;
transferring a key value for each record held by each processor of said first group of processors and a record pointer indicative of a storage location of said each record to one processor of said second group of processors which has been assigned one of said different key sections to which said key value belongs;
sorting, in each processor of said second group of processors, key values received therein from said first group of processors and producing, as a result of said sorting, local key value information for a key section assigned to said each processor of said second group of processors, said local key value information including sorted key values belonging to said one key section and record pointers received together with said sorted key values;
informing said host processor of key partition information indicative of a relation between each of said different key sections and corresponding processors of said second group of processors which has been assigned to said each key section in said assigning step;
storing said key partition information in said host processor as a first result of said sort request; and
storing said local key value information generated in each processor of said second group of processors there within as a second result of said sort request so as to be used in combination with said key partition information stored in said host processor when said records of said database are to be accessed according to an order of the key values of said one keys;
wherein said assigning step comprises the steps of:
determining by each of said first group of processors, a key distribution range of key values within the records of said first group of processors,
dividing by each of said first group of processors, the key distribution range into a plurality of key sections,
obtaining by each of said first group of processors, the local distribution information of key values within the records of said first group of processors,
exchanging said local distribution information of key values among the source processors to obtain the global distribution information of key values of the table, and
assigning by each of said first group of processors, the different key sections to a second group of processors, on the basis of said global key distribution information of key values.

3. A database access method according to claim 2, further comprising the steps of:

selecting in said host computer based upon said key partition information, at least one processor of said second group of processors which has been assigned with at least one of said different key sections, wherein said at least one key section indicates a range of key values which correspond to records to be read;
requesting, in said host processor, the selected at least one processor of said second group of processors to read out records having key values belonging to said at least one key section; and
sequentially providing different ones of the first group of processors with read requests for records whose record pointers are included in the local key value information stored in the selected at least one processor from said selected at least one processor of said second group of processors, in response to the request by said host processor and based upon record pointers, so that those records are supplied to said host processor according to an order of said sorted key values held in said local key value information.

4. A sorting method for a distributed database system executable on a computer system comprised of a plurality of processors and a host processor connected thereto, wherein records of a database are held by a first group of processors included in the plurality of processors, said method comprising the steps of:

assigning different key sections within a key distribution range to a second group of processors included in the plurality of processors, in response to a sort request from said host processor, wherein said key distribution range includes a range of key values within the records of said database;
transferring a key value for each record held by each processor of said first group of processors and a record pointer indicative of a storage location of said each record to one processor of said second group of processors which has been assigned one of said different key sections to which said key value belongs;
sorting, in each processor of said second group of processors, key values received therein from said first group of processors and producing, as a result of said sorting, local key value information for a key section assigned to said each processor of said second group of processors, said local key value information including sorted key values belonging to said one key section and record pointers received together with said sorted key values;
informing said host processor of key partition information indicative of a relation between each of said different key sections and corresponding processors of said second group of processors which has been assigned to said each key section in said assigning step;
storing said key partition information in said host processor as a first result of said sort request;
storing said local key value information generated in each processor of said second group of processors there within as a second result of said sort request so as to be used in combination with said key partition information stored in said host processor when said records of said database are to be accessed according to an order of the key values of said one key;
determining by at least one of said first group of processors, in response to the sort request, a key distribution range of key values within the records of said first group of processors; and
dividing the key distribution range into a plurality of key sections;
wherein the determining step comprises the steps of:
determining, by each of said first group of processors, a local key distribution range of key values records held by said each processor with respect to one of plural keys predetermined for the records of said database,
exchanging among different ones of said first group of processors, the local key distribution range determined thereby,
combining in each of said first group of processors, the local key distribution range determined thereby with at least one local key distribution range given by at least one other processor by the exchanging step to generate renewed key distribution range indicative of combined key distribution range of key values of records held in said each processor and in said at least one other processor, and
repeating the exchanging step and the combining step so that each of said first group of processors generates a combined key distribution range of key values of records held in said first group of processors, wherein each of said first group of processors changes a processor with which a local key distribution range is to be exchanged, at each repetition of the exchanging step.
Referenced Cited
U.S. Patent Documents
3611316 October 1971 Woodrum
4575798 March 11, 1986 Lindstrom et al.
4760526 July 26, 1988 Takeda et al.
4817050 March 28, 1989 Komatsu et al.
5058002 October 15, 1991 Nakamura et al.
5146590 September 8, 1992 Lorie et al.
5179699 January 12, 1993 Iyer et al.
5230047 July 20, 1993 Frey, Jr. et al.
Foreign Patent Documents
0127753 December 1984 EPX
0377993 July 1990 EPX
A-2-118756 JPX
A-2-228730 JPX
Other references
  • Ullman, translated by Kunii et al., "Principle of Database System", pp. 59-61. S. Sekiguchi et al., "Methods in Parallel Scientific Computation", Information Processing, vol. 27, No. 9, Sep. 1986, pp.985-993. DeWitt et al., "Parallel Sorting on a Shared Nothing Architecture Using Probabilistic Splitting", 4-6 Dec. 1991, pp. 280-291, IEEE Comp. Soc. Press. Haishoud, et al., "Critical Issues in the Design of a Fault-Tolerant Multiprocessor Database Server".
Patent History
Patent number: 5842207
Type: Grant
Filed: Jul 10, 1992
Date of Patent: Nov 24, 1998
Assignee: Hitachi, Ltd. (Tokyo)
Inventors: Shinji Fujiwara (Kokubunji), Yooichi Shintani (Machida), Mitsuru Nagasaka (Kodaira), Naoki Hamanaka (Tokyo), Mikiko Suzuki (Kunitachi)
Primary Examiner: Thomas G. Black
Assistant Examiner: Jack M. Choules
Law Firm: Antonelli, Terry, Stout & Kraus
Application Number: 7/911,617
Classifications
Current U.S. Class: 707/7; 707/10
International Classification: G06F 1730;