JP3451938B2 - Range division method and device, and machine-readable recording medium recording program - Google Patents

Range division method and device, and machine-readable recording medium recording program

Info

Publication number
JP3451938B2
JP3451938B2 JP16600598A JP16600598A JP3451938B2 JP 3451938 B2 JP3451938 B2 JP 3451938B2 JP 16600598 A JP16600598 A JP 16600598A JP 16600598 A JP16600598 A JP 16600598A JP 3451938 B2 JP3451938 B2 JP 3451938B2
Authority
JP
Japan
Prior art keywords
range
record
divided
records
ranges
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP16600598A
Other languages
Japanese (ja)
Other versions
JPH11345157A (en
Inventor
光保 濱田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP16600598A priority Critical patent/JP3451938B2/en
Publication of JPH11345157A publication Critical patent/JPH11345157A/en
Application granted granted Critical
Publication of JP3451938B2 publication Critical patent/JP3451938B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、複数のレンジに分
割可能なデータベースを備えたデータベースシステムに
関し、特に、レコード件数が極端に多くなったレンジを
複数のレンジに分割することにより、検索処理速度の低
下を防ぐ技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database system having a database that can be divided into a plurality of ranges, and in particular, by dividing a range having an extremely large number of records into a plurality of ranges, a search processing speed can be increased. Technology to prevent the deterioration of

【0002】[0002]

【従来の技術】大規模なデータベースを構築する際、デ
ータベースを複数のレンジに分割するということが、従
来から行われている。
2. Description of the Related Art It is a conventional practice to divide a database into a plurality of ranges when constructing a large-scale database.

【0003】このように、データベースを複数のレンジ
に分割することにより、例えば、データベースシステム
に、利用者によって明示された特定のレンジ或いは利用
者によって指定された条件を満たすレンジのみを対象に
した検索処理を行わせることが可能になるので、処理時
間を短縮させることが可能になる。また、例えば、特定
のレンジに障害が発生した場合、他のレンジにその影響
が及ばないので、障害を局所化することができ、更に、
障害の発生したレンジに対してのみ復元処理を行えば良
いので、復元に要する時間を少なくすることができる。
By dividing the database into a plurality of ranges in this way, for example, the database system is searched for only a specific range specified by the user or a range satisfying the condition specified by the user. Since processing can be performed, processing time can be shortened. In addition, for example, when a failure occurs in a specific range, it does not affect other ranges, so the failure can be localized, and further,
Since the restoration process only needs to be performed on the range in which the failure has occurred, the time required for restoration can be reduced.

【0004】ところで、データベースを構築後、複数存
在するレンジの内の、特定レンジのレコード件数が増加
し、他のレンジと比較して極端にレコード件数が多くな
る場合がある。このような状況に於いて、上記特定レン
ジを検索範囲に含む検索要求が発生すると、その検索処
理に多くの時間が費やされてしまう。そこで、このよう
な場合、従来は、レコードのレンジキー値とレンジとの
対応関係を示すレンジ定義を変更して上記特定レンジを
複数のレンジに分割し、更に、レコードを再編成するこ
とにより、特定のレンジのレコード件数が極端に多くな
らないようにしている。
By the way, after the database is constructed, the number of records in a specific range among a plurality of ranges may increase, and the number of records may become extremely large as compared with other ranges. In such a situation, if a search request including the specific range is included in the search range, a lot of time is spent on the search process. Therefore, in such a case, conventionally, by changing the range definition indicating the correspondence between the range key value of the record and the range, the specific range is divided into a plurality of ranges, and by further reorganizing the records, We try to prevent the number of records in a particular range from becoming extremely large.

【0005】ところで、上記特定レンジを複数のレンジ
(例えば、第1,第2の2つのレンジ)に分割する場
合、第1,第2のレンジに割り当てるレンジキー値が重
要になる。つまり、第1,第2のレンジにほぼ同数のレ
コードが登録されるように、第1,第2のレンジにレン
ジキー値を割り当てることが望ましい。
By the way, when the above-mentioned specific range is divided into a plurality of ranges (for example, first and second ranges), the range key value assigned to the first and second ranges becomes important. That is, it is desirable to assign range key values to the first and second ranges so that the same number of records are registered in the first and second ranges.

【0006】例えば、上記特定レンジのレコード件数が
20万件で、レンジキー値が「1」,「2」,「3」,
「4」,「5」のレコードの件数がそれぞれ1万件,1
万件,8万件,6万件,4万件であれば、第1のレンジ
にレンジキー「1」,「2」,「3」を割り当て、第2
のレンジにレンジキー「4」,「5」を割り当てること
により、第1,第2のレンジのレコード件数を共に10
万件にすることができる。従来は、上記したようなレン
ジキー値の割り当て作業を人手により行っていた。つま
り、従来は、人手により、各レンジキー値のレコード件
数を認識し、第1,第2のレンジのレコード件数がほぼ
同数になるように、第1,第2のレンジにレンジキーを
割り当てるようにしていた。
For example, the number of records in the specific range is 200,000, and the range key values are "1", "2", "3",
The number of records of "4" and "5" is 10,000 and 1 respectively.
If there are 10,000 cases, 80,000 cases, 60,000 cases and 40,000 cases, the range keys “1”, “2” and “3” are assigned to the first range and the second range is assigned.
By assigning the range keys "4" and "5" to the range of, the number of records in both the first and second ranges is 10
It can be millions. Conventionally, the work of assigning range key values as described above has been performed manually. That is, conventionally, the number of records of each range key value is manually recognized, and the range keys are assigned to the first and second ranges so that the numbers of records of the first and second ranges are almost the same. I was doing.

【0007】[0007]

【発明が解決しようとする課題】上述したように、従来
は、人手により、分割後の各レンジに割り当てるレンジ
キー値を決定するようにしているため、作業者に多くの
負担がかかると共に、レンジの分割処理に多くの時間が
費やされるという問題があった。
As described above, conventionally, the range key value to be assigned to each range after division is manually determined, so that the operator is burdened and the range There is a problem that a lot of time is spent on the division processing of.

【0008】そこで、本発明の目的は、レンジの分割処
理を短時間で且つ作業者に負担をかけることなく行える
ようにすることにある。
Therefore, an object of the present invention is to make it possible to perform range division processing in a short time and without burdening an operator.

【0009】尚、特開平2−178854号公報には、
レンジ定義が変更されても、アプリケーションプログラ
ムの変更を不要にする技術が記載されているが、レンジ
の分割方法は、全く記載されていない。
Incidentally, Japanese Patent Laid-Open No. 2-178854 discloses that
A technique is disclosed that makes it unnecessary to change the application program even if the range definition is changed, but the range division method is not described at all.

【0010】[0010]

【課題を解決するための手段】本発明のレンジ分割方法
は、上記目的を達成すると共に、利用者がレンジをどの
ように分割するかを指定できるようにするため、複数の
レンジに分割されたデータベースを備えたデータベース
システムに於いて、利用者によって指示されたレンジに
対して、そのレンジを利用者によって指示された複数の
マルチレンジに分割する際の、レコードのレンジキー値
とマルチレンジとの対応関係を定義したマルチレンジ定
義を設定し、各レンジに登録されているレコードをレコ
ード退避ファイルに退避させる際、前記各レンジ毎に
そのレンジに割り当てられているレンジキー値が2つ以
上である場合には、そのレンジに登録されているレコー
ド件数をほぼ2等分するレンジキー値であるレンジキー
平均値を求め、前記各レンジのレコード件数と予め定め
られている条件とに基づいて、前記各レンジそれぞれに
ついて分割すべきであるか否かを判断し、分割すべきで
あると判断し且つマルチレンジ定義が設定されていない
レンジを、そのレンジのレンジキー平均値に従って2つ
の自動分割レンジに分割し、分割すべきであると判断し
且つマルチレンジ定義がされているレンジをマルチレン
ジ定義に従って複数のマルチレンジに分割し、前記レコ
ード退避ファイルに退避させられているレコードの内、
2つの自動分割レンジに分割されたレンジに登録されて
いたレコードを、そのレコードのレンジキー値に従って
該当する自動分割レンジに登録し直し、マルチレンジに
分割されたレンジに登録されていたレコードを、そのレ
コードのレンジキー値に従って該当するマルチレンジに
登録し直す。
The range dividing method of the present invention achieves the above-mentioned object and divides the range into a plurality of ranges in order to allow the user to specify how to divide the range. In a database system equipped with a database, a range key value of a record and a multi-range when dividing a range specified by a user into a plurality of multi-ranges specified by the user When setting the multi-range definition that defines the correspondence and saving the records registered in each range to the record save file, for each range ,
Two or more range key values assigned to that range
In the case of the above, the range key average value that is the range key value that divides the number of records registered in the range into approximately two equal parts is obtained, and based on the number of records of each range and the predetermined condition. Then, it is determined whether or not each of the ranges should be divided, and it is determined that the ranges should be divided, and the range for which the multi-range definition is not set is set to two automatic ranges according to the range key average value of the range. Dividing into divided ranges, judging that it should be divided and dividing the range in which the multi-range definition is made into a plurality of multi-ranges according to the multi-range definition, among the records saved in the record save file,
The records registered in the range divided into two automatic division ranges are re-registered in the corresponding automatic division range according to the range key value of the record, and the records registered in the range divided in the multi range are Reregister to the corresponding multi-range according to the range key value of the record.

【0011】[0011]

【0012】[0012]

【0013】上記方法を実現するため、本発明のレンジ
分割装置は、複数のレンジに分割されたデータベースを
備えたデータベースシステムに於いて、利用者によって
指示されたレンジに対して、そのレンジを利用者によっ
て指示された複数のマルチレンジに分割する際の、レコ
ードのレンジキー値とマルチレンジとの対応関係を定義
したマルチレンジ定義を設定するマルチレンジ定義手段
と、各レンジに登録されているレコードをレコード退避
ファイルに退避させる際、前記各レンジ毎にそのレンジ
に登録されているレコード件数をほぼ2等分するレンジ
キー値であるレンジキー平均値を求めるレコード退避手
段と、該レコード退避手段が求めた各レンジのレコード
件数と予め定められている条件とに基づいて、前記各レ
ンジそれぞれについて分割すべきであるか否かを判断
し、分割すべきであると判断し且つマルチレンジ定義が
設定されていないレンジを、そのレンジのレンジキー平
均値に従って2つの自動分割レンジに分割し、分割すべ
きであると判断し且つマルチレンジ定義がされているレ
ンジをマルチレンジ定義に従って複数のマルチレンジに
分割する自動レンジ分割手段と、前記レコード退避ファ
イルに退避させられているレコードの内、2つの自動分
割レンジに分割されたレンジに登録されていたレコード
を、そのレコードのレンジキー値に従って該当する自動
分割レンジに登録し直し、マルチレンジに分割されたレ
ンジに登録されていたレコードを、そのレコードのレン
ジキー値に従って該当するマルチレンジに登録し直すレ
コード復元手段とを備えている。
In order to realize the above method, the range dividing device of the present invention is a database system having a database divided into a plurality of ranges, and uses the range for the range designated by the user. The multi-range definition means that sets the multi-range definition that defines the correspondence between the range key value of the record and the multi-range when dividing into multiple multi-ranges specified by the user, and the records registered in each range. When saving a record to a record save file, a record save means for obtaining a range key average value, which is a range key value that divides the number of records registered in the range into approximately two for each range, and the record save means. Based on the number of records obtained for each range and the preset conditions, It is determined whether or not it should be divided, it is determined that it should be divided, and the range for which the multi-range definition is not set is divided into two automatic division ranges according to the range key average value of the range, Of the records saved in the record save file, an automatic range dividing unit that determines that the range should be divided and divides the range defined by the multirange into a plurality of multiranges according to the multirange definition, 2 Records registered in a range divided into two automatic division ranges are re-registered in the corresponding automatic division range according to the range key value of that record, and the records registered in the range divided into multi ranges are And a record restoring means for re-registering in the corresponding multi-range according to the range key value of the record.

【0014】[0014]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して詳細に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0015】図1は、本発明の前提となる技術を示すブ
ロック図である。本発明の前提となる技術は、データベ
ース100と、データベース100内のレンジ分割表1
01と、レンジ分割表101内の3つのレンジR1〜R
3と、レンジR1〜R3に登録されているレコードをレ
コード退避ファイル104に退避させるレコード退避手
段103と、各レンジR1〜R3のレンジ定義やレコー
ド件数などの情報が登録されるデータベース管理情報フ
ァイル102と、各レンジR1〜R3のレコード件数と
利用者によって指定されたレンジ自動分割条件とに基づ
いて分割することが必要であると判断したレンジを2つ
の自動分割レンジに分割する自動レンジ分割手段106
と、レコード退避ファイル104に退避させられている
レコードの内、2つの自動分割レンジに分割されたレン
ジに登録されていたレコードを、そのレコードのレンジ
キー値に従って該当する自動分割レンジに登録し直すレ
コード復元手段105と、アプリケーションプログラム
107からレンジキーおよび条件式によって検索範囲が
指定されたレコード検索要求108が発行された場合、
検索対象とするレンジをレンジキー,条件式およびレン
ジ定義に基づいて絞り込むレンジ絞り込み手段109
と、レンジ絞り込み手段109で絞り込まれたレンジを
対象にしてレコードを検索するレコード検索手段110
とを含んでいる。
FIG. 1 is a block diagram showing a technique on which the present invention is based . The technique on which the present invention is based is a database 100 and a range division table 1 in the database 100.
01 and three ranges R1 to R in the range division table 101
3, a record save means 103 for saving records registered in the ranges R1 to R3 to the record save file 104, and a database management information file 102 in which information such as range definition and the number of records of each range R1 to R3 is registered. And an automatic range dividing means 106 for dividing the range determined to be divided based on the number of records of each range R1 to R3 and the automatic range dividing condition specified by the user into two automatic dividing ranges.
Then, among the records saved in the record save file 104, the record registered in the range divided into two automatic division ranges is re-registered in the corresponding automatic division range according to the range key value of the record. When the record restoring means 105 and the application program 107 issue a record search request 108 in which a search range is specified by a range key and a conditional expression,
Range narrowing means 109 for narrowing down the range to be searched based on the range key, conditional expression and range definition
And a record search means 110 for searching records for the range narrowed down by the range narrowing means 109.
Includes and.

【0016】レコード退避手段103は起動されると、
データベース100内の各レンジR1〜R3に登録され
ているレコードをレコード退避ファイル104に退避さ
せる。その際、レコード退避手段103は、レコードを
退避ファイル104に退避させる処理に加え、各レンジ
R1〜R3のレコード件数を求める処理と、各レンジR
1〜R3のレンジキー平均値を求める処理と、各レンジ
R1〜R3のレコード件数およびレンジキー平均値をデ
ータベース管理情報ファイル102に登録する処理も行
う。ここで、レンジキー平均値とは、そのレンジに登録
されているレコード件数をほぼ2等分するレンジキーの
値である。
When the record saving means 103 is activated,
The records registered in the ranges R1 to R3 in the database 100 are saved in the record save file 104. At that time, the record saving means 103 performs a process of saving the records in the save file 104, a process of obtaining the number of records of each range R1 to R3, and a process of each range R.
A process of obtaining the range key average value of 1 to R3 and a process of registering the number of records of each range R1 to R3 and the range key average value in the database management information file 102 are also performed. Here, the average value of the range key is the value of the range key that divides the number of records registered in the range into two substantially equal parts.

【0017】レコード退避手段103の処理が終了する
と、レコード復元手段105が動作する。レコード復元
手段105は、先ず、自動レンジ分割手段106を動作
させ、処理対象とするレンジRi(1≦i≦3)を通知
する。
When the processing of the record saving means 103 is completed, the record restoring means 105 operates. The record restoring unit 105 first operates the automatic range dividing unit 106 to notify the range Ri (1 ≦ i ≦ 3) to be processed.

【0018】これにより、自動レンジ分割手段106
は、データベース管理情報ファイル102から各レンジ
R1〜R3のレコード件数を採取し、それらと利用者に
よって指示されているレンジ自動分割条件とに基づい
て、レンジRiを2つの自動分割レンジRi−1,Ri
−2に分割することが必要か否かを判断する。
As a result, the automatic range dividing means 106
Collects the number of records of each range R1 to R3 from the database management information file 102, and based on them and the range automatic division condition instructed by the user, divides the range Ri into two automatic division ranges Ri-1, Ri
-2 is determined whether it is necessary to divide.

【0019】レンジ分割が不要と判断した場合は、自動
レンジ分割手段106は、その旨をレコード復元手段1
05に通知する。これにより、レコード復元手段105
は、次に処理対象にするレンジを自動レンジ分割手段1
06に通知する。
When it is determined that the range division is unnecessary, the automatic range division means 106 informs the record restoration means 1 accordingly.
Notify 05. As a result, the record restoration means 105
Is the automatic range dividing means 1 for the range to be processed next.
06 will be notified.

【0020】これに対して、レンジ分割が必要と判断し
た場合は、自動レンジ分割手段106は、当該レンジR
iのレンジキー平均値と、レンジ定義の範囲値(レンジ
Riに格納するレコードのレンジキー値の範囲)とをデ
ータベース管理情報ファイル102から採取し、その範
囲値をレンジキー平均値で2分した2つの範囲値を求め
る。そして、上記2つの範囲値をそれぞれ自動分割レン
ジRi−1,Ri−2の範囲値とした2つの自動分割レ
ンジ定義を作成し、それらをレンジRiのレンジ定義に
関連付けてデータベース管理情報ファイル102に登録
する。これにより、レンジRiは、2つの自動分割レン
ジRi−1,Ri−2に分割される。その後、自動レン
ジ分割手段106は、レコード復元手段105に対して
レンジ分割を行ったことを通知する。
On the other hand, when it is determined that the range division is necessary, the automatic range division means 106 determines the range R.
The range key average value of i and the range value of the range definition (range of the range key value of the record to be stored in the range Ri) were collected from the database management information file 102, and the range value was divided into two by the range key average value. Find two range values. Then, two automatic division range definitions having the above two range values as the range values of the automatic division ranges Ri-1 and Ri-2 are created, and these are associated with the range definition of the range Ri and stored in the database management information file 102. register. As a result, the range Ri is divided into two automatic division ranges Ri-1 and Ri-2. After that, the automatic range dividing unit 106 notifies the record restoring unit 105 that the range has been divided.

【0021】これにより、レコード復元手段105は、
レコード退避ファイル104に退避させられているレコ
ードの内、レンジRiに登録されていたレコードを、そ
のレコードのレンジキー値と自動分割レンジ定義に従っ
て該当する自動分割レンジ(Ri−1或いはRi−2)
に登録し直す。ここで、自動分割レンジRi−1,Ri
−2には、それぞれレンジRiの範囲値をレンジキー平
均値で2分した2つの範囲値の一方,他方を割り当てて
いるので、自動分割レンジRi−1,Ri−2のレコー
ド件数をほぼ等しくすることができる。このように、
発明の前提となる技術によれば、自動的に、レコード件
ほぼ等しくなるようにレンジを2分割できるので、
人手により、レンジを分割していた従来の技術に比較し
て、レンジ分割に要する処理時間,作業者の負担を低減
することができる。
As a result, the record restoration means 105
Of the records saved in the record save file 104, the records registered in the range Ri are converted into the corresponding automatic division range (Ri-1 or Ri-2) according to the range key value of the record and the automatic division range definition.
Register again with. Here, the automatic division ranges Ri-1, Ri
-2 is assigned to one or the other of the two range values obtained by dividing the range value of the range Ri by the range key average value, so that the number of records in the automatic division ranges Ri-1 and Ri-2 is almost equal. can do. Book like this
According to the technology on which the invention is based , the range can be automatically divided into two so that the number of records becomes almost equal.
Compared with the conventional technique in which the range is divided manually, the processing time required for the range division and the burden on the operator can be reduced.

【0022】アプリケーションプログラム107が、レ
ンジキーおよび条件式によって検索範囲を指定したレコ
ード検索要求108を発行すると、先ず、レンジ絞り込
み手段109が動作する。
When the application program 107 issues a record search request 108 in which a search range is specified by a range key and a conditional expression, first, the range narrowing means 109 operates.

【0023】レンジ絞り込み手段109は、先ず、検索
範囲を示すレンジキー,条件式と、データベース管理情
報ファイル102に登録されている各レンジR1〜R3
のレンジ定義とに基づいて、検索対象とするレンジを求
める。その後、そのレンジが自動レンジ分割されていた
場合、更にレンジが絞り込めるか否かを考慮する。更に
レンジが絞り込める場合は、そこからレコード検索手段
110により、レコードを読み出し、アプリケーション
プログラム107にレコードを返却する。
The range narrowing means 109 firstly includes a range key indicating a search range, a conditional expression, and each range R1 to R3 registered in the database management information file 102.
A range to be searched is obtained based on the range definition of. After that, when the range is automatically divided, whether or not the range can be further narrowed down is considered. When the range can be further narrowed down, the record retrieval unit 110 reads the record from the range and returns the record to the application program 107.

【0024】、例えば、図2に示すように、レンジR
1,R2,R3のレコード件数が、それぞれ5万件,2
0万件,8万件であり、範囲値がそれぞれ「19970
1〜199704」,「199705〜19970
8」,「199709〜199712」であったとす
る。尚、レンジキー値は月日を示し、例えば、レンジキ
ー値「199701」は、1997年1月を表してい
る。
Now , for example, as shown in FIG.
The number of records of 1, R2 and R3 is 50,000 and 2 respectively.
There are 0,000 and 80,000 cases, and the range values are "19970
1-199704 "," 199705-19970
8 "and" 199709 to 199712 ". The range key value indicates the month and day, and for example, the range key value “199701” indicates January 1997.

【0025】レコード退避手段103は、動作開始が指
示されると、レンジR1〜R3の内の1つに注目する
(図3,S301)。今、例えば、レンジR2に注目し
たとする。
When the record save means 103 is instructed to start the operation, it pays attention to one of the ranges R1 to R3 (FIG. 3, S301). Now, suppose that the range R2 is focused on, for example.

【0026】その後、レコード退避手段103は、デー
タベース管理情報ファイル102に登録されているレン
ジR2のレンジ定義を参照し、レンジR2に割り当てら
れているレンジキー値が1つだけか否かを判断する(S
302)。そして、レンジR2に割り当てられているレ
ンジキー値が1つだけだと判断した場合はフラグFを
「0」とし(S303)、そうでないと判断した場合は
フラグFを「1」にする(S304)。
Thereafter, the record saving means 103 refers to the range definition of the range R2 registered in the database management information file 102, and judges whether or not there is only one range key value assigned to the range R2. (S
302). Then, if it is determined that the range key value assigned to the range R2 is only one, the flag F is set to "0" (S303), and if not determined, the flag F is set to "1" (S304). ).

【0027】次いで、レコード退避手段103は、現在
注目しているレンジR2からレコードを1つ読み出し、
そのレコード中のレンジキー値をソート処理用に保存す
る(S305,306)。
Next, the record saving means 103 reads one record from the range R2 which is currently under consideration,
The range key value in the record is saved for sort processing (S305, 306).

【0028】その後、レコード退避手段103は、レン
ジR2のレコード件数を求めるために、レコードカウン
タのカウント値を+1してから、レコードをレコード退
避ファイル104へ退避させる(S307,S30
8)。読み出したレコードが最終レコードでない場合
(S309がNo)は、S305のレコードの読み出し
処理へと戻り、上記した処理を繰り返す。
Thereafter, the record save means 103 increments the count value of the record counter by +1 in order to obtain the number of records in the range R2, and then saves the records in the record save file 104 (S307, S30).
8). If the read record is not the final record (No in S309), the process returns to the record reading process in S305, and the above process is repeated.

【0029】レンジR2の全てのレコードをレコード退
避ファイル104に退避させると(S309がYe
s)、レコード退避手段103は、フラグFが1である
か否かを判断する(図4,S401)。そして、フラグ
Fが「0」の場合は、レンジに割り当てられているレン
ジキー値が1つだけであり、そのレンジを分割すること
は不可能であるので、レンジR2が分割できないことを
示す情報をデータベース管理情報ファイル102に登録
する(S402)。
When all the records in the range R2 are saved in the record save file 104 (S309 returns Yes.
s), the record saving means 103 determines whether the flag F is 1 (FIG. 4, S401). When the flag F is "0", there is only one range key value assigned to the range, and it is impossible to divide that range. Therefore, information indicating that the range R2 cannot be divided. Is registered in the database management information file 102 (S402).

【0030】これに対して、フラグFが「1」の場合
は、図3のS306で保存したレンジキー値を昇順にソ
ートする(S403)。その後、ソート結果からレコー
ド件数を2分するようなレンジキー平均値を求めると共
に、そのレンジキー平均値を、レンジを2つの自動分割
レンジに分割した時の、レンジキー値が小さい方の自動
分割レンジ(低位側の自動分割レンジ)に割り当てるの
か、レンジキー値が大きい方の自動分割レンジ(高位側
の自動分割レンジ)に割り当てるのかを決定し、レンジ
R2のレンジキー平均値と、そのレンジキー平均値を低
位側,高位側の何れに割り当てるのかを示す割り当て情
報とをデータベース管理情報ファイル102に登録する
(S404)。それに加え、レンジR2のレコード件数
も、データベース管理情報ファイル102へ登録する
(S405)。
On the other hand, when the flag F is "1", the range key values stored in S306 of FIG. 3 are sorted in ascending order (S403). After that, the range key average value that divides the number of records into two is calculated from the sorting result, and the range key average value is automatically divided into the two automatic division ranges when the range key value is smaller. Decide whether to assign to the range (low-order side automatic division range) or the one with the larger range key value (high-order side automatic division range), and select the range key average value of range R2 and its range key. Assignment information indicating whether the average value is assigned to the low-order side or the high-order side is registered in the database management information file 102 (S404). In addition, the number of records in the range R2 is also registered in the database management information file 102 (S405).

【0031】その後、レコード退避手段103は、未処
理のレンジが存在するか否かを判断し(S406)、未
処理のレンジが存在しない場合は、その処理を終了し、
未処理のレンジが存在する場合は、レコードカウンタの
値を「0」にした後(S407)、図3のS301の処
理に戻り、前述したと同様の処理を行う。
Thereafter, the record saving means 103 judges whether or not there is an unprocessed range (S406), and if there is no unprocessed range, the process is terminated,
If there is an unprocessed range, the value of the record counter is set to "0" (S407), the process returns to S301 in FIG. 3, and the same process as described above is performed.

【0032】ここで、図4のS404で行う処理につい
て詳細に説明する。今、例えば、レコード件数が20万
件のレンジR2を処理対象にしているとする。そして、
レンジR2には、レンジキー値が「199705」,
「199706」,「199707」,「19970
8」のレコードがそれぞれ2万件,2万件,7万件,9
万件登録されているとする。
Here, the processing performed in S404 of FIG. 4 will be described in detail. Now, for example, it is assumed that the range R2 in which the number of records is 200,000 is a processing target. And
For the range R2, the range key value is "199705",
"199706", "199707", "19970"
8 ”records are 20,000, 20,000, 70,000 and 9 respectively.
It is assumed that 10,000 items have been registered.

【0033】このような場合、レコード退避手段103
は、図4のS403で昇順にソートしたレンジキー値の
ソート結果の内の、先頭から(値が小さい方から)10
万1番目のレンジキー値をレンジキー平均値とする。つ
まり、(レコード件数÷2+1)番目のレンジキー値を
レンジキー平均値とする。この例の場合、10万1番目
のレンジキー値は「199707」であるので、それを
レンジキー平均値とする。
In such a case, the record saving means 103
Is 10 from the top (smallest value) of the range key value sorted in ascending order in S403 of FIG.
The 11th range key value is the range key average value. That is, the (number of records / 2 + 1) th range key value is set as the range key average value. In the case of this example, since the 101st range key value is "199707", it is set as the range key average value.

【0034】更に、レコード退避手段103は、ソート
結果の10万1番目よりも前方に存在するレンジキー平
均値「199707」の個数と、10万1番目よりも後
方に存在するレンジキー平均値「199707」の個数
を調べる。そして、前方に存在するレンジキー平均値の
個数の方が多い場合は、レンジキー平均値を低位側の自
動分割レンジに割り当てると決定し、後方に存在するレ
ンジキー平均値の方が多い場合は、レンジキー平均値を
高位側の自動分割レンジに割り当てると決定する。この
例の場合は、10万1番目よりも前方に存在するレンジ
キー平均値の個数の方が多いので、レコード退避手段1
03は、レンジキー平均値「199707」を低位側の
自動分割レンジに割り当てると決定することになる。従
って、この例に於いては、レンジR2を2つの自動分割
レンジR2−1,R2−2に分割した場合、低位側の自
動分割レンジR2−1にレンジキー値「199705〜
199707」が割り当てられ、高位側の自動分割レン
ジR2−2にレンジキー値「199708」が割り当て
られることになる。尚、10万1番目の前方,後方に存
在するレンジキー平均値の個数が同じ場合は、予め定め
られている規則に従って、レンジキー平均値を低位側,
高位側の何れかの自動分割レンジに割り当てる。
Further, the record saving means 103 stores the number of range key average values "199707" existing ahead of the 101st 101st sort result and the range key average value existing 1001st behind the range key " Check the number of "199707". If there are more range key average values in the front, it is determined that the range key average value is assigned to the lower automatic division range, and if there are more range key average values in the rear, , Range key It is decided to assign the average value to the high-order side automatic division range. In the case of this example, since the number of range key average values existing ahead of the 101st order is larger, the record saving means 1
03 determines that the range key average value “199707” is assigned to the lower automatic division range. Therefore, in this example, when the range R2 is divided into two automatic division ranges R2-1 and R2-2, the range key value "199705-" is assigned to the lower automatic division range R2-1.
199707 "is assigned, and the range key value" 199708 "is assigned to the high-level automatic division range R2-2. If the number of range key average values existing at the 101st and the rearward is the same, the range key average value is set to the lower side according to a predetermined rule.
Allocate to one of the higher automatic division ranges.

【0035】次に、レコード復元手段105,自動レン
ジ分割手段106の動作について説明する。
Next, the operations of the record restoring means 105 and the automatic range dividing means 106 will be described.

【0036】レコード退避手段103の処理が終了する
と、レコード復元手段105は、レンジR1〜R3の内
の1つに注目し、注目したレンジを自動レンジ分割手段
106に通知する(図5,S501,S502)。今、
例えば、レンジR2に注目したとすると、レコード復元
手段105は、自動レンジ分割手段106に、レンジR
2を示す情報を通知することになる。
When the processing of the record saving means 103 is completed, the record restoring means 105 pays attention to one of the ranges R1 to R3 and notifies the automatic range dividing means 106 of the focused range (FIG. 5, S501). S502). now,
For example, if attention is paid to the range R2, the record restoring unit 105 causes the automatic range dividing unit 106 to specify the range R.
The information indicating 2 will be notified.

【0037】これにより、自動レンジ分割手段106
は、データベース管理情報ファイル102を参照し、レ
ンジR2が分割不可のレンジ(レンジキー値が1個のレ
ンジ)か否かを調べる(図6,S601)。
As a result, the automatic range dividing means 106
Refers to the database management information file 102 and checks whether or not the range R2 is an indivisible range (range having one range key value) (S601 in FIG. 6).

【0038】そして、分割不可のレンジであると判断し
た場合は、レコード復元手段105に対して、レンジR
2の分割が不要であることを通知する(S610)。こ
れに対して、分割不可のレンジでないと判断した場合
は、データベース管理情報ファイル102から、各レン
ジR1〜R3のレコード件数を読み出し(S603)、
その後、S604の処理を行う。尚、既に、レンジR1
〜R3のレコード件数を読み込んでいる場合(S602
がYes)は、S603の処理を行うことなく、S60
4の処理を行う。
If it is determined that the range cannot be divided, the range R is sent to the record restoring means 105.
It is notified that the division of 2 is unnecessary (S610). On the other hand, if it is determined that the range is not indivisible, the number of records in each range R1 to R3 is read from the database management information file 102 (S603),
Then, the process of S604 is performed. In addition, the range R1 has already been
~ When the number of records of R3 is read (S602
Is Yes), without performing the processing of S603, S60
Process 4 is performed.

【0039】S604では、各レンジR1〜R3のレコ
ード件数と、利用者によって指定されているレンジ自動
分割条件に基づいて、現在注目しているレンジR2を2
つの自動分割レンジに分割する必要があるか否かを判断
する。ここで、レンジ自動分割条件は、利用者が、自由
に指定できるものである。今、例えば、レンジ自動分割
条件として、「レコード件数が、他のレンジのレコード
件数の内の、最も少ないレコード件数の2倍以上であれ
ば、レンジを2つの自動分割レンジに分割する」が指定
されていたとする。
In step S604, the range R2 currently under consideration is set to 2 based on the number of records in each range R1 to R3 and the range automatic division condition designated by the user.
Determine if it needs to be split into one automatic split range. Here, the range automatic division condition can be freely specified by the user. Now, for example, as the range automatic division condition, "if the number of records is more than twice the smallest number of records of the other ranges, the range is divided into two automatic division ranges" is specified. It has been done.

【0040】この例の場合、レンジR1,R2,R3の
レコード件数が、それぞれ5万件,20万件,8万件で
あり、現在注目しているレンジR2のレコード件数が、
最もレコード件数の少ないレンジR1のレコード件数の
2倍以上であるので、自動レンジ分割手段106は、レ
ンジR2を分割する必要があると判断することになる
(S605がYes)。
In the case of this example, the number of records in the ranges R1, R2, and R3 is 50,000, 200,000, and 80,000, respectively, and the number of records in the range R2, which is currently focused, is
Since the number of records in the range R1 having the smallest number of records is twice or more, the automatic range dividing unit 106 determines that the range R2 needs to be divided (Yes in S605).

【0041】S605がYesとなると、自動レンジ分
割手段106は、データベース管理情報ファイル102
から現在注目しているレンジR2のレンジ定義およびレ
コード退避時に登録したレンジR2についてのレンジキ
ー平均値,割り当て情報を読み出す(S606,S60
7)。その後、自動レンジ分割手段106は、読み出し
たレンジキー平均値,割り当て情報と、レンジR2のレ
ンジ定義の範囲値とを基に、レンジR2を2個の自動分
割レンジR2−1,R2−2に分割するための自動分割
レンジ定義を作成し、それをデータベース管理情報ファ
イル102上にを展開する(S608)。これにより、
レンジR2は、2個の自動分割レンジR2−1,R2−
2に分割される。
When S605 becomes Yes, the automatic range dividing means 106 causes the database management information file 102.
The range definition of the range R2 that is currently focused on, the range key average value, and the allocation information for the range R2 registered when the record is saved are read (S606, S60).
7). After that, the automatic range dividing means 106 divides the range R2 into two automatic division ranges R2-1 and R2-2 based on the read range key average value, the allocation information, and the range value of the range definition of the range R2. An automatic division range definition for division is created and is expanded on the database management information file 102 (S608). This allows
Range R2 is two automatic division ranges R2-1, R2-
It is divided into two.

【0042】ここで、S608の処理を、具体例を挙げ
て詳細に説明する。今、例えば、図7に示す内容の、レ
ンジR2のレンジ定義71,レンジキー平均値73,割
り当て情報74がデータベース管理情報ファイル102
に登録されているとする。
Here, the process of S608 will be described in detail with a specific example. Now, for example, the range definition 71 of the range R2, the range key average value 73, and the allocation information 74 having the contents shown in FIG.
Assume that you are registered with.

【0043】この例の場合、レンジR2のレンジ定義7
1の範囲値が「199705〜199708」、レンジ
R2のレンジキー平均値73が「199707」、レン
ジR2の割り当て情報74が「低位側」であるので、レ
ンジ定義71の範囲値「199705〜199708」
の内の、レンジキー平均値「1997907」以下の範
囲値「199705〜199707」を低位側の自動分
割レンジR2−1の範囲値とし、レンジキー平均値「1
99707」よりも大きな範囲値「199708」を高
位側の自動分割レンジR2−2の範囲値とする。
In the case of this example, the range definition 7 of the range R2
Since the range value of 1 is "199705 to 199708", the range key average value 73 of the range R2 is "199707", and the allocation information 74 of the range R2 is "low side", the range value of the range definition 71 is "199705 to 199708".
In the range key average value “1997907” or less, the range value “199705 to 199707” is set as the range value of the lower automatic split range R2-1, and the range key average value “1” is set.
A range value "199708" larger than "99707" is set as a range value of the high-order side automatic division range R2-2.

【0044】その後、自動分割レンジR2−1のレンジ
番号「R2−1」と範囲値「199705〜19970
7」とを関係付けた自動分割レンジR2−1の自動分割
レンジ定義72−1を作成すると共に、自動分割レンジ
R2−2のレンジ番号「R2−2」と範囲値「1997
08」を関係付けた自動分割レンジR2−2の自動分割
レンジ定義72−2を作成する。そして、作成した自動
分割レンジR2−1,R2−2の自動分割レンジ定義7
2−1,72−2を、レンジR2のレンジ定義71に関
係付けてデータベース管理情報ファイル102上に展開
する。以上が、SS608の詳細な処理例である。
After that, the range number "R2-1" of the automatic division range R2-1 and the range value "199705 to 19970.
7 ”and the automatic division range definition 72-1 of the automatic division range R2-1 are created, and the range number“ R2-2 ”and the range value“ 1997 ”of the automatic division range R2-2 are created.
The automatic division range definition 72-2 of the automatic division range R2-2 associated with "08" is created. Then, the automatic division range definition 7 of the created automatic division ranges R2-1 and R2-2
2-1 and 72-2 are expanded on the database management information file 102 in association with the range definition 71 of the range R2. The above is a detailed processing example of SS608.

【0045】S608の処理が終了すると、自動レンジ
分割手段106は、レコード復元手段105に対して、
レンジの分割が必要なことを通知する(S609)。
尚、S605で、現在注目しているレンジがレンジ自動
分割条件に適合していないと判断した場合は、自動レン
ジ分割手段106は、レコード復元手段105に対し
て、レンジの分割が不要なことを通知する(S61
0)。
When the processing of S608 ends, the automatic range dividing means 106 instructs the record restoring means 105 to
It notifies that range division is necessary (S609).
If it is determined in step S605 that the currently focused range does not match the range automatic division condition, the automatic range dividing means 106 informs the record restoring means 105 that the range division is unnecessary. Notify (S61
0).

【0046】レコード復元手段105は、自動レンジ分
割手段106からレンジ分割が不要であることが通知さ
れると(図5,S503がNo)、未処理のレンジが存
在すか否かを判断する(S505)。そして、未処理の
レンジが存在すると判断した場合は、S501の処理に
戻り、存在しないと判断しが場合は、その処理を終了す
る。
When the record restoring means 105 is notified by the automatic range dividing means 106 that the range division is not necessary (No in S503 of FIG. 5,), the record restoring means 105 determines whether or not there is an unprocessed range (S505). ). When it is determined that there is an unprocessed range, the process returns to S501, and when it is determined that no range exists, the process ends.

【0047】これに対して、自動レンジ分割手段106
からレンジ分割が必要なことが通知された場合(S50
3がYes)は、レコード退避ファイル104に退避さ
せられているレコードの内、現在注目しているレンジR
2に登録されていたレコードを、そのレコード中のレン
ジキー値と、データベース管理情報ファイル102に登
録されている自動分割レンジR2−1,R2−2の自動
分割レンジ定義72−1,72−2とに基づいて、自動
分割レンジR2−1,R2−2の内の該当するレンジに
登録し直す(S504)。つまり、レンジR2に登録さ
れていたレコードの内の、レンジキー値が「19970
5〜199707」のレコードは、自動分割レンジR2
−1に登録し直し、レンジキー値が「199708」の
レコードは、自動分割レンジR2−2に登録し直す。そ
の後、レコード復元手段105は、S505の処理を行
う。
On the other hand, the automatic range dividing means 106
When it is notified that range division is necessary (S50
3 is Yes), the range R that is currently focused on in the records saved in the record save file 104
2 is the range key value in the record and the automatic division range definitions 72-1 and 72-2 of the automatic division ranges R2-1 and R2-2 registered in the database management information file 102. Based on the above, the registration is re-registered in the corresponding range of the automatic division ranges R2-1 and R2-2 (S504). That is, of the records registered in the range R2, the range key value is "19970.
5 to 199707 "is the automatic division range R2
-1 is re-registered, and the record having the range key value of "199708" is re-registered in the automatic division range R2-2. After that, the record restoring unit 105 performs the process of S505.

【0048】次に、レンジ絞り込み手段109,レコー
ド検索手段110の動作について説明する。
Next, the operations of the range narrowing means 109 and the record searching means 110 will be described.

【0049】アプリケーションプログラム107が、レ
ンジキー値と条件式により検索範囲(1つのレンジとは
限らない)を指定したレコード検索要求108を発行す
ると、レンジ絞り込み手段109は、図8のフローチャ
ートに示す処理を開始する。
When the application program 107 issues a record search request 108 in which a search range (not necessarily one range) is specified by a range key value and a conditional expression, the range narrowing means 109 causes the process shown in the flowchart of FIG. To start.

【0050】レンジ絞り込み手段109は、レンジR1
〜R3の内の1つのレンジ(例えば、レンジR2とす
る)に注目し、そのレンジR2が検索対象であるか否か
を判断する(S801)。
The range narrowing means 109 has a range R1.
Focusing on one range (for example, range R2) of R3 to R3, it is determined whether or not the range R2 is a search target (S801).

【0051】そして、レンジR2が検索対象でないと判
断した場合(S801がNo)は、未処理のレンジが存
在するか否か判断し(S807)、存在する場合はS8
01へ戻り、存在しない場合はその処理を終了する。
If it is determined that the range R2 is not the search target (No in S801), it is determined whether or not there is an unprocessed range (S807), and if it exists, S8.
Returning to 01, if not present, the processing ends.

【0052】これに対して、レンジR2が検索対象であ
ると判断した場合(S801がYes)は、レンジ絞り
込み情報部(図示せず)に当該レンジR2を示す情報を
登録し(S802)、その後、当該レンジR2が自動レ
ンジ分割されているか否かを判断する(S803)。こ
のS803の判断は、データベース管理情報ファイル1
02を参照し、レンジR2のレンジ定義に関連して自動
分割レンジ定義が登録されているか否かを判断すること
により行う。
On the other hand, when it is determined that the range R2 is the search target (Yes in S801), the information indicating the range R2 is registered in the range narrowing-down information section (not shown) (S802), and thereafter. , It is determined whether the range R2 is divided into automatic ranges (S803). This determination in S803 is based on the database management information file 1
02 to determine whether the automatic division range definition is registered in relation to the range definition of the range R2.

【0053】この例の場合は、データベース管理情報フ
ァイル102には、図7に示すように、レンジR2のレ
ンジ定義71に関連して自動分割レンジR2−1,R2
−2の自動分割レンジ定義72−1,72−2が登録さ
れているので、S803の判断結果はYesとなるが、
もし、S803の判断結果がNoとなった場合は、レン
ジ絞り込み手段109は、S807に処理を行うことに
なる。
In the case of this example, in the database management information file 102, as shown in FIG. 7, the automatic division ranges R2-1 and R2 are associated with the range definition 71 of the range R2.
Since the automatic division range definitions 72-1 and 72-2 of -2 are registered, the determination result of S803 is Yes,
If the determination result in S803 is No, the range narrowing means 109 will perform the process in S807.

【0054】S803で、レンジR2が自動レンジ分割
されていると判断すると、自動分割レンジR2−1,R
2−2の内の1つ(例えば、R2−1)に注目し、当該
自動分割レンジR2−1が検索対象であるか否かをデー
タベース管理情報ファイル102内の自動分割レンジ定
義72−1を参照して判断する(S804)。
When it is determined in step S803 that the range R2 is divided by the automatic range, the automatic division ranges R2-1, R
Paying attention to one of the 2-2 (for example, R2-1), the automatic division range definition 72-1 in the database management information file 102 is checked to determine whether or not the automatic division range R2-1 is the search target. The determination is made by referring to (S804).

【0055】そして、自動分割レンジR2−1が、検索
対象であると判断した場合は、S802で絞り込み情報
部に登録したレンジR2を示す情報に関係付けて自動分
割レンジR2−1を示す情報を登録する(S805)。
以上の処理をレンジR2に対応する全ての自動分割レン
ジR2−1,R2−2に対して行うと(S806がN
o)、未処理のレンジが存在するか否かを判断し(S8
07)、存在すると判断した場合は、再びS801の処
理を行い、存在しないと判断した場合は、処理を終了す
る。
When it is determined that the automatic division range R2-1 is the search target, the information indicating the automatic division range R2-1 is associated with the information indicating the range R2 registered in the narrowing-down information section in S802. Register (S805).
When the above processing is performed for all the automatic division ranges R2-1 and R2-2 corresponding to the range R2 (S806 returns N
o), it is judged whether or not there is an unprocessed range (S8).
07), if it is determined that it exists, the process of S801 is performed again, and if it is determined that it does not exist, the process ends.

【0056】レコード検索手段110は、レンジ絞り込
み手段109の処理が終了すると、絞り込み情報部を参
照し、そこに登録されている情報によって示されるレン
ジ,自動分割レンジのみを検索対象にして検索処理を行
い、検索結果をアプリケーションプログラム107に返
却する。尚、レンジを示す情報に関連付けて自動分割レ
ンジを示す情報が登録されている場合は、上記レンジは
検索対象とせず、上記自動分割レンジのみを検索対象に
する。
When the processing of the range narrowing means 109 is completed, the record searching means 110 refers to the narrowing-down information part and carries out the search processing by targeting only the range and the automatic division range indicated by the information registered therein. The search result is returned to the application program 107. When the information indicating the automatic division range is registered in association with the information indicating the range, the range is not set as the search target, and only the automatic division range is set as the search target.

【0057】次に、レコードをデータベース100に登
録する際の動作を説明する。レコードをデータベース1
00に登録する場合は、レコードのレンジキー値とデー
タベース管理情報ファイル102に登録されている各レ
ンジR1〜R3のレンジ定義とに基づいて、上記レコー
ドの登録先のレンジを求める。その後、上記レンジが自
動分割レンジに分割されているか否かを、上記レンジの
レンジ定義に関連付けて自動分割レンジ定義が登録され
ているか否かに基づいて判断する。そして、上記レンジ
が自動分割レンジに分割されていると判断した場合は、
自動分割レンジ定義とレコードのレンジキー値とに基づ
いて、登録先の自動分割レンジを決定し、その自動分割
レンジにレコードを登録する。
Next, the operation of registering a record in the database 100 will be described. Database of records 1
In the case of registering the record number 00, the range of the record destination is obtained based on the range key value of the record and the range definition of each range R1 to R3 registered in the database management information file 102. Then, it is determined whether or not the range is divided into the automatic division ranges, based on whether or not the automatic division range definition is registered in association with the range definition of the range. Then, if it is determined that the above range is divided into automatic division ranges,
The automatic division range of the registration destination is determined based on the automatic division range definition and the range key value of the record, and the record is registered in the automatic division range.

【0058】〔本発明の実施の形態〕 図9は本発明の実施の形態を示すブロック図である。図
1に示した前提技術と異なる点は、レコード復元手段1
05の代わりにレコード復元手段105aを備えた点、
自動レンジ分割手段106の代わりに自動レンジ分割手
段106aを備えた点、レンジ絞り込み手段109の代
わりにレンジ絞り込み手段109aを備えた点、および
レンジ定義手段111,マルチレンジ定義手段112,
入出力装置113を追加した点である。尚、他の図1と
同一符号は同一部分を表している。
[0058] [implementation of the present invention] FIG. 9 is a block diagram illustrating an embodiment of implementation of the present invention. The difference from the base technology shown in FIG.
The point that a record restoring means 105a is provided instead of 05,
A point that an automatic range dividing means 106a is provided instead of the automatic range dividing means 106, a point that a range narrowing means 109a is provided instead of the range narrowing means 109, and a range defining means 111, a multi-range defining means 112,
The point is that the input / output device 113 is added. The same reference numerals as those in FIG. 1 denote the same parts.

【0059】入出力装置113は、キーボード,CRT
等から構成され、利用者の指示をレンジ定義手段11
1,マルチレンジ定義手段112に入力したり、レンジ
定義手段111,マルチレンジ定義手段112の出力を
表示する機能を有する。
The input / output device 113 is a keyboard or a CRT.
And the like, and includes a user's instruction to define the range 11
1, it has a function of inputting to the multi-range defining means 112 and displaying the outputs of the range defining means 111 and the multi-range defining means 112.

【0060】レンジ定義手段111は、入出力装置11
3から入力される利用者の指示に従って、データベース
管理情報ファイル102にレンジR1〜R3のレンジ定
義を登録する機能を有する。
The range defining means 111 is the input / output device 11
3 has a function of registering the range definitions of the ranges R1 to R3 in the database management information file 102 according to the user's instruction input from the user.

【0061】マルチレンジ定義手段112は、入出力装
置113から入力される利用者の指示に従って、レンジ
を複数のマルチレンジに分割する際の、レコードのレン
ジキー値とマルチレンジとの対応関係を定義したマルチ
レンジ定義をデータベース管理情報ファイル102に登
録する機能を有する。
The multi-range defining means 112 defines the correspondence between the range key value of the record and the multi-range when the range is divided into a plurality of multi-ranges according to the user's instruction input from the input / output device 113. The multi-range definition is registered in the database management information file 102.

【0062】レコード復元手段105aは、図1に示し
たレコード復元手段105が備えている機能に加え、レ
コード退避ファイル104に退避させられたレコード
を、マルチレンジ定義とレコードのレンジキー値とに従
ってマルチレンジに登録し直す機能を有する。
In addition to the function of the record restoring means 105 shown in FIG. 1, the record restoring means 105a multiplies the records saved in the record save file 104 according to the multi-range definition and the range key value of the record. It has the function of re-registering to the range.

【0063】自動レンジ分割手段106aは、図1に示
した自動レンジ分割手段106が備えている機能に加
え、マルチレンジ定義が設定されているレンジが、レン
ジ自動分割条件に適合している場合、レコード復元手段
105aに対してマルチレンジ定義に従ってレコードを
登録し直すことを指示する機能を有する。
In addition to the function of the automatic range dividing means 106 shown in FIG. 1, the automatic range dividing means 106a has the following features: It has a function of instructing the record restoring means 105a to re-register a record according to the multi-range definition.

【0064】レンジ絞り込み手段109aは、図1に示
したレンジ絞り込み手段109が備えている機能に加
え、マルチレンジ定義が有効になっているレンジについ
ては、マルチレンジ定義に従って検索範囲を絞り込む機
能を有する。
The range narrowing means 109a has the function of narrowing the search range according to the multi-range definition for the range for which the multi-range definition is valid, in addition to the function of the range narrowing means 109 shown in FIG. .

【0065】次に、本実施の形態の動作を説明する。Next, the operation of this embodiment will be described.

【0066】利用者は、レンジ分割表101を定義する
場合、レンジ定義手段111を用いて、各レンジR1〜
R3のレンジ定義をデータベース管理情報ファイル10
2に登録する。
When defining the range division table 101, the user uses the range defining means 111 to set each range R1 to R1.
Database management information file 10 for R3 range definition
Register in 2.

【0067】その後、利用者は、レンジR1〜R3の中
に、分割が必要になった際の分割方法を指定したいレン
ジが存在する場合には、マルチレンジ定義手段112を
用いてデータベース管理情報ファイル102にマルチレ
ンジ定義を登録する。
After that, when the user wants to specify the division method when the division is required, the user uses the multi-range definition means 112 to make a database management information file. The multi-range definition is registered in 102.

【0068】図10はマルチレンジ定義手段112の処
理例を示すフローチャートであり、以下同図を参照して
マルチレンジ定義手段112の動作を詳細に説明する。
FIG. 10 is a flow chart showing a processing example of the multi-range defining means 112, and the operation of the multi-range defining means 112 will be described in detail below with reference to the figure.

【0069】今、例えば、レンジR1〜R3の中に、分
割方法を指定したいレンジが存在し、そのレンジがR2
であったとする。そして、その分割方法が、図11に示
すように、「レンジR2をレンジキー値の範囲値がそれ
ぞれ199705,199706〜199707,その
他(199708)の3個のマルチレンジMR2−1,
MR2−2,MR2−3に分割する」というものであっ
たとする。
Now, for example, in the ranges R1 to R3, there is a range for which a division method is desired to be designated, and that range is R2.
It was. Then, as shown in FIG. 11, the division method is as follows: "range R2 has three multi-ranges MR2-1, range key value range values are 199705, 199706 to 199707, and others (199708).
It is divided into MR2-2 and MR2-3 ”.

【0070】この場合、利用者は、入出力装置113か
らマルチレンジ定義手段112に対して、マルチレンジ
定義を行いたいレンジR2を示す情報を入力する。尚、
レンジR2以外にもマルチレンジ定義を行いたいレンジ
が存在する場合には、そのレンジを示す情報も併せて入
力する。
In this case, the user inputs, from the input / output device 113 to the multi-range defining means 112, information indicating the range R2 for which multi-range definition is desired. still,
When there is a range other than the range R2 for which multi-range definition is desired, the information indicating the range is also input.

【0071】レンジR2を示す情報が入力されると、マ
ルチレンジ定義手段112は、レンジR2のレンジ定義
がデータベース管理情報ファイル102に登録されてい
るか否かを判断する(図10,S1001)。
When the information indicating the range R2 is input, the multi-range defining means 112 determines whether the range definition of the range R2 is registered in the database management information file 102 (FIG. 10, S1001).

【0072】そして、レンジR2のレンジ定義が存在し
ない場合は、利用者にエラーを返却する(S100
8)。これに対してレンジ定義が存在する場合は、その
レンジ定義をデータベース管理情報ファイル102から
取り出す(S1002)。ここでは、レンジ2の範囲値
は「199705〜199708」となっている。
If the range definition of the range R2 does not exist, an error is returned to the user (S100).
8). On the other hand, if the range definition exists, the range definition is retrieved from the database management information file 102 (S1002). Here, the range value of range 2 is “199705 to 199708”.

【0073】その後、マルチレンジ定義手段112は、
入出力装置113にマルチレンジ定義情報の入力促進文
を表示し、利用者にマルチレンジ定義情報を入力するこ
とを促す(S1003)。
After that, the multi-range defining means 112
The input promotion sentence of the multi-range definition information is displayed on the input / output device 113 to prompt the user to input the multi-range definition information (S1003).

【0074】これに応答して利用者は、入出力装置11
3からマルチレンジ定義情報として、マルチレンジMR
2−1,MR2−2,MR2−3のレンジキーの範囲値
「199705」,「199706〜199707」,
「その他」を入力する。尚、本実施例では、入力促進文
を入出力装置113に表示して、利用者にマルチレンジ
定義情報の入力を促すようにしたが、予め利用者に、所
定のファイル(図示せず)にマルチレンジ定義情報を登
録させておき、上記ファイルからマルチレンジ定義情報
を入力するようにしても良い。
In response to this, the user is prompted by the input / output device 11
3 to multi-range MR as multi-range definition information
The range values of the range keys 2-1 and MR2-2 and MR2-3 are "199705", "199706 to 199707",
Enter "Other". In the present embodiment, the input prompt sentence is displayed on the input / output device 113 to prompt the user to input the multi-range definition information. However, the user is requested to enter a predetermined file (not shown) in advance. The multi-range definition information may be registered and the multi-range definition information may be input from the above file.

【0075】これにより、マルチレンジ定義手段112
は、入力された範囲値がレンジR2の範囲値内、つまり
「199705〜199708」であるか否かを判断し
(S1004)、1個でも範囲外のものが存在する場合
は、マルチレンジ定義を無効にし、利用者にエラーを返
却する(S1007,S1008)。尚、マルチレンジ
定義情報中の「その他」は、レンジキー範囲内で、マル
チレンジ定義されていない範囲、つまり「19970
8」を示す。
As a result, the multi-range defining means 112
Determines whether the input range value is within the range value of the range R2, that is, "199705 to 199708" (S1004), and if even one is out of the range, the multi-range definition is set. It is invalidated and an error is returned to the user (S1007, S1008). In addition, "others" in the multi-range definition information is a range within the range key range that is not defined by the multi-range, that is, "19970".
8 "is shown.

【0076】これに対して、入力された範囲値が全てレ
ンジR2の範囲値内である場合(1004がYes)
は、図12に示すように、マルチレンジMR2−1,M
R2−2,MR2−3のマルチレンジ定義1202−
1,1202−2,1202−3を、レンジR2のレン
ジ定義1201に関連付けてデータベース管理情報ファ
イル102に登録する(S1005)。尚マルチレンジ
定義1202−1〜1202−3は、レンジ番号,範囲
値および有効無効情報とを含んでいる。有効無効情報
は、そのマルチレンジ定義1202−1〜1202−3
が有効であるか否かを示す情報であり、この時点に於い
ては、レンジR2は、マルチレンジMR2−1〜MR2
−3に分割されていないので、「無効」が設定される。
On the other hand, when all the input range values are within the range value of the range R2 (Yes in 1004)
, Multi-range MR2-1, M, as shown in FIG.
Multirange definition 1202-of R2-2 and MR2-3
1, 1202-2, 1202-3 are registered in the database management information file 102 in association with the range definition 1201 of the range R2 (S1005). The multi-range definitions 1202-1 to 1202-3 include range numbers, range values, and valid / invalid information. The valid / invalid information is the multi-range definition 1202-1 to 1202-3.
Is information indicating whether or not is valid. At this point, the range R2 is the multi-range MR2-1 to MR2.
Since it is not divided into -3, "invalid" is set.

【0077】その後、マルチレンジ定義手段112は、
利用者によってマルチレンジ定義を行うことが指示され
ているレンジの中に未処理のものがあるか否かを判断し
(S1006)、未処理のものが存在すると判断した場
合はS1003の処理に戻り、存在しないと判断した場
合はその処理を終了する。
After that, the multi-range defining means 112
It is determined whether or not there is an unprocessed one in the range instructed to perform the multi-range definition by the user (S1006). When it is determined that there is an unprocessed range, the process returns to S1003. If it is determined that the file does not exist, the process ends.

【0078】マルチレンジ定義手段112によってレン
ジR2に対するマルチレンジ定義1202−1〜120
2−3がデータベース管理情報ファイル102に登録さ
れた後に、レコード退避手段103が起動されると、レ
コード退避手段103は、図3,図4のフローチャート
に示す処理を行う。
The multi-range definition means 112 defines multi-ranges 1202-1 to 120-1 for the range R2.
When the record save means 103 is activated after 2-3 is registered in the database management information file 102, the record save means 103 performs the processing shown in the flowcharts of FIGS. 3 and 4.

【0079】レコード退避手段103の処理が終了する
と、レコード復元手段105aが、図13のフローチャ
ートに示す処理を行う。
When the processing of the record saving means 103 is completed, the record restoring means 105a performs the processing shown in the flowchart of FIG.

【0080】レコード復元手段105aは、先ず、レン
ジR1〜R3の内の1つに注目し、注目したレンジを自
動レンジ分割手段106aに通知する(図13,S13
01,S1302)。今、例えば、レンジR2に注目し
たとすると、レコード復元手段105aは、自動レンジ
分割手段106aに、レンジR2を示す情報を通知する
ことになる。
The record restoring means 105a first pays attention to one of the ranges R1 to R3 and notifies the automatic range dividing means 106a of the focused range (FIG. 13, S13).
01, S1302). Now, for example, if attention is paid to the range R2, the record restoration means 105a will notify the automatic range division means 106a of information indicating the range R2.

【0081】これにより、自動レンジ分割手段106a
は、データベース管理情報ファイル102を参照し、レ
ンジR2にマルチレンジ定義がされているか否かを判断
する(図14,S1401)。
As a result, the automatic range dividing means 106a
Refers to the database management information file 102 and determines whether or not the range R2 has a multi-range definition (FIG. 14, S1401).

【0082】そして、レンジR2にマルチレンジ定義が
されていないと判断場合は、図6に示したS601〜S
610と同様の処理を行う(S1407)。
When it is determined that the range R2 is not defined as multi-range, S601 to S601 shown in FIG.
The same process as 610 is performed (S1407).

【0083】これに対して、レンジR2にマルチレンジ
定義がされていると判断した場合は、データベース管理
情報ファイル102から、各レンジR1〜R3のレコー
ド件数を読み出し(S1402)、その後、S1403
の処理を行う。尚、既に、レンジR1〜R3のレコード
件数を読み込んでいる場合は、S1402の処理は不要
である。
On the other hand, when it is determined that the range R2 has the multi-range definition, the number of records of each range R1 to R3 is read from the database management information file 102 (S1402), and then S1403.
Process. If the number of records in the ranges R1 to R3 has already been read, the process of S1402 is unnecessary.

【0084】S1403では、各レンジR1〜R3のレ
コード件数と、利用者によって指定されているレンジ自
動分割条件に基づいて、現在注目しているレンジR2が
レンジ自動分割条件に適合しているか否かを判断する。
In S1403, whether or not the range R2 currently focused on conforms to the automatic range dividing condition based on the number of records in each range R1 to R3 and the automatic range dividing condition specified by the user. To judge.

【0085】そして、レンジR2がレンジ自動分割条件
に適合していると判断した場合(S1404がYes)
は、レコード復元手段105aに対して、レンジR2の
マルチレンジ定義が有効であることを通知する(S14
05)。これに対して、レンジR2がレンジ自動分割条
件に適合していないと判断した場合(S1404がN
o)は、レコード復元手段105aに対して、レンジR
2の分割が不要であることを通知する(S1406)。
When it is determined that the range R2 meets the automatic range division condition (Yes in S1404).
Notifies the record restoration means 105a that the multi-range definition of the range R2 is valid (S14).
05). On the other hand, when it is determined that the range R2 does not meet the automatic range division condition (S1404 returns N
o) is the range R with respect to the record restoring means 105a.
It is notified that the division of 2 is unnecessary (S1406).

【0086】レコード復元手段105aは、自動レンジ
分割手段106aからレンジR2のマルチレンジ定義1
202−1〜1202−3が有効であることが通知され
ると(図13,S1303がYes)、レコード退避フ
ァイル104に退避させられているレコードの内、現在
注目しているレンジR2に登録されていたレコードを、
そのレコード中のレンジキー値と、データベース管理情
報ファイル107に登録されているマルチレンジMR2
−1〜MR2−3のマルチレンジ定義1202−1〜1
202−3とに基づいて、該当するマルチレンジに登録
し直す(S1306)。尚、S1306に於いては、各
マルチレンジ定義1202−1〜1202−3中の有効
無効情報を「有効」に変更する処理も行う。これによ
り、レンジR2は、マルチレンジMR2−1〜MR−3
に分割される。
The record restoring means 105a uses the multi-range definition 1 of the range R2 from the automatic range dividing means 106a.
When it is notified that 202-1 to 1202-3 are valid (Yes in step S1303 in FIG. 13), the records saved in the record save file 104 are registered in the range R2 which is currently focused. The records that were
The range key value in the record and the multi-range MR2 registered in the database management information file 107
-1 to MR2-3 multi-range definition 1202-1 to 120-1
Based on 202-3, the multi-range is re-registered (S1306). Incidentally, in S1306, processing for changing the valid / invalid information in each of the multi-range definitions 1202-1 to 1202-3 to “valid” is also performed. Accordingly, the range R2 is the multi-range MR2-1 to MR-3.
Is divided into

【0087】また、レコード復元手段105aは、自動
レンジ分割手段106aからレンジR2の分割が不要で
あることが通知されると(S1304がNo)、未処理
のレンジが存在するか否かを判断し(S1307)、存
在すると判断した場合はS1301の処理に戻り、存在
しないと判断した場合は処理を終了する。
Further, when the record restoring means 105a is notified by the automatic range dividing means 106a that the division of the range R2 is unnecessary (No in S1304), the record restoring means 105a judges whether or not there is an unprocessed range. (S1307), if it is determined that it exists, the processing returns to S1301, and if it is determined that it does not exist, the processing ends.

【0088】また、レコード復元手段105aは、自動
レンジ分割手段106aからレンジの分割は必要である
ことが通知されると(S1304がYes)、レコード
退避ファイル104に退避させられているレコードの
内、現在注目しているレンジR2に登録されていたレコ
ードを、そのレコード中のレンジキー値と、データベー
ス管理情報ファイル102に登録されている自動分割レ
ンジ定義とに基づいて該当する自動分割レンジに登録し
直す(S1305)。尚、S1304がYesとなるの
は、自動レンジ分割手段106aが、S1406に於い
て図6に示したS609の処理を行った場合である。
Further, when the record restoring means 105a is notified by the automatic range dividing means 106a that the range division is necessary (Yes in S1304), the record restoring means 105a selects one of the records saved in the record saving file 104. The record registered in the range R2, which is currently in focus, is registered in the corresponding automatic division range based on the range key value in the record and the automatic division range definition registered in the database management information file 102. It is corrected (S1305). Note that S1304 becomes Yes when the automatic range dividing means 106a has performed the process of S609 shown in FIG. 6 in S1406.

【0089】次に、レンジ絞り込み手段109a,レコ
ード検索手段110の動作について説明する。
Next, the operations of the range narrowing means 109a and the record searching means 110 will be described.

【0090】アプリケーションプログラム107が、レ
ンジキー値と条件式により検索範囲を指定したレコード
検索要求108を発行すると、レンジ絞り込み手段10
9aは、図15のフローチャートに示す処理を開始す
る。
When the application program 107 issues the record search request 108 in which the search range is specified by the range key value and the conditional expression, the range narrowing means 10
9a starts the process shown in the flowchart of FIG.

【0091】レンジ絞り込み手段109aは、レンジR
1〜R3の内の1つのレンジ(例えば、レンジR1とす
る)に注目し、そのレンジR1が検索対象であるか否か
を判断する(S1501)。
The range narrowing means 109a has a range R
Attention is paid to one of the ranges 1 to R3 (for example, the range R1), and it is determined whether or not the range R1 is the search target (S1501).

【0092】そして、レンジR1が検索対象でないと判
断した場合(S1501がNo)は、未処理のレンジが
存在するか否か判断し(S1506)、存在する場合は
S1501へ戻り、存在しない場合はその処理を終了す
る。
If it is determined that the range R1 is not the search target (No in S1501), it is determined whether or not an unprocessed range exists (S1506). If it exists, the process returns to S1501. If it does not exist, it returns to S1501. The process ends.

【0093】これに対して、レンジR1が検索対象であ
ると判断した場合(S1501がYes)は、レンジ絞
り込み情報部(図示せず)に当該レンジR1を示す情報
を登録し(S1502)、更に、当該レンジR1がマル
チレンジ或いは自動分割レンジに分割されているか否か
を判断する(S1503)。このS1503の判断は、
データベース管理情報ファイル102を参照して行う。
つまり、レンジR1のレンジ定義に関連して、有効無効
情報が「有効」になっているマルチレンジ定義が登録さ
れているか、或いは自動分割レンジ定義が登録されてい
る場合のみ、レンジR1がマルチレンジ或いは自動分割
レンジに分割されていると判断する。
On the other hand, when it is determined that the range R1 is the search target (Yes in S1501), the information indicating the range R1 is registered in the range narrowing information section (not shown) (S1502), and Then, it is determined whether the range R1 is divided into a multi-range or an automatic division range (S1503). The determination in S1503 is
This is performed by referring to the database management information file 102.
That is, only when the multi-range definition whose valid / invalid information is “valid” is registered or the automatic division range definition is registered in relation to the range definition of the range R1, the range R1 is the multi-range. Alternatively, it is determined that the range is divided into the automatic division ranges.

【0094】そして、S1503に於いて、レンジR1
が分割されていないと判断した場合は、S1506の処
理を行う。これに対して、S1503で、レンジR1が
分割されていると判断した場合は、S1504の処理を
行う。
Then, in S1503, the range R1
If it is determined that is not divided, the process of S1506 is performed. On the other hand, if it is determined in S1503 that the range R1 is divided, the process of S1504 is performed.

【0095】S1504に於いては、レンジR1が複数
のマルチレンジに分割されている場合には、その内の1
つに注目し、マルチレンジが検索対象であるか否かをデ
ータベース管理情報ファイル102内のマルチレンジ定
義を参照して判断する。また、レンジR1が2個の自動
分割レンジに分割されている場合には、その内の1つに
注目し、マルチレンジが検索対象であるか否かをデータ
ベース管理情報ファイル102内の自動分割レンジ定義
を参照して判断する。
In S1504, if the range R1 is divided into a plurality of multi-ranges, one of them is divided.
Paying attention to one of the above, the multi-range definition in the database management information file 102 is used to determine whether or not the multi-range is the search target. Further, when the range R1 is divided into two automatic division ranges, one of them is focused on, and whether or not the multi-range is the search target is determined by the automatic division range in the database management information file 102. Determine by referring to the definition.

【0096】そして、S1504に於いて、注目してい
るマルチレンジ或いは自動分割レンジが、検索対象であ
ると判断した場合は、S1502で絞り込み情報部に登
録したレンジR1を示す情報に関係付けて現在注目して
いるマルチレンジ或いは自動分割レンジを示す情報を登
録する(S1507)。以上の処理をレンジR1に関連
する全てのマルチレンジ或いは自動分割レンジに対して
行うと(S1505がNo)、S1506に於いて未処
理のレンジが存在するか否かを判断する。そして、未処
理のレンジが存在する場合には、S1501の処理に戻
り、存在しない場合には、その処理を終了する。
If it is determined in step S1504 that the multi-range or the automatic division range of interest is the search target, the information indicating the range R1 registered in the narrowing-down information section in step S1502 is associated with the current information. Information indicating the focused multi-range or automatic division range is registered (S1507). When the above processing is performed for all the multi-ranges or automatic division ranges related to the range R1 (No in S1505), it is determined in S1506 whether there is an unprocessed range. Then, if there is an unprocessed range, the process returns to S1501, and if not, the process ends.

【0097】レコード検索手段110は、レンジ絞り込
み手段109aの処理が終了すると、絞り込み情報部を
参照し、そこに登録されている情報によって示されるレ
ンジ,,マルチレンジ,自動分割レンジを検索対象にし
て検索処理を行い、検索結果をアプリケーションプログ
ラム107に返却する。尚、レンジを示す情報に関連付
けてマルチレンジ,自動分割レンジを示す情報が登録さ
れている場合は、上記レンジは検索対象とせず、上記マ
ルチレンジ,自動分割レンジのみを検索対象にする。
When the processing of the range narrowing means 109a is completed, the record searching means 110 refers to the narrowing down information part and sets the range indicated by the information registered therein, the multi-range, and the automatic division range as search targets. Search processing is performed and the search result is returned to the application program 107. If the information indicating the multi-range and the automatic division range is registered in association with the information indicating the range, the above range is not the search target, and only the multi-range and the automatic division range are the search targets.

【0098】次に、レコードをデータベース100に登
録する際の動作を説明する。レコードをデータベース1
00に登録する場合は、レコードのレンジキー値とデー
タベース管理情報ファイル102に登録されている各レ
ンジR1〜R3のレンジ定義とに基づいて、上記レコー
ドの登録先のレンジを求める。その後、上記レンジがマ
ルチレンジ或いは自動分割レンジに分割されているか否
かを判断する。そして、上記レンジが自動分割レンジに
分割されていると判断した場合は、各マルチレンジのマ
ルチレンジ定義あるいは各自動分割レンジの自動分割レ
ンジ定義と、レコードのレンジキー値とに基づいて、登
録先のマルチレンジ或いは自動分割レンジを決定し、そ
のマルチレンジ或いは自動分割レンジにレコードを登録
する。
Next, the operation of registering a record in the database 100 will be described. Database of records 1
In the case of registering the record number 00, the range of the record destination is obtained based on the range key value of the record and the range definition of each range R1 to R3 registered in the database management information file 102. Then, it is determined whether the range is divided into a multi-range or an automatic division range. When it is determined that the above range is divided into automatic division ranges, the registration destination is based on the multi-range definition of each multi-range or the automatic division range definition of each automatic division range and the range key value of the record. The multi-range or automatic division range is determined, and a record is registered in the multi-range or automatic division range.

【0099】図16は、レンジ分割装置のハードウェア
構成例を示した図であり、コンピュータ1601と、記
録媒体1602と、データベース1603とを備えてい
る。記録媒体1602は、ディスク,半導体メモリ,そ
の他の記録媒体であり、コンピュータをレンジ分割装置
として機能させるためのレンジ分割用プログラムが記録
されている。
FIG. 16 is a diagram showing an example of the hardware configuration of the range dividing device, which comprises a computer 1601, a recording medium 1602, and a database 1603. The recording medium 1602 is a disk, a semiconductor memory, or another recording medium, and stores a range division program for causing a computer to function as a range division device.

【0100】図1に示したレンジ分割装置を構成する場
合には、記録媒体1602に記録されているレンジ分割
用プログラムは、コンピュータ1601によって読み取
られ、コンピュータ1601の動作を制御することで、
コンピュータ1601上に、図1に示したレコード退避
手段103,レコード復元手段105,自動レンジ分割
手段106,レンジ絞り込み手段109,レコード検索
手段110を実現する。
In the case of configuring the range dividing device shown in FIG. 1, the range dividing program recorded in the recording medium 1602 is read by the computer 1601 and the operation of the computer 1601 is controlled,
The record saving means 103, the record restoring means 105, the automatic range dividing means 106, the range narrowing means 109, and the record searching means 110 shown in FIG. 1 are realized on the computer 1601.

【0101】また、図9に示したレンジ分割装置を構成
する場合には、記録媒体1602に記録されているレン
ジ分割用プログラムは、コンピュータ1601によって
読み取られ、コンピュータ1601の動作を制御するこ
とで、コンピュータ1601上に、図9に示したレコー
ド退避手段103,レコード復元手段105a,自動レ
ンジ分割手段106a,レンジ絞り込み手段109a,
レコード検索手段110,レンジ定義手段111,マル
チレンジ定義手段112を実現する。
Further, in the case of configuring the range dividing device shown in FIG. 9, the range dividing program recorded in the recording medium 1602 is read by the computer 1601 and controls the operation of the computer 1601. On the computer 1601, the record saving means 103, the record restoring means 105a, the automatic range dividing means 106a, the range narrowing means 109a, shown in FIG.
A record search means 110, a range definition means 111, and a multi-range definition means 112 are realized.

【0102】[0102]

【発明の効果】以上説明したように、本発明は、データ
ベースの各レンジに登録されているレコードを退避させ
る際、各レンジ毎にそのレンジのレコード件数をほぼ2
等分するレンジキー平均値を求めておき、各レンジのレ
コード件数と予め定められている条件とに基づいて分割
すべきであると判断したレンジを、そのレンジのレンジ
キー平均値に従って2つの自動分割レンジに分割するよ
うにしたので、極端にレコード件数が多く検索処理に多
くの時間を要するレンジを2つのレンジに分割するとい
う処理を、短時間で且つ作業者に負担をかけずに行うこ
とが可能になるという効果がある。
As described above, according to the present invention, when the records registered in each range of the database are saved, the number of records in each range is approximately 2 for each range.
The range key average value to be equally divided is obtained, and the range determined to be divided based on the number of records in each range and the predetermined condition is set to two automatic ranges according to the range key average value of the range. Since the range is divided into two ranges, the range in which the number of records is extremely large and the search process takes a lot of time is divided into two ranges. This process should be performed in a short time without burdening the operator. There is an effect that it becomes possible.

【0103】また、本発明は、利用者によって指示され
たレンジに対して、そのレンジを利用者によって指示さ
れた複数のマルチレンジに分割する際の、レコードのレ
ンジキー値とマルチレンジとの対応関係を定義したマル
チレンジ定義を設定できるようにしたので、利用者がレ
ンジをどのようにに分割するのかを指定できるという効
果がある。
Further, according to the present invention, a range key value of a record and a multi-range are associated with each other when a range designated by the user is divided into a plurality of multi-ranges designated by the user. Since the multi-range definition that defines the relationship can be set, there is an effect that the user can specify how to divide the range.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の前提となる技術を示すブロック図であ
る。
FIG. 1 is a block diagram showing a technique on which the present invention is based .

【図2】レンジ分割表101に於けるレコードの格納例
を示す図である。
FIG. 2 is a diagram showing a storage example of records in a range division table 101.

【図3】レコード退避手段103の処理例を示すフロー
チャートである。
FIG. 3 is a flowchart showing a processing example of record saving means 103.

【図4】レコード退避手段103の処理例を示すフロー
チャートである。
FIG. 4 is a flowchart showing a processing example of a record saving unit 103.

【図5】レコード復元手段105の処理例を示すフロー
チャートである。
FIG. 5 is a flowchart showing a processing example of a record restoring unit 105.

【図6】自動レンジ分割手段106の処理例を示すフロ
ーチャートである。
FIG. 6 is a flowchart showing a processing example of automatic range dividing means 106.

【図7】レンジ定義,自動分割レンジ定義の一例を示す
図である。
FIG. 7 is a diagram showing an example of a range definition and an automatic division range definition.

【図8】レンジ絞り込み手段109の処理例を示すフロ
ーチャートである。
FIG. 8 is a flowchart showing a processing example of range narrowing means 109.

【図9】本発明の実施の形態を示すブロック図である。FIG. 9 is a block diagram showing an embodiment of the present invention.

【図10】マルチレンジ定義手段112の処理例を示す
フローチャートである。
FIG. 10 is a flowchart showing a processing example of multi-range defining means 112.

【図11】レンジとマルチレンジとの関係の一例を示す
図である。
FIG. 11 is a diagram showing an example of a relationship between a range and a multi-range.

【図12】レンジ定義,マルチレンジ定義の一例を示す
図である。
FIG. 12 is a diagram showing an example of a range definition and a multi-range definition.

【図13】レコード復元手段105aの処理例を示すフ
ローチャートである。
FIG. 13 is a flowchart showing a processing example of the record restoring unit 105a.

【図14】自動レンジ分割手段106aの処理例を示す
フローチャートである。
FIG. 14 is a flowchart showing a processing example of automatic range dividing means 106a.

【図15】レンジ絞り込み手段109aの処理例を示す
フローチャートである。
FIG. 15 is a flowchart showing a processing example of range narrowing means 109a.

【図16】レンジ分割装置のハードウェア構成例を示す
ブロック図である。
FIG. 16 is a block diagram illustrating a hardware configuration example of a range dividing device.

【符号の説明】[Explanation of symbols]

100…データベース 101…レンジ分割表 102…データベース管理情報ファイル 103…レコード退避手段 104…レコード退避ファイル 105,105a…レコード復元手段 106,106a…自動レンジ分割手段 107…アプリケーションプログラム 108…レコード検索要求 109,109a…レンジ絞り込み手段 110…レコード検索手段 111…レンジ定義手段 112…マルチレンジ定義手段 113…入出力装置 R1〜R3…レンジ R2−1,R2−2…自動分割レンジ MR2−1〜MR2−3…マルチレンジ 100 ... Database 101 ... Range contingency table 102 ... Database management information file 103 ... Record saving means 104 ... Record save file 105, 105a ... Record restoring means 106, 106a ... Automatic range dividing means 107 ... Application program 108 ... Record search request 109, 109a ... Range narrowing means 110 ... Record search means 111 ... Range definition means 112 ... Multi-range definition means 113 ... Input / output device R1-R3 ... range R2-1, R2-2 ... Automatic division range MR2-1 to MR2-3 ... Multi-range

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のレンジに分割されたデータベース
を備えたデータベースシステムに於いて、 利用者によって指示されたレンジに対して、そのレンジ
を利用者によって指示された複数のマルチレンジに分割
する際の、レコードのレンジキー値とマルチレンジとの
対応関係を定義したマルチレンジ定義を設定し、 各レンジに登録されているレコードをレコード退避ファ
イルに退避させる際、前記各レンジ毎に、そのレンジに
割り当てられているレンジキー値が2つ以上である場合
には、そのレンジに登録されているレコード件数をほぼ
2等分するレンジキー値であるレンジキー平均値を求
め、 前記各レンジのレコード件数と予め定められている条件
とに基づいて、前記各レンジそれぞれについて分割すべ
きであるか否かを判断し、分割すべきであると判断し且
つマルチレンジ定義が設定されていないレンジを、その
レンジのレンジキー平均値に従って2つの自動分割レン
ジに分割し、分割すべきであると判断し且つマルチレン
ジ定義がされているレンジをマルチレンジ定義に従って
複数のマルチレンジに分割し、 前記レコード退避ファイルに退避させられているレコー
ドの内、2つの自動分割レンジに分割されたレンジに登
録されていたレコードを、そのレコードのレンジキー値
に従って該当する自動分割レンジに登録し直し、マルチ
レンジに分割されたレンジに登録されていたレコード
を、そのレコードのレンジキー値に従って該当するマル
チレンジに登録し直すことを特徴とするレンジ分割方
法。
1. In a database system having a database divided into a plurality of ranges, when a range designated by a user is divided into a plurality of multi-ranges designated by the user. When setting the multi-range definition that defines the correspondence between the range key value of the record and the multi-range, and saving the records registered in each range to the record save file ,
When the assigned range key value is two or more
The range key average value, which is a range key value that divides the number of records registered in that range into approximately two equal parts, is obtained, and based on the number of records in each range and a predetermined condition, It is determined whether each range should be divided, it is determined that it should be divided, and the range for which the multi-range definition is not set is divided into two automatic division ranges according to the range key average value of the range. Then, it is judged that it should be divided, and the range for which the multi-range definition is made is divided into a plurality of multi-ranges according to the multi-range definition, and two automatic divisions among the records saved in the record save file are performed. Records registered in a range divided into ranges are registered in the corresponding automatic division range according to the range key value of the record. And again, range partitioning method characterized by multi-range records were registered in the divided range, the re-registered in the multi-range that corresponds according range key value for that record.
【請求項2】 前記レンジキー平均値は、レンジに登録
されているレコードのレンジキー値をソートし、ソート
結果と前記レンジのレコード件数とに基づいて求めるこ
とを特徴とする請求項1記載のレンジ分割方法。
2. The range key average value is obtained by sorting range key values of records registered in a range, and based on the sorting result and the number of records in the range. Range division method.
【請求項3】 複数のレンジに分割されたデータベース
を備えたデータベースシステムに於いて、 利用者によって指示されたレンジに対して、そのレンジ
を利用者によって指示された複数のマルチレンジに分割
する際の、レコードのレンジキー値とマルチレンジとの
対応関係を定義したマルチレンジ定義を設定するマルチ
レンジ定義手段と、 各レンジに登録されているレコードをレコード退避ファ
イルに退避させる際、前記各レンジ毎に、そのレンジに
割り当てられているレンジキー値が2つ以上である場合
には、そのレンジに登録されているレコード件数をほぼ
2等分するレンジキー値であるレンジキー平均値を求め
るレコード退避手段と、 該レコード退避手段が求めた各レンジのレコード件数と
予め定められている条件とに基づいて、前記各レンジそ
れぞれについて分割すべきであるか否かを判断し、分割
すべきであると判断し且つマルチレンジ定義が設定され
ていないレンジを、そのレンジのレンジキー平均値に従
って2つの自動分割レンジに分割し、分割すべきである
と判断し且つマルチレンジ定義がされているレンジをマ
ルチレンジ定義に従って複数のマルチレンジに分割する
自動レンジ分割手段と、 前記レコード退避ファイルに退避させられているレコー
ドの内、2つの自動分割レンジに分割されたレンジに登
録されていたレコードを、そのレコードのレンジキー値
に従って該当する自動分割レンジに登録し直し、マルチ
レンジに分割されたレンジに登録されていたレコード
を、そのレコードのレンジキー値に従って該当するマル
チレンジに登録し直すレコード復元手段とを備えたこと
を特徴とするレンジ分割装置。
3. In a database system having a database divided into a plurality of ranges, when a range designated by a user is divided into a plurality of multi-ranges designated by the user. , A multi-range definition means for setting a multi-range definition that defines the correspondence between the range key value of a record and a multi-range, and when saving the records registered in each range to a record save file, To that range
When the assigned range key value is two or more
Is a record saving means for obtaining a range key average value, which is a range key value that divides the number of records registered in the range into approximately two equal parts, and the number of records in each range obtained by the record saving means is predetermined. Based on the conditions that are set, it is determined whether or not each of the ranges should be divided, the range that is determined to be divided, and the range for which the multi-range definition is not set is the range key of that range. An automatic range dividing unit that divides into two automatic division ranges according to an average value, determines that they should be divided, and divides a range having a multirange definition into a plurality of multiranges according to the multirange definition; Of the records saved in the file, the records registered in the range divided into two automatic division ranges , Re-register to the corresponding automatic division range according to the range key value of that record, and re-register the record registered to the range divided into multi-ranges to the corresponding multi-range according to the range key value of that record. And a range dividing device.
【請求項4】 前記レコード退避手段は、各レンジ毎
に、そのレンジに登録されているレコードのレンジキー
値をソートし、ソート結果と前記レンジのレコード件数
とに基づいてレンジキー平均値を求める構成を備えたこ
とを特徴とする請求項3記載のレンジ分割装置。
4. The record saving means sorts the range key values of the records registered in each range for each range, and obtains the range key average value based on the sorting result and the number of records in the range. 4. The range dividing device according to claim 3, further comprising a configuration.
【請求項5】 複数のレンジに分割されたデータベース
を備えたコンピュータを、 利用者によって指示されたレンジに対して、そのレンジ
を利用者によって指示された複数のマルチレンジに分割
する際の、レコードのレンジキー値とマルチレンジとの
対応関係を定義したマルチレンジ定義を設定するマルチ
レンジ定義手段、 各レンジに登録されているレコードをレコード退避ファ
イルに退避させる際、前記各レンジ毎に、そのレンジに
割り当てられているレンジキー値が2つ以上で ある場合
には、そのレンジに登録されているレコード件数をほぼ
2等分するレンジキー値であるレンジキー平均値を求め
るレコード退避手段、 該レコード退避手段が求めた各レンジのレコード件数と
予め定められている条件とに基づいて、前記各レンジそ
れぞれについて分割すべきであるか否かを判断し、分割
すべきであると判断し且つマルチレンジ定義が設定され
ていないレンジを、そのレンジのレンジキー平均値に従
って2つの自動分割レンジに分割し、分割すべきである
と判断し且つマルチレンジ定義がされているレンジをマ
ルチレンジ定義に従って複数のマルチレンジに分割する
自動レンジ分割手段、 前記レコード退避ファイルに退避させられているレコー
ドの内、2つの自動分割レンジに分割されたレンジに登
録されていたレコードを、そのレコードのレンジキー値
に従って該当する自動分割レンジに登録し直し、マルチ
レンジに分割されたレンジに登録されていたレコード
を、そのレコードのレンジキー値に従って該当するマル
チレンジに登録し直すレコード復元手段、 として機能させるためのプログラムを記録した機械読み
取り可能な記録媒体。
5. A record when a computer having a database divided into a plurality of ranges is divided into a plurality of ranges designated by a user, and the range is divided into a plurality of multi-ranges designated by the user. Multi-range definition means that sets the multi-range definition that defines the correspondence between the range key value and the multi-range, and when saving the records registered in each range to the record save file, for each range , To
If the range key value assigned is two or more
Is a record saving means for obtaining a range key average value that is a range key value that divides the number of records registered in that range into two equal parts, and the number of records in each range obtained by the record saving means is predetermined. Based on the conditions that exist, it is determined whether or not each of the ranges should be divided, the range that is determined to be divided, and the range for which the multi-range definition is not set is the range key average of that range. An automatic range dividing unit that divides into two automatic division ranges according to a value, determines that they should be divided, and divides a range having a multirange definition into a plurality of multiranges according to the multirange definition; Of the saved records, the records registered in the range divided into two automatic division ranges are A record restoring means that re-registers the corresponding automatic division range according to the range key value of the record, and re-registers the record registered in the range divided into the multi-range into the corresponding multi range according to the range key value of the record. A machine-readable recording medium having a program recorded thereon to function as.
JP16600598A 1998-05-29 1998-05-29 Range division method and device, and machine-readable recording medium recording program Expired - Fee Related JP3451938B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16600598A JP3451938B2 (en) 1998-05-29 1998-05-29 Range division method and device, and machine-readable recording medium recording program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16600598A JP3451938B2 (en) 1998-05-29 1998-05-29 Range division method and device, and machine-readable recording medium recording program

Publications (2)

Publication Number Publication Date
JPH11345157A JPH11345157A (en) 1999-12-14
JP3451938B2 true JP3451938B2 (en) 2003-09-29

Family

ID=15823128

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16600598A Expired - Fee Related JP3451938B2 (en) 1998-05-29 1998-05-29 Range division method and device, and machine-readable recording medium recording program

Country Status (1)

Country Link
JP (1) JP3451938B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06139119A (en) * 1992-10-28 1994-05-20 Hitachi Ltd System and method for managing data base
JP3367140B2 (en) * 1993-04-28 2003-01-14 株式会社日立製作所 Database management method
JPH09218858A (en) * 1996-02-14 1997-08-19 Hitachi Ltd Distributed type data base control system

Also Published As

Publication number Publication date
JPH11345157A (en) 1999-12-14

Similar Documents

Publication Publication Date Title
JP4160632B2 (en) A parallel processing device for traversing a database
US6012069A (en) Method and apparatus for retrieving a desired image from an image database using keywords
US5845273A (en) Method and apparatus for integrating multiple indexed files
US5546517A (en) Apparatus for determining the structure of a hypermedia document using graph partitioning
JP2003500748A (en) Method and apparatus for selecting aggregate level and cross-product level in a data warehouse
KR20020034998A (en) Method and apparatus for populating multiple data marts in a single aggregation process
US6006278A (en) Method and system for importing remote functions to a network computer
US7289974B2 (en) System and method for data reconciliation
US5884321A (en) Document image and query management system for application databases
US5920866A (en) Process and system for generating shared value lists for databases
US7877386B2 (en) Business object search method process and presentation
JP3451938B2 (en) Range division method and device, and machine-readable recording medium recording program
KR101137056B1 (en) Commodity information registering method and system which uses automatic commodity model suggesting logic
JP2980067B2 (en) Document categorizing apparatus and machine-readable recording medium recording program
US7092932B1 (en) System and method for providing an intelligent database access searching
US6643632B1 (en) Data processing system and computer-readable recording medium recorded with a program for causing a computer to process data
US9767313B2 (en) Method for automated separation and partitioning of data in a payroll and resource planning system
JP2001084271A (en) Information retrieving device, algorithm updating method thereof and computer-readable storage medium
JP2004192221A (en) Document retrieval processing method and device, and recording medium with the method recorded
US5819253A (en) Database retrieval system having a plurality of independent input modes for database retrieval conditions
JP3372977B2 (en) Machine translation system
JP4194141B2 (en) File management apparatus, file management method, and storage medium
US20200371678A1 (en) Graphical user interface for refocusing the scope of a series of queries
CN117130937A (en) Test case processing method, device, electronic equipment and storage medium
JPH10240794A (en) Device for preparing specification and method therefor

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070718

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080718

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090718

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100718

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110718

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees