JPS62287350A - Index integrally updating system - Google Patents

Index integrally updating system

Info

Publication number
JPS62287350A
JPS62287350A JP61132154A JP13215486A JPS62287350A JP S62287350 A JPS62287350 A JP S62287350A JP 61132154 A JP61132154 A JP 61132154A JP 13215486 A JP13215486 A JP 13215486A JP S62287350 A JPS62287350 A JP S62287350A
Authority
JP
Japan
Prior art keywords
index
record
update
update information
data
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.)
Pending
Application number
JP61132154A
Other languages
Japanese (ja)
Inventor
Kazumasa Iwamoto
岩本 和真
Atsushi Kitazawa
敦 北澤
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
NEC Solution Innovators Ltd
Original Assignee
NEC Corp
NEC Solution Innovators Ltd
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, NEC Solution Innovators Ltd filed Critical NEC Corp
Priority to JP61132154A priority Critical patent/JPS62287350A/en
Publication of JPS62287350A publication Critical patent/JPS62287350A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decrease a block read request and a write request by holding the updating information of an index accompanied to the updating of a data record, as a sort record, in case of updating the data record, and updating an index file in the order of a key value integrally after updating the data record. CONSTITUTION:A sort record group on an index record updating information storage means 5 rearranged by a sorting means 4 is read successively by an index record reading means 6, and an index on an index file 8 is updated by an index updating means 7. The index updating means 7 updates the index record existing on the index file 8 in accordance with an updating processing identifier 65, while an index identifier 61 has the same value.

Description

【発明の詳細な説明】 3、発明の詳細な説明 (産業上の利用分野) 本発明は、インデックスを利用したアクセス手段を備え
たデータファイルの更新方式に関する。
Detailed Description of the Invention 3. Detailed Description of the Invention (Field of Industrial Application) The present invention relates to a data file update method provided with access means using an index.

(従来の技術) 従来、データファイルの検索効率を向上させるためのイ
ンデックスファイルを備えたデータファイルにおいて1
、データレコードを更新する際にデータレコードの各フ
ィールドが更新されれば、それに付随するインデックス
ファイルも同時lこ更新していた。
(Prior Art) Conventionally, in a data file equipped with an index file for improving data file search efficiency, 1
When updating a data record, if each field of the data record is updated, the associated index file is also updated at the same time.

インデックスレコードをいくつかまとめてひとつのブロ
ックとし、入出力処理を前記ブロック単位で行うインデ
ックスファイルを想定した場合、単位インデックスレコ
ードの更新を、第9図を利用して説明すると次の5ステ
ツプに示すようになる。
Assuming an index file where several index records are grouped together into one block and input/output processing is performed in units of blocks, updating of unit index records can be explained using Figure 9 as shown in the following five steps. It becomes like this.

第1ステツプでは、上位レベルブロック91を読込む。In the first step, the upper level block 91 is read.

第2ステツプでは、更新するインデックスレコードの更
新処理が「削除」、あるいは「変更」であれば、キー値
が含まれる下位レベルブロックの管理レコード92を見
出し、いっぽう、更新処理が「追加」であれば、インデ
ックスレコードを格納する下位レベルブロックの管理レ
コード92を見出す。
In the second step, if the update process of the index record to be updated is "delete" or "change", the management record 92 of the lower level block containing the key value is found; on the other hand, if the update process is "add" For example, it finds the management record 92 of the lower level block that stores the index record.

第3ステツプでは、下位レベルブロック管理レコード9
2が示す最下位レベルブロック93を読込む〇 第4ステツプでは、更新処理が「削除」であれば最下位
レベルブロック93のインデックスレコード9Gを削除
し、更新処理が「変更」であれば最下位レベルブロック
93のインデックスレコード94を変更し、更新処理が
「追加」であれば最下位レベルブロック93にインデッ
クスレコード95を追加する。
In the third step, the lower level block management record 9
Read the lowest level block 93 indicated by 2. In the fourth step, if the update process is "delete", the index record 9G of the lowest level block 93 is deleted, and if the update process is "change", the lowest level block 93 is read. The index record 94 of the level block 93 is changed, and if the update process is "add", the index record 95 is added to the lowest level block 93.

第5ステツプでは、最下位レベルブロック93を書込む
In the fifth step, the lowest level block 93 is written.

上記インデックスレコードの更新において、2回のブロ
ック読込み要求と1回のブロック書込み要求とが発生す
る。
In updating the index record, two block read requests and one block write request occur.

このようなインデックスレコードの更新手段は、データ
レコードの更新層外に対応してインデックスレコードを
保守するためにインデックスファイル上に格納されるイ
ンデックスレコードがキー値の順に並んでいる性質を利
用していない。
This method of updating index records does not utilize the property that index records stored in an index file are arranged in the order of key values in order to maintain index records in response to data records outside the update layer. .

(発明が解決しようとする問題点) 従来のインデックス更新方式では、データレコードをル
コードだけ更新した場合には、更新されたフィ゛−ルド
に対応するインデックスがひとつだけであっても、2回
のブロック読込み要求と、1回のブロック書込み要求と
が発生する。
(Problem to be Solved by the Invention) In the conventional index update method, when only the field code of a data record is updated, even if there is only one index that corresponds to the updated field, it is necessary to update the data record twice. A block read request and one block write request occur.

もし1次に更新されるインデックスレコードが現在処理
したブロックに格納されるか、あるいは格納されている
ことが保証されているとすれば、次に更新されるインデ
ックスレコードの更新では、上記インデックスレコード
更新手段のうち、第4ステツプの手続きのみが必要とな
る。
If the index record to be updated first is stored in the currently processed block, or is guaranteed to be stored in the currently processed block, then in updating the index record to be updated next, the above index record will be updated. Of the methods, only the fourth step is required.

この場合、ブロックの読込み要求と、書込み要求とはと
もに発生しない。
In this case, neither a block read request nor a block write request occurs.

本発明の目的は、データレコードを更新する際、それに
伴うインデックスの更新情報をソートレコードとして保
持し、データレコードの更新後に一括してキー値順にイ
ンデックスファイルを更新することにより上記欠点を除
去し、ブロック読込み要求と書込み要求とを減少させる
ことができるように構成したインデンクス一括更新方式
を提供することにある。
An object of the present invention is to eliminate the above-mentioned drawbacks by retaining the accompanying index update information as a sort record when updating a data record, and updating the index file in the order of key values all at once after updating the data record. An object of the present invention is to provide an index batch update method configured to reduce block read requests and write requests.

(問題点を解決するための手段) 本発明によるインデックス一括更新方式はデータレコー
ド更新処理手段と、インデックスレコード更新情報生成
手段と、ソートレコード記憶手段と、ソート手段と、イ
ンデックスレコード更新情報読込み手段と、インデック
ス更新手段とを具備して構成したものである。
(Means for Solving the Problems) The index batch update method according to the present invention includes a data record update processing means, an index record update information generation means, a sort record storage means, a sorting means, and an index record update information reading means. , and index updating means.

データレコード更新処理手段は、1個あるいは複数個の
インデックスをもつデータファイル上のデータレコード
を更新するためのものである。
The data record update processing means is for updating data records on a data file having one or more indexes.

インデックスレコード更新情報生成手段は、上記データ
レコード更新処理手段によって更新された少なくとも複
数データレコードに対する1個、あるいは複数個のイン
デックスを更新するために、更新されたデータレコード
の更新されたフィールド値をキー値とし、更新されたデ
ータレコードのデータファイル上のアドレスをポインタ
値としたインデックスレコードに対して、データレコー
ドの各フィールドに対応するインデックス識別子と、更
新されたデータレコードの更新順位と、インデックスレ
コードの更新方式識別子とを付加したインデックスレコ
ード更新情報を生成するためのものである。
The index record update information generation means uses the updated field value of the updated data record as a key in order to update one or more indexes for at least a plurality of data records updated by the data record update processing means. For an index record whose pointer value is the address on the data file of the updated data record, the index identifier corresponding to each field of the data record, the update order of the updated data record, and the index record's address. This is for generating index record update information to which an update method identifier is added.

ソートレコード記憶手段は、上記インデックスレコード
更新手段により生成されたインデックスレコード更新情
報をソートレコードとして記憶するためのものである。
The sort record storage means is for storing the index record update information generated by the index record update means as a sort record.

ソート手段は、上記ソートレコード記憶手段に格納され
ているソートレコードに対して、上記インデックスレコ
ード更新情報生成手段によって付加されたインデックス
識別子を第1のキーとし、インデックスレコードのキー
値を第2のキーとし、上記インデックスレコード更新情
報生成手段によって付加され、更新されたデータレコー
ドの更新順位を第3のキーとして並び換えるためのもの
である。
The sorting means uses the index identifier added by the index record update information generation means as a first key and the key value of the index record as a second key for the sort records stored in the sort record storage means. This is used to rearrange the update order of data records added and updated by the index record update information generating means as a third key.

インデックスレコード更新情報読込み手段は。How to read index record update information.

上記ソートレコード記憶手段から上記ソート手段によっ
て並換えたソートレコードを読込み、インデックスレコ
ード更新情報を取込むためのものである。
This is for reading the sorted records rearranged by the sorting means from the sorting record storage means and fetching index record update information.

インデックス更新手段は、上記インデックスレコード更
新情報読込み手段によって読込まれたインデックスレコ
ード更新情報をもとにインデックス識別子で示されるイ
ンデックスファイルを一括して更新するためのものであ
る。
The index update means is for collectively updating the index files indicated by the index identifiers based on the index record update information read by the index record update information reading means.

(実施例) 次に、本発明の一実施例について図面を参照して説明す
る。
(Example) Next, an example of the present invention will be described with reference to the drawings.

第1図は、本発明によるインデックス一括更新方式を実
現する一実施例を示すブロック構成図である。
FIG. 1 is a block diagram showing an embodiment of the index batch update method according to the present invention.

第1図において、1はデータファイル、2はデータレコ
ード更新処理手段、3はインデックスレコード更新情報
生成手段、4はソート手段、5はソートレコード記憶手
段、6はインデックスレコード更新情報読込み手段、7
はインデックス更新手段、8はインデックスファイルで
ある。
In FIG. 1, 1 is a data file, 2 is a data record update processing means, 3 is an index record update information generation means, 4 is a sorting means, 5 is a sort record storage means, 6 is an index record update information reading means, and 7
8 is an index update means, and 8 is an index file.

第2図は、第1図に示す実施例におけるデータレコード
形式を示す説明図である。
FIG. 2 is an explanatory diagram showing the data record format in the embodiment shown in FIG.

本実施例のデータレコード形式は第2図に示すようにA
フィールド10と、Bフィールド11と、Cフィールド
12と、Dフィールド13との4つのフィールドから成
り、Bフィールド11と、Dフィールド13との2つの
フィールドがそれぞれインデックスをもっている。
The data record format of this embodiment is A as shown in Figure 2.
It consists of four fields: field 10, B field 11, C field 12, and D field 13, and two fields, B field 11 and D field 13, each have an index.

本実施例による更新前のデータレコード群を第3図に示
し、更新後のデータレコード群を第4図に示す。
FIG. 3 shows a data record group before updating according to this embodiment, and FIG. 4 shows a data record group after updating.

各フィールドのサフィックスは並びの順番を示している
The suffix of each field indicates the order of arrangement.

第3図のデータレコード群に加エラしたデータレコード
更新処理を、第5図に示す。
FIG. 5 shows a data record update process in which errors are added to the data record group of FIG. 3.

更新ノ験 1番のデータレコード更新処理は、アドレス
P1のデータレコードを削除するものである。
Update Experience The first data record update process is to delete the data record at address P1.

更新順 2番のデータレコード更新処理は、アドレスP
2のデータレコードのフィールドBの値を「B2」から
「B5」に変更し、フィールドDの値を「B2」から「
B5」に変更するものである。
Update order The second data record update process is for address P.
Change the value of field B in data record 2 from "B2" to "B5", and change the value of field D from "B2" to "
B5".

更新順 3番はそれぞれフィールドAの値がrA4J、
フィールドBの値が「B4」、フィールドCの値が「C
4」、フィールドDの値が「D4」である新しいデータ
レコードを追加する処理である。
Update order No. 3 has the value of field A rA4J,
The value of field B is "B4", the value of field C is "C"
4", and the value of field D is "D4". This is the process of adding a new data record.

上記データレコード更新処理に伴って、インデックスレ
コード更新情報生成手段3が作成すべきソートレコード
形式を第6図に示す。
FIG. 6 shows the sort record format to be created by the index record update information generating means 3 in conjunction with the data record update process.

データレコードのインデックスを備えたフィールドに対
応するインデックス識別子61とキー値62と、データ
レコードのデータファイル1上における格納位置を示す
アドレスに対応して決定されるポインタ値63と、デー
タレコードの更新順とインデックスレコードの更新順と
を対応ずけるための更新順位64と、データレコードの
更新方法とインデックスレコードの更新方法を対応ずけ
るための更新処理識別子65とから成る。
An index identifier 61 and a key value 62 corresponding to the field with the index of the data record, a pointer value 63 determined corresponding to the address indicating the storage position of the data record on the data file 1, and the update order of the data record. and an update order 64 for associating the update order of the index record with the update order of the index record, and an update process identifier 65 for associating the update method of the data record with the update method of the index record.

第7図jま、インデックスレコード更新情報生成手段3
によって生成されたインデックスレコード更新情報群で
ある。第7図において、71〜78はそれぞれインデッ
クスレコード更新情報である。
Figure 7: Index record update information generation means 3
This is a group of index record update information generated by. In FIG. 7, 71 to 78 are index record update information, respectively.

次に、第1図に戻って各要素の概要を説明する。Next, referring back to FIG. 1, an overview of each element will be explained.

データレコード更新手段2は、1個あるいは複数個のイ
ンデックスを備えたデータファイル1上のデータレコー
ドを更新する。
Data record updating means 2 updates data records on data file 1 having one or more indexes.

インデックスレコード更新情報生成手段3は、上記デー
タレコード更新処理手段2によって更新された少なくと
も複数のデータレコードのインデックスのキー値となっ
ているフィールドがデータレコードの更新に伴って更新
されているときに限りフィールド値をキー値62とし、
データレコードのデータファイル1上のアドレスをポイ
ンタ63としたインデックスレコードを生成し、上記生
成されたインデックスレコードに対してデータレコード
の各フィールドに対応するインデックス識別子61と、
データレコードの更新順位64と、更新処理がデータレ
コードの削除であれば削除処理識別子とし、データレコ
ードの追加であれば追加処理識別子とし、データレコー
ドの変更であれば削除処理識別子と追加処理識別子とに
分割することによって決定された更新処理識別子65と
を付加したインデックスレコード更新情報を生成する。
The index record update information generation means 3 generates information only when the field serving as the key value of the index of at least a plurality of data records updated by the data record update processing means 2 is updated in accordance with the update of the data records. Set the field value to key value 62,
Generate an index record with the address on the data file 1 of the data record as a pointer 63, and add an index identifier 61 corresponding to each field of the data record to the generated index record,
The update order 64 of the data record, if the update process is to delete a data record, it is a deletion process identifier, if a data record is added, it is an addition process identifier, and if a data record is changed, it is a deletion process identifier and an addition process identifier. The index record update information to which the update processing identifier 65 determined by dividing the index record is added is generated.

ソート手段4は、インデックス識別子61を第1のキー
とし、インデックスレコードのキー値62を第2のキー
とし、データレコードの更新順位64を第3のキーとし
て上記ソートレコード記憶手段5に格納されているソー
トレコードを並換える。
The sorting means 4 uses the index identifier 61 as a first key, the key value 62 of the index record as a second key, and the update order 64 of the data record as a third key, which are stored in the sort record storage means 5. Sort the existing sort records.

ソートレコード記憶手段5は、インデックスレコード更
新情報によりデータレコードカラ生成したソートレコー
ドを並び換えるための作業用記憶手段である。
The sort record storage means 5 is a working storage means for rearranging the sort records generated from the data records based on the index record update information.

インデックスレコード更新情報読込み手段6は、前記ソ
ートレコード記憶手段5からソート後のソートレコード
を読込み、インデックスレコード更新情報を取込む。
The index record update information reading means 6 reads the sorted records from the sort record storage means 5 and takes in the index record update information.

インデックス更新手段7は、上記インデックスレコード
更新情報読込み手段6によって読込まれたインデックス
レコード更新情報をもとにインデックス識別子61によ
って示されるインデックスファイル8上のインデックス
レコードを、インデックスレコード更新情報に従ってキ
ー値順に一括更新する。
The index update means 7 collectively updates the index records in the index file 8 indicated by the index identifier 61 based on the index record update information read by the index record update information reading means 6 in order of key value according to the index record update information. Update.

インデックスファイル8は、データレコードから生成さ
れたインデックスを格納するファイルである。
The index file 8 is a file that stores an index generated from data records.

以上、第1図に記載した各要素の概要である。The above is an overview of each element shown in FIG.

第3図のデータレコード群に対して、第5図の更新処理
が加えられることを想定したとき、本方式によるインデ
ックス更新手順は第1の処理から第3の処理に至るまで
以下の通りである。
Assuming that the update process shown in Figure 5 is applied to the data record group shown in Figure 3, the index update procedure according to this method from the first process to the third process is as follows. .

第1に、インデックス更新情報の生成について記述する
First, generation of index update information will be described.

更新順 1番の更新処理は、削除処理である。Update order: The first update process is a deletion process.

フィールドBに付加されにインデックスの識別子である
「インデックスB」を、インデックスレコード更新情報
のインデックス識別子61とする。
The index identifier "index B" added to field B is assumed to be the index identifier 61 of the index record update information.

フィールドBの値である「B1」を、インデツクスレコ
ード更新情報のキー値62とする。
The value of field B, "B1", is assumed to be the key value 62 of the index record update information.

データレコードのアドレスである「Pl」を、インデッ
クスレコード更新情報のポインタ値63とする。
Let "Pl", which is the address of the data record, be the pointer value 63 of the index record update information.

更新順位64を「1」とし、更新処理識別子65を「削
除」とする。
The update order 64 is set to "1", and the update process identifier 65 is set to "delete".

この結果、インデックスレコード更新情報71が生成さ
れる。
As a result, index record update information 71 is generated.

このインデックスレコード更新情報がソートレコードと
して、ソートレコード記憶手段5に格納される。
This index record update information is stored in the sort record storage means 5 as a sort record.

インデックスDについても同様のインデックスレ;−ド
更新情報生成手段3を適用することにより、新たなイン
デックスレコード更新情報72が生成される。
By applying the same index record update information generating means 3 to index D, new index record update information 72 is generated.

更新順 2番の更新処理は、変更処理である。Update order: The second update process is a change process.

フィールドBに付加されたインデックスの識別子である
「インデックスB」を、インデックスレコード更新情報
のインデックス識別子61とする。
"Index B", which is the index identifier added to field B, is assumed to be the index identifier 61 of the index record update information.

フィールドBの変更前の値である「B2」を、インデッ
クスレコード更新情報のキー値62とする。
"B2", which is the value of field B before the change, is set as the key value 62 of the index record update information.

データレコードのアドレスである「B2」を、インデッ
クスレコード更新情報のポインタ値63とする。
"B2", which is the address of the data record, is set as the pointer value 63 of the index record update information.

更新順位64を「2」とし、更新処理識別子65を「削
除」とする。
The update order 64 is set to "2", and the update process identifier 65 is set to "delete".

この結果、インデックスレコード更新情報73が生成さ
れる。
As a result, index record update information 73 is generated.

次に、フィールドBに付加されたインデックスの識別子
である「インデックスB」を、インデックスレコード更
新情報のインデックス識別子61とする。
Next, "index B", which is the index identifier added to field B, is set as the index identifier 61 of the index record update information.

フィールドBの変更後の値である「B5」を、インデッ
クスレコード更新情報のキー[62とTる。
The changed value of field B, "B5", is set as the key [62] of the index record update information.

データレコードのアドレスである「B2」を、インデッ
クスレコード更新情報のポインタ値63とする。
"B2", which is the address of the data record, is set as the pointer value 63 of the index record update information.

更新順位64を「2」とし、更新処理識別子65を「追
加」とする。
The update order 64 is set to "2", and the update process identifier 65 is set to "add".

この結果、インデックスレコード更新情報74が生成さ
れる。
As a result, index record update information 74 is generated.

インデックスDについても同様のインデックスレコード
更新情報生成手段3を適用することにより、新たなイン
デックスレコード更新情報75.76が生成される。
By applying the same index record update information generating means 3 to index D, new index record update information 75 and 76 are generated.

更新順 3番の更新処理は、追加処理である。Update order: The third update process is an additional process.

フィールドBに付加されたインデックスの識別子である
「インデックスB」を、インデックスレコード更新情報
のインデックス識別子61とする。
"Index B", which is the index identifier added to field B, is assumed to be the index identifier 61 of the index record update information.

追加するデータレコードのフィールドBの値である「B
4」を、インデックスレコード更新情報のキー値62と
する。
"B", which is the value of field B of the data record to be added.
4'' is the key value 62 of the index record update information.

データレコードのアドレスである「B4」を、インデッ
クスレコード更新情報のポインタ値63とする。
"B4", which is the address of the data record, is set as the pointer value 63 of the index record update information.

更新順位64を「3」々し、更新処理識別子65を「追
加」とする。
The update order 64 is set to "3" and the update process identifier 65 is set to "add".

この結果インデックスレコード更新情報77が生成され
る。
As a result, index record update information 77 is generated.

インデックスDについても同様のインデックスレ;−ド
更新情報生成手段3を適用することにより、新たなイン
デックスレコード更新情報78が生成される。
By applying the same index record update information generating means 3 to index D, new index record update information 78 is generated.

第2に、インデックスレコード更新情報のソートについ
て記述する。
Second, sorting of index record update information will be described.

インデックスレコード更新情報生成手段3により生成さ
れたインデックスレコード更新情報記憶手段5上のソー
トレコード群に対して、ソート手段4ではインデックス
識別子61を第1キーとし、キー値62を第2キーとし
、更新順位64を第3キーとして並び換える。
The sorting means 4 updates the sorted records on the index record update information storage means 5 generated by the index record update information generation means 3 with the index identifier 61 as the first key and the key value 62 as the second key. Sort with rank 64 as the third key.

並び換えの終了後の状態が、第8図(a)である。The state after the rearrangement is completed is shown in FIG. 8(a).

第3に、インデックスファイルの更新について記述する
Third, updating of the index file will be described.

ソート手段4によって並び換えられたインデツクスレコ
ード更新情報記憶手段5上のソートレコード群を、イン
デックスレコード読込み手段6により順次読込み、イン
デックス更新手段7によりてインデックスファイル8上
のインデックスを更新する。
The sorted records on the index record update information storage means 5 that have been sorted by the sorting means 4 are sequentially read by the index record reading means 6, and the index on the index file 8 is updated by the index updating means 7.

インデックス更新手段7は、インデックス識別子61が
同一の値である間、同一のインデックスファイル8上に
存在するインデックスレコードを更新処理識別子65に
従って更新する。
The index update means 7 updates index records existing on the same index file 8 according to the update processing identifier 65 while the index identifier 61 has the same value.

同一のインデックスファイル内では、インデックスレコ
ード更新情報上のキー値が変化した時点で、新しいキー
値を現在処理中のブロックで処理できるか否かが判断さ
れる。
Within the same index file, when a key value on index record update information changes, it is determined whether the new key value can be processed in the block currently being processed.

現在処理中の最下位ブロックの最大キー値よりもインデ
ックスレコード更新情報上の新しいキー値が小さい場合
には、現在処理中のブロックで処理することが可能であ
る。
If the new key value on the index record update information is smaller than the maximum key value of the lowest block currently being processed, it is possible to process the block currently being processed.

処理が不可能な場合には、現在処理中のブロックを曹込
んだ後、上位のブロックからインデックスファイルをサ
ーチすることにより新しい処理ブロックを決定する。
If processing is not possible, the block currently being processed is eliminated and a new block to be processed is determined by searching the index file starting from the upper blocks.

第8図(b)は更新前のインデックスBを示し、第8図
<c)は前記第1の処理の記述から第3の処理の記述に
よる手続きに従って更新された更新後のインデックスB
を示している。
FIG. 8(b) shows the index B before updating, and FIG. 8<c) shows the index B after updating according to the procedure from the first processing description to the third processing description.
It shows.

(発明の効果) 本発明はフィールドに対応して、データレコードの更新
に伴うインデックスの更新処理をインデックス識別子と
、更新方式識別子と、更新順位識別子とを付加したソー
トレコードの作成にII換えることによって、インデッ
クスの一括更新時にはインデックス更新情報がキー値順
にソートされていることから、読込みブロックの数およ
び書込みブロック数を削減することが可能である。
(Effects of the Invention) The present invention replaces the index update process associated with data record update with the creation of a sort record to which an index identifier, an update method identifier, and an update order identifier are added in accordance with the field. Since the index update information is sorted in the order of key values when the index is updated at once, it is possible to reduce the number of read blocks and the number of write blocks.

本発明の効果は数式によれば、次のように要約される。The effects of the present invention can be summarized as follows according to a mathematical formula.

インデックスを最上位ブロックから最下位ブロックまで
サーチする際のブロック読込み要求数と、最下位ブロッ
クを書込む際のブロック書込み要求数の和をTとする。
Let T be the sum of the number of block read requests when searching an index from the highest block to the lowest block and the number of block write requests when writing the lowest block.

従来の方式では、1インデツクスレコードを更新すると
必ずT回だけのブロック読込み要求と書込み要求とが発
生するので、更新されたすべてのインデックスレコード
件数をNuとすれば、全体でTXNuの読込み/書込み
ブロック数が得られる。
In the conventional method, updating one index record always generates T block read requests and T write requests, so if Nu is the number of all updated index records, the total number of reads/writes is TXNu. The number of blocks is obtained.

本発明の方式によれば、Tはたかだか最下位インデック
スブロックの個数回だけ発生するだけであるので、読込
みブロックの数と、書込みブロック数との和は、1ブロ
ツクに格納されるインデックスレコード:数をfとし、
インデックスレコードの全件数をNとして。
According to the method of the present invention, T occurs only as many times as the lowest index block, so the sum of the number of read blocks and the number of write blocks is the number of index records stored in one block. Let f be
Let N be the total number of index records.

+ たかだか Tx(N/f)  である。ここで、十 〔〕 は、切上げを表わす。+ It is at most Tx (N/f). Here, ten [ ] represents rounding up.

例えば、インデックスレコードの全件数を100万件と
し、1ブロツクに格納されるインデックスレコードの数
を100とし、全体の1割にあたる10万件のインデッ
クスレコードが更新されたものと仮定すれば、読込みブ
ロックの数および書込みブロック数の和の比率は、従来
の方式と本発明の方式とで + Nu:(N/f)  = 100000  :  10
000=10:1 となる。
For example, assuming that the total number of index records is 1 million, the number of index records stored in one block is 100, and that 100,000 index records, which is 10% of the total, have been updated, the read block The ratio of the sum of the number of blocks and the number of write blocks is + Nu: (N/f) = 100000: 10 between the conventional method and the method of the present invention.
000=10:1.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は、本発明によるインデックス一括更新方式の一
実施例を示すブロック構成図である。 第2図は、第1図に示す実施例におけるデータレコード
形式を示す説明図である。 第3図は、更新前のデータレコード形式を示す説明図で
ある。 第4図は、更新後のデータレコード形式を示す説明図で
ある。 第5図は、デ・−タフアイルに加えられた更新を示す説
明図である。 第6図は、ソートレコード形式を示す説明図である。 第7図は、第1図に示す実施例におけるソートレコード
群を示す説明図である。 第8図(a)は、並べ換え後のソートレコード群を示す
説明図であり、第8図(b)は更新前のインデックスB
を示す説明図であり、第8図(C)は更新後のインデッ
クスBを示す説明図である。 第9図は、インデックス構造の例を示す説明図である。 1・・・データファイル 2・・・データレコード更新処理手段 3・・・インデックスレコード更新情報生成手段4・・
・ソート手段 5・・・ンートレコード記憶手段 6・・・インデックスレコード更新情報読込み手段 7・・・インデックス更新手段 8・・・インデックスファイル 10〜13・・・フィールド 61・・・インデックス識別子 62・・・キー値      63・・・ポインタ値6
4・・・更新順位 65・・・更新処理識別子
FIG. 1 is a block diagram showing an embodiment of the index batch update method according to the present invention. FIG. 2 is an explanatory diagram showing the data record format in the embodiment shown in FIG. FIG. 3 is an explanatory diagram showing the data record format before update. FIG. 4 is an explanatory diagram showing the updated data record format. FIG. 5 is an explanatory diagram showing updates made to the data file. FIG. 6 is an explanatory diagram showing the sort record format. FIG. 7 is an explanatory diagram showing a sort record group in the embodiment shown in FIG. FIG. 8(a) is an explanatory diagram showing the sorted record group after sorting, and FIG. 8(b) is an explanatory diagram showing the index B before updating.
FIG. 8(C) is an explanatory diagram showing the updated index B. FIG. FIG. 9 is an explanatory diagram showing an example of an index structure. 1...Data file 2...Data record update processing means 3...Index record update information generation means 4...
Sorting means 5... Index record storage means 6... Index record update information reading means 7... Index updating means 8... Index files 10 to 13... Field 61... Index identifier 62...・Key value 63...Pointer value 6
4...Update order 65...Update process identifier

Claims (1)

【特許請求の範囲】[Claims] 1個あるいは、複数個のインデックスをもつデータファ
イル上のデータレコードを更新するためのデータレコー
ド更新処理手段と、前記データレコード更新処理手段に
よって更新された少なくとも複数データレコードに対す
る1個あるいは複数個のインデックスを更新するために
、前記更新されたデータレコードの更新されたフィール
ド値をキー値とし、前記更新されたデータレコードのデ
ータファイル上のアドレスをポインタ値としたインデッ
クスレコードに対して、データレコードの各フィールド
に対応するインデックス識別子と、更新されたデータレ
コードの更新順位と、インデックスレコードの更新方式
識別子とを付加したインデックスレコード更新情報を生
成するためのインデックスレコード更新情報生成手段と
、前記インデックスレコード更新手段により生成された
インデックスレコード更新情報をソートレコードとして
記憶するためのソートレコード記憶手段と、前記ソート
レコード記憶手段に格納されているソートレコードに対
して前記インデックスレコード更新情報生成手段によっ
て付加されたインデックス識別子を第1のキーとし、イ
ンデックスレコードのキー値を第2のキーとし、前記イ
ンデックスレコード更新情報生成手段によって付加され
、更新されたデータレコードの更新順位を第3のキーと
して並換えるためのソート手段と、前記ソートレコード
記憶手段から前記ソート手段によって並換えたソートレ
コードを読込み、インデックスレコード更新情報を取込
むためのインデックスレコード更新情報読込み手段と、
前記インデックスレコード更新情報読込み手段によって
読込まれたインデックスレコード更新情報をもとにイン
デックス識別子で示されるインデックスファイルを一括
して更新するためのインデックス更新手段とを具備して
構成したことを特徴とするインデックス一括更新方式。
a data record update processing means for updating a data record on a data file having one or more indexes; and one or more indexes for at least the plurality of data records updated by the data record update processing means. In order to update the index record, the updated field value of the updated data record is used as the key value, and the address on the data file of the updated data record is used as the pointer value. Index record update information generation means for generating index record update information to which an index identifier corresponding to a field, an update order of an updated data record, and an index record update method identifier are added; and the index record update means. a sort record storage means for storing the index record update information generated by the index record storage means as a sort record; and an index identifier added by the index record update information generation means to the sort records stored in the sort record storage means. a first key, a key value of the index record as a second key, and a sorting means for sorting the update order of data records added and updated by the index record update information generating means as a third key. and index record update information reading means for reading the sort records rearranged by the sorting means from the sort record storage means and importing index record update information;
An index comprising an index updating means for collectively updating index files indicated by index identifiers based on the index record update information read by the index record update information reading means. Batch update method.
JP61132154A 1986-06-06 1986-06-06 Index integrally updating system Pending JPS62287350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61132154A JPS62287350A (en) 1986-06-06 1986-06-06 Index integrally updating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61132154A JPS62287350A (en) 1986-06-06 1986-06-06 Index integrally updating system

Publications (1)

Publication Number Publication Date
JPS62287350A true JPS62287350A (en) 1987-12-14

Family

ID=15074621

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61132154A Pending JPS62287350A (en) 1986-06-06 1986-06-06 Index integrally updating system

Country Status (1)

Country Link
JP (1) JPS62287350A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02190971A (en) * 1989-01-20 1990-07-26 Nec Corp Index updating system
JPH08147328A (en) * 1994-11-15 1996-06-07 Hitachi Ltd Method and device for retrieving document
JPH08235217A (en) * 1995-02-24 1996-09-13 Pioneer Electron Corp Data retrieval and output device and karaoke device
JPH1139326A (en) * 1997-07-22 1999-02-12 Hitachi Ltd High speed document registration/retrieval method and device therefor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02190971A (en) * 1989-01-20 1990-07-26 Nec Corp Index updating system
JPH08147328A (en) * 1994-11-15 1996-06-07 Hitachi Ltd Method and device for retrieving document
JPH08235217A (en) * 1995-02-24 1996-09-13 Pioneer Electron Corp Data retrieval and output device and karaoke device
JPH1139326A (en) * 1997-07-22 1999-02-12 Hitachi Ltd High speed document registration/retrieval method and device therefor

Similar Documents

Publication Publication Date Title
CA1214284A (en) Sparse array bit map used in data bases
US10120869B2 (en) Method and apparatus for fault-tolerant memory management
CN101751406B (en) Method and device for realizing column storage based relational database
JP3318834B2 (en) Data file system and data retrieval method
CN110825794A (en) Partition merging method and database server
JPS63273961A (en) Management system for plural versions
JPS62287350A (en) Index integrally updating system
JPS6172333A (en) Merge processing system
RU2389066C2 (en) Multidimensional database and method of managing multidimensional database
EP0170442A2 (en) A method for searching sparse databases using an associative technique
JP3980326B2 (en) Data management method and computer-readable recording medium
JP2540821B2 (en) Database search system
JP2615046B2 (en) Record addition processing method
JP3145727B2 (en) Data retrieval device
JP2507399B2 (en) Database equipment
JPH02222044A (en) Data processor
JP3456481B2 (en) Information processing device
JPH03282966A (en) Method for managing hash entry area
CN117573634A (en) Key value storage method based on multi-log structure merging tree
JPS62296226A (en) Index processing system for index sequence arranging file
JPH04199338A (en) Data base management system
JPH07182215A (en) Data managing device
JP2007310844A (en) Data processing system
JP2000076106A (en) Management method for indexed sequential file
JPS62239249A (en) File managing device