JPH0816881B2 - Database update method - Google Patents

Database update method

Info

Publication number
JPH0816881B2
JPH0816881B2 JP61087914A JP8791486A JPH0816881B2 JP H0816881 B2 JPH0816881 B2 JP H0816881B2 JP 61087914 A JP61087914 A JP 61087914A JP 8791486 A JP8791486 A JP 8791486A JP H0816881 B2 JPH0816881 B2 JP H0816881B2
Authority
JP
Japan
Prior art keywords
database
page table
slot
transaction
version page
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
JP61087914A
Other languages
Japanese (ja)
Other versions
JPS62245348A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP61087914A priority Critical patent/JPH0816881B2/en
Priority to US07/031,835 priority patent/US5043871A/en
Publication of JPS62245348A publication Critical patent/JPS62245348A/en
Publication of JPH0816881B2 publication Critical patent/JPH0816881B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データベース・システムにおける、トラン
ザクシヨンのデータベース更新方式に係り、特に、デー
タの回復たとえば電源断等のシステム障害が発生したと
きのデータの回復によるデータベースの論理的一貫性を
有するデータベースを更新する方法および装置に係る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a transaction database updating method in a database system, and more particularly to data recovery when a system failure such as power failure occurs. And method for updating a database with logical consistency of the database by recovery of the database.

〔従来の技術〕[Conventional technology]

データベース・システムにおいては、電源断等による
システム障害やプログラム誤り等によるトランザクシヨ
ン障害が発生したとき、データベースの論理的一貫性を
保たねばならない。特に障害発生時に実行未完了のトラ
ンザクシヨンによるデータベース更新結果については、
これを無効にしなければならない。
In a database system, when a system failure such as a power failure or a transaction failure due to a program error or the like occurs, logical consistency of the database must be maintained. Especially regarding the database update result by the transaction that has not been executed at the time of failure,
You have to disable this.

このための従来技術として、トランザクシヨンがデー
タベースを更新する際、更新前の情報の格納箇所とは異
なる新しい箇所に更新結果を格納する方式が知られてお
り、エー・シー・エム,トランザクシヨンズ オン デ
ータベース システムズ,第2巻,第1号(1977年),
第91頁から第104頁(ACM Trans.Database Syst.,Vol.2,
No.1(1977),p p.91−104)に述べられている。この方
式はシヤドウ・ページ方式と呼ばれ、トランザクシヨン
実行完了までにそのすべてのデータベース更新内容を新
たな格納箇所に書き出し、トランザクシヨン実行完了時
点で更新前情報を無効、更新後情報を有効とする。シヤ
ドウ・ページ方式の特徴をまとめると次の(1)〜
(4)となる。
As a conventional technique for this purpose, when the transaction updates the database, a method is known in which the update result is stored in a new place different from the place where the information before the update is stored. Database Systems, Volume 2, Issue 1 (1977),
Pages 91 to 104 (ACM Trans.Database Syst., Vol.2,
No. 1 (1977), pp. 91-104). This method is called the Shadow page method, and all the database updates are written to a new storage location by the time transaction execution is completed, and the pre-update information is invalid and the post-update information is valid when the transaction execution is completed. . Summarizing the features of the shear page method, the following (1)-
It becomes (4).

(1)データベースは論理的な領域の単位であるページ
から構成され、ページとページのデータベース蓄積媒体
上の格納箇所であるスロツトとの対応を表わすページ・
テーブルをカレント版とバツクアツプ版の2つもつ。こ
れらはいずれもデイスク等の不揮発性媒体上に格納され
る。通常、ページ・テーブル自体も複数のブロツクに分
割され、主記憶装置と不揮発媒体との間の転送はブロツ
ク単位に行われる。
(1) A database is composed of pages that are units of logical areas, and pages that represent the correspondence between pages and slots that are storage locations of pages on the database storage medium.
There are two tables, the current version and the backup version. All of these are stored on a non-volatile medium such as a disk. Normally, the page table itself is also divided into a plurality of blocks, and the transfer between the main storage device and the non-volatile medium is performed in block units.

(2)トランザクシヨンによつてデータベースが更新さ
れる場合に更新ページの更新後の内容を格納する新たな
スロツトをカレント・ページ・スロツトと呼び、ページ
との対応はカレント版ページ・テーブルに保持する。一
方、更新前のページの内容を格納しているスロツトはシ
ヤドウ・ページ・スロツトと呼び、ページとの対応はバ
ツクアツプ版ページ・テーブルに保持する。
(2) A new slot that stores the updated contents of the updated page when the database is updated by the transaction is called the current page slot, and the correspondence with the page is held in the current version page table. . On the other hand, the slot storing the contents of the page before the update is called a shy-do page slot, and the correspondence with the page is held in the backup version page table.

(3)トランザクシヨンの実行完了時、カレント版ペー
ジ・テーブルを有効とすることにより、カレント・ペー
ジ・スロツトに格納された更新後情報を有効とする。具
体的には、カレント版とバツクアツプ版のうちいずれの
ページ・テーブルが有効かを示す不揮発媒体上のステー
タス・ビツトを変更する。
(3) When the transaction is completed, the updated version information stored in the current page slot is validated by validating the current version page table. Specifically, the status bit on the non-volatile medium indicating which page table of the current version and the backup version is valid is changed.

(4)トランザクシヨン実行中にシステム/トランザク
シヨン障害が発生すると、ステータス・ビツトによりバ
ツクアツプ版ページ・テーブルが有効なことがわかる。
すなわち、バツクアツプ版ページ・テーブルで示される
シヤドウ・ページ・スロツトに格納された更新前情報が
有効とされる。
(4) If a system / transaction failure occurs during transaction execution, the status bit shows that the backup version page table is valid.
That is, the pre-update information stored in the shed page page slot shown in the backup version page table is valid.

したがつて、システム/トランザクシヨン障害が発生
してもデータベースの論理的一貫性を保つことが可能で
あり、しかもデータベース更新履歴情報の取得は不要で
ある。
Therefore, even if a system / transaction failure occurs, the logical consistency of the database can be maintained, and acquisition of the database update history information is unnecessary.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

上記シヤドウ・ページ方式における従来技術には次の
3つの問題点があつた。
There are the following three problems in the prior art in the shear page method.

第一に、同時に複数のトランザクシヨンがデータベー
スを共用し、これを更新できないことである。この理由
は、トランザクシヨン実行完了時にカレント版ページ・
テーブルの有効化をステータス・ビツトの変更により一
括して行うため、当該ページ・テーブルの中に実行中の
他のトランザクシヨンにより更新中のページに関する情
報が含まれてはならないためである。
First, multiple transactions share the database at the same time and cannot be updated. The reason for this is that the current version page /
This is because the validation of the table is collectively performed by changing the status bit, and therefore, the page table concerned should not include information about the page being updated by another transaction being executed.

第二に、データベース更新結果の有効化と、端末へ送
信するメツセージや主記憶装置上のシステム管理情報の
更新結果の有効化とを同期させることが困難なことであ
る。トランザクシヨンは、通常、データベース更新のみ
ならず、メツセージ送受信やシステム管理情報更新を伴
う。しかし、従来技術におけるステータス・ビツトの変
更はデータベース更新のみに係つている。このため、シ
ステム障害が発生したとき、タイミングによつては、デ
ータベース更新結果のみが有効とされたり、逆にメツセ
ージやシステム管理情報更新結果のみが有効とされたり
する恐れがある。
Second, it is difficult to synchronize the validation of the database update result with the validation of the update result of the message transmitted to the terminal or the system management information on the main storage device. The transaction usually involves not only database updating but also message transmission / reception and system management information updating. However, the status bit changes in the prior art relate only to database updates. Therefore, when a system failure occurs, depending on the timing, only the database update result may be valid, or conversely, only the message or the system management information update result may be valid.

第三に、トランザクシヨン毎に不揮発性媒体上のペー
ジ・テーブルやステータス・ビツトを更新する必要があ
り、この更新オーバヘツドがシステムの性能劣化の一因
となつていることである。
Third, it is necessary to update the page table and status bit on the non-volatile medium for each transaction, and this update overhead contributes to the deterioration of system performance.

第一,第二の問題点のため、複数のオンライントラン
ザクシヨンが同時にデータベースを共用し更新するよう
な現実のシステム環境のもとでは、前述のようなシヤド
ウ・ページ方式ではなく、データベース更新履歴情報を
取得する方式と組み合わせたシヤドウ・ページ方式が用
いられている。しかし、この方式ではデータベース更新
情報取得のオーバヘツドが大きく、上記の第三の問題点
とあわせ、システムの処理効率が低下する恐れがあつ
た。
Due to the first and second problems, under the actual system environment in which multiple online transactions share and update the database at the same time, the database update history information is not used instead of the shadow page method described above. The Shado page method combined with the method of acquiring is used. However, with this method, there is a large overhead in acquiring the database update information, and in addition to the above-mentioned third problem, there is a possibility that the processing efficiency of the system may decrease.

本発明は、シヤドウ・ページ方式を用いたデータベー
ス・システムにおいて、処理効率を低下させることな
く、複数トランザクシヨンによるデータベースの同時更
新を可能とするデータベース更新方法を提供することを
目的とする。
It is an object of the present invention to provide a database updating method that enables simultaneous updating of a database by a plurality of transactions without reducing processing efficiency in a database system using the shadow page method.

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

上記目的を達成するため、本発明におけるデータベー
ス・システムは、データの論理的な格納箇所であるペー
ジから構成されるデータベースと、該データベースの各
ページ該ページの最新の内容が格納されているデータベ
ース蓄積媒体上のスロットとの対応情報を登録するカレ
ント版ページ・テーブルと、上記データベース蓄積媒体
上の各スロットの使用有無を示すカレント版スロット使
用マップと、過去の上記カレント版ページ・テーブルの
内容を記録する複数のバックアップ版ページ・テーブル
と、トランザクション処理に関する履歴情報を記録する
履歴ファイルとを有する。実行中のトランザクションが
データベースを更新するとき、上記カレント版スロット
使用マップに基づいて見い出した空きスロットに更新し
たページの内容を格納する。そして、該ページと該空き
スロットとの対応情報をカレント版ページ・テーブルに
登録し、上記カレント版スロット使用マップ中の上記空
きスロットに関する情報を更新する。さらに、カレント
版ページ・テーブルの変更内容を示す履歴レコードを上
記履歴ファイルに取得する。また、定期的にカレント版
ページ・テーブルと内容が一致するようにバックアップ
版ページ・テーブルを更新する。そして、システム障害
発生時に、上記履歴ファイルに記録されたカレント版ペ
ージ・テーブルの変更内容を示す履歴レコードおよび上
記バックアップ版ページ・テーブルに基づいて、上記カ
レント版ページ・テーブルを回復する。
In order to achieve the above object, a database system according to the present invention is a database including a page which is a logical storage location of data, and a database storage in which the latest contents of each page of the database are stored. Records the current version page table for registering the correspondence information with the slots on the medium, the current version slot usage map indicating whether each slot on the database storage medium is used, and the past contents of the current version page table A plurality of backup version page tables and a history file that records history information regarding transaction processing. When the transaction being executed updates the database, the contents of the updated page are stored in the empty slot found based on the current version slot usage map. Then, the correspondence information between the page and the empty slot is registered in the current version page table, and the information about the empty slot in the current version slot usage map is updated. Further, a history record showing the contents of change in the current version page table is acquired in the history file. Further, the backup version page table is periodically updated so that the contents match the current version page table. Then, when a system failure occurs, the current version page table is restored based on the history record indicating the changed contents of the current version page table recorded in the history file and the backup version page table.

このようなデータベース・システムにおいてさらに、
データベース更新結果の有効化と、端末に送信するメッ
セージやメモリ内のシステム管理情報の更新結果とを同
期させるため、本発明では望ましくは、実行中のトラン
ザクションが端末メッセージを送受信したり、メモリ上
のシステム管理情報を更新する場合、その内容を示す履
歴レコードを上記履歴ファイルに取得し、トランザクシ
ョンの実行完了時、該トランザクションの実行完了を示
す履歴レコードを上記履歴ファイルに取得する。そし
て、システム障害発生時、上記カレント版ページ・テー
ブルを回復するステップにおいて、トランザクションの
処理完了を示す履歴レコードが上記履歴ファイルに取得
されているトランザクシヨンによるデータベース更新の
みを上記データベースに反映するように上記カレント版
ページ・テーブルを回復するとともに、公知の方法で端
末に送信するメッセージやメモリ内のシステム管理情報
を回復する。
Further in such a database system,
In order to synchronize the validation of the database update result with the update result of the message sent to the terminal or the system management information in the memory, it is desirable in the present invention that the transaction being executed transmits or receives the terminal message or is stored in the memory. When updating the system management information, a history record indicating the contents thereof is acquired in the history file, and when the execution of the transaction is completed, a history record indicating the completion of execution of the transaction is acquired in the history file. When a system failure occurs, in the step of recovering the current version page table, the history record indicating the completion of transaction processing is reflected in the database only by the database update by the transaction acquired in the history file. In addition to recovering the current version page table, a message transmitted to the terminal and system management information in the memory are recovered by a known method.

〔作用〕[Action]

カレント版ページ・テーブルの更新内容を示す履歴レ
コードおよびトランザクションの処理完了を示す履歴レ
コードを履歴ファイルに取得し、システム障害時にはこ
れらの履歴レコードを用いてデータベースを回復するの
で、複数のトランザクションがデータベースに同時更新
する場合にも、トランザクションによるデータベース更
新結果を他のトランザクションとは独立に有効化するこ
とができる。また、データベース更新時にデータベース
更新履歴レコードを履歴ファイルに取得せず、データ量
が少ないカレント版ページ・テーブルの更新内容を示す
履歴レコードを履歴ファイルに取得する。
Since multiple history records indicating the updated contents of the current version page table and history records indicating the completion of transaction processing are acquired in the history file and the database is recovered using these history records in the event of a system failure, multiple transactions can be executed in the database. Even when updating at the same time, the database update result of a transaction can be validated independently of other transactions. Further, when the database is updated, the database update history record is not acquired in the history file, but the history record indicating the update contents of the current version page table having a small amount of data is acquired in the history file.

また、カレント版ページ・テーブルの内容が変更させ
る度にバックアップ版ページ・テーブルを更新せず、定
期的にまとめてバックアップ版ページ・テーブルを更新
するので、バックアップ版ページ・テーブルの更新オー
バヘッドが小さい。したがって、システムの処理効率を
低下させることがない。
Also, the backup version page table is not updated every time the contents of the current version page table are changed, but the backup version page table is updated collectively in a batch, so the update overhead of the backup version page table is small. Therefore, the processing efficiency of the system is not reduced.

さらに、システム障害発生時に履歴ファイル中の履歴
レコードを用いて回復処理を行うので、データベース更
新結果の有効化と、端末に送信するメッセージやメモリ
内のシステム管理情報の更新結果とを同期させることが
できる。
In addition, since recovery processing is performed using the history record in the history file when a system failure occurs, it is possible to synchronize the validation of the database update result with the message sent to the terminal or the update result of the system management information in memory. it can.

〔実施例〕〔Example〕

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

最初に、第一の実施例について構成および動作を説明
する。第1図は第一の実施例の構成を示す図であり、本
発明の特徴を表わす図である。第1図において、磁気デ
イスク等のデータベース蓄積媒体50,バツクアツプ版ペ
ージ・テーブル80やバツクアツプ版スロツト使用マツプ
90等のデータベース制御情報を格納する不揮発性記憶媒
体100、および履歴フアイル70の媒体である磁気デイス
ク(あるいは磁気テープ)がCPU/メモリ10に接続されて
いる。データベース蓄積媒体50上のデータベース領域60
は、スロツトと呼ばれる固定長のブロツクに分割されて
いる。一方、トランザクシヨンが参照・更新するデータ
ベースの論理的な空間はページと呼ばれる固定区画に分
割されている。スロツトはページの内容を格納するため
のものであり、両者のサイズは一致する(例えば4096バ
イト)。各スロツトは1回の入出力動作で参照・更新が
できる。第2図は、バツクアツプ版ページ・テーブル80
およびバツクアツプ版スロツト使用マツプ90を説明する
図である。バツクアツプ版ページ・テーブル80はチエツ
クポイント時に更新され、当該時点におけるカレント版
ページ・テーブル30の内容が反映される。すなわち、バ
ツクアツプ版ページ・テーブル80は、最初のチエツクポ
イント時点での各ページの最新の内容のデータベース領
域60内での格納箇所であるスロツトの番号が設定されて
いる。また、バツクアツプ版スロツト使用マツプ90は、
バツクアツプ版ページ・テーブル80同様チエツクポイン
ト時に更新され、当該時点でのカレント版ページ・テー
ブル30にもとづくデータベース領域60内の各スロツトの
使用無を示すビツトマツプである。すなわち、バツクア
ツプ版スロツト使用マツプ90は、最新のチエツクポイン
ト時点での各ページの最新の内容が格納されているスロ
ツトに対しては1、他のスロツトに対しては0が設定さ
れている。バツクアツプ版ページ・テーブル80およびバ
ツクアツプ版スロツト使用マツプ90は、各々複数個の固
定長(例えば512バイト)のブロツク81,91から構成され
ており、各ブロツクは1回の入出力動作で参照・更新が
可能である。バツクアツプ版ページ・テーブル80の書き
込み中に障害が発生した場合、データベースの論理的一
貫性が保証されなくなる。この問題に対し、バツクアツ
プ版ページ・テーブル80を二重化し、最初の書き込み動
作が正常に終了したら引き続き他方への書き込みを実行
する、最初の書き込み動作が異常終了した場合は他方の
バツクアツプ版ページ・テーブルを用いて通常のシステ
ム障害として回復処理を行うことによりデータベースの
論理的一貫性を保証することができる。よつて、以下本
実施例においてはバツクアツプ版ページ・テーブル80に
対する書き込み動作は常に正常に終了するものとする。
なお、バツクアツプ版ページ・テーブル80およびバツク
アツプ版スロツト使用マツプ90は、データベース蓄積媒
体50上に置かれてもよい。次に、第3図はカレント版ペ
ージ・テーブル30およびカレント版スロツト使用マツプ
40を説明する図である。システム動作中、これらのデー
タベース制御情報はメモリ10上に存在する。カレント版
ページ・テーブル30はトランザクシヨンによるデータベ
ース更新時に更新され、更新ページの更新後の内容が格
納されているデータベース領域60のスロツトの番号が設
定される。すなわち、カレント版ページ・テーブル30は
システム動作中の各時点でのデータベースの各ページの
最新の内容が格納されたスロツトの番号が設定されてい
る。また、カレント版ページ・テーブル30はバツクアツ
プ版ページ・テーブル80に対応して複数の固定長の論理
的なブロツク31から構成される。なお、以下の実施例に
おいてメモリ10はカレント版ページ・テーブル30全体を
置くことが可能なものとする。そうでない場合、実行中
のトランザクシヨンによつて更新されたページに対する
エントリを含むブロツクを除くカレント版ページ・テー
ブル30のブロツクをLRUアルゴリズム等を用いてメモリ
(主記憶装置)以外の記憶装置(揮発性でも可)に書き
出すことにより、実質的にはカレント版ページ・テーブ
ル30全体がメモリ10上にあるとしてよい。一方、カレン
ト版スロツト使用マツプ40はトランザクシヨンによるデ
ータベース更新時およびトランザクシヨン実行完了時に
更新され、システムの各時点でのデータベース領域60内
の各スロツトの使用有無を示す。カレント版スロツト使
用マツプ40は、バツクアツプ版スロツト使用マツプ90に
対応して複数の固定長の論理的なブロツク41から構成さ
れる。バツクアツプ版スロツト使用マツプ90と異なり、
カレント版スロツト使用マツプ40においてはデータベー
スの各ページの最新の内容を格納したスロツトだけでは
なく、実行中のトランザクシヨンによつて更新されたペ
ージの更新前の内容を格納したスロツト(シヤドウ・ス
ロツトと呼ぶ)61も使用状態になつている。また、シヤ
ドウ・スロツトに対応するエントリを含むブロツクに対
しては、スロツト使用状況を示す通常のブロツク41の他
に、各スロツトがシヤドウ・スロツトであるか否かを示
すブロツク42が存在する。第4図は履歴フアイル70を説
明する図である。履歴フアイル70には、ページ・テーブ
ル更新ジヤーナル71やトランザクシヨン処理完了ジヤー
ナル72の他に、端末メツセージ・ジヤーナル73やシステ
ム管理情報更新ジヤーナル74等のシステムの各種履歴情
報が時系列時に取得される。ページ・テーブル更新ジヤ
ーナル71は、更新ページ番号,該ページの更新前の内容
を格納したスロツトの番号,該ページの更新後の内容を
格納したスロツトの番号、等の情報を含んでいる。
First, the configuration and operation of the first embodiment will be described. FIG. 1 is a diagram showing the configuration of the first embodiment and is a diagram showing the features of the present invention. In FIG. 1, a database storage medium 50 such as a magnetic disk, a back-up version page table 80, and a back-up version slot-using map.
A nonvolatile storage medium 100 for storing database control information such as 90 and a magnetic disk (or magnetic tape) which is a medium of the history file 70 are connected to the CPU / memory 10. Database area 60 on database storage medium 50
Is divided into fixed-length blocks called slots. On the other hand, the logical space of the database referenced and updated by the transaction is divided into fixed sections called pages. The slot is for storing the contents of the page, and the sizes of both are the same (for example, 4096 bytes). Each slot can be referenced and updated with one input / output operation. Figure 2 shows the backup version page table 80.
FIG. 3 is a diagram for explaining a back-up plate slot use map 90. The backup version page table 80 is updated at the checkpoint, and the contents of the current version page table 30 at that time are reflected. That is, in the backup version page table 80, the slot number which is the storage location in the database area 60 of the latest contents of each page at the time of the first check point is set. In addition, the back-up version slot-using map 90 is
Similar to the backup version page table 80, it is a bit map that is updated at the check point and indicates that each slot in the database area 60 based on the current version page table 30 is not used. That is, the back-up version slot use map 90 is set to 1 for the slot storing the latest contents of each page at the latest check point, and set to 0 for the other slots. The back-up version page table 80 and the back-up version slot-use map 90 are each composed of a plurality of fixed length blocks (512 bytes, for example) 81 and 91, and each block can be referenced / updated by one input / output operation. Is possible. If a failure occurs while writing the backup page table 80, the logical consistency of the database cannot be guaranteed. To solve this problem, the backup page table 80 is duplicated, and after the first write operation is completed normally, writing to the other is continued. If the first write operation is abnormally terminated, the other backup page table It is possible to guarantee the logical consistency of the database by performing recovery processing as an ordinary system failure using. Therefore, hereinafter, in the present embodiment, it is assumed that the write operation to the backup version page table 80 is normally completed.
The backup version page table 80 and the backup version slot use map 90 may be placed on the database storage medium 50. Next, FIG. 3 shows the current version page table 30 and the map using the current version slot.
It is a figure explaining 40. During the system operation, these database control information exists in the memory 10. The current version page table 30 is updated when the database is updated by the transaction, and the slot number of the database area 60 in which the updated content of the updated page is stored is set. That is, the current version page table 30 is set with the slot number in which the latest contents of each page of the database at each point in time during system operation are stored. Further, the current version page table 30 is composed of a plurality of fixed length logical blocks 31 corresponding to the backup version page table 80. In the following embodiments, the memory 10 can store the entire current version page table 30. Otherwise, the blocks of the current version page table 30 excluding the block containing the entry for the page updated by the transaction being executed are stored in a storage device (volatile memory) other than the memory (main storage device) using the LRU algorithm or the like. The entire current version page table 30 may be stored in the memory 10 by writing it to the memory 10. On the other hand, the current version slot use map 40 is updated at the time of updating the database by the transaction and at the completion of the execution of the transaction, and indicates whether or not each slot in the database area 60 is used at each time of the system. The current version slot-use map 40 is composed of a plurality of fixed-length logical blocks 41 corresponding to the back-up version slot-use map 90. Unlike the back-up version slot-using map 90,
In the current version of slot use map 40, not only the slot that stores the latest contents of each page of the database but also the slot that stores the contents before the update of the page updated by the transaction that is being executed (shutter slot Call 61) is also in use. For a block containing an entry corresponding to a shed slot, in addition to a normal block 41 showing the slot usage status, there is a block 42 showing whether or not each slot is a shed slot. FIG. 4 is a diagram for explaining the history file 70. In the history file 70, various history information of the system such as the terminal message journal 73 and the system management information update journal 74 is acquired in time series in addition to the page / table update journal 71 and the transaction processing completion journal 72. The page table update journal 71 includes information such as an updated page number, a slot number in which the contents of the page before updating are stored, and a slot number in which the contents after updating of the page are stored.

次にシステム動作について説明する。システム動作を
通常時動作,チエツクポイント時動作,システム障害時
動作,トランザクシヨン障害時動作に分けて述べる。
Next, the system operation will be described. The system operation is divided into normal operation, checkpoint operation, system failure operation, and transaction failure operation.

(1)通常時動作 トランザクシヨンの実行開始から終了までの本発明に
かかわる処理は(a)〜(f)の順序で行われる。
(1) Normal-time operation The processes according to the present invention from the start to the end of the execution of the transaction are performed in the order of (a) to (f).

(a)実行中のページ読み込み カレント版ページ・テーブル30の該ページのエントリ
をサーチし、該ページの最新の内容を格納するスロツト
の番号を求める。そして、求めたスロツトから該ページ
を読み込む。
(A) Reading of the page being executed The entry of the page in the current version page table 30 is searched for the slot number storing the latest contents of the page. Then, the page is read from the obtained slot.

(b)実行中の更新ページ書き出し 更新ページをデータベース蓄積媒体50上のデータベー
ス領域60に書き出す時の処理フローを第5図に示す。
(B) Writing updated pages during execution FIG. 5 shows a processing flow when writing updated pages to the database area 60 on the database storage medium 50.

最初に、該ページに対するシヤドウ・スロツトが存
在するかどうかを調べる。後述のメモリ10上に蓄積され
たシヤドウ・スロツトに関する情報により、該ページに
対するシヤドウ・スロツトの存在有無を判定することが
できる。
First, check if there is a shed slot for the page. It is possible to determine the presence / absence of a shadow slot for the page based on the information on the shadow slot accumulated in the memory 10 described later.

において該ページに対するシヤドウ・スロツトが
存在するならば、該ページは該トランザクシヨンにおい
て既に1回以上データベースに書き出されている。この
場合、カレント版ページ・テーブル30の該ページのエン
トリをサーチし、求めたスロツトに該ページの更新後の
内容を書き出す。
If there is a shadow slot for the page at, then the page has already been written to the database one or more times at the transaction. In this case, the entry of the page in the current version page table 30 is searched, and the updated content of the page is written in the obtained slot.

において該ページに対するシヤドウ・スロツトが
存在しないならば、該ページを該トランザクシヨンにお
いて初めてデータベースに書き出す場合である。この場
合、以下の手順で新しいスロツトに該ページの更新後の
内容を書き出し、元のスロツトをシヤドウ・スロツトに
する。
If there is no shadow slot for the page at, then the page is first written to the database at the transaction. In this case, the updated contents of the page are written in a new slot by the following procedure, and the original slot is changed to the shadow slot.

カレント版スロツト使用マツプ40をサーチし、空き
スロツトを見いだす。
Search for the current slot-use map 40 and find an empty slot.

上記の空きスロツトに該ページの更新後の内容を書
き出す。
The updated content of the page is written in the above-mentioned empty slot.

カレント版ページ・テーブル30の該ページのエント
リを更新し、上記新スロツトの番号を設定する。また、
カレント版スロツト使用マツプ40を更新し、上記新スロ
ツトを使用中の状態とするとともに、該ページの更新前
の内容を格納していたスロツトをシヤドウ・スロツトと
する。
The entry of the page in the current version page table 30 is updated, and the number of the new slot is set. Also,
The current version slot use map 40 is updated so that the new slot is in the use state, and the slot storing the contents before the update of the page is changed to the shear slot.

該ページのページ番号,更新前の内容を格納してい
るスロット(以後、更新前スロットと言う)および更新
後の内容を格納しているスロット(以後、更新後スロッ
トと言う)の各番号等からなるページ・テーブル更新履
歴情報をメモリ10内に蓄積する。また、該ページについ
て、シヤドウ・スロツトが存在することおよび該シヤド
ウ・スロツトの番号をメモリ10内に蓄積する。
From the page number of the page, the slot storing the pre-update contents (hereinafter referred to as the pre-update slot) and the slot number storing the post-update contents (hereinafter referred to as the post-update slot), etc. The page table update history information is stored in the memory 10. Also, the presence of a shed slot and the number of the shed slot are stored in the memory 10 for the page.

(c)コミツト命令発行時の更新ページ書き出し 前項(b)は、メモリ10内のデータベース・ページ格
納領域があふれた場合などに実行される処理である。本
項は、トランザクシヨンで実行中のプログラムから処理
完了を表わすコミツト命令が発行された時、該トランザ
クシヨンで更新した全てのページをデータベースに書き
出す処理である。内容は、前項(b)の処理を各ページ
について実行することに他ならない。なお、本処理実行
中にシステム障害が発生した時、該トランザクシヨンは
処理未完了とみなし、データベース更新結果はデータベ
ースに反映されない。
(C) Writing of updated page at the time of issuing a commit instruction The above item (b) is a process executed when the database page storage area in the memory 10 overflows. This section is a process of writing all pages updated by the transaction to the database when a commit instruction indicating the completion of the process is issued from the program being executed by the transaction. The content is nothing but the execution of the processing in the previous section (b) for each page. When a system failure occurs during execution of this process, the transaction is regarded as incomplete and the database update result is not reflected in the database.

(d)ページ・テーブル更新ジヤーナル取得 メモリ10内に蓄積したページ・テーブル更新履歴情報
をページ・テーブル更新ジヤーナル71として履歴フアイ
ル70に取得する。
(D) Page / table update journal acquisition The page / table update history information accumulated in the memory 10 is acquired in the history file 70 as the page / table update journal 71.

実際の媒体への出力は、他の端末メツセージ・ジヤー
ナル73やシステム管理情報更新ジヤーナル74等の各種履
歴情報と一緒に、(e)のトランザクシヨン処理完了ジ
ヤーナル取得時あるいはメモリ10内の履歴情報格納領域
があふれた時に行われる。
The actual output to the medium is carried out together with various history information such as other terminal message journal 73 and system management information update journal 74, etc., when the transaction processing completion journal in (e) is acquired or the history information is stored in the memory 10. This is done when the area overflows.

(e)カレント版スロツト使用マツプ更新 (b)の処理でメモリ10内に蓄積したシヤドウ・スロ
ツト管理情報により、該トランザクシヨンで更新したペ
ージに対するシヤドウ・スロツトを解放し、空きスロツ
トとする。具体的には、各シヤドウ・スロツトに対し
て、カレント版スロツト使用マツプ40をサーチし、該ス
ロツトの使用有無を示すビツトおよび該スロツトがシヤ
ドウ・スロツトか否かを示すビツトをいずれもオフにす
る。
(E) Update of current version slot map The shutter slot for the page updated by the transaction is released based on the shutter slot management information accumulated in the memory 10 in the process of (b), and the slot is made empty. Specifically, for each shed slot, search the current version slot use map 40, and turn off both the bit indicating whether or not the slot is used and the bit indicating whether or not the slot is the shed slot. .

(f)トランザクシヨン処理完了ジヤーナル取得 前項(e)が終了すると、トランザクシヨンの処理が
完了したことを示すトランザクシヨン処理完了ジヤーナ
ル72を履歴フアイル70に取得する。
(F) Acquisition of Transaction Processing Completion Journal When the previous item (e) is completed, the transaction processing completion journal 72 indicating that the processing of the transaction is completed is acquired in the history file 70.

(d)で述べたように、本処理では該トランザクシヨ
ンに関する各種履歴情報で履歴フアイル70の媒体に未出
力のものを該トランザクシヨン処理完了ジヤーナルとと
もに履歴フアイル70の媒体に出力する。
As described in (d), in this processing, various history information regarding the transaction that has not been output to the medium of the history file 70 is output to the medium of the history file 70 together with the transaction processing completion journal.

(2)チエツクポイント時動作 チエツクポイントは、システム障害時の回復処理に要
する時間の短縮等の理由により、下記のようなタイミン
グで設定される。
(2) Operation at check point The check point is set at the following timing for the reason of shortening the time required for the recovery processing at the time of system failure.

・システム開始/再開始処理終了時 ・システム終了時 ・前回のチエツクポイントから一定件数の履歴情報を取
得した時 ・その他(履歴フアイルの媒体障害時等) チエツクポイント時動作のうち、データベースにかか
わる処理は、以下の(a),(b)の順に行われる。
-At the end of system start / restart processing-At the end of system-When a certain number of history information is acquired from the previous check points-Others (when media failure of history file etc.) Processing related to database among check point operations Is performed in the order of (a) and (b) below.

(a)ページ・テーブル更新ジヤーナル取得 メモリ10内に蓄積したページ・テーブル更新履歴情報
をページ・テーブル更新ジヤーナル71として履歴フアイ
ル70に取得する((1)通常時動作の(d)と異なり、
媒体に出力する)。
(A) Page / table update journal acquisition The page / table update history information accumulated in the memory 10 is acquired in the history file 70 as the page / table update journal 71 ((1) unlike normal operation (d),
Output to medium).

(b)バツクアツプ版ページ・テーブル等の更新 不揮発性記憶媒体100上のバツクアツプ版ページ・テ
ーブル80およびバツクアツプ版スロツト使用マツプ90を
更新し、カレント版ページ・テーブル30の内容を反映さ
せる。バツクアツプ版ページ・テーブル80については、
カレント版ページ・テーブル30の内容をそのまま書き出
せばよい。バツクアツプ版スロツト使用マツプ90につい
ては、カレント版スロツト使用マツプ40においてスロツ
ト使用有無を示すビツトマツプのブロツク41とシヤドウ
・スロツトか否かを示すビツトマツプのブロツク42の排
他的論理和の結果を書き出せばよい。
(B) Update of backup version page table, etc. The backup version page table 80 and the backup version slot use map 90 on the non-volatile storage medium 100 are updated to reflect the contents of the current version page table 30. For back-up version page table 80,
The contents of the current version page table 30 may be directly written out. For the back-up version slot-using map 90, the result of the exclusive OR of the block 41 of the bit map indicating whether the slot is used and the block 42 of the bottom map indicating whether the slot is used or not in the current version slot-using map 40 may be written out.

また、カレント版ページ・テーブル30およびカレント
版スロツト使用マツプ40のブロツク毎に前回のチエツク
ポイントからの更新有無を示す更新フラグを設け、必要
なブロツクのみを不揮発性記憶媒体100上のバツクアツ
プ版ページ・テーブル80およびバツクアツプ版スロツト
使用マツプ90に書き出すことにより、更新量を削減する
ことができる。
In addition, an update flag is provided for each block of the current-version page table 30 and the current-version slot-use map 40 to indicate whether or not the update has been made from the previous check point, and only the necessary blocks are back-up version pages on the non-volatile storage medium 100. By writing to the table 80 and the backup-up slot use map 90, the update amount can be reduced.

なお、チエツクポイント情報として、バツクアツプ版
ページ・テーブル80を更新する時に履歴フアイル70中の
最終の履歴情報の(各履歴情報に付与された一貫)番号
およびチエチクポイント時に実行中の全トランザクシヨ
ンに関する履歴情報の中の最初の履歴情報の(各履歴情
報に付与された一貫)番号を、バツクアツプ版ページ・
テーブル80とともに不揮発性記憶媒体100に取得してお
く。
As the checkpoint information, the number (consistently given to each history information) of the last history information in the history file 70 when updating the backup version page table 80 and all the transactions being executed at the time of the checkpoint are related. The first (upper limit) number of the history information in the history information (consistent to each history information)
It is acquired in the nonvolatile storage medium 100 together with the table 80.

上記(a),(b)の処理を行つている間、トランザ
クシヨンは実行状態であつてもよいがデータベースの更
新はできず、データベース更新を要求するトランザクシ
ヨンは待ち状態になる。
While the transactions (a) and (b) are being performed, the transaction may be in the execution state, but the database cannot be updated, and the transaction requesting the database update is in the waiting state.

なお、(b)におけるチエツクポイント情報は、デー
タベースの地にメツセージやシステム管理情報等の回復
対象を有するシステム環境では、システム障害からの回
復処理で用いる各種情報を格納するフアイルに通常取得
される。
Note that the check point information in (b) is normally acquired in a file that stores various information used in recovery processing from a system failure in a system environment in which a database, a message, system management information, or the like has a recovery target.

(3)システム障害時動作 電源断等のシステム障害が発生した時のデータベース
回復処理を以下に述べる。処理フローを第6図に示す。
下記(a)〜(c)の処理実行後、システムはカレント
版ページ・テーブル30にもとづいて必要なページを読み
込み、通常処理を開始する。
(3) Operation at the time of system failure The database recovery processing when a system failure such as power failure occurs is described below. The processing flow is shown in FIG.
After executing the processes of (a) to (c) below, the system reads the required page based on the current version page table 30 and starts the normal process.

(a)データベース制御情報の読み込み 不揮発性記憶媒体100からバツクアツプ版ページ・テ
ーブル80およびバツクアツプ版スロツト使用マツプ90を
読み込み、各々カレント版ページ・テーブル30およびカ
レント版スロツト使用マツプ40としてメモリ10内に展開
する。なお、カレント版スロツト使用マツプ40はシステ
ム障害からの回復処理が終了して通常処理が開始される
までは各スロツトの使用有無を示すビツトマツプ・ブロ
ツク41のみから構成されており、シヤドウ・スロツトか
否かを示すビツトマツプ・ブロツク42は存在しない。
(A) Reading of database control information The back-up version page table 80 and the back-up version slot-use map 90 are read from the non-volatile storage medium 100 and expanded in the memory 10 as the current version page table 30 and the current-version slot use map 40, respectively. To do. It should be noted that the current version slot use map 40 is composed of only the bit map block 41 which indicates the use or non-use of each slot until the recovery process from the system failure is completed and the normal process is started. There is no Bitmap block 42 indicating that.

(b)トランザクシヨンの状態解析 履歴フアイル70を読み、システム障害発生時のトラン
ザクシヨンの状態を解析する。そして、解析結果をもと
にトランザクシヨンを分類する。トランザクシヨンは、
必要な回復処理の内容により第7図に示すように下記の
〜に分類される。なお、第7図において111はチエ
ツクポイント、112はシステム障害発生時点、121〜125
はトランザクシヨンを示す。
(B) Analysis of transaction status The history file 70 is read to analyze the status of the transaction when a system failure occurs. Then, the transactions are classified based on the analysis result. The transaction is
Depending on the contents of the necessary recovery processing, as shown in FIG. In FIG. 7, 111 is a check point, 112 is a system failure occurrence point, 121 to 125.
Indicates a transaction.

タイプIのトランザクシヨン 121のトランザクシヨンのように、チエツクポイント
以前に完了したトランザクシヨン。なお、トランザクシ
ヨンの完了はトランザクシヨン処理完了ジヤーナルの取
得有無により判定する。
A type I transaction A transaction completed before the checkpoint, like the 121 transaction. The completion of the transaction is determined by whether or not the transaction processing completion journal is acquired.

タイプIIのトランザクシヨン 122のトランザクシヨンのように、チエツクポイント
以前に始まり、チエツクポイント後に完了したトランザ
クシヨン。
Type II transaction Like the 122 transaction, a transaction that started before the checkpoint and completed after the checkpoint.

タイプIIIのトランザクシヨン 123のトランザクシヨンのように、チエツクポイント
以前に始まり、システム障害発生時に実行中であつたト
ランザクシヨン。
A type III transaction Like the 123 transaction, a transaction that started before the checkpoint and was running when the system failed.

タイプIVのトランザクシヨン 124のトランザクシヨンのように、チエツクポイント
後に始まり、システム障害が発生する前に完了したトラ
ンザクシヨン。
Type IV transaction Like the 124 transaction, a transaction that begins after a checkpoint and completes before a system failure occurs.

タイプVのトランザクシヨン 125のトランザクシヨンのように、チエツクポイント
後に始まり、システム障害発生時に実行中であつたトラ
ンザクシヨン。
Type V transaction Like the 125 transaction, the transaction that started after the checkpoint and was running when the system failed.

後述するようにタイプIのトランザクシヨンに対する
データベース回復処理は不要である。したがつて、デー
タベース回復処理において解析すべき履歴情報の範囲
は、チエツクポイント時に実行中であつた全トランザク
シヨンの最初の履歴情報以降である。この履歴情報の番
号はチエツクポイント時にチエツクポイント時の最終履
歴情報の番号とともに不揮発性記憶媒体100に書き出さ
れているので、回復処理の先頭でメモリ10内に読み込め
ばよい。
As will be described later, database recovery processing for type I transactions is not required. Therefore, the range of history information to be analyzed in the database recovery processing is after the first history information of all transactions that were being executed at the checkpoint. The history information number is written in the non-volatile storage medium 100 at the time of the checkpoint together with the final history information number at the checkpoint, so it may be read into the memory 10 at the beginning of the recovery process.

(c)データベース制御情報の回復 (b)で分類したトランザクシヨンのタイプに応じ
て、回復処理を行う。
(C) Recovery of database control information Recovery processing is performed according to the transaction type classified in (b).

タイプIのトランザクシヨン 該トランザクシヨンによる全ての処理は有効である。
該トランザクシヨンのデータベース更新結果は既に有効
化されており、データベース回復処理は不要である。
Type I Transactions All processing by the transaction is valid.
The database update result of the transaction has already been validated, and database recovery processing is unnecessary.

タイプIIのトランザクシヨン 該トランザクシヨンによる全ての処理は有効である
が、該トランザクシヨンのデータベース更新結果の一部
が有効化されていない可能性がある。したがつて、履歴
フアイル70中の該トランザクシヨンのページ・テーブル
更新ジヤーナル71を用いて該トランザクシヨンの有効化
されていないデータベース更新結果をメモリ10内のデー
タベース制御情報20に反映させる。すなわち、該トラン
ザクシヨンのチエツクポイント後に履歴フアイル70に取
得されたページ・テーブル更新ジヤーナル71を取得順に
履歴ファイル70から読み込み、カレント版ページ・テー
ブル30およびカレント版スロツト使用マツプ40を更新す
る。カレント版ページ・テーブル30については、該ペー
ジに関するエントリをサーチし、更新後スロツト番号を
設定する。また、カレント版スロツト使用マツプ40につ
いては、更新前および更新後の各スロツトに対するエン
トリをサーチし、各々オフおよびオンにする。
Type II transaction Although all the processing by the transaction is valid, it is possible that a part of the database update result of the transaction is not validated. Therefore, the page table update journal 71 of the transaction in the history file 70 is used to reflect the non-validated database update result of the transaction in the database control information 20 in the memory 10. That is, after the checkpoint of the transaction, the page table update journal 71 acquired in the history file 70 is read from the history file 70 in the order of acquisition, and the current version page table 30 and the current version slot use map 40 are updated. The current version page table 30 is searched for an entry relating to the page and the updated slot number is set. Further, for the current version slot use map 40, the entries for the slots before and after the update are searched and turned off and on, respectively.

タイプIIIのトランザクシヨン 該トランザクシヨンによる全ての処理は無効である
が、該トランザクシヨンのデータベース更新結果は一部
が有効化されている可能性がある。したがつて、履歴フ
アイル70中の該トランザクシヨンのページ・テーブル更
新ジヤーナル71を用いて該トランザクシヨンの有効化さ
れたデータベース更新結果をメモリ10内のデータベース
制御情報20から取り除く。すなわち、該トランザクシヨ
ンのチエツクポイント以前に取得されたページ・テーブ
ル更新ジヤーナル71を取得順とは逆順に読み込み、カレ
ント版ページ・テーブル30およびカレント版スロツト使
用マツプ40を更新する。カレント版ページ・テーブル30
については、該ページに関するエントリをサーチし、更
新前スロツト番号を設定する。また、カレント版スロツ
ト使用マツプ40については、更新前および更新後の各ス
ロツトに対するエントリをサーチし、各々オンおよびオ
フする。
Type III transaction Although all processing by the transaction is invalid, the database update result of the transaction may be partially validated. Therefore, the page table update journal 71 of the transaction in the history file 70 is used to remove the validated database update result of the transaction from the database control information 20 in the memory 10. That is, the page table update journal 71 acquired before the check point of the transaction is read in the reverse order of the acquisition order, and the current version page table 30 and the current version slot use map 40 are updated. Current version page table 30
For, the entry for the page is searched and the slot number before update is set. As for the current version slot use map 40, the entries for the slots before and after the update are searched and turned on and off respectively.

タイプIVのトランザクシヨン 該トランザクシヨンによる全ての処理は有効である
が、該トランザクシヨンのデータベース更新結果は有効
化されていない。したがつて、履歴フアイル70中の該ト
ランザクシヨンのページ・テーブル更新ジヤーナルを用
いて該トランザクシヨンのデータベース更新結果をメモ
リ10内のデータベース制御情報20に反映させる。本項で
は該トランザクシヨンの全てのページ・テーブル更新ジ
ヤーナル71を用いることを除き、具体的な処理内容は
のタイプIIのトランザクシヨンと同じである。
Type IV transaction All the processing by the transaction is valid, but the database update result of the transaction is not valid. Therefore, the database update information of the transaction is reflected in the database control information 20 in the memory 10 by using the page table update journal of the transaction in the history file 70. In this section, the specific processing contents are the same as those of the type II transaction except that all the page table update journals 71 of the transaction are used.

本タイプのトランザクシヨンが複数存在する場合、ト
ランザクシヨン処理完了ジヤーナルを取得した順に上記
処理を行う。
When there are multiple transactions of this type, the above processing is performed in the order in which the transaction processing completion journals are acquired.

タイプVのトランザクシヨン 該トランザクシヨンによる全ての処理は無効である。
該トランザクシヨンのデータベース更新結果は有効化さ
れておらず、データベース回復処理は不要である。
Type V Transaction All processing by the transaction is invalid.
The database update result of the transaction has not been validated and database recovery processing is unnecessary.

なお、データベース以外の回復対象であるメツセージ
やシステム管理情報等の回復処理は、履歴フアイル70を
解析することにより公知の方法で行う。
It should be noted that the recovery processing of the messages other than the database, such as the messages to be recovered and the system management information, is performed by a known method by analyzing the history file 70.

(4)トランザクシヨン障害時動作 履歴フアイル70へのトランザクシヨン処理完了ジヤー
ナル72取得以前のプログラム・エラー等発生によるトラ
ンザクシヨン障害の場合、以下の回復処理を行う。
(4) Operation at the time of a transaction failure In the case of a transaction failure due to the occurrence of a program error before acquisition of the journal 72, the following recovery processing is performed.

(a)データベース制御情報の回復 メモリ10内に蓄積したシヤドウ・スロツト管理情報を
用いて、該トランザクシヨンの全ての更新ページについ
て下記の,の処理を行う。
(A) Recovery of database control information Using the shutter / slot management information accumulated in the memory 10, the following processes are performed for all updated pages of the transaction.

カレント版ページ・テーブル30の該ページに関するエ
ントリをサーチし、更新前スロツト番号を設定する。
The entry for the page in the current version page table 30 is searched and the slot number before update is set.

カレント版スロツト使用マツプ40をサーチし、該ペー
ジの更新後スロツトの使用有無を示すビツトおよび該ペ
ージの更新前スロツトがシヤドウ・スロツトか否かを示
すビツトをともにオフにする。
The current version slot use map 40 is searched, and both the bit indicating whether the slot after update of the page is used and the bit indicating whether the slot before update of the page is a shutter slot are turned off.

(b)メモリ内のページ内容の回復 相異なるトランザクシヨン間でメモリ10内にロードさ
れたページの引継ぎを行う場合は、該トランザクシヨン
による更新前の情報をメモリ10内に残しておき、それを
用いて該ページの内容を該トランザクシヨン実行開始時
点の内容に戻す。
(B) Recovery of page contents in memory When handing over a page loaded in the memory 10 between different transactions, the information before the update by the transaction is left in the memory 10 and the information is updated. The contents of the page are returned to the contents at the time when the execution of the transaction is started by using.

なお、メツセージやシステム管理情報等の回復処理
は、履歴フアイル70にもとづいて公知の方法で行う。
Incidentally, the recovery processing of the message, the system management information and the like is carried out by a known method based on the history file 70.

以上述べたように、本実施例によれば前述のシヤドウ
・ページ方式の3つの問題点を解決することができる。
また、本実施例特有の効果を第一として、チエツクポイ
ント時にシステム停止状態である必要がなくトランザク
シヨン実行中であつてもよい(ただし、データベース更
新を要求するトランザクシヨンは待ち状態になる)の
で、チエツクポイント処理のオーバヘツドが小さい。第
二の効果として、チエツクポイント時に実行中の全トラ
ンザクシヨンの最初の履歴情報の番号を不揮発性記憶媒
体に記録するので、システム障害発生時の回復処理にお
いてデータベースに関して解析すべき履歴情報の範囲が
狭くなり、回復処理に要する時間が短縮される。また、
チエツクポイント時にメモリ10内のシステム管理情報等
を不揮発性記憶媒体に書き出し、システム障害発生時に
上記の書き出した情報を用いて回復処理を行えば、デー
タベース以外に関しても解析すべき履歴情報の範囲が狭
くなり、回復処理に関する時間は更に短縮される。
As described above, according to this embodiment, it is possible to solve the above-mentioned three problems of the shear page method.
Further, with the first effect peculiar to this embodiment, the system need not be in the stopped state at the time of the checkpoint and may be in the transaction execution (however, the transaction requesting the database update is in the waiting state). , The check point processing overhead is small. As a second effect, the number of the first history information of all transactions being executed at the time of checkpoint is recorded in the non-volatile storage medium, so the range of history information to be analyzed regarding the database in the recovery process at the time of system failure occurs. It becomes narrower and the time required for the recovery process is shortened. Also,
If the system management information in the memory 10 is written to a non-volatile storage medium at the time of a check point, and the recovery processing is performed using the above written information when a system failure occurs, the range of history information to be analyzed is narrowed even for other than the database. Therefore, the time required for the recovery process is further shortened.

なお、システム障害発生時の回復処理において、デー
タベース回復処理を本実施例のようにトランザクシヨン
毎に行うのではなく、下記の,のようにすることに
より、トランザクシヨンの状態解析およびメツセージや
システム管理情報等の回復初流と一緒に回復処理を効率
的に行うことができる。
In the recovery processing when a system failure occurs, the database recovery processing is not performed for each transaction as in the present embodiment, but by performing the following, the status analysis of the transaction and the message or system management are performed. It is possible to efficiently perform recovery processing together with the initial recovery of information and the like.

最初に履歴フアイル70を最終の履歴情報から取得順
とは逆順に読み込み、トランザクシヨンの状態解析およ
び未完了トランザクシヨンの処理の無効化を行う。
First, the history file 70 is read from the final history information in the reverse order of the acquisition order, and the state analysis of transactions and the processing of incomplete transactions are invalidated.

次に履歴フアイル70を取得順に読み込み、完了トラ
ンザクシヨンの処理の有効化を行う。
Next, the history file 70 is read in the order of acquisition, and the processing of the completed transaction is validated.

次に、第二の実施例について構成および動作を説明す
る。第8図は第二の実施例の構成を示す図である。基本
的には第一の実施例と同じであり、バツクアツプ版ペー
ジ・テーブル80およびバツクアツプ版スロツト使用マツ
プ90からなる不揮発性記憶媒体100上のデータベース制
御情報が2組である点が第一の実施例と異なる。なお、
第8図においてこれらの2組のデータベース制御情報は
別々の不揮発性記憶媒体100に格納されているが、2組
とも同じ不揮発性記憶媒体(データベース蓄積媒体50で
もよい)に格納されていてもよい。2組のバツクアツプ
版ページ・テーブル80およびバツクアツプ版スロツト使
用マツプ90は、チエツクポイント時に交互に更新され、
システム障害発生時の回復処理では最新の有効なチエツ
クポイント時に更新された方が使用される。このため、
不揮発性記憶媒体100にチエツクポイント情報として、
第一の実施例同様に該バツクアツプ版ページ・テーブル
80の更新時の履歴フアイル70中の最終履歴情報の番号を
記録する領域を設けるとともに、該チエツクポイントの
有効/無効を示すチエツクポイント有効フラグを設け
る。なお、第一の実施例とは異なり、各バツクアツプ版
ページ・テーブル80が二重化されている必要はない。
Next, the configuration and operation of the second embodiment will be described. FIG. 8 is a diagram showing the configuration of the second embodiment. Basically, it is the same as the first embodiment, and the first embodiment is that there are two sets of database control information on the non-volatile storage medium 100 consisting of the backup version page table 80 and the backup version slot use map 90. Different from the example. In addition,
In FIG. 8, these two sets of database control information are stored in different non-volatile storage media 100, but both sets may be stored in the same non-volatile storage medium (may be the database storage medium 50). . Two sets of back-up page tables 80 and back-up slot-using maps 90 are alternately updated at the checkpoint,
In the recovery process when a system failure occurs, the one updated at the latest valid check point is used. For this reason,
As the checkpoint information in the non-volatile storage medium 100,
Similar to the first embodiment, the backup version page table
An area for recording the number of the final history information in the history file 70 at the time of updating 80 is provided, and a check point valid flag showing validity / invalidity of the check point is provided. Note that, unlike the first embodiment, each backup version page table 80 does not need to be duplicated.

次にシステム動作について述べる。通常時動作および
トランザクシヨン障害時動作は第一の実施例と同様に行
われる。よつて、以下においてはチエツクポイント時動
作およびシステム障害時動作について述べる。
Next, the system operation will be described. The normal operation and the transaction failure operation are performed as in the first embodiment. Therefore, the operation at the time of checkpoint and the operation at the time of system failure will be described below.

(1)チエツクポイント時動作 チエツクポイント時動作のうち、データベースにかか
わる処理について述べる。処理フローを第9図に示す。
(1) Checkpoint operation At the checkpoint operation, the processing related to the database will be described. The processing flow is shown in FIG.

(a)バツクアツプ版ページ・テーブル等の更新 該チエツクポイント時に更新すべきバツクアツプ版ペ
ージ・テーブル80およびバツクアツプ版スロツト使用マ
ツプ90を選択し、必要な更新処理を行う。更新対象とな
るバツクアツプ版ページ・テーブル等は、システム開始
/再開始時に選択した後、有効なチエツクポイント毎に
切り換えていく。選択したバツクアツプ版ページ・テー
ブル80およびバツクアツプ版スロツト使用マツプ90の更
新処理は、第一の実施例と同様に行う。ただし、更新フ
ラグは各々のバツクアツプ版ページ・テーブル80および
バツクアツプ版スロツト使用マツプ90毎に設定する必要
がある。
(A) Updating the backup version page / table, etc. Select the backup version page table 80 and the backup version slot use map 90 that should be updated at the check point, and perform the necessary update processing. The backup version page / table to be updated is selected at the time of system start / restart, and then switched at each valid check point. The update processing of the selected backup-up page table 80 and the backup-up slot use map 90 is performed in the same manner as in the first embodiment. However, the update flag must be set for each backup version page table 80 and each backup version slot use map 90.

なお、チエツクポイント情報として不揮発性記憶媒体
100にバツクアツプ版ページ・テーブル80更新時の履歴
フアイル70中の最終履歴情報の番号を取得するととも
に、上記不揮発性記憶媒体100上のチエツクポイント有
効フラグをオフ(無効状態)にする。
A nonvolatile storage medium is used as the checkpoint information.
The number of the final history information in the history file 70 at the time of updating the backup version page table 80 is acquired in 100, and the check point valid flag on the nonvolatile storage medium 100 is turned off (invalid state).

上記処理を行つている間、データベースの更新を含
め、トランザクシヨンは実行状態であつてもよい。
While performing the above processing, the transaction may be in the execution state including the update of the database.

(b)チエツクポイント有効監視 チエツクポイント時に実行中の全トランザクシヨンの
実行状態を監視し、該チエツクポイントの有効監視を行
う。第10図はチエツクポイント有効監視を説明する図で
あり、図において210および211はチエツクポイント、22
1〜229はトランザクシヨン、230はトランザクシヨン障
害、231はトランザクシヨン障害に対する回復処理を示
す。チエツクポイント210の時点で実行中の全トランザ
クシヨン221,224,226,228がチエツクポイント有効監視
の対象となり、トランザクシヨン障害230の発生により
該チエツクポイントは無効となる。この場合、トランザ
クシヨン障害230に対する回復処理231の終了後、再度チ
エツクポイント211を取り直す。今度はチエツクポイン
ト211の時点で実行中の全トランザクシヨン222,225,22
7,229がチエツクポイント有効監視の対象となり、トラ
ンザクシヨン229の処理完了によりチエツクポイント211
は有効となる。
(B) Checkpoint effective monitoring The execution state of all transactions being executed at the time of the checkpoint is monitored, and the checkpoints are effectively monitored. FIG. 10 is a diagram for explaining checkpoint effective monitoring, in which 210 and 211 are checkpoints and 22.
Reference numerals 1 to 229 denote a transaction, 230 a transaction failure, and 231 a recovery processing for the transaction failure. All the transaction points 221, 224, 226, 228 that are being executed at the time of the checkpoint 210 are the targets of checkpoint valid monitoring, and the occurrence of the transaction failure 230 invalidates the checkpoint. In this case, after completion of the recovery processing 231 for the transaction failure 230, the check point 211 is taken again. This time all the transactions 222,225,22 running at checkpoint 211.
7,229 will be subject to checkpoint effective monitoring, and checkpoint 211 will be completed after transaction 229 processing is completed.
Is valid.

(c)チエツクポイント有効フラグの更新 チエツクポイント有効監視の結果、該チエツクポイン
トが有効になつた場合、不揮発性記憶媒体100上のチエ
ツクポイント有効フラグをオン(有効状態)にする。
(C) Update of checkpoint valid flag When the checkpoint is valid as a result of the checkpoint valid monitoring, the checkpoint valid flag on the non-volatile storage medium 100 is turned on (valid state).

(2)システム障害時動作 電源断等のシステム障害が発生した時のデータベース
回復処理は基本的には第一の実施例と同様に行うが、以
下に述べるように少し異なる。下記(a)〜(c)の処
理実行後、システムはカレント版ページ・テーブル30に
もとづいて必要なページを読み込み、通常処理を開始す
る。
(2) Operation at the time of system failure The database recovery processing when a system failure such as power failure occurs is basically performed in the same manner as in the first embodiment, but is slightly different as described below. After executing the processes of (a) to (c) below, the system reads the required page based on the current version page table 30 and starts the normal process.

(a)データベース制御情報の読み込み 最初に読み込むべきバツクアツプ版ページ・テーブル
80およびバツクアツプ版スロツト使用マツプ90を選択し
た後、それらに対する読み込み処理を第一の実施例と同
様に行う。読み込み対象の選択は下記の通りに行う。
(A) Reading the database control information The backup version page table to be read first
After selecting 80 and the back-up plate slot use map 90, the reading process for them is performed as in the first embodiment. Select the read target as follows.

各不揮発性記憶媒体100から、各々のチエツクポイ
ント有効フラグおよびバツクアツプ版ページ・テーブル
80更新時の履歴フアイル70中の最終履歴情報の番号を読
む。
Checkpoint valid flag and backup version page table from each nonvolatile storage medium 100.
80 Update history file Read the number of the last history information in file 70.

チエツクポイント有効フラグがともにオン(有効状
態)の場合、バツクアツプ版ページ・テーブル80更新時
の最終履歴情報の番号を比較し、新しい方を読み込み対
象とする。
If both checkpoint valid flags are ON (valid state), the numbers of the final history information at the time of updating the backup version page table 80 are compared, and the newer one is targeted for reading.

チエツクポイント有効フラグが一方のみオンの場
合、オンの方を読み込み対象とする。なお、チエツクポ
イント時の動作より、両方のチエツクポイント有効フラ
グがオフとなることはない。
If only one of the checkpoint valid flags is on, the one that is on will be read. It should be noted that both checkpoint valid flags are never turned off because of the operation at the checkpoint.

上記選択処理において選択されなかつた方のバツクア
ツプ版ページ・テーブル80およびバツクアツプ版スロツ
ト使用マツプ90は、次のチエツクポイント時の更新対象
となる。また、それらの更新フラグは全てオンに設定さ
れる。
The back-up version page table 80 and the back-up version slot use map 90 that have not been selected in the above selection process are to be updated at the next check point. Also, all of these update flags are set to ON.

(b)トランザクシヨンの状態解析 履歴フアイル70を読み、第一の実施例と同様に行う。
ただし、本実施例の場合はチエツクポイント有効監視に
より、タイプIIIのトランザクシヨンは存在せず、デー
タベース回復処理において解析すべき履歴情報の範囲は
チエツクポイント時点での最終履歴情報以降である。
(B) Analysis of transaction state The history file 70 is read, and the same procedure as in the first embodiment is performed.
However, in the case of the present embodiment, due to the checkpoint effective monitoring, there is no type III transaction, and the range of history information to be analyzed in the database recovery processing is after the last history information at the time of the checkpoint.

(c)データベース制御情報の回復 タイプIIIのトランザクシヨンが存在しない以外は第
一の実施例と同様に行う。
(C) Recovery of database control information The procedure is the same as in the first embodiment except that there is no type III transaction.

なお、メツセージやシステム管理情報等の回復処理
は、履歴フアイル80を解析することにより公知の方法で
行う。
The recovery processing of the message, system management information and the like is performed by a known method by analyzing the history file 80.

以上述べたように、本実施例によれば第一の実施例同
様に前述のシヤドウ・ページ方式の3つの問題点を解決
することができる。また、本実施例特有の効果の第一と
して、チエツクポイント時にシステム停止状態である必
要がなく、データベース更新を含めてトランザクシヨン
実行中であつてもよい。したがつて、チエツクポイント
処理のオーバヘツドが第一の実施例よりも更に小さい。
第二の効果として、チエツクポイント有効監視によりシ
ステム障害発生時の回復処理においてデータベースに関
して解析すべき履歴情報の範囲がチエツクポイント時点
での最終履歴情報以降ですみ、回復処理に関する時間が
短縮される。メモリ内のシステム管理情報等のデータベ
ース制御情報と同様の方法を用いれば回復に要する時間
が更に短縮されるのは第一の実施例と同様である。
As described above, according to this embodiment, like the first embodiment, it is possible to solve the above-mentioned three problems of the shadow page method. Further, as the first effect peculiar to the present embodiment, the system does not need to be in the stopped state at the check point, and the transaction may be executed including the database update. Therefore, the overhead of the checkpoint process is smaller than that of the first embodiment.
The second effect is that by checking the checkpoints effectively, the range of history information to be analyzed for the database in the recovery process when a system failure occurs is only after the last history information at the time of the checkpoints, and the recovery process time is shortened. As in the first embodiment, the time required for recovery is further shortened by using the same method as the database control information such as the system management information in the memory.

次に、第三の実施例について構成および動作を説明す
る。第11図は第三の実施例の構成を示す図である。本実
施例においては、第一の実施例の構成に更に複数のチエ
ツクポイント・ダンプ・フアイル200を加え、CPU/メモ
リ10に接続した構成になつている。チエツクポイント・
ダンプ・フアイル200はチエツクポイント時にメモリ10
上のシステム管理情報やデータベース制御情報20等が書
き出されるフアイルであり、ラウンドロビン方式で使用
される。すなわち、チエツクポイント毎に順に各チエツ
クポイント・ダンプ・フアイルが使用され、一巡すると
再び先頭のチエツクポイント・ダンプ・フアイルから順
に使用していく。このとき、以前書き出した情報(チエ
ツクポイント・ダンプ情報と呼ぶ)を消さないようにそ
の後に新たなチエツクポイント・ダンプ情報を書き出
す。そして、システム障害発生時の回復処理では最新の
有効なチエツクポイント時に取得されたチエツクポイン
ト・ダンプ情報が用いられる。このため、チエツクポイ
ント・ダンプ・フアイル200にはメモリ10上のシステム
管理情報やデータベース制御情報20等のチエツクポイン
ト・ダンプ情報の他に、有効なチエツクポイントに対し
てチエツクポイント情報としてチエツクポイント時の履
歴フアイル70中の最終履歴情報の番号が含まれている。
なお、バツクアツプ版ページ・テーブル80の二重化は第
二の実施例同様に不要である。
Next, the configuration and operation of the third embodiment will be described. FIG. 11 is a diagram showing the configuration of the third embodiment. In this embodiment, a plurality of checkpoint dump files 200 are further added to the structure of the first embodiment, and the structure is connected to the CPU / memory 10. Check Point
Dump File 200 has 10 memory at checkpoint
It is a file in which the above system management information, database control information 20, etc. are written out, and is used in a round robin system. In other words, each checkpoint dump file is used in sequence for each checkpoint, and after one cycle, the checkpoint dump files are used again in order from the leading checkpoint dump file. At this time, new checkpoint dump information is written out so as not to erase the previously written information (called checkpoint dump information). Then, in the recovery process when a system failure occurs, the checkpoint dump information acquired at the latest valid checkpoint is used. Therefore, in addition to the checkpoint dump information such as the system management information on the memory 10 and the database control information 20 in the checkpoint dump file 200, the checkpoint dump information for the valid checkpoints is used as the checkpoint information at the time of the checkpoint. Contains the number of the last history information in history file 70.
It is not necessary to duplicate the backup version page table 80 as in the second embodiment.

次にシステム動作について述べる。通常時動作および
トランザクシヨン障害時動作は第一の実施例と同様に行
われる。よつて、以下においてはチエツクポイント時動
作およびシステム障害時動作について述べる。
Next, the system operation will be described. The normal operation and the transaction failure operation are performed as in the first embodiment. Therefore, the operation at the time of checkpoint and the operation at the time of system failure will be described below.

(1)チエツクポイント時動作 チエツクポイント時の処理フローを第12図に示す。(1) Operation at checkpoint Figure 12 shows the processing flow at checkpoint.

(a)チエツクポイント・ダンプ・フアイル選択 チエツクポイント・ダンプ情報を取得するチエツクポ
イント・ダンプ・フアイル200を選択する。取得対象と
なるチエツクポイント・ダンプ・フアイル200は、シス
テム開始/再開始時に選択した後、ラウンドロビン方式
で使用する。
(A) Checkpoint dump file selection Select the checkpoint dump file 200 for which you want to obtain checkpoint dump information. The checkpoint dump file 200 to be acquired is used in a round robin method after being selected at the time of system start / restart.

(b)チエツクポイント・ダンプ情報取得 システム管理情報やデータベース制御情報20等のメモ
リ10上の情報を、選択したチエツクポイント・ダンプ・
フアイル200に取得する。データベース制御情報20は、
ブロツク単位に、バツクアツプ版ページ・テーブル80お
よびバツクアツプ版スロツト使用マツプ90の最新の更新
処理以降に更新された部分のみをチエツクポイント・ダ
ンプ情報として取得する。このため、カレント版ページ
・テーブル30およびカレント版スロツト使用マツプ40に
ブロツク毎に更新フラグを設ける。
(B) Acquisition of checkpoint / dump information Information on the memory 10 such as system management information and database control information 20 is selected as a checkpoint / dump information.
Get to File 200. The database control information 20 is
For each block, only the parts of the backup up page table 80 and the backup up slot use map 90 that have been updated since the latest update processing are acquired as the check point dump information. Therefore, the current version page table 30 and the current version slot use map 40 are provided with update flags for each block.

(c)チエツクポイント有効監視 第二の実施例同様にチエツクポイントの有効監視を行
い、チエツクポイントが無効となつた場合はチエツクポ
イントを取り直す。このとき、同じチエツクポイント・
ダンプ・フアイル200の無効となつたチエツクポイント
・ダンプ情報の上にかぶせて新たにチエツクポイント・
ダンプ情報を取得する。
(C) Check Point Effective Monitoring As in the second embodiment, the check points are effectively monitored, and when the check points are invalid, the check points are retaken. At this time, the same checkpoint
Dump file 200 invalid checkpoints Overlaid on dump information to newly checkpoints
Get dump information.

(d)最終履歴情報の番号の取得 チエツクポイント有効監視の結果、該チエツクポイン
トが有効になつた場合、該チエツクポイント時の履歴フ
アイル70中の最終履歴情報の番号を上記チエツクポイン
ト・ダンプ・フアイル200に取得する。本処理により、
該チエツクポイント・ダンプ情報は有効となる。
(D) Obtaining the number of the final history information When the checkpoint is validated as a result of checking the checkpoint validity, the number of the final history information in the history file 70 at the time of the checkpoint is set to the checkpoint dump dump file. Get to 200. By this processing,
The check point dump information is valid.

(e)バツクアツプ版ページ・テーブル等の更新チエツ
クポイント・ダンプ情報の取得量を削減するため、一定
回数の有効なチエツクポイント毎にバツクアツプ版ペー
ジ・テーブル80およびバツクアツプ版スロツト使用マツ
プ90を更新し、それらの更新フラグをオフに設定する。
(E) Updating the backup version page / table, etc. In order to reduce the amount of checkpoint dump information acquired, the backup version page / table 80 and backup version slot use map 90 are updated for each valid number of valid checkpoints. Set their update flags to off.

(2)システム障害時動作 システム障害発生時のデータベース回復処理は、以下
の(a)〜(d)の順に行われる。(a)〜(d)の処
理実行後、システムはカレント版ページ・テーブル30に
もとづいて必要なページを読み込み、通常処理を開始す
る。
(2) Operation at the time of system failure The database recovery processing when a system failure occurs is performed in the following order (a) to (d). After executing the processes of (a) to (d), the system reads necessary pages based on the current version page table 30 and starts the normal process.

(a)データベース制御情報の読み込み 第一の実施例と同様にして、不揮発性記憶媒体100か
らバツクアツプ版ページ・テーブル80およびバツクアツ
プ版スロツト使用マツプ90を読み込み、カレント版ペー
ジ・テーブル30およびカレント版スロツト使用マツプ40
としてメモリ10内に展開する。
(A) Reading of database control information As in the first embodiment, the backup version page table 80 and the backup version slot use map 90 are read from the non-volatile storage medium 100, and the current version page table 30 and the current version slot are read. Use map 40
It is expanded in the memory 10 as.

(b)チエツクポイント・ダンプ情報の読み込みデータ
ベース制御情報20のチエツクポイント・ダンプ情報をチ
エツクポイント・ダンプ・フアイル200から読み込み、
カレント版ページ・テーブル30およびカレント版スロツ
ト使用マツプ40の該当するブロツクにかぶせ、データベ
ース制御情報20を該チエツクポイント時の状態に回復す
る。読み込むべきチエツクポイント・ダンプ・フアイル
200の選択は下記の通りに行う。
(B) Reading the checkpoint dump information The checkpoint dump information of the database control information 20 is read from the checkpoint dump file 200,
The current version page table 30 and the current version slot use map 40 are covered with the corresponding blocks to restore the database control information 20 to the state at the time of the check point. Checkpoint dump file to read
Selection of 200 is performed as follows.

各チエツクポイント・ダンプ・フアイルから各々の
最終のチエツクポイント・ダンプ情報に対する最終履歴
情報の番号を読み込む。
The final history information number for each final checkpoint dump information is read from each checkpoint dump file.

読み込んだ番号を比較し、最新の番号に対するチエ
ツクポイント・ダンプ情報を読み込み対象とする。な
お、最終履歴情報の番号が取得されていないチエツクポ
イント・ダンプ情報は無効であるため、読み込み対象と
はならない。
The read numbers are compared and the checkpoint dump information for the latest number is read. Note that the checkpoint dump information for which the final history information number has not been acquired is invalid and is not subject to reading.

(c)トランザクシヨンの状態解析 第二の実施例と同様に行う。(C) State analysis of transaction The same as in the second embodiment.

(d)データベース制御情報の回復 第二の実施例と同様に行う。(D) Recovery of database control information The same as the second embodiment.

なお、メツセージやシステム管理情報等の回復処理
は、履歴フアイル70およびチエツクポイント・ダンプ・
フアイル200を用いることにより公知の方法で行う。
In addition, recovery processing of messages, system management information, etc. is performed by the history file 70 and checkpoint dump.
This is carried out by a known method by using the file 200.

以上述べたように、本実施例によれば第二,第三の実
施例同様に前述のシヤドウ・ページ方式の3つの問題点
を解決することができる。また、本実施例特有の効果と
して第二の実施例と同様の効果を得ることができる。
As described above, according to this embodiment, like the second and third embodiments, it is possible to solve the above-mentioned three problems of the shadow page method. Further, as the effect peculiar to this embodiment, the same effect as the second embodiment can be obtained.

以上の説明において不揮発性記憶装置としてIC不揮発
メモリ等の高速ランダムアクセス記憶装置またはいわゆ
るICデイスク等を適用した場合の高速化および使い勝手
上の効果は秀れている。
In the above description, when a high-speed random access storage device such as an IC non-volatile memory or a so-called IC disk is applied as the non-volatile storage device, the speed-up and usability are excellent.

上記各実施例によれば、複数のオンライン・トランザ
クシヨンが同時にデータベースを更新し、端末とメツセ
ージを送受信するオンライン・データベース・システム
において、シヤドウ・ページ方式を用いることが可能と
なる。従来、このようなシステムでは、データベース更
新履歴情報を磁気ディスクや磁気テープ等の記憶媒体取
得し、たとえばシステム/トランザクシヨン障害時には
これを用いて回復処理を行う方式が広く採用されてい
る。この従来方式と比較すると、上記各実施例により履
歴情報取得量を削減することができる。例えば、ページ
・サイズを約4Kバイト、ページ番号およびスロツト番号
を4バイトにし、いずれの番号も更新前後情報を取得す
るものと考えると、1ページ当たりの平均更新データ量
が60バイトならば1/10、100バイトならば1/17に履歴情
報取得量を削減できる(ただし、更新履歴情報のみの比
較)。特定のページに更新が集中した場合、更に履歴情
報取得量削減効果が大きい。
According to each of the above-mentioned embodiments, the online page database system in which a plurality of online transactions simultaneously update the database and send and receive messages to and from the terminal can use the shadow page method. Conventionally, in such a system, a method has been widely adopted in which database update history information is acquired from a storage medium such as a magnetic disk or a magnetic tape, and recovery processing is performed using this when a system / transaction failure occurs. Compared with this conventional method, the history information acquisition amount can be reduced by each of the above embodiments. For example, assuming that the page size is about 4 Kbytes, the page number and slot number are 4 bytes, and that both numbers acquire pre- and post-update information, if the average amount of updated data per page is 60 bytes, then 1 / With 10 or 100 bytes, the amount of history information acquired can be reduced to 1/17 (however, comparison of update history information only). When updates concentrate on a specific page, the effect of reducing the amount of acquired history information is even greater.

また、上記各実施例では通常時はメモリ上のカレント
版ページ・テーブルおよびカレント版スロツト使用マツ
プを参照/更新することにより、シヤドウ・ページ方式
におけるページ・テーブル更新オーバヘツドを減少させ
ている。
Further, in each of the above-mentioned embodiments, normally, by referring to / updating the current version page table and the current version slot use map on the memory, the page table update overhead in the shear page method is reduced.

さらにトランザクシヨンの度にバツクアツプ版ページ
・テーブルを磁気デイスク等に取得していた従来方式に
比して多数回(例えば1,000回)のトランザクシヨンの
後、チエツクポイント時にバツクアツプ版ページテーブ
ルを不揮発メモリに転送することによる総合的高速化効
果は著しいものがある。
In addition, the backup version page table is stored in a non-volatile memory at the check point after a large number of times (for example, 1,000 times) compared to the conventional method in which the backup version page table is acquired on a magnetic disk at each transaction. The overall speed-up effect by transferring is remarkable.

〔発明の効果〕〔The invention's effect〕

本発明によれば、シャドウ・ページ方式を用いたデー
タベース・システムにおいて、処理効率を低下させるこ
となく、複数トランザクションによるデータベースの同
時更新を可能とすることができる。
According to the present invention, in a database system using the shadow page method, it is possible to simultaneously update a database by a plurality of transactions without lowering processing efficiency.

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

第1図は第1の実施例の構成図、第2図は本発明バツク
アツプ版ページ・テーブルおよびバツクアツプ版スロツ
ト使用マツプの説明図、第3図は本発明カレント版ペー
ジ・テーブルおよびカレント版スロツト使用マツプの説
明図、第4図は本発明履歴フアイルの説明図、第5図は
本発明における更新ページ書き出し時の処理フロー図、
第6図は本発明におけるシステム障害時のデータベース
回復処理フロー図、第7図はトランザクシヨンの状態
図、第8図は本発明第2の実施例の構成図、第9図は第
2の実施例のチエツクポイント時の処理フロー図、第10
図は本発明におけるチエツクポイント有効監視の説明
図、第11図は本発明第3の実施例の構成図、第12図は第
3の実施例のチエツクポイント時の処理フロー図であ
る。 10……CPU/メモリ、20……データベース制御情報、30…
…カレント版ページ・テーブル、40……カレント版スロ
ツト使用マツプ、50……データベース蓄積媒体、60……
データベース領域、70……履歴フアイル、71……ページ
・テーブル更新ジヤーナル、72……トランザクシヨン処
理完了ジヤーナル、80……バツクアツプ版ページ・テー
ブル、90……バツクアツプ版スロツト使用マツプ、100
……不揮発性記憶媒体、200……チエツクポイント・ダ
ンプ・ファイル。
FIG. 1 is a block diagram of the first embodiment, FIG. 2 is an explanatory diagram of a backup version page table of the present invention and a backup version slot use map, and FIG. 3 is a current version page table of the present invention and a current version slot use. FIG. 4 is an explanatory diagram of a map, FIG. 4 is an explanatory diagram of a history file of the present invention, and FIG. 5 is a processing flow diagram when writing an updated page in the present invention.
FIG. 6 is a flow chart of the database recovery processing at the time of system failure in the present invention, FIG. 7 is a state diagram of the transaction, FIG. 8 is a block diagram of the second embodiment of the present invention, and FIG. 9 is a second embodiment. Example process flow diagram at checkpoint, 10th
FIG. 11 is an explanatory view of checkpoint effective monitoring in the present invention, FIG. 11 is a configuration diagram of a third embodiment of the present invention, and FIG. 12 is a processing flow chart at the time of checkpoint of the third embodiment. 10 ... CPU / memory, 20 ... Database control information, 30 ...
… Current version page table, 40 …… Map using current version slot, 50 …… Database storage medium, 60 ……
Database area, 70 ... History file, 71 ... Page / table update journal, 72 ... Transaction completion journal, 80 ... Back-up version page / table, 90 ... Back-up slot use map, 100
... Non-volatile storage medium, 200 ... Checkpoint dump file.

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】データの論理的な格納箇所であるページか
ら構成されるデータベースと、該データベースの各ペー
ジと該ページの最新の内容が格納されているデータベー
ス蓄積媒体上のスロットとの対応情報を登録するカレン
ト版ページ・テーブルと、上記データベース蓄積媒体上
の各スロットの使用有無を示すカレント版スロット使用
マップと、過去の上記カレント版ページ・テーブルの内
容を記録する複数のバックアップ版ページ・テーブル
と、トランザクション処理に関する履歴情報を記録する
履歴ファイルとを有し、実行中のトランザクションがデ
ータベースを更新するとき、上記カレント版スロット使
用マップに基づいて見い出した空きスロットに更新した
ページの内容を格納し、該ページと該空きスロットとの
対応情報をカレント版ページ・テーブルに登録し、上記
カレント版スロット使用マップ中の上記空きスロットに
関する情報を更新し、カレント版ページ・テーブルの変
更内容を示す履歴レコードを上記履歴ファイルに取得
し、定期的に上記複数のバックアップ版ページ・テーブ
ルの中から1つのバックアップ版ページ・テーブルを順
に選択して、選択したバックアップ版ページ・テーブル
をカレント版ページ・テーブルと内容が一致するように
更新し、システム障害発生時には、上記履歴ファイルに
記録されたカレント版ページ・テーブルの変更内容を示
す履歴レコードおよび上記複数のバックアップ版ページ
・テーブルの中で最後に更新したバックアップ版ページ
・テーブルの内容に基づいて、上記カレント版ページ・
テーブルを回復することを特徴とするデータベース更新
方法。
1. Corresponding information between a database composed of pages which are logical storage locations of data, each page of the database and a slot on a database storage medium in which the latest contents of the page are stored. A current version page table to be registered, a current version slot usage map indicating whether or not each slot on the database storage medium is used, and a plurality of backup version page tables for recording the past contents of the current version page table. , And has a history file for recording history information about transaction processing, and when an active transaction updates the database, stores the content of the updated page in the empty slot found based on the current version slot usage map, Corresponding information between the page and the empty slot is current Register in the page table, update the information about the empty slots in the current version slot usage map, obtain history records showing the contents of changes in the current version page table in the history file, and periodically Select one backup version page table in order from the backup version page table and update the selected backup version page table so that the contents match the current version page table. Based on the history record showing the contents of change of the current version page table recorded in the history file and the content of the last updated backup version page table among the above multiple backup version page tables,
A database update method characterized by recovering a table.
【請求項2】第1項記載のデータベース更新方法におい
て、上記複数のバックアップ版ページ・テーブルをシス
テム障害時に記憶内容が失われない記憶媒体上に構成し
たことを特徴とするデータベース更新方法。
2. The database updating method according to claim 1, wherein the plurality of backup version page tables are configured on a storage medium that does not lose stored contents when a system failure occurs.
【請求項3】第2項記載のデータベース更新方法におい
て、トランザクションの実行完了時、該トランザクショ
ンの実行完了を示す履歴レコードを上記履歴ファイルに
取得し、上記カレント版ページ・テーブルを回復するス
テップにおいて、トランザクションの処理完了を示す履
歴レコードが上記履歴ファイルに取得されているトラン
ザクションによるデータベース更新のみを上記データベ
ースに反映するように上記カレント版ページ・テーブル
を回復することを特徴とするデータベース更新方法。
3. The database updating method according to claim 2, wherein upon completion of execution of a transaction, a history record indicating completion of execution of the transaction is acquired in the history file, and the current version page table is recovered. A database updating method, wherein the current version page table is restored so that only a database update by a transaction whose history record indicating completion of transaction processing is acquired in the history file is reflected in the database.
【請求項4】第3項記載のデータベース更新方法におい
て、上記バックアップ版ページテーブルを更新するステ
ップにおいて、該更新時点において実行中の全トランザ
クションに関する履歴レコードの中の最初の履歴レコー
ドの識別子を上記システム障害時に記憶内容が失われな
い記憶媒体に記録し、上記カレント版ページ・テーブル
を回復するステップにおいて、上記記憶媒体に記録され
た上記識別子を持つ履歴レコード以降に上記履歴ファイ
ルに取得された履歴レコードを用いて上記カレント版ペ
ージ・テーブルを回復することを特徴とするデータベー
ス更新方法。
4. The database updating method according to claim 3, wherein in the step of updating the backup version page table, the identifier of the first history record among history records relating to all transactions being executed at the time of the update is the system. A history record acquired in the history file after the history record having the identifier recorded in the storage medium in the step of recovering the current version page table by recording in a storage medium in which the storage content is not lost at the time of failure A method for updating a database, characterized in that the current version page table is recovered by using.
【請求項5】第3項記載のデータベース更新方法におい
て、実行中のトランザクションが端末メッセージを送受
信したり、メモリ上のシステム管理情報を更新する場
合、その内容を示す履歴レコードを上記履歴ファイルに
取得し、システム障害発生時に上記履歴ファイル中の履
歴レコードに基づいて端末メッセージおよびメモリ上の
システム管理情報の回復を行うことを特徴とするデータ
ベース更新方法。
5. In the database updating method according to claim 3, when a transaction being executed transmits / receives a terminal message or updates system management information on a memory, a history record indicating the contents is acquired in the history file. Then, when a system failure occurs, the terminal message and the system management information on the memory are recovered based on the history record in the history file.
【請求項6】第1項記載のデータベース更新方法におい
て、上記カレント版スロット使用マップは上記データベ
ースの各ページの最新の内容を格納するスロットおよび
実行中のトランザクションが更新したページの更新前の
内容を格納するスロットを使用中とするように構成する
ことを特徴とするデータベース更新方法。
6. The method for updating a database according to claim 1, wherein the current version slot usage map indicates a slot for storing the latest contents of each page of the database and contents before updating of the page updated by the transaction being executed. A method for updating a database, characterized in that the storing slot is configured to be in use.
【請求項7】第1項記載のデータベース更新方法におい
て、上記バックアップ版ページテーブルへの登録有無に
基づいて上記データベース蓄積媒体の各スロットの使用
有無を示すバックアップ版スロット使用マップを有し、
上記バックアップ版ページ・テーブルを更新するステッ
プにおいて上記バックアップ版スロット使用マップを更
新することを特徴とするデータベース更新方法。
7. The database updating method according to claim 1, further comprising: a backup version slot usage map indicating whether or not each slot of the database storage medium is used based on the presence or absence of registration in the backup version page table,
A database updating method characterized in that the backup version slot usage map is updated in the step of updating the backup version page table.
【請求項8】第1項記載のデータベース更新方法におい
て、上記バックアップ版ページテーブルを更新するステ
ップにおいて、バックアップ版ページ・テーブルの更新
中に障害が発生したとき、前回更新したバックアップ版
ページ・テーブルから更新中であった上記バックアップ
版ページ・テーブルを回復することを回復することを特
徴とするデータベース 更新方法。
8. The database updating method according to claim 1, wherein in the step of updating the backup version page table, when a failure occurs during updating of the backup version page table, the previously updated backup version page table is used. A method for updating a database, which comprises recovering the backup version page table that was being updated.
【請求項9】第1項記載のデータベース更新方法におい
て、チェックポイント時にメモリ上のシステム管理情報
を取得するチェックポイント・ダンプ・ファイルを備
え、上記バックアップ版ページ・テーブルを更新する間
隔よりも短い間隔ぜ上記上記チェックポイントを設け、
上記チェックポイント時にカレント版ページ・テーブル
の前回のチェックポイント時以降の上記カレント版ペー
ジ・テーブルの更新部分を上記チェックポイント・ダン
プ・ファイルに記録し、システム障害発生時に、上記履
歴ファイルに記録されたカレント版ページ・テーブルの
変更内容を示す履歴レコード、上記チェックポイント・
ダンプ・ファイルに記録された情報および上記バックア
ップ版ページ・テーブルに基づいて、上記カレント版ペ
ージ・テーブルを回復することを特徴とするデータベー
ス更新方法。
9. The database updating method according to claim 1, further comprising a checkpoint dump file for acquiring system management information on a memory at a checkpoint, the interval being shorter than an interval for updating the backup version page table. Establish the above checkpoint,
At the time of the above checkpoint, the updated part of the current version page table after the previous checkpoint of the current version page table was recorded in the above checkpoint dump file, and when the system failure occurred, it was recorded in the above history file. A history record showing the contents of changes in the current version page table, checkpoint above
A database updating method comprising recovering the current version page table based on the information recorded in a dump file and the backup version page table.
JP61087914A 1986-03-26 1986-04-18 Database update method Expired - Fee Related JPH0816881B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP61087914A JPH0816881B2 (en) 1986-04-18 1986-04-18 Database update method
US07/031,835 US5043871A (en) 1986-03-26 1987-03-26 Method and apparatus for database update/recovery

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61087914A JPH0816881B2 (en) 1986-04-18 1986-04-18 Database update method

Publications (2)

Publication Number Publication Date
JPS62245348A JPS62245348A (en) 1987-10-26
JPH0816881B2 true JPH0816881B2 (en) 1996-02-21

Family

ID=13928187

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61087914A Expired - Fee Related JPH0816881B2 (en) 1986-03-26 1986-04-18 Database update method

Country Status (1)

Country Link
JP (1) JPH0816881B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5043866A (en) * 1988-04-08 1991-08-27 International Business Machines Corporation Soft checkpointing system using log sequence numbers derived from stored data pages and log records for database recovery
JPH0540682A (en) * 1990-06-08 1993-02-19 Internatl Business Mach Corp <Ibm> High available trouble-resistant relocation of storage device having atomicity
US5715447A (en) * 1991-08-06 1998-02-03 Fujitsu Limited Method of and an apparatus for shortening a lock period of a shared buffer
EP0551528B1 (en) * 1991-08-06 1999-01-27 Fujitsu Limited Method and apparatus for reducing lock period of shared buffer
JPH07175700A (en) * 1993-12-20 1995-07-14 Fujitsu Ltd Database management system
JP4581500B2 (en) * 2004-06-17 2010-11-17 株式会社日立製作所 Disaster recovery system, program, and database recovery method
CN110309233B (en) * 2018-03-28 2022-11-15 腾讯科技(深圳)有限公司 Data storage method, device, server and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS582937A (en) * 1981-06-27 1983-01-08 Fujitsu Ltd Trouble recovery system

Also Published As

Publication number Publication date
JPS62245348A (en) 1987-10-26

Similar Documents

Publication Publication Date Title
US5043871A (en) Method and apparatus for database update/recovery
US4961134A (en) Method for minimizing locking and reading in a segmented storage space
US5724581A (en) Data base management system for recovering from an abnormal condition
US7640276B2 (en) Backup system, program and backup method
JP2718031B2 (en) History information acquisition method
US5333314A (en) Distributed data base system of composite subsystem type, and method of fault recovery for the system
US5561795A (en) Method and apparatus for audit trail logging and data base recovery
US6018746A (en) System and method for managing recovery information in a transaction processing system
JP3763992B2 (en) Data processing apparatus and recording medium
US6119209A (en) Backup directory for a write cache
JPS633341B2 (en)
US20060200500A1 (en) Method of efficiently recovering database
CN113220490A (en) Transaction persistence method and system for asynchronous write-back persistent memory
JPH0816881B2 (en) Database update method
KR101419428B1 (en) Apparatus for logging and recovering transactions in database installed in a mobile environment and method thereof
JP2004062759A (en) Database log management method, its device and its program
JPH06149485A (en) Data completion guarantee processing method
JP2001229063A (en) Data managing system
JP4139642B2 (en) Database management method and system
JPS63132351A (en) Memory data base processor
JPH0823840B2 (en) Method and apparatus for updating database
JPH0816880B2 (en) Database system and processing method thereof
JPS62297948A (en) Recovery system for fault of data base
CN116126591B (en) Transaction mechanism of embedded system
JPH03271841A (en) Recovery system for data base

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees