JPH0324645A - Information processor - Google Patents

Information processor

Info

Publication number
JPH0324645A
JPH0324645A JP1159050A JP15905089A JPH0324645A JP H0324645 A JPH0324645 A JP H0324645A JP 1159050 A JP1159050 A JP 1159050A JP 15905089 A JP15905089 A JP 15905089A JP H0324645 A JPH0324645 A JP H0324645A
Authority
JP
Japan
Prior art keywords
index
update
updating
update information
information
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.)
Granted
Application number
JP1159050A
Other languages
Japanese (ja)
Other versions
JP2634908B2 (en
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 JP1159050A priority Critical patent/JP2634908B2/en
Publication of JPH0324645A publication Critical patent/JPH0324645A/en
Application granted granted Critical
Publication of JP2634908B2 publication Critical patent/JP2634908B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To improve the updating processing efficiency of a data base file by collectively updating data records as necessary without executing addition, change and deletion processing of data records to/from a data base file at the time of updating each data record. CONSTITUTION:In the case of sharing the data base file by plural processes, the addition, change and deletion processing of data records are not executed at the time of updating each data record and its index updating information is stored in an index updating information storage device 11 in each process. At the time of setting up a rest point in each process, batch updating is executed by a whole index batch updating device 13. When an index is updated at the time of referring to the index, the start of the process is waited by an index waiting device 16 until the batch updating is ended by the device 13, and after receiving updating end information from an index updating end informing device 18, the process is started by a process starter 19.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理装置におけるデータ処理に利用される
。特に、データベースファイルのデータレコードの追加
、変更および削除処理に伴うインデックスレコードの追
加、変更および削除処理をデータレコードの更新時には
行わず、その後必要に応じて一括更新する共有インデッ
クスの一括更新処理を行う情報処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention is utilized for data processing in an information processing device. In particular, the process of adding, changing, and deleting index records accompanying the process of adding, changing, and deleting data records in database files is not performed when updating data records, and the shared index is then updated in bulk as necessary. It relates to an information processing device.

〔概要〕〔overview〕

本発明は、データレコードの複数の項目に対して項目の
値をキー値としデータレコードのアドレスをポインタ値
とするインデックスを持つデータペースファイルを備え
た情報処理装置において、前記データベースファイルの
データレコードの追加、変更および削除処理に伴うイン
デックスレコードの追加、変更および削除処理を、デー
タレコードの更新時に行わずに、その後必要に応じて一
括して更新を行うようにすることにより、データベース
ファイルの更新処理効率ならびに使用率の向上を図った
ものである。
The present invention provides an information processing apparatus equipped with a data pace file having an index for a plurality of items of a data record, with item values as key values and addresses of data records as pointer values. Database file update processing is improved by not performing the addition, modification, and deletion processing of index records when updating data records, and then updating them all at once as necessary. The aim is to improve efficiency and usage rate.

〔従来の技術〕[Conventional technology]

データベースファイルにおけるインデックスは、データ
ベースの参照処理速度を向上させるための付加情報であ
る。特にデータレコードのフィールド値をインデックス
のキー値として重複して格納する場合は、インデックス
はそのインデックスを利用した参照処理が発生するまで
、データ部との整合性を必要としない。反対にデータレ
コードの更新時にそのデータレコードのアドレスをポイ
ンタ値とするインデックスレコードの更新処理を行うと
すると、インデックスのキー値がデータレコードの更新
順と異なる場合は、データベースに対するアクセスにば
らつきが発生するため効率が悪い。従って、データレコ
ードの更新時には対応するインデックスの更新情報を格
納し、後に一括してインデックスを更新する方法がとら
れてきた。
The index in the database file is additional information for improving the database reference processing speed. In particular, when field values of data records are stored redundantly as key values of an index, the index does not require consistency with the data section until reference processing using the index occurs. On the other hand, if an index record is updated using the address of the data record as a pointer value when updating a data record, if the index key value is different from the update order of the data records, there will be variations in access to the database. Therefore, it is inefficient. Therefore, a method has been adopted in which when updating a data record, update information for the corresponding index is stored, and the index is updated all at once later.

第4図は複数個のデータレコードおよびインデックスレ
コードを一つのブロックとして格納しブロックごとに入
出力を行うデータベースファイルを表している。データ
レコード41が追加される場合を考えてみると、まずブ
ロック42が読み出され、そのブロックにデータレコー
ドが格納される。次に、インデックスレコード43が作
或され、ブロック44を読み出して、作或したインデッ
クスレコードを格納する。同様にインデックスレコード
45が作戊され、ブロック46に格納される。
FIG. 4 shows a database file that stores a plurality of data records and index records as one block and performs input/output for each block. Considering the case where a data record 41 is added, block 42 is first read and the data record is stored in that block. Next, an index record 43 is created, and block 44 is read and the created index record is stored. Similarly, an index record 45 is created and stored in block 46.

いま、このデータベースファイルの人出力に利用可能な
二つの入出力用のバッファ52および53がある場合を
考える。ブロック46を読み出す時点でバッファ52お
よび53が一杯になってしまっているため、ブロック4
2または44を書き出す必要がある。
Now, consider the case where there are two input/output buffers 52 and 53 available for human output of this database file. Since buffers 52 and 53 are full by the time block 46 is read, block 4
You need to write out 2 or 44.

書き出すブロックを一番前にアクセスしたブロックとい
う意味でブロック42とする。次にデータレコード47
を追加すると、ブロック42を再度読み出す必要がある
が、そのときブロック46を書き出す必要が生じる。追
加するデータレコードが10件あるとすれば、 10X 3 X 2 =60回 の入出力がデータベースファイルに対して発生すること
になる。
The block to be written is assumed to be block 42, meaning the block that was accessed first. Next, data record 47
, it is necessary to read block 42 again, but at that time it is necessary to write block 46. If there are 10 data records to be added, 10 x 3 x 2 = 60 input/outputs will occur to the database file.

インデックスを一括更新する場合には、10件のデータ
レコードの追加処理で発生する入出力回数はブロック4
2の読み出しと書き出し各1回で2回、インデックスレ
コードの追加処理でブロック44および469読み出し
と書き出しで4回である。データベースに対する入出力
は合計6回となり、一括更新しなかった場合と比べると
10分の1で済むことになる。このようにインデックス
を一括して更新する方法は入出力のためのバツファに比
べて一時に更新するインデックスの数が多いバツファに
有効である。
When updating the index all at once, the number of input/outputs that occur when adding 10 data records is block 4.
2 is read and written once each, and blocks 44 and 469 are read and written four times in the index record addition process. A total of six inputs and outputs to the database will be required, which is one-tenth of the number of times compared to the case where the batch update is not performed. This method of updating indexes all at once is effective for buffers that update a large number of indexes at once compared to input/output buffers.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

ところで、インデックスの一括更新を行う場合は、デー
タ部とインデックス部の整合性を保つために、データ部
の更新順とインデックスの更新順を一致させておく必要
がある。データベースファイルが複数のプロセスで共有
されている場合を考えると、各プロセスで発生するデー
タ部の更新に伴うインデックス部の更新順を保証する手
段が必要となる。またデータベースファイル更新時の障
害復旧で、データ部とインデックス部の整合性を保証す
る必要がある。さらに、一括更新中のインデックスを参
照する場合は、それまでのインデックスの更新情報を反
映したインデックスに対する参照処理となる。単一プロ
セスであれば、そのプロセスで発生したインデックスの
更新情報を反映すればよいが、複数プロセスでインデッ
クスを更新している場合、あるプロセスで発生したイン
デックスの参照要求を処理するためには、その時点にお
ける全てのプロセスでのインデックスの更新情報を全て
反映する必要がある。
By the way, when performing a batch update of indexes, in order to maintain consistency between the data section and the index section, it is necessary to match the update order of the data section and the index update order. Considering the case where a database file is shared by multiple processes, a means is needed to guarantee the order in which the index section is updated as the data section is updated by each process. In addition, it is necessary to guarantee consistency between the data part and the index part during failure recovery when updating the database file. Furthermore, when referring to an index that is being updated at once, the process is to refer to an index that reflects the update information of the index up to that point. If it is a single process, it is enough to reflect the index update information that occurred in that process, but if multiple processes are updating the index, in order to process the index reference request that occurred in one process, It is necessary to reflect all index update information in all processes at that time.

従来のインデックス一括更新方式では、複数プロセスで
データベースファイルを共有する場合の更新順と障害復
旧の問題、およびインデックス参照時の更新情報反映方
式の問題が解決されておらず、一括更新するインデック
スは単一プロセスからのアクセスしか許さず、データベ
ースファイルの更新処理効率ならびに使用率の向上を図
ることができない問題点があった。
The conventional index batch update method does not solve the problem of update order and failure recovery when database files are shared by multiple processes, and the problem of update information reflection method when referencing the index. There was a problem in that it only allowed access from one process, making it impossible to improve the update processing efficiency and usage rate of database files.

本発明の目的は、前記の問題点を解消することにより、
複数プロセスで共有して更新、参照しているデータベー
スファイルに適応する、データベースファイルにおける
インデックス部をデータ部の更新後に一括して行い、デ
ータベースファイルの更新処理効率ならびに使用率の向
上を図ることができるインデックス一括更新方式を備え
た情報処理装置を提供することにある。
The purpose of the present invention is to solve the above-mentioned problems.
Adapts to database files that are shared, updated, and referenced by multiple processes. The index section of the database file can be updated all at once after updating the data section, improving the update processing efficiency and usage rate of the database file. An object of the present invention is to provide an information processing device equipped with an index batch update method.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、データレコードの複数の項目に対して、項目
の値をキー値としデータレコードのアドレスをポインタ
値とするインデックスを持つデータベースファイルを備
えた情報処理装置において、前記データベースファイル
のデータ部およびインデックス部を複数のプロセスで共
有して使用する場合に、インデックスの更新時に実際に
インデックスを更新せずにインデックス更新情報をプロ
セス単位およびインデックス単位に格納するインデック
ス更新情報格納手段と、前記インデックス更新情報の格
納開始を通知するインデックス更新開始通知手段と、プ
ロセス単位の静止点の確立時にそのプロセスで前記イン
デックス更新開始手段によってインデックス更新情報の
格納が通知されているインデックスをインデックス更新
情報に基づいて一括更新する全インデックス一括更新手
段と、データベースファイル更新中に障害が発生したプ
ロセスにおける復旧処理でインデックス更新情報を無効
とするインデックス更新情報消去手段と、インデックス
の参照時に前記インデックス更新通知手段によってイン
デックス更新情報が格納された旨の通知がある場合には
、インデックスの参照を行う旨の通知を行うインデック
ス参照通知手段と、インデックスの参照が可能となるま
でインデックスの使用を待ち合わせるインデックス更新
待ち合わせ手段と、前記インデックス参照通知手段によ
ってインデックスの参照の通知を受けたインデックスを
参照しようとするプロセスを含む全てのプロセスで、該
当するインデックス更新情報が存在する場合インデック
ス更新情報に基づいてインデックスを実際に更新するイ
ンデックス一括更新手段と、インデックス一括更新が終
了した場合インデックスの更新終了を通知するインデッ
クス更新終了通知手段と、前記インデックス更新開始通
知手段によってインデックス更新情報の格納が通知され
ている全てのプロセスからインデックスの更新終了が通
知された場合、前記インデックス更新待ち合わせ手段に
よって待ち合わせているプロセスを起動するプロセス起
動手段とを備えたことを特徴とする。
The present invention provides an information processing apparatus including a database file having an index for a plurality of items of a data record, with the value of the item as a key value and the address of the data record as a pointer value. An index update information storage means for storing index update information in units of processes and in units of indexes without actually updating the index when an index is updated when an index part is shared and used by a plurality of processes; an index update start notifying means for notifying the start of storage of the index update information; and an index update start notification means for notifying the start of storage of the index update information in that process when a quiescent point is established for each process, and indexes for which storage of the index update information has been notified by the index update start means in that process are collectively updated based on the index update information. an index update information erasing means that invalidates the index update information in a recovery process in a process in which a failure occurs during a database file update; and an index update information eraser that disables the index update information by the index update notification means when the index is referenced. an index reference notification means for notifying that the index will be referenced when there is a notification that the index has been stored; an index update waiting means for waiting for use of the index until the index can be referenced; Index batch update means that actually updates the index based on the index update information when the corresponding index update information exists in all processes including the process that attempts to refer to the index that has been notified of index reference by the notification means. and an index update end notification means for notifying the end of index update when the index batch update is completed, and notification of the end of index update from all the processes that have been notified to store the index update information by the index update start notification means. If the index update waiting means waits for the index update, the index update waiting means starts the process waiting for the index update waiting means.

〔作用〕[Effect]

テータベースファイルが複数のプロセスで共有して使用
する場合に、インデックスの更新は更新時にいちいち行
わずに、そのインデックス更新情報はプロセス単位にイ
ンデックス更新情報格納手段に格納される。そして、プ
ロセス単位の静止点の確立時に全インデックス一括更新
手段により一括更新を行う。また、データベースファイ
ル更新中に障害が発生した場合には、インデックス更新
情報消去手段により当該プロセスのインデックス情報を
無効とする。また、インデックスの参照時にインデック
スの更新がある場合には、インデックス一括更新手段に
より一括更新が終了するまで当該プロセスの起動をイン
デックス待ち合わせ手段により待ち合わせ、インデック
ス更新通知手段による更新終了通知後にプロセス起動手
段により起動させる。
When a database file is shared and used by a plurality of processes, the index update information is stored in the index update information storage means for each process without updating the index every time it is updated. Then, when a quiescent point is established for each process, a batch update is performed by the batch update means for all indexes. Furthermore, if a failure occurs while updating the database file, the index information of the process is invalidated by the index update information erasing means. Furthermore, if an index is updated when the index is referenced, the index waiting means waits for the startup of the relevant process until the batch update is completed by the index batch updating means, and after the index update notifying means notifies the completion of the update, the process starting means Activate it.

すなわち、同一のデータレコードに対する更新処理が、
最初に更新したプロセスの静止点まで待たされる性質を
利用して、プロセス単位にインデックス単位にインデッ
クス更新情報を格納し、復旧処理時にはインデックス情
報を制除することになり、複数プロセスでデータベース
を共有し更新している場合でも、データ部とインデック
ス部との整合性が保証される。これにより、データベー
スファイルの更新効率および使用率の向上を図ることが
可能となる。
In other words, update processing for the same data record is
Taking advantage of the property of waiting until the quiescent point of the first process to update, index update information is stored for each index in each process, and the index information is restricted during recovery processing, allowing multiple processes to share the database. Even when updated, consistency between the data section and index section is guaranteed. This makes it possible to improve the update efficiency and usage rate of database files.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を参照して説明する
Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例を示すブロック構或図である
FIG. 1 is a block diagram showing an embodiment of the present invention.

本実施例は、データレコードの複数の項目に対して、第
4図に示す項目の値48をキー値49としデータレコー
ドのアドレス50をポインタ値51とするインデックス
を持つデータベースファイルを備えた情報処理装置にお
いて、 前記データベースファイルのデータ部およびインデック
ス部を複数のプロセスで共有して使用する場合に、イン
デックスの更新時に実際にインデックスを更新せず、イ
ンデックス更新情報をプロセス単位およびインデックス
単位に格納するインデックス更新情報格納手段11と、
前記インデックス更新情報の格納開始を通知するインデ
ックス更新開始通知手段12と、プロセス単位の静止点
の確立時にそのプロセスでインデックス更新開始手段1
2によってインデックス更新情報の格納が通知されてい
る全てのインデックスをインデックス更新情報に基づい
て一括更新する全インデックス一括更新手段13と、デ
ータベースファイル更新中に障害が発生したプロセスに
おける復旧処理でインデックス更新情報を無効とするイ
ンデックス更新情報消去手段l4と、インデックスの参
照時に前記インデックス更新通知手段12によってイン
デックス更新情報が格納された旨の通知がある場合、イ
ンデックスの参照を行う旨の通知を行うインデックス参
照通知手段15と、インデックスの参照が可能となるま
でインデックスの使用を待ち合わせるインデックス更新
待ち合わせ手段16と、インデツクス参照通知手段l5
によってインデックスの参照の通知を受けた、インデッ
クスを参照しようとするプロセスを含む全てのプロセス
で、該当するインデックス更新情報が存在する場合イン
デックス更新情報に基づいてインデックスを実際に更新
するインデックス一括更新手段17と、前記インデック
ス一括更新が終了した場合インデックスの更新終了を通
知するインデックス更新終了通知手段18と、インデッ
クス更新開始通知手段12によってインデックス更新情
報の格納が通知されている全てのプロセスからインデッ
クスの更新終了が通知された場合、インデックス更新待
ち合わせ手段l6によって待ち合わせているプロセスを
起動するプロセス起動手段l9とを備えている。なお、
第1図において、Eは更新開始メッセージキューおよび
Fは参照開始メッセージキューである。
This embodiment is an information processing system that includes a database file that has an index for a plurality of items in a data record, with the value 48 of the item shown in FIG. 4 as a key value 49, and the address 50 of the data record as a pointer value 51. In the device, when the data part and index part of the database file are shared and used by multiple processes, an index that stores index update information in each process and each index without actually updating the index when updating the index. Update information storage means 11;
an index update start notification means 12 for notifying the start of storage of the index update information; and an index update start means 1 for a process when a quiescent point is established for each process.
All index batch update means 13 updates all indexes for which storage of index update information has been notified by 2 at once based on the index update information, and the index update information is updated in a recovery process in a process in which a failure occurs during database file update. index update information erasing means 14 for invalidating the index update information, and an index reference notification for notifying that the index will be referenced if there is a notification that the index update information has been stored by the index update notification means 12 when the index is referenced. means 15, index update waiting means 16 that waits for index use until index reference becomes possible, and index reference notification means 15.
An index batch update means 17 that actually updates the index based on the index update information if the corresponding index update information exists in all the processes including the process that attempts to refer to the index and is notified of index reference by. When the index batch update is completed, the index update end notification means 18 notifies the end of the index update, and the index update start notification means 12 sends an index update end notification from all the processes that have been notified to store the index update information. The process starting means 19 is provided for starting the process being waited for by the index update waiting means 16 when the index update waiting means 16 is notified. In addition,
In FIG. 1, E is the update start message queue and F is the reference start message queue.

本発明の特徴は、第1図において、インデックス更新情
報格納手段11、インデックス更新開始通知手段12、
全インデックス一括更新手段13、インデックス更新情
報消去手段l4、インデックス参照通知手段15、イン
デックス更新待ち合わせ手段16、インデックス一括更
新手段17、インデックス更新終了通知手段l8、およ
びプロセス起動手段19を設けたことにある。
The features of the present invention are as shown in FIG. 1, index update information storage means 11, index update start notification means 12,
All index batch update means 13, index update information deletion means 14, index reference notification means 15, index update waiting means 16, index batch update means 17, index update completion notification means 18, and process starting means 19 are provided. .

次に、本実施例の動作について、第2図ないし第4図、
ならびに第{表ないし第5表を参照して説明する。
Next, regarding the operation of this embodiment, FIGS. 2 to 4,
This will be explained with reference to Tables 1 to 5.

第2図は第4図の状態のデータベースファイルに対する
複数プロセスにおける更新処理の例を示したものである
FIG. 2 shows an example of update processing performed by a plurality of processes on the database file in the state shown in FIG. 4.

まず、プロセス1でデータレコード21がアドレス3に
追加される。このとき、第1表に示すように、インデッ
クス更新情報格納手段11によってキー値C1ポインタ
値3のインデックス更新情報およびキー値c1ポインタ
値3のインデックス更新情報がプロセス1で格納される
(手順61〉。また、インデックス更新開始通知手段1
2によって更新開始メッセージキューEにプロセス1の
インデックス1およびインデックス2に関するインデッ
クス更新開始が通知される。
First, in process 1, data record 21 is added to address 3. At this time, as shown in Table 1, the index update information of the key value C1 pointer value 3 and the index update information of the key value c1 pointer value 3 are stored in the process 1 by the index update information storage means 11 (Step 61) .In addition, index update start notification means 1
2, the update start message queue E is notified of the start of index update regarding index 1 and index 2 of process 1.

次に、プロセス2でデータレコード22がアドレス4に
追加される。このとき、第1表に示すように、インデッ
クス更新情報格納手段11によって、キー値D、ポイン
タ値4のインデックス更新情報ならびにキー値d1ポイ
ンタ値4のインデックス更新情報がプロセス2で格納さ
れる(手順62〉。
Next, in process 2, data record 22 is added to address 4. At this time, as shown in Table 1, the index update information storage means 11 stores the index update information of key value D, pointer value 4, and index update information of key value d1 and pointer value 4 in process 2 (procedure 62〉.

また、インデックス更新開始通知手段12によって、更
新開始メッセージキューEにプロセス2のインデックス
lおよびインデックス2に関するインデックス更新開始
が通知される。
Furthermore, the index update start notifying means 12 notifies the update start message queue E of the start of index update regarding index l and index 2 of process 2.

次に、プロセス1でアドレスlのデータレコードをデー
タレコード23で置き換える。このとき、第1表に示す
ように、変更処理を変更前のインデックスレコードの削
除(手順63)と、更新後のインデックスレコードの追
加(手順64)に置き換えてインデックス更新情報が作
戊される。また、更新開始メッセージキューEにすでに
プロセス1が【 登録されているので、インデックス更新開始通知手段l
2は動作しない。
Next, in process 1, the data record at address l is replaced with data record 23. At this time, as shown in Table 1, index update information is created by replacing the change process with deleting the index record before change (step 63) and adding the index record after update (step 64). Also, since process 1 has already been registered in the update start message queue E, the index update start notification means l
2 does not work.

その後、プロセス2でアドレスlのデータレコードを削
除しようとするが、既にプロセスlでこのデータレコー
ドが更新されているため、プロセス2は待ち状態に入る
。プロセス1が静止点を確立する時点でのインデックス
更新情報の内容を第l表に示す。
Thereafter, process 2 attempts to delete the data record at address l, but since this data record has already been updated by process l, process 2 enters a wait state. Table 1 shows the contents of the index update information at the time when process 1 establishes a quiescent point.

(以下本頁余白) 静止点が確立されると、全インデックス一括更新手段1
3は更新開始メッセージキューEからプロセス1に関す
る更新通知を取り出し、インデックス一括更新手段17
によってインデックス1を一括更新し、次に、インデッ
クス2を一括更新する。
(Hereinafter referred to as the margin of this page) Once the static point is established, all indexes are updated simultaneously 1
3 takes out the update notification regarding process 1 from the update start message queue E, and sends the index batch update means 17
Index 1 is updated all at once, and then index 2 is updated all at once.

更新が完了したインデックス更新情報は削除される。プ
ロセスlの静止点でプロセス2の待ちが解除され、アド
レス1のデータレコードが削除される。このとき、アド
レス1のデータレコードの内容はデータレコード23で
置き変わっているので、キー値X1ポインタ値1と、キ
ー値x1ポインタ値1のインデックス更新情報がインデ
ックス更新情報格納手段11によって、第2表に示すよ
うに、プロセス2に追加される(手順65〉。第2表は
プロセス2が静止点に達した時点でのインデックス更新
情報の内容を示している。
Index update information that has been updated is deleted. At the quiescent point of process l, process 2 is released from waiting, and the data record at address 1 is deleted. At this time, the contents of the data record at address 1 have been replaced by data record 23, so the index update information for key value X1 pointer value 1 and key value As shown in the table, the index update information is added to process 2 (step 65).Table 2 shows the contents of the index update information at the time when process 2 reaches the quiescent point.

次に第4図で示されるデータベースファイルに対して第
3図に示される複数プロセスでの更新処理を行った場合
について説明する。第3図は第2図の処理でプロセスl
が静止点を確立する前に、障害が発生した場合を示して
いる。障害が発生した時点でのインデックス更新情報の
内容は、第1表で示される。
Next, a case where the database file shown in FIG. 4 is updated by multiple processes shown in FIG. 3 will be described. Figure 3 shows the process l of the process in Figure 2.
shows the case where a failure occurs before the quiescent point is established. The contents of the index update information at the time the failure occurs are shown in Table 1.

障害が発生すると、データベースシステムは自動的にデ
ータベースファイルの復旧処理を行い、データベースフ
ァイルの内容は第4図の状態に戻される。これに伴って
、インデックス更新情報消去手段14は更新開始メッセ
ージキューEからプロセス1に関する更新通知を取り出
し、インデックス1とインデックス2の更新情報を削除
する。この操作によって、データ部とインデックス部の
整合性が保たれることになる。プロセスlの復旧処理終
了後プロセス2の待ちが解除され、アドレス1のデータ
レコードが削除される。このとき、アドレス1のデータ
レコードの内容は第4図のままであるので、第3表に示
すように、キー値A1ポインタ値1と、キー値a1ポイ
ンタ値1のインデックス更新情報がインデックス更新情
報格納手段lによってプロセス2に追加される(手順6
6)。
When a failure occurs, the database system automatically performs a database file recovery process, and the contents of the database file are returned to the state shown in FIG. 4. Along with this, the index update information erasing means 14 takes out the update notification regarding process 1 from the update start message queue E, and deletes the update information of index 1 and index 2. This operation maintains consistency between the data section and the index section. After the recovery processing of process 1 is completed, the waiting state of process 2 is released, and the data record at address 1 is deleted. At this time, the contents of the data record at address 1 remain as shown in Figure 4, so as shown in Table 3, the index update information of key value A1 pointer value 1 and key value a1 pointer value 1 is the index update information. added to process 2 by storage means l (step 6
6).

第3表はプロセス2が静止点に達した時点でのインデッ
クス更新情報の内容を示している。
Table 3 shows the contents of the index update information when process 2 reaches the quiescent point.

(以下本頁余白〉 以上述べてきたように、同一のデータレコードに対する
更新処理が、最初に更新したプロセスの静止点まで待た
される性質を利用して、プロセス単位にインデックス更
新情報を格納し、復旧処理時にはインデックス更新情報
を削除することにより、複数プロセスでデータベースを
共有し更新している場合でも、データ部とインデックス
部の整合性が保証できる。
(The following is the margin of this page) As mentioned above, by taking advantage of the property that update processing for the same data record waits until the quiescent point of the process that first updated it, index update information is stored in each process, and recovery By deleting index update information during processing, consistency between the data section and index section can be guaranteed even when the database is shared and updated by multiple processes.

次に、参照処理と更新処理とがインデックスを共有した
場合の動作について説明する。第4表は三つのプロセス
から一つのインデックスを同時に更新および参照した場
合を示している。
Next, the operation when the reference process and the update process share an index will be described. Table 4 shows the case where one index is simultaneously updated and referenced by three processes.

プロセス1はデータレコードの更新に伴ってインデック
ス更新情報格納手段11によってインデックスの更新情
報をプロセス1で格納する。このとき、インデックス更
新開始通知手段12は更新開始メッセージキューEにプ
ロセス1を登録する(手順71〉 。次にプロセス2が
データレコードの更新に伴ってインデックス更新情報格
納手段1によってインデックスの更新情報をプロセス2
で格納する。このとき、インデックス更新開始通知手段
12は更新開始メッセージキューEにプロセス2を登録
する(手順72〉。さらに、プロセス3がデータレコー
ドの更新に伴ってインデックス更新情報格納手段11に
よってインデックスの更新情報をプロセス3で格納する
。このとき、インデックス更新開始通知手段12は更新
開始メッセージキューEにプロセス3を登録する(手順
73〉。
Process 1 stores index update information by index update information storage means 11 as data records are updated. At this time, the index update start notification means 12 registers the process 1 in the update start message queue E (step 71).Next, the process 2 receives the index update information by the index update information storage means 1 as the data record is updated. Process 2
Store in . At this time, the index update start notification means 12 registers the process 2 in the update start message queue E (step 72).Furthermore, as the process 3 updates the data record, the index update information storage means 11 receives the index update information. It is stored in process 3. At this time, the index update start notification means 12 registers process 3 in the update start message queue E (step 73).

プロセス2が静止点を確立すると、全インデックス一括
更新手段13によってプロセス2のインデックスが一括
更新され、インデックス更新終了通知手段18によって
更新開始メッセージキューEからプロセス2が削除され
る(手順74〉。この時点でプロセス2がインデックス
を参照しようとしても、更新開始メッセージキューEに
通知された更新を必要とするインデックスが存在するの
で、インデックス待ち合わせ手段16によりインデック
スの更新終了を待ち合わせる。
When the process 2 establishes a quiescent point, the index of the process 2 is updated at once by the all index batch update means 13, and the process 2 is deleted from the update start message queue E by the index update end notification means 18 (step 74). Even if the process 2 attempts to refer to the index at this point, there is an index that requires updating that has been notified to the update start message queue E, so the index waiting means 16 waits for the completion of the index update.

待ち合わせに先立って、インデックス参照開始通知手段
15はプロセス2を参照開始メッセージキューFに登録
する(手順75〉 。その後、プロセス3がインデック
スを更新しようとすると、参照開始メッセージキューF
にインデックスの参照開始が通知されているので、イン
デックス一括更新手段l7を動作させ、インデックスを
一括更新する。
Prior to the meeting, the index reference start notification means 15 registers the process 2 in the reference start message queue F (step 75). After that, when the process 3 attempts to update the index, the index reference start notification means 15 registers the process 2 in the reference start message queue F.
Since the start of reference to the index has been notified, the index batch update means 17 is operated to collectively update the index.

このとき、インデックス更新終了通知手段l8は更新開
始メッセージヰユーEからプロセス3を削除する〈手順
76〉。プロセスlが更新処理をおこなった時点でも、
参照開始メッセージキューFにインデックスの参照開始
が通知されているので、インデックス一括更新手段17
を動作させ、インデックスを一括更新する。このとき、
インデックス更新終了通知手段18は更新開始メッセー
ジキューEからプロセス1を削除する(手順77〉。更
新開始メッセージキューEの内容が空になると、プロセ
ス起動手段19が参照開始メッセージキューFに登録さ
れたプロセスを起動する。これによって、プロセス2は
プロセス1、プロセス2およびプロセス3の更新を全て
反映したインデックスを参照することができる。
At this time, the index update end notification means 18 deletes process 3 from the update start message E (step 76). Even when process l performs the update process,
Since the reference start message queue F is notified of the index reference start, the index batch update means 17
and update the index in bulk. At this time,
The index update end notification means 18 deletes the process 1 from the update start message queue E (step 77). When the contents of the update start message queue E become empty, the process activation means 19 deletes the process registered in the reference start message queue F. This allows process 2 to refer to the index that reflects all updates of process 1, process 2, and process 3.

最後にインデックスを共有する参照プロセスが複数個あ
る場合について第5表を用いて説明する。
Finally, the case where there are multiple reference processes that share an index will be explained using Table 5.

プロセスlはデータレコードの更新に伴ってインデック
ス更新情報格納手段11によってインデックスの更新情
報をプロセス1で格納する。このとき、インデックス更
新開始通知手段12は更新開始メッセージキューEにプ
ロセス1を登録する(手順81〉 。次に、プロセス2
がデータレコードの更新に伴ってインデックス更新情報
格納手段11によってインデックスの更新情報をプロセ
ス2で格納する。このとき、インデックス更新開始通知
手段l2は更新開始メッセージヰ.−Eにプロセス2を
登録する(手順82)。さらに、プロセス3がデータレ
コードの更新に伴ってインデックス更新情報格納手段1
1によってインデックスの更新情報をプロセス3で格納
する。このとき、インデックス更新開始通知事段12は
更新開始メッセージキューEにプロセス3を登録する(
手順83)。
The process 1 stores index update information by the index update information storage means 11 as the data records are updated. At this time, the index update start notification means 12 registers the process 1 in the update start message queue E (step 81>. Next, the process 2
The index update information is stored in process 2 by the index update information storage means 11 as the data record is updated. At this time, the index update start notification means 12 sends the update start message I. -Register process 2 in E (step 82). Furthermore, the process 3 updates the index update information storage means 1 as the data records are updated.
1, index update information is stored in process 3. At this time, the index update start notification stage 12 registers the process 3 in the update start message queue E (
Step 83).

プロセス2が静止点を確立すると、全インデックス一括
更新手段13によってプロセス2のインデックスが一括
更新され、インデックス更新通知手段18によって更新
開始メッセージキューEからプロセス2が削除される(
手順84)。この時点でプロセス2がインデックスを参
照しようとしても、更新開始メッセージキューEに通知
された更新を必要とするインデックスが存在するので、
インデックス待ち合わせ手段l6によりインデックスの
更新終了を待ち合わせる。待ち合わせに先立って、イン
デックス参照開始通知手段12はプロセス2を参照開始
メッセージキューFに登録する(手順85)。
When the process 2 establishes a quiescent point, the index of the process 2 is updated at once by the all index batch update means 13, and the process 2 is deleted from the update start message queue E by the index update notification means 18 (
Step 84). Even if process 2 attempts to refer to the index at this point, there is an index that requires updating that has been notified to the update start message queue E, so
The index waiting means 16 waits for the completion of index updating. Prior to the meeting, the index reference start notification means 12 registers process 2 in the reference start message queue F (step 85).

プロセス3が静止点を確立すると、全インデックス一括
更新手段13によってプロセス3のインデックスが一括
更新され、インデックス更新終了通知手段18によって
更新開始メッセージキューEからプロセス3が削除され
る(手順86〉 。その後、プロセス3がインデックス
を参照しようとしても、まだ更新開始メッセージキュー
Eに通知された更新を必要とするインデックスが存在す
るので、インデックス待ち合わせ手段l6によりインデ
ックスの更新終了を待ち合わせる。
When the process 3 establishes a quiescent point, the index of the process 3 is updated at once by the all index batch update means 13, and the process 3 is deleted from the update start message queue E by the index update completion notification means 18 (step 86>. Then) , even if process 3 attempts to refer to the index, there is still an index that requires updating that has been notified to the update start message queue E, so the index waiting means 16 waits for the index update to be completed.

待ち合わせに先立って、インデックス参照開始通知手段
15はプロセス3を参照開始メッセージキューFに登録
する(手順87)。プロセス1が更新処理をおこなう時
点で、参照開始メッセージキューFにインデックスの参
照開始が通知されているので、インデックス一括更新手
段17を動作させ、インデックスを一括更新する。この
とき、インデックス更新終了通知事段l8は更新開始メ
ッセージキューEからプロセスlを削除する(手順88
〉。
Prior to the meeting, the index reference start notification means 15 registers process 3 in the reference start message queue F (step 87). At the time when the process 1 performs the update process, the reference start message queue F is notified of the start of index reference, so the index batch update means 17 is operated to update the indexes in batch. At this time, the index update end notification step 18 deletes the process 1 from the update start message queue E (step 88
〉.

更新開始メッセージキューEの内容が空になると、プロ
セス起動手段19が参照開始メッセージキューFに登録
されたプロセスを順次起動する。これによって、プロセ
ス2およびプロセス3は、プロセス1、プロセス2およ
びプロセス3の更新を全て反映したインデックスを参照
することができる。
When the contents of the update start message queue E become empty, the process activation means 19 sequentially activates the processes registered in the reference start message queue F. This allows Process 2 and Process 3 to refer to the index that reflects all updates of Process 1, Process 2, and Process 3.

(以下本頁余白) 以上のように、本発明の手順によれば、複数のプロセス
からデータベースを共有して更新、参照している場合で
も、データとインデックスの整合性を保ったままインデ
ックスの一括更新処理が可能となる。
(Hereinafter, the margin of this page) As described above, according to the procedure of the present invention, even when a database is shared and updated and referenced by multiple processes, indexes can be updated all at once while maintaining the consistency of data and indexes. Update processing becomes possible.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明は、インデックスを一括更
新することによるデータベースファイルの更新処理効率
を向上させる効果と、一括更新しているインデックスを
共有利用できることによる、データベースファイルの使
用率向上効果とを合わせもっている。
As explained above, the present invention has the effect of improving the update processing efficiency of database files by collectively updating indexes, and the effect of improving the usage rate of database files by being able to share the indexes that are being updated in batches. I have both.

以下に、一括更新しているインデックスを共有利用する
効果を挙げる。
Below are the effects of sharing indexes that are updated in bulk.

l) 一度に数十程度のデータを更新する処理が不規則
に発生する場合、発生した場所で、即座に処理できる。
l) If processing to update dozens of data at once occurs irregularly, it can be processed immediately at the location where it occurs.

共有利用できない場合は、発生したデータを蓄積して一
箇所一括処理する必要がある。
If shared use is not possible, it is necessary to accumulate the generated data and process it in one place.

2〉 一括処理しているデータベースファイルの他の端
末で参照できる。例えば中間結果や処理の進み具合を確
認できる。共有利用できない場合は、その処理が終了す
るまで待たなければならない。
2> Database files that are being batch processed can be referenced on other terminals. For example, you can check intermediate results and processing progress. If shared use is not possible, you will have to wait until the process is finished.

次に、インデックスを共有利用する場合の一括更新の効
果を挙げる。
Next, we will discuss the effects of batch updating when indexes are shared.

3) 一括して更新することによって処理効率が向上す
る。特にデータベースファイルとの入出力に使用できる
バッファ数が少ない場合は効果が大きい。
3) Processing efficiency is improved by updating all at once. This is especially effective when the number of buffers that can be used for input/output with database files is small.

4) 一括更新にインデックスの更新順、およびインデ
ックスごとのキーの更新順を一意に決めることにより、
インデックスの更新による資源の確保順が一意に決定さ
れ、ロック制御によるデッドロック状態を減少させるこ
とができる。
4) By uniquely determining the index update order and key update order for each index for batch updates,
The order in which resources are secured by updating the index is uniquely determined, and deadlock conditions caused by lock control can be reduced.

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

第1図は本発明の一実施例を示すブロック構或図。 第2図は実施例の複数プロセスでの更新処理例(1)を
示す説明図。 第3図は実施例の複数プロセスでの更新処理例(2)を
示す説明図。 第4図は実施例のデータとインデックスの入出力を示す
説明図。 1l・・・インデックス更新情報格納手段、12・・・
インデックス更新開始通知手段、13・・・全インデッ
クス一括更新手段、14・・・インデックス更新情報消
去手段、15・・・インデックス参照通知手段、l6・
・・インデックス更新待ち合わせ手段、17・・・イン
デックス一括更新手段、l8・・・インデックス更新終
了通知手段、19・・・プロセス起動手段、21、22
、23、41、47・・・データレコード、42、44
、46・・・ブロック、43、45、49・・・インデ
ックスレコード、48・・・項目の値、50・・・アド
レス、51・・・ポインタ値、52、53・・・バッフ
ァ、E・・・更新開始メッセージキュー、F・・・参照
開始メッセージキュー El釘閉袷メ・ソゼージキ1一 「:蔓賊lfl@メ・ンセーゾキュ− 大砧例の橋八 昂 1 図
FIG. 1 is a block diagram showing an embodiment of the present invention. FIG. 2 is an explanatory diagram showing an example (1) of update processing in a plurality of processes according to the embodiment. FIG. 3 is an explanatory diagram showing an example (2) of update processing in a plurality of processes according to the embodiment. FIG. 4 is an explanatory diagram showing data and index input/output in the embodiment. 1l... Index update information storage means, 12...
Index update start notification means, 13... All index batch update means, 14... Index update information deletion means, 15... Index reference notification means, l6.
... Index update waiting means, 17... Index batch update means, l8... Index update completion notification means, 19... Process starting means, 21, 22
, 23, 41, 47...data record, 42, 44
, 46... Block, 43, 45, 49... Index record, 48... Item value, 50... Address, 51... Pointer value, 52, 53... Buffer, E...・Update start message queue, F...Reference start message queue El Nail Closure Me・Sozejiki 11 ``: Bandit lfl@Me・Nsezokyu- Okinuti no Hashi Yako 1 Figure

Claims (1)

【特許請求の範囲】 1、データレコードの複数の項目に対して、項目の値を
キー値としデータレコードのアドレスをポインタ値とす
るインデックスを持つデータベースファイルを備えた情
報処理装置において、 前記データベースファイルのデータ部およびインデック
ス部を複数のプロセスで共有して使用する場合に、イン
デックスの更新時に実際にインデックスを更新せずにイ
ンデックス更新情報をプロセス単位およびインデックス
単位に格納するインデックス更新情報格納手段と、 前記インデックス更新情報の格納開始を通知するインデ
ックス更新開始通知手段と、 プロセス単位の静止点の確立時にそのプロセスで前記イ
ンデックス更新開始手段によってインデックス更新情報
の格納が通知されているインデックスをインデックス更
新情報に基づいて一括更新する全インデックス一括更新
手段と、 データベースファイル更新中に障害が発生したプロセス
における復旧処理でインデックス更新情報を無効とする
インデックス更新情報消去手段と、インデックスの参照
時に前記インデックス更新通知手段によってインデック
ス更新情報が格納された旨の通知がある場合には、イン
デックスの参照を行う旨の通知を行うインデックス参照
通知手段と、 インデックスの参照が可能となるまでインデックスの使
用を持ち合わせるインデックス更新待ち合わせ手段と、 前記インデックス参照通知手段によってインデックスの
参照の通知を受けたインデックスを参照しようとするプ
ロセスを含む全てのプロセスで、該当するインデックス
更新情報が存在する場合、インデックス更新情報に基づ
いてインデックスを実際に更新するインデックス一括更
新手段と、インデックス一括更新が終了した場合インデ
ックスの更新終了を通知するインデックス更新終了通知
手段と、 前記インデックス更新開始通知手段によってインデック
ス更新情報の格納が通知されている全てのプロセスから
インデックスの更新終了が通知された場合、前記インデ
ックス更新待ち合わせ手段によって待ち合わせているプ
ロセスを起動するプロセス起動手段と を備えたことを特徴とする情報処理装置。
[Scope of Claims] 1. An information processing device comprising a database file having an index for a plurality of items of a data record, with the value of the item as a key value and the address of the data record as a pointer value, comprising: an index update information storage means for storing index update information in each process and each index without actually updating the index when updating the index when the data part and the index part are shared and used by multiple processes; an index update start notification means for notifying the start of storing the index update information; and an index update information for an index for which storage of the index update information has been notified by the index update start means in that process when a process-based quiescent point is established. an index update information erasing means for invalidating index update information in a recovery process in a process in which a failure occurs during a database file update; An index reference notification means for notifying that the index will be referenced when there is a notification that index update information has been stored, and an index update waiting means for waiting to use the index until the index can be referenced. , If the corresponding index update information exists, all processes including the process that attempts to refer to the index that has been notified of index reference by the index reference notification means actually update the index based on the index update information. an index batch update means for notifying the end of index update when the index batch update is completed; 1. An information processing apparatus comprising: a process starting means for starting a process being waited for by the index update waiting means when the completion of the update of the index update waiting means is notified.
JP1159050A 1989-06-21 1989-06-21 Information processing device Expired - Lifetime JP2634908B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1159050A JP2634908B2 (en) 1989-06-21 1989-06-21 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1159050A JP2634908B2 (en) 1989-06-21 1989-06-21 Information processing device

Publications (2)

Publication Number Publication Date
JPH0324645A true JPH0324645A (en) 1991-02-01
JP2634908B2 JP2634908B2 (en) 1997-07-30

Family

ID=15685135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1159050A Expired - Lifetime JP2634908B2 (en) 1989-06-21 1989-06-21 Information processing device

Country Status (1)

Country Link
JP (1) JP2634908B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0212460A (en) * 1988-04-08 1990-01-17 Internatl Business Mach Corp <Ibm> Parallel accessing to index tree

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0212460A (en) * 1988-04-08 1990-01-17 Internatl Business Mach Corp <Ibm> Parallel accessing to index tree

Also Published As

Publication number Publication date
JP2634908B2 (en) 1997-07-30

Similar Documents

Publication Publication Date Title
EP0037264A2 (en) Associative memory system
JPH0324645A (en) Information processor
JP2924786B2 (en) Exclusive control system, exclusive control method, and medium for storing exclusive control program for shared file in loosely coupled multiple computer system
JP2641399B2 (en) File management device
JPH0337748A (en) External storage accessing system utilizing main storage
JPH03116248A (en) Data maintenance system for data base
JP2740238B2 (en) File exclusive control unit
JP2787107B2 (en) Buffer control system and device
JP2903605B2 (en) File area management processing method
JP2630215B2 (en) Method of deleting unnecessary file data while online
JPS6150356B2 (en)
JPH0659959A (en) File protection method
JPH11120056A (en) Saving and restoring project data
JP2672818B2 (en) Memory segment management method
JP2735400B2 (en) Asynchronous I/O control method
JPH01258170A (en) Data set management system
JPS62241047A (en) Shared control method for input/output buffer by data base control system
JPH02257282A (en) Table preparation processor
JPS6368960A (en) Sequential access controller for shared storage medium
JPH01166124A (en) Volume shared control system
JPH01120621A (en) Retrieving/updating system for data base
JPH11143745A (en) Data management system and data management method
JPS63167942A (en) File control system
JPH04361338A (en) Transaction log data succeeding system
JPH0682334B2 (en) Management processing device for management table

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20080425

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090425

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100425

Year of fee payment: 13

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100425

Year of fee payment: 13