JPH04111026A - Write system for updating history information to data base - Google Patents

Write system for updating history information to data base

Info

Publication number
JPH04111026A
JPH04111026A JP2228147A JP22814790A JPH04111026A JP H04111026 A JPH04111026 A JP H04111026A JP 2228147 A JP2228147 A JP 2228147A JP 22814790 A JP22814790 A JP 22814790A JP H04111026 A JPH04111026 A JP H04111026A
Authority
JP
Japan
Prior art keywords
history information
output
update history
storage device
external storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2228147A
Other languages
Japanese (ja)
Inventor
Hideo Fukuda
秀夫 福田
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 Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
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 Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2228147A priority Critical patent/JPH04111026A/en
Publication of JPH04111026A publication Critical patent/JPH04111026A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To curtail the output waiting time of updating history information, and to improve the processing capacity by issuing a write request to an external storage device of updating history information, and thereafter, continuing a transaction processing without waiting for the end of write, and taking confirmation of write before the transaction processing is finished at the latest. CONSTITUTION:After issuing a write request to an external storage device 7 of updating history information 11, a transaction processing is continued without waiting for the end of write, and confirmation of write is executed before the transaction processing is finished at the latest. That is, at the time of outputting the updating history information 11 to the external storage device 7, it is executed by dividing it into an output request and an output confirmation. In such a way, the output waiting time of the updating history information 11 is curtailed, and the processing capacity is improved.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はトランザクション処理に係り、とくにトランザ
クション処理中に発生するデータベース更新に伴う更新
履歴情報の外部記憶装置への書き込み方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to transaction processing, and more particularly to a method for writing update history information to an external storage device accompanying database updates that occur during transaction processing.

[従来の技術] 障害回復において最も重要な点は、ユーザ業務のトラン
ザクションを保証することにある。ここでトランザクシ
ョンとは、ユーザ業務の論理的な処理の集合である。デ
ータベースの障害回復を行うためには更新履歴情報が必
要である。更新履歴情報は処理装置の電源断等にも対応
するために、外部記憶装置上に記憶しておく必要がある
。さらに更新履歴情報と更新されるユーザレコードの関
係において、更新履歴情報はユーザレコードより先に外
部記憶装置に出力されていなければならない。これは、
もしユーザレコードを先に出力した場合、ユーザレコー
ド出力後、更新履歴情報出力前に電源断等の障害が発生
した場合、更新履歴情報がないためにデータベースの回
復処理が出来なくなってしまうためである。
[Prior Art] The most important point in failure recovery is to guarantee user business transactions. Here, a transaction is a collection of logical processes of user business. Update history information is necessary for database failure recovery. The update history information needs to be stored on an external storage device in order to cope with power-off of the processing device. Furthermore, in the relationship between the update history information and the user record to be updated, the update history information must be output to the external storage device before the user record. this is,
If the user record is output first, if a failure such as a power outage occurs after the user record is output but before the update history information is output, the database recovery process will not be possible because there is no update history information. .

なお、障害回復に関するものには例えば特開昭61−1
51754号公報、特開平2−87242号公報等が挙
げられる。
In addition, regarding disaster recovery, for example, Japanese Patent Laid-Open No. 61-1
51754, JP-A-2-87242, and the like.

[発明が解決しようとする課題] 従来からユーザレコードの外部記憶装置出力は、主記憶
上にバッファリングを行っている。このバッファリング
の単位は一般に物理的なデータ領域の単位(ページ)で
ある。レコード単位の排他制御を行う一般のデータベー
スでは1ページ内には複数レコードが存在するため、同
一ページ内の別レコードを異なるタスクでアクセスする
場合がある。これに対応するため、システム共通領域で
バッファを管理している。このことは、あるタスクでト
ランザクションが終了しユーザレコードを外部記憶装置
に出力すると、同一ページ内の他のタスクのユーザレコ
ードも出力されてしまうことを意味する。すなわち、ユ
ーザレコードは他タスクの動きにより、いつ外部記憶装
置に出力されるかわからないため、更新履歴情報とユー
ザレコードの出力順序の関係上、更新履歴情報は常に即
時出力としなければならなかった。この従来方式におい
て、一番の問題点は更新履歴情報の出力に時間がかかる
という点である。ユーザレコードはバッファリング可能
であるが、更新履歴情報の出力は即時出力のため、外部
記憶装置への出力完了まで同一トランザクジョンに関す
る次の処理を待たさなければならず、ユーザレコードを
ルコード更新するたびに、必ず1回の外部記憶装置出力
待ちが発生していた。
[Problems to be Solved by the Invention] Conventionally, user records output to an external storage device have been buffered on main memory. The unit of this buffering is generally a physical data area unit (page). In a general database that performs exclusive control on a record-by-record basis, there are multiple records in one page, so different records in the same page may be accessed by different tasks. To accommodate this, buffers are managed in a system common area. This means that when a transaction ends in a certain task and a user record is output to an external storage device, user records of other tasks within the same page will also be output. That is, since it is not known when the user record will be output to the external storage device due to the movement of other tasks, the update history information must always be output immediately due to the relationship between the update history information and the output order of the user records. The biggest problem with this conventional method is that it takes time to output the update history information. User records can be buffered, but since the update history information is output immediately, the next process related to the same transaction must wait until the output to the external storage device is completed, and each time the user record is updated There was always one external storage device output wait.

本発明の目的は、更新履歴情報の出力待ち時間を削減さ
せ、処理能力の向上を行うことにある。
An object of the present invention is to reduce the output waiting time of update history information and improve processing capacity.

[課題を解決するための手段] 上記目的は、更新履歴情報の外部記憶装置への書き込み
要求を発行した後、書き込みの終了を待たずにトランザ
クション処理を継続させ、遅くともトランザクション処
理の終了までの間に書き込みの確認をとることによって
達成される。
[Means for solving the problem] The above purpose is to continue transaction processing without waiting for the end of writing after issuing a write request for update history information to an external storage device, and to continue transaction processing until the end of transaction processing at the latest. This is achieved by confirming the writing.

[作用] 更新履歴情報を出力するバッファとして他のタスクから
影響を受けないタスク固有のローカルバッファを使用す
ることによって、および当該タスクでユーザレコードが
格納しであるページを出力する必要が発生したとき、他
タスクの更新履歴情報を参照し、出力要求が既に出てい
るものに対しては出力完了確認を行い、出力要求が出て
いないものに対しては出力要求と出力完了確認の双方を
行った後、ユーザレコードが格納しであるページを出力
することにより、他タスクのユーザレコードと更新履歴
情報の出力順序を保証することができる。
[Effect] By using a task-specific local buffer that is not affected by other tasks as a buffer for outputting update history information, and when the task needs to output a page containing user records. , refer to the update history information of other tasks, and check the output completion for those for which an output request has already been issued, and perform both the output request and the output completion confirmation for those for which no output request has been issued. After that, by outputting the page where the user record is stored, it is possible to guarantee the output order of the user records of other tasks and the update history information.

[実施例コ 以下、本発明の一実施例を図面により詳細に説明する。[Example code] Hereinafter, one embodiment of the present invention will be described in detail with reference to the drawings.

第1図は更新履歴出力管理方式を各処理との関連におい
て説明するためのものであり、1はユーザの業務プログ
ラム、2は業務プログラム1からデータ処理を委託され
るオペレーティングシステム、3はデータベースに対す
る処理をつかさどるデータベースアクセス制御部、4は
ユーザプログラムからのデータ処理を行うためのレコー
ド群や更新履歴情報が記憶される主記憶装置上のデータ
エリア、5はユーザレコードを記憶するページバッファ
、6は更新履歴情報を記憶する更新履歴情報バッファ、
7はデータベース及び更新履歴情報が格納される磁気デ
ィスク等の外部記憶装置、8はユーザレコードが格納さ
れているデータベース、9はユーザレコード、10は主
記憶装置上のデータエリア4とユーザレコード9のやり
とりを行う単位のページ、11はユーザレコードの更新
履歴を格納する更新履歴情報、12は更新履歴情報を管
理し格納する更新履歴情報領域、13はデータベース及
び更新履歴情報の内容を外部記憶装置7から主記憶装置
へ入出力するために使用されるチャネル装置、14は外
部記憶装置7に対するデータの入出力を制御する入出力
制御部である。
Figure 1 is for explaining the update history output management method in relation to each process. 1 is the user's business program, 2 is the operating system entrusted with data processing from the business program 1, and 3 is the system for the database. 4 is a data area on the main memory where record groups and update history information for processing data from user programs are stored; 5 is a page buffer that stores user records; 6 is a database access control unit that is in charge of processing; an update history information buffer that stores update history information;
7 is an external storage device such as a magnetic disk in which a database and update history information are stored; 8 is a database in which user records are stored; 9 is a user record; 10 is a data area 4 and a user record 9 on the main storage device. 11 is update history information that stores the update history of user records; 12 is an update history information area that manages and stores update history information; 13 is an external storage device 7 for storing the contents of the database and update history information; A channel device 14 is used for inputting and outputting data to and from the external storage device 7, and is an input/output control unit that controls inputting and outputting data to and from the external storage device 7.

第2図はタスク対応の更新履歴情報バッファと外部記憶
装置上の更新履歴情報領域の関係を示すものであり、1
5は第1のタスク、1−aはタスク15で稼動する業務
プログラム、6−aは当該プログラムで実行した処理の
更新履歴情報とそれを格納するバッファ、16は第2の
タスク、1−bはタスク16で稼動する業務プログラム
、6−すは業務プログラム1−bで実行した処理の更新
履歴情報とそれを格納するバッファ、7は更新履層情報
が格納されている磁気ディスク等の外部記憶装置、12
は更新履歴情報を管理し格納する更新履歴情報領域、1
7はタスク15用に割り当てた更新履歴情報領域、11
−aはタスク15の更新履歴情報、18はタスク16用
に割り当てた更新履歴情報領域、11−bはタスク16
の更新履歴情報である。
Figure 2 shows the relationship between the update history information buffer corresponding to a task and the update history information area on the external storage device.
5 is the first task, 1-a is a business program running in task 15, 6-a is update history information of the process executed by the program and a buffer for storing it, 16 is the second task, 1-b is the business program running in task 16, 6- is the update history information of the process executed by the business program 1-b and a buffer that stores it, and 7 is external storage such as a magnetic disk in which updated track information is stored. device, 12
is an update history information area for managing and storing update history information, 1
7 is an update history information area allocated for task 15, 11
-a is the update history information of task 15, 18 is the update history information area allocated for task 16, and 11-b is task 16
This is update history information.

タスク15の業務プログラム1−aでユーザレコードの
更新(追加、削除も含む)を行った場合、その更新履歴
を更新履歴バッファ6−aに格納する。同様にタスク1
6の業務プログラム1−bでユーザレコードの更新を行
った場合、その更新履歴を更新履歴バッファ6−bに格
納する。この2つのバッファはそれぞれタスク固有のロ
ーカル領域に確保するため、シリアル制御は必要ではな
く並行処理が可能である。また、当該タスクが終了し更
新履歴情報が不必要になった場合、それまでの更新履歴
情報を消去するが、外部記憶装置上でも別領域になって
いるため、他タスクの更新履歴情報に影響を与えず処理
が可能となり、無駄な領域もできることがない。
When a user record is updated (including addition and deletion) in the business program 1-a of task 15, the update history is stored in the update history buffer 6-a. Similarly, task 1
When a user record is updated by the business program 1-b of No. 6, the update history is stored in the update history buffer 6-b. Since these two buffers are secured in local areas specific to each task, serial control is not necessary and parallel processing is possible. Also, when the task in question ends and the update history information is no longer needed, the update history information up to that point will be deleted, but since it is in a separate area on the external storage device, it will affect the update history information of other tasks. Processing can be performed without giving up space, and no wasted space is created.

第3図はユーザレコードを格納するページの管理方式を
示すものであり、19はページの参照/更新状態及びバ
ッファアドレスを管理するテーブル、5はユーザレコー
ドを格納するページバッファ、15,16.nは業務プ
ログラムを実行するタスクである。
FIG. 3 shows a management method for pages that store user records, with reference numeral 19 a table for managing page reference/update states and buffer addresses, 5 a page buffer for storing user records, 15, 16 . n is a task that executes a business program.

ページ管理テーブル19は、ページの状態を管理してい
る。本テーブルを参照することにより、当該ページの使
用状況が明確になり、自タスク以外に当該ページを更新
しているタスクが存在するか否かを判断できる。あるタ
スクでユーザレコードを外部記憶装置に出力する必要性
が発生した時、本テーブルをチエツクし他タスクで同一
ページを更新している場合は、他タスクのユーザレコー
ドと更新履歴情報の出力順序を守るために、他タスクの
更新履歴情報を外部記憶装置に出力する。
The page management table 19 manages the state of pages. By referring to this table, the usage status of the page becomes clear, and it can be determined whether there is a task other than the own task that is updating the page. When it is necessary to output user records to an external storage device in a certain task, check this table and, if the same page is being updated in another task, change the output order of user records and update history information of other tasks. To protect this, update history information of other tasks is output to an external storage device.

第4図はタスク管理情報の関連を示すものであり、20
はシステム内に一つだけあるデータベース管理情報、1
5,16.nはタスク、21はタスクを管理するタスク
管理情報、6はタスク対応の更新履歴管理情報バッファ
である。
Figure 4 shows the relationship between task management information, and shows 20
is the only database management information in the system, 1
5,16. n is a task, 21 is task management information for managing the task, and 6 is an update history management information buffer corresponding to the task.

前述のページ管理テーブルを参照することにより、他タ
スクの更新履歴情報を出力する必要が発生した場合、こ
のタスク管理情報21を検索し外部記憶装置7に出力す
る必要のあるタスクを決定する0次に決定したタスクの
更新履歴情報バッファアドレスを求め、そのバッファの
内容を外部記憶装置に出力する。
By referring to the page management table mentioned above, when it becomes necessary to output update history information of other tasks, this task management information 21 is searched to determine the task that needs to be output to the external storage device 7. Finds the update history information buffer address of the task determined in , and outputs the contents of the buffer to an external storage device.

第5図は業務プログラム1の流れとバッファへのレコー
ド転送及び外部記憶装置への出力順序を示すものであり
、22はトランザクションの開始から終了までの業務プ
ログラムの流れ、23〜32はデータベースアクセス制
御部3が行うバッファ転送と外部記憶装置出力処理であ
る。
Figure 5 shows the flow of the business program 1 and the order of record transfer to the buffer and output to the external storage device. 22 is the flow of the business program from the start to the end of the transaction, and 23 to 32 are database access control. This is buffer transfer and external storage device output processing performed by unit 3.

業務プログラム1からレコード更新要求(レコードAの
更新)がくると、まずユーザレコードをページバッファ
5に転送する(23)、次に今回の更新要求に対する更
新履歴情報の出力要求(24)と更新履歴情報の出力確
認(25)を行う、この時点て業務プログラム1に制御
を戻し、業務プログラム1はトランザクシミン処理の続
きを続行する。次に、レコード更新要求(レコードBの
更新)がくると、同様にユーザレコードをページバッフ
ァに転送する(26)。ここで先のレコードAの格納さ
れているページバッファ5の内容を外部記憶装置7に対
して出力要求を行う(27)。次に今回の更新要求に対
する更新履歴情報の出力要求(28)を行う、この時点
ですぐに出力確認まで行わずに業務プログラム1に制御
を戻し、業務プログラム1はトランザクション処理の続
きを続行する。このように出力確認まで行わずに業務プ
ログラムに制御を戻すことにより、業務プログラムのレ
スポンスが向上する。
When a record update request (update of record A) comes from the business program 1, the user record is first transferred to the page buffer 5 (23), and then a request to output update history information for the current update request (24) and the update history are sent. The information output is confirmed (25). At this point, control is returned to the business program 1, and the business program 1 continues the transaction processing. Next, when a record update request (update of record B) comes, the user record is similarly transferred to the page buffer (26). Here, a request is made to the external storage device 7 to output the contents of the page buffer 5 in which the previous record A is stored (27). Next, an output request (28) for the update history information for the current update request is made, and at this point, control is returned to the business program 1 without immediately confirming the output, and the business program 1 continues the transaction processing. By returning control to the business program without checking the output in this way, the response of the business program is improved.

業務プログラムが行うトランザクション処理の終了時に
は、全ての情報を外部記憶装置に出力する必要があるた
め、ユーザレコードの出力確認(29,31、32)と
更新履歴情報の出力確認(30)をまとめて行う0以上
のように、外部記憶装置に対する出力を出力要求と出力
確認にわけて行うことにより、性能向上に効果がある。
At the end of transaction processing performed by a business program, all information must be output to the external storage device, so the user record output confirmation (29, 31, 32) and update history information output confirmation (30) are performed together. By dividing the output to the external storage device into an output request and an output confirmation, as in the case of 0 or more, it is effective to improve performance.

なおレコードA更新に対する更新履歴情報の出力要求(
24)と更新履歴情報の出力確認(25)は最初のレコ
ード更新なので、即時出力としている。レコードB更新
に続いて他のレコードC更新があればこの時点でレコー
ドBの更新履歴情報の出力確認をすることができる。
Please note that the update history information output request for record A update (
24) and confirmation of output of update history information (25) are the first record updates, so they are output immediately. If there is another record C update following the update of record B, the output of the update history information of record B can be confirmed at this point.

[発明の効果] 以上の説明から明らかなように、更新履歴情報を外部記
憶装置に対して出力する際、出力要求と出力確認にわけ
て行うことにより、性能向上に効果がある。
[Effects of the Invention] As is clear from the above description, when outputting update history information to an external storage device, performing the output request and output confirmation separately is effective in improving performance.

また、更新履歴情報をバッファリングしさらにローカル
バッファで管理することにより、シリアル制御を不要と
し、外部記憶装置出力回数を削減でき、外部記憶装置上
での領域管理を簡単にすることに効果がある。
In addition, by buffering the update history information and managing it in a local buffer, serial control is not required, the number of outputs to the external storage device can be reduced, and the area management on the external storage device is effective. .

また、タスク管理情報及びページ管理情報を持ち、当該
タスクだけでなく裏タスクの外部記憶装置出力状態を管
理することにより、障害回復に必要なユーザレコードと
更新履歴情報の外部記憶装置出力回数を保証することが
可能となり、信頼性向上に効果がある。
In addition, it has task management information and page management information, and by managing the external storage output status of not only the relevant task but also the back task, guarantees the number of times the user records and update history information required for failure recovery are output to the external storage device. This is effective in improving reliability.

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

第1図は本発明を実現するためのシステム構成図、第2
図は更新履歴情報のバッファと外部記憶装置との関係を
説明するための図、第3図はページ管理を行うための管
理情報を示す図、第4図はタスク管理を行うための管理
情報を示す図、第5図はユーザレコードと更新履歴情報
の外部記憶装置出力順序を説明するための図である。 1・・・業務プログラム、 3・・・データベースアクセス制御部、5・・・ページ
バッファ、 6・・・更新履歴情報バッファ、 7・・・外部記憶装置、 9・・・ユーザレコード。 10・・・ページ。 11・・・更新履歴情報。
Figure 1 is a system configuration diagram for realizing the present invention, Figure 2 is a system configuration diagram for realizing the present invention.
The figure is a diagram to explain the relationship between the update history information buffer and the external storage device, Figure 3 is a diagram showing management information for page management, and Figure 4 is a diagram showing management information for task management. FIG. 5 is a diagram for explaining the order in which user records and update history information are output to an external storage device. DESCRIPTION OF SYMBOLS 1... Business program, 3... Database access control unit, 5... Page buffer, 6... Update history information buffer, 7... External storage device, 9... User record. 10...page. 11...Update history information.

Claims (1)

【特許請求の範囲】[Claims] 1、トランザクション処理中に発生するデータベース更
新に伴う更新履歴情報の外部記憶装置への書き込み方式
において、前記更新履歴情報の外部記憶装置への書き込
み要求を発行した後、前記書き込みの終了を待たずに前
記トランザクション処理を継続させ、遅くとも前記トラ
ンザクション処理の終了までの間に前記書き込みの確認
をすることを特徴とするデータベースに対する更新履歴
情報の書き込み方式。
1. In a method of writing update history information to an external storage device due to a database update that occurs during transaction processing, after issuing a write request for the update history information to the external storage device, without waiting for the end of the writing. A method for writing update history information to a database, characterized in that the transaction processing is continued and the writing is confirmed at the latest until the end of the transaction processing.
JP2228147A 1990-08-31 1990-08-31 Write system for updating history information to data base Pending JPH04111026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2228147A JPH04111026A (en) 1990-08-31 1990-08-31 Write system for updating history information to data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2228147A JPH04111026A (en) 1990-08-31 1990-08-31 Write system for updating history information to data base

Publications (1)

Publication Number Publication Date
JPH04111026A true JPH04111026A (en) 1992-04-13

Family

ID=16871968

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2228147A Pending JPH04111026A (en) 1990-08-31 1990-08-31 Write system for updating history information to data base

Country Status (1)

Country Link
JP (1) JPH04111026A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9411292B2 (en) 2012-07-31 2016-08-09 Ricoh Company, Ltd. Image forming apparatus, image forming method, and computer-readable recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9411292B2 (en) 2012-07-31 2016-08-09 Ricoh Company, Ltd. Image forming apparatus, image forming method, and computer-readable recording medium

Similar Documents

Publication Publication Date Title
JP4028820B2 (en) Method and apparatus for selective caching of transactions in a computer system
JP5142995B2 (en) Memory page management
KR100238925B1 (en) A recoverable disk control system with a non-volatile memory
WO2014160654A1 (en) Recovery processing for database in persistent system
JPH03160534A (en) Access control system for shared file
JPS59167761A (en) Computer system
JPH039494B2 (en)
JPH04111026A (en) Write system for updating history information to data base
JPH0337748A (en) External storage accessing system utilizing main storage
KR100630213B1 (en) Method for processing write-ahead logging protocol using data buffer control blocks in data storage systems
JP2641399B2 (en) File management device
JP3460265B2 (en) Data transfer method between computers
JP2903605B2 (en) File area management processing method
JPH03231337A (en) Collection processing system for system execution history
JP2912657B2 (en) File access processor
JP4131579B2 (en) Data management system and data management method
JP2735400B2 (en) Asynchronous I / O control method
JPH02151944A (en) Data processor
JPH09282202A (en) Data movement management system
JPS62297948A (en) Recovery system for fault of data base
JPH04175841A (en) Data base reformation processing system
JPS61276040A (en) File access system
JPH02213962A (en) Cache memory control system for disk cache
JPH0612302A (en) File access processing system
JPH04361338A (en) Transaction log data succeeding system