JP2003140951A - Transaction simultaneously execution control method and transaction simultaneous execution control device - Google Patents

Transaction simultaneously execution control method and transaction simultaneous execution control device

Info

Publication number
JP2003140951A
JP2003140951A JP2001339931A JP2001339931A JP2003140951A JP 2003140951 A JP2003140951 A JP 2003140951A JP 2001339931 A JP2001339931 A JP 2001339931A JP 2001339931 A JP2001339931 A JP 2001339931A JP 2003140951 A JP2003140951 A JP 2003140951A
Authority
JP
Japan
Prior art keywords
transaction
lock
versions
version
update
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
JP2001339931A
Other languages
Japanese (ja)
Inventor
Hiroshi Takegawa
弘志 竹川
Tetsuya Ikeda
哲也 池田
Takuya Hiraoka
卓也 平岡
Kazushige Asada
一繁 浅田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001339931A priority Critical patent/JP2003140951A/en
Publication of JP2003140951A publication Critical patent/JP2003140951A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a transaction simultaneous execution control method and a transaction simultaneous execution control device, capable of inhibiting the operation to a designated object by all of reference transactions and update transactions except the user's own one. SOLUTION: An inquiry execution means 11 causes a transaction simultaneous execution control means 14 to process and execute a request for starting and ending a transaction, and causes a lock management means 13 to execute an exclusive request for all of the other transactions from an inquiry input/output means 21. At the end of the transaction, the transaction simultaneous execution control means 14 instructs the lock management means 13 and a version control means 12 to cancel the management information on that transaction. When operation is requested by a certain transaction, the version control means 12 selects a version corresponding to the transaction to execute the operation.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、複数のアプリケー
ションプログラムが同時にデータベースにアクセスを行
うとき、互いに干渉しないで直列的に実行されたかのよ
うに制御することができるトランザクション同時実行制
御方法およびトランザクション同時実行制御装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a transaction concurrency control method and a transaction concurrency control method that allow a plurality of application programs to access a database at the same time as if they were serially executed without interfering with each other. Regarding the control device.

【0002】[0002]

【従来の技術】従来から、データベース・システムにお
いて、同時実行制御によるデータのトランザクション
(更新、参照などの処理単位のことをいう)の管理が実
行されている。この同時実行制御とは、複数の利用者が
データベース・システム内の同じデータに同時にアクセ
スしようとしたとき、排他制御を行ってデータの整合性
を保証する制御機能のことをいう。通常、データベース
にアクセスするトランザクションの同時実行制御には、
個々のトランザクションがアクセスするデータベースに
対し、専有ロック、共有ロックなどのロックをかけて、
並列実行されるトランザクションのスケジュールを直列
可能なものにする排他制御が用いられる。このように、
同時実行制御において、利用者による操作対象のデータ
ベースの一貫性の保証は、複数のトランザクションの実
行の直列可能性(独立性)を確保することにより行われ
る。同時実行制御の直列可能性を保証するための方式と
しては、以下で説明するような2相ルールによるロック
方式、タイムスタンプによる順序付け方式、マルチバー
ジョン方式などの様々な方式が知られている。
2. Description of the Related Art Conventionally, in database systems, management of data transactions (referred to as processing units such as update and reference) by concurrency control is executed. This concurrency control is a control function that guarantees data consistency by performing exclusive control when multiple users try to access the same data in the database system at the same time. Normally, for concurrency control of transactions that access the database,
Locks such as proprietary locks and shared locks on the databases accessed by individual transactions,
Exclusive control is used to make the schedule of transactions executed in parallel serializable. in this way,
In the concurrency control, the consistency of the database to be operated by the user is guaranteed by ensuring the serializability (independence) of execution of multiple transactions. Various methods such as a lock method based on a two-phase rule, an ordering method based on a time stamp, and a multi-version method are known as methods for guaranteeing the serializability of concurrency control.

【0003】2相ルールによるロック方式では、あるト
ランザクションでデータに対する操作を行う前に、デー
タベースに対して一斉にロックをかけ、所定の操作後に
ロックを一斉に解くことにより直立化可能性を保証す
る。そこで、2相ルールによるロック方式では、書き込
み操作のときには操作対象に対して更新ロック(以下、
Xロックという)を、読み出し操作のときには操作対象
に対して参照ロック(以下、Sロックという)をそれぞ
れ確保することで操作対象を予約してから操作を実行す
るようになっている。例えば、2相ルールによるロック
方式において、あるトランザクションT1がある操作対
象に対して、ある種類のロックをかけたい場合に、すで
に他のトランザクションT0によって操作対象に対して
ある種類のロックがされているとき、各トランザクショ
ンT0、T1間でのロックの両立性は図5で示すような
表になる。
In the lock method based on the two-phase rule, the database is locked all at once before an operation is performed on the data in a certain transaction, and the lock is unlocked all at once after a predetermined operation to guarantee the possibility of uprighting. . Therefore, in the lock method based on the two-phase rule, an update lock (hereinafter,
When a read operation is performed, a reference lock (hereinafter referred to as an S lock) is secured for each operation target, so that the operation target is reserved before the operation is performed. For example, in the lock method based on the two-phase rule, when a transaction T1 wants to lock a certain type of an operation target, another transaction T0 has already locked a certain type of the operation target. At this time, the lock compatibility between the transactions T0 and T1 is as shown in the table of FIG.

【0004】図5において、○はロックが共存できるこ
とを表し、○が記入されている部分においてはトランザ
クションT1は操作対象をロックできる。一方、図5に
おいて、×はロックが衝突することを表し、トランザク
ションT1は、衝突の原因となっているロックが放棄さ
れ、操作対象をロックできるようになるまで、実行を中
断し、待つことになる。あるトランザクションにおいて
ロックをひとつでも放棄した場合、それ以降のトランザ
クションが終了するまでロックを確保しない。あるトラ
ンザクションの終了時に、そのトランザクションが確保
したロックのうち、放棄されていないものが残っていれ
ば、すべて放棄される。すなわち、2相ルールトランザ
クションを複数のロックを確保していく過程と、確保し
ていたロックをはずす過程の2相に分ける。これによ
り、トランザクションの直列可能性が保証される。
In FIG. 5, ◯ indicates that locks can coexist, and the transaction T1 can lock the operation target in the portion marked with ◯. On the other hand, in FIG. 5, a cross indicates that a lock conflicts, and the transaction T1 suspends execution and waits until the lock causing the conflict is abandoned and the operation target can be locked. Become. If any lock is abandoned in a transaction, the lock is not acquired until the end of the subsequent transactions. At the end of a transaction, any locks held by that transaction that are not abandoned will be relinquished. That is, the two-phase rule transaction is divided into two phases, a process of securing a plurality of locks and a process of releasing the secured locks. This ensures the serializability of transactions.

【0005】また、トランザクション中において異なる
種類の操作対象を認める場合、例えば、データベース、
データベースを構成する表、表を構成するタプルなどに
対する操作を認める場合、複粒度ロックが必要になる。
すなわち、ある対象への書き込み操作は、その上位の操
作対象に対して、更新の意図があることを表すIXロッ
クやSIXロックを確保してから、その操作対象に対し
てXロックを確保する。ある操作対象への読み出し操作
は、その上位の操作対象に対して、参照の意図があるこ
とを表すISロックを確保してから、その操作対象に対
してSロックを確保する。図5で示した各トランザクシ
ョンT0、T1間でのロックの両立性にこれらの意図的
なIXロック、SIXロック、ISロックを加えると、
図6で示すような表になる。図5と同様に、図6におい
て○はロックが共存できることを表し、×はロックが衝
突することを表している。
In the case where different types of operation targets are recognized in a transaction, for example, a database,
To allow operations on tables that make up the database and tuples that make up the table, a multi-grain lock is required.
That is, in the write operation to a certain target, the IX lock and the SIX lock indicating that there is an update intention are secured for the operation target of the higher order, and then the X lock is secured for the operation target. For a read operation to a certain operation target, an IS lock indicating that there is a reference intent is secured for the operation target at a higher level, and then an S lock is secured for the operation target. When these intentional IX lock, SIX lock, and IS lock are added to the lock compatibility between the transactions T0 and T1 shown in FIG. 5,
The table is as shown in FIG. Similar to FIG. 5, in FIG. 6, a circle indicates that locks can coexist, and a cross indicates that locks collide.

【0006】マルチバージョン方式では、書き込み操作
は操作対象を複写して片方を更新することにより、残り
の一方に更新前の状態を残すようになっている。ある操
作対象の複製をバージョンと呼び、読み出し操作は操作
対象の複数のバージョンのうち、ひとつのバージョンの
直列可能性が保証されるように2相ルールによるロック
を用いた手段、時間管理を行うタイムスタンプによる順
序付けを用いた手段によって選択される。2相ルールに
よるロックを用いたマルチバージョン方式では、書き込
み操作は、操作対象に対してXロックを確保してから、
操作対象を複写し、読み出し操作は、操作対象に対して
Sロックを確保してから、更新前のバージョンを読み出
す。ある対象のXロックを放棄しようとしたときに、そ
の対象が他のトランザクションによりSロックされてい
れば、Xロックを保証ロック(以下、Cロックという)
に変換する。例えば、2相ルールによるロックを用いた
マルチバージョン方式において、あるトランザクション
T1がある操作対象に対して、ある種類のロックをかけ
たい場合に、すでに他のトランザクションT0によって
操作対象に対してある種類のロックがされているとき、
各トランザクションT0、T1間でのロックの両立性は
図7で示すような表になる。なお、図7も図5および図
6と同様に、○はロックが共存できることを表し、×は
ロックが衝突することを表している。
In the multi-version method, the write operation is such that the operation target is copied and one is updated, and the state before the update is left in the other one. A copy of a certain operation target is called a version, and a read operation is a means using a lock based on a two-phase rule so that the serializability of one version among a plurality of versions of the operation target is guaranteed. Selected by means of stamped ordering. In the multi-version method using the lock based on the two-phase rule, the write operation secures the X lock for the operation target, and then
The operation target is copied, and the read operation secures the S lock for the operation target and then reads the version before update. If you try to abandon an X lock of a certain target and the target is S-locked by another transaction, the X lock is a guaranteed lock (hereinafter called C lock).
Convert to. For example, in the multi-version method using the lock based on the two-phase rule, when a certain transaction T1 wants to lock a certain type on an operation target, another transaction T0 has a certain type of operation target on the operation target. When locked,
The compatibility of locks between the transactions T0 and T1 is as shown in FIG. Note that in FIG. 7 as well as FIG. 5 and FIG. 6, a circle indicates that locks can coexist, and a cross indicates that locks collide.

【0007】一方、タイムスタンプによる順序付けを用
いたマルチバージョン方式では、各トランザクションは
開始した時刻を表すタイムスタンプを有しており、バー
ジョンごとにバージョンが生成された時刻をライト・タ
イムスタンプとして記憶する。また、バージョンを参照
したトランザクションのうち、タイムスタンプが最大の
ものをリード・タイムスタンプとして記憶する。ある操
作対象に対する読み出し、書き込み操作は、操作を行う
トランザクションのタイムスタンプより前であり、最大
のライト・タイムスタンプを持つバージョンに対して行
う。書き込み操作を行うバージョンは最新のものであ
り、リード・タイムスタンプがトランザクションのタイ
ムスタンプより前で、他のトランザクションにより更新
中であってはならない。このような条件を満たしている
場合、そのバージョンを複写して新しいバージョンを生
成し、更新を行う。この条件を満たしていない場合、ト
ランザクションを中止する。読み出し操作を行うバージ
ョンが最新のものであり、そのバージョンを生成したト
ランザクションにより更新中の場合、更新が終わるま
で、トランザクションの実行を中断し、待つことにな
る。
On the other hand, in the multi-version method using time stamp ordering, each transaction has a time stamp indicating the start time, and the time when a version is generated for each version is stored as a write time stamp. . Also, among the transactions that referred to the version, the one with the largest time stamp is stored as the read time stamp. Read and write operations on a certain operation target are performed on the version that has a maximum write time stamp before the time stamp of the transaction in which the operation is performed. The version performing the write operation is the latest, the read time stamp must be earlier than the transaction time stamp, and it must not be being updated by another transaction. When such a condition is satisfied, the version is copied to generate a new version and the update is performed. If this condition is not met, the transaction will be aborted. When the version for which the read operation is performed is the latest version and is being updated by the transaction that generated the version, execution of the transaction is suspended and waits until the update is completed.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、トラン
ザクションを読み出し操作のみを行う参照トランザクシ
ョンと、読み書き両方の操作を行う更新トランザクショ
ンに分類した場合、上述したような方式によってトラン
ザクションの同時実行制御を行うと、双方のトランザク
ションに対して以下のような干渉による不具合が生じ
る。2相ルールによるロック方式では、多数の参照トラ
ンザクションと少数の更新トランザクションが同じ対象
を操作するとき、少数の更新トランザクションによるX
ロックのために、多数の参照トランザクションの実行が
中断され、待つことになる。また、参照トランザクショ
ンがその対象を長時間参照する場合、一度参照し始めた
ら、更新トランザクションは長時間実行が中断され、待
つことになる。
However, when the transactions are classified into a reference transaction that performs only a read operation and an update transaction that performs both read and write operations, if concurrent execution control of transactions is performed by the above-described method, The following inconveniences occur for both transactions. In the lock method based on the two-phase rule, when a large number of reference transactions and a small number of update transactions operate the same target, X due to a small number of update transactions
Due to the lock, the execution of many reference transactions is interrupted and will wait. Further, when the reference transaction refers to the target for a long time, once the reference transaction is started, the update transaction is suspended for a long time and waits.

【0009】また、2相ルールによるロックを用いたマ
ルチバージョン方式では、多数の更新トランザクション
と少数の参照トランザクションが同じ対象を操作すると
き、少数の参照トランザクションによって更新トランザ
クションのXロックがCロックに変換され、その結果、
多くの更新トランザクションの実行を中止することにな
る。さらに、タイムスタンプによる順序付けを用いたマ
ルチバージョン方式では、ある更新トランザクションが
ある操作対象を長時間更新する場合、その操作対象を操
作する参照トランザクションが開始されると、参照トラ
ンザクションは長時間実行が中断され、待つことにな
る。また、大量の参照トランザクションと少数の更新ト
ランザクションが同じ操作対象を操作するとき、例え
ば、参照トランザクションがその操作対象を短時間しか
参照しなくても、更新トランザクションより後に開始さ
れた参照トランザクションが先にその操作対象を参照す
る可能性が高く、その結果、更新トランザクションが中
止される可能性が高くなる。
Further, in the multi-version method using the lock based on the two-phase rule, when a large number of update transactions and a small number of reference transactions operate the same target, the X-lock of the update transaction is converted into a C lock by the small number of reference transactions. And as a result,
It will stop the execution of many update transactions. Furthermore, in the multi-version method using ordering by time stamp, when a certain update transaction updates an operation target for a long time, when a reference transaction that operates the operation target is started, the reference transaction suspends long-term execution. Will be waited for. Also, when a large number of reference transactions and a small number of update transactions operate the same operation target, for example, even if the reference transaction refers to the operation target for a short time, the reference transaction started after the update transaction comes first. There is a high probability that the operation target will be referred to, and as a result, the update transaction will likely be aborted.

【0010】このような干渉による不具合を防ぐため
に、それぞれの種類のトランザクションごとに異なる方
式を協調させながら使うことにより、同時実行制御を行
う方法が提案されている。例えば、Concurren
cy Control andRecovery in
Database Systems(Jeffrey
D.Ullman:Computer Scienc
e Press, Inc.,:1988)には、参照
トランザクションにタイムスタンプによる順序付けを用
いたマルチバージョン方式を、更新トランザクションに
2相ルールによるロック方式をそれぞれ使うことにより
同時実行制御をする方法が記載されている。また、特開
平3−123946号公報には、参照トランザクション
にタイムスタンプによる順序付けを用いたマルチバージ
ョン方式を、更新トランザクションに2相ルールによる
ロックを用いたマルチバージョン方式をそれぞれ使うこ
とにより、同時実行制御をする方法が記載されている。
In order to prevent such a problem due to interference, there has been proposed a method of performing concurrency control by using different methods in cooperation for each kind of transaction. For example, Concurren
cy Control and Recovery in
Database Systems (Jeffrey
D. Ullman: Computer Science
e Press, Inc. ,: 1988) describes a method of controlling concurrency by using a multi-version method using ordering with a time stamp for a reference transaction and a locking method with a two-phase rule for an update transaction. Further, in Japanese Patent Laid-Open No. 3-123946, simultaneous execution control is performed by using a multi-version method using ordering by a time stamp for a reference transaction and a multi-version method using a lock by a two-phase rule for an update transaction. How to do is described.

【0011】上述のConcurrency Cont
rol and Recoveryin Databa
se Systemsや特開平3−123946号公報
に記載の複合方式による同時実行制御方式を用いても、
データベースの破棄や、表に列を追加するなどのような
所定の対象すべてのバージョンを破棄する必要が生じる
操作を行うとき、その操作対象への操作をすべてのトラ
ンザクションに対して禁止する必要が生じることがあ
る。2相ルールによるロック方式によって同時実行制御
をする場合には、ある対象にXロックを確保することで
禁止できるが、前述した2つの複合方式によって同時実
行制御をする場合、参照トランザクションと更新トラン
ザクションの間の干渉がなくなる代わりに禁止すること
ができなくなる。そこで、本発明の目的は、複合方式に
よる同時実行制御方式によって、参照トランザクション
と更新トランザクションの間の干渉がないことを生か
し、自分以外のすべての参照トランザクションおよび更
新トランザクションによる所定の対象への操作を禁止す
ることが可能なトランザクション同時実行制御方法およ
びトランザクション同時実行制御装置を提供することで
ある。
The Concurrency Cont
roll and Recovery in Databa
Even if the simultaneous execution control system by the composite system described in se Systems or JP-A-3-123946 is used,
When you perform an operation that requires discarding all versions of a given target, such as discarding a database or adding a column to a table, you need to prohibit operations on that target for all transactions. Sometimes. When performing concurrent execution control by the lock method based on the two-phase rule, it can be prohibited by securing an X lock for a certain object, but when performing concurrent execution control by the above-mentioned two complex methods, the reference transaction and update transaction The interference cannot be eliminated, but it cannot be prohibited. Therefore, an object of the present invention is to make use of the fact that there is no interference between the reference transaction and the update transaction by the concurrency control method by the composite method, and to perform operations on a predetermined target by all reference transactions and update transactions other than itself. A transaction concurrency control method and a transaction concurrency control device that can be prohibited.

【0012】[0012]

【課題を解決するための手段】請求項1記載の発明で
は、排他資源の読み出し操作を行う参照トランザクショ
ンに対して時間管理による順序付けを用いたマルチバー
ジョン方式と、前記排他資源の読み書き操作を行う更新
トランザクションに対して2相ルールによるロック方式
とを協調利用可能なトランザクション同時実行制御方法
において、前記参照トランザクションまたは前記更新ト
ランザクションによる前記排他資源内の所定の操作対象
への排他要求を受信する第1のステップと、前記排他資
源の複製であるバージョンを複数作成する第2のステッ
プと、前記第1のステップにより受信した排他要求に基
づいて、前記参照トランザクションまたは前記更新トラ
ンザクションによる前記第2のステップで作成された前
記バージョンに対する操作をロックにより管理する第3
のステップと、前記複数バージョンのうち、所定の1バ
ージョンを参照または更新するトランザクションの存在
を表すロックをかける第4のステップと、前記複数バー
ジョンのうち、所定の1バージョンを参照する意図また
は更新する意図があるトランザクションの存在を表すロ
ックをかける第5のステップと、前記複数バージョンの
すべてのバージョンを参照または更新するトランザクシ
ョンの存在を表すロックをかける第6のステップと、前
記複数バージョンのすべてのバージョンを参照する意図
または更新する意図があるトランザクションの存在を表
すロックをかける第7のステップと、からなり、前記第
3のステップでは、前記第4のステップ、前記第5のス
テップ、前記第6のステップ、前記第7のステップのう
ちいずれか1のステップにおけるロックに基づいて、前
記参照トランザクションまたは前記更新トランザクショ
ンによる操作を禁止することにより、前記目的を達成す
る。
According to a first aspect of the present invention, a multi-version method that uses ordering by time management for a reference transaction that performs an exclusive resource read operation, and an update that performs a read / write operation of the exclusive resource. In a transaction concurrency control method capable of cooperatively using a lock method based on a two-phase rule for a transaction, a first request for receiving an exclusive request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction is provided. And a second step of creating a plurality of versions that are duplicates of the exclusive resource, and the second step of the reference transaction or the update transaction based on the exclusion request received in the first step. To the above version The third to be managed by the lock operation
And a fourth step of locking the existence of a transaction that refers to or updates a predetermined one of the plurality of versions, and an intention or update of referring to a predetermined one of the plurality of versions. A fifth step of acquiring a lock indicating the existence of an intended transaction, a sixth step of acquiring a lock indicating the existence of a transaction referring to or updating all versions of the plurality of versions, and all versions of the plurality of versions And a seventh step of acquiring a lock indicating the existence of a transaction having the intention of referring to or updating the transaction. In the third step, the fourth step, the fifth step, and the sixth step. Step, any one of the seventh step Tsu based on locks in-flop, by prohibiting operation of the reference transaction or the update transaction, to achieve the above object.

【0013】請求項2記載の発明では、排他資源の読み
出し操作を行う参照トランザクションに対して時間管理
による順序付けを用いたマルチバージョン方式と、前記
排他資源の読み書き操作を行う更新トランザクションに
対して2相ルールによるロック方式を用いたマルチバー
ジョン方式とを協調利用可能なトランザクション同時実
行制御方法において、前記参照トランザクションまたは
前記更新トランザクションによる前記排他資源内の所定
の操作対象への排他要求を受信する第1のステップと、
前記排他資源の複製であるバージョンを複数作成する第
2のステップと、前記第1のステップにより受信した排
他要求に基づいて、前記参照トランザクションまたは前
記更新トランザクションによる前記第2のステップで作
成された前記バージョンに対する操作をロックにより管
理する第3のステップと、前記複数バージョンのうち、
所定の1バージョンを参照または更新するトランザクシ
ョンの存在を表すロックをかける第4のステップと、前
記複数バージョンのうち、所定の1バージョンを参照す
る意図または更新する意図があるトランザクションの存
在を表すロックをかける第5のステップと、前記前記複
数バージョンのすべてのバージョンを参照または更新す
るトランザクションの存在を表すロックをかける第6の
ステップと、前記複数バージョンのすべてのバージョン
を参照する意図または更新する意図があるトランザクシ
ョンの存在を表すロックをかける第7のステップと、か
らなり、前記第3のステップでは、前記第4のステッ
プ、前記第5のステップ、前記第6のステップ、前記第
7のステップのうちいずれか1のステップにおけるロッ
クに基づいて、前記参照トランザクションまたは前記更
新トランザクションによる操作を禁止することにより、
前記目的を達成する。
In a second aspect of the present invention, a multi-version method using time-based ordering for a reference transaction that performs an exclusive resource read operation, and a two-phase method for an update transaction that performs an exclusive resource read / write operation In a transaction concurrency control method capable of cooperating with a multi-version method using a lock method according to a rule, a first request for receiving an exclusive request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction is provided. Steps,
A second step of creating a plurality of versions that are duplicates of the exclusive resource; and the creation of the reference transaction or the update transaction in the second step based on the exclusion request received in the first step. Of the plurality of versions, the third step of managing operations on versions with a lock, and
A fourth step of acquiring a lock indicating the existence of a transaction that refers to or updates a predetermined version, and a lock indicating the existence of a transaction that intends to reference or update a predetermined version of the plurality of versions. A fifth step of applying, a sixth step of applying a lock indicating the existence of a transaction that refers to or updates all versions of the plurality of versions, and an intent to refer to or update all versions of the plurality of versions. A seventh step of applying a lock indicating the existence of a transaction, wherein the third step includes the fourth step, the fifth step, the sixth step, and the seventh step. Based on the lock in any one step, By prohibiting the operation by the irradiation transaction or the update transaction,
To achieve the above objectives.

【0014】請求項3記載の発明では、排他資源の読み
出し操作を行う参照トランザクションに対して時間管理
による順序付けを用いたマルチバージョン方式と、前記
排他資源の読み書き操作を行う更新トランザクションに
対して2相ルールによるロック方式とを協調利用可能な
トランザクション同時実行制御装置において、前記参照
トランザクションまたは前記更新トランザクションによ
る前記排他資源内の所定の操作対象への排他要求を受信
する要求受信手段と、前記排他資源の複製であるバージ
ョンを複数作成するバージョン作成手段と、前記要求受
信手段により受信した排他要求に基づいて、前記参照ト
ランザクションまたは前記更新トランザクションによる
前記バージョン作成手段で作成された前記バージョンに
対する操作をロックにより管理するロック管理手段と、
前記複数バージョンのうち、所定の1バージョンを参照
または更新するトランザクションの存在を表すロックを
かける第1のロック手段と、前記複数バージョンのう
ち、所定の1バージョンを参照する意図または更新する
意図があるトランザクションの存在を表すロックをかけ
る第2のロック手段と、前記複数バージョンのすべての
バージョンを参照または更新するトランザクションの存
在を表すロックをかける第3のロック手段と、前記複数
バージョンのすべてのバージョンを参照する意図または
更新する意図があるトランザクションの存在を表すロッ
クをかける第4のロック手段と、を備え、前記ロック管
理手段は、前記第1のロック手段、前記第2のロック手
段、前記第3のロック手段、前記第4のロック手段のう
ちいずれか1によるロックに基づいて、前記参照トラン
ザクションまたは前記更新トランザクションによる操作
を禁止することにより、前記目的を達成する。
According to the third aspect of the present invention, a multi-version method that uses ordering by time management for a reference transaction that performs an exclusive resource read operation and a two-phase method for an update transaction that performs a read / write operation of the exclusive resource. In a transaction concurrency control device capable of cooperating with a locking method according to a rule, a request receiving unit for receiving an exclusion request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction, Based on the version creating means for creating a plurality of versions that are duplicates and the exclusion request received by the request receiving means, the operation for the version created by the version creating means by the reference transaction or the update transaction is locked. And lock management means for managing by,
First locking means for locking the existence of a transaction that refers to or updates a predetermined version of the plurality of versions, and has an intention of referring to or updating a predetermined version of the plurality of versions A second locking means for locking the existence of a transaction; a third locking means for locking the existence of a transaction that refers to or updates all versions of the plurality of versions; and all versions of the plurality of versions. Fourth lock means for applying a lock indicating the existence of a transaction having an intention to refer to or update, the lock management means including the first lock means, the second lock means, and the third lock means. And any one of the fourth locking means Based on the click, by prohibiting operation of the reference transaction or the update transaction, to achieve the above object.

【0015】請求項4記載の発明では、排他資源の読み
出し操作を行う参照トランザクションに対して時間管理
による順序付けを用いたマルチバージョン方式と、前記
排他資源の読み書き操作を行う更新トランザクションに
対して2相ルールによるロック方式を用いたマルチバー
ジョン方式とを協調利用可能なトランザクション同時実
行制御装置において、前記参照トランザクションまたは
前記更新トランザクションによる前記排他資源内の所定
の操作対象への排他要求を受信する要求受信手段と、前
記排他資源の複製であるバージョンを複数作成するバー
ジョン作成手段と、前記要求受信手段により受信した排
他要求に基づいて、前記参照トランザクションまたは前
記更新トランザクションによる前記バージョン作成手段
で作成された前記バージョンに対する操作をロックによ
り管理するロック管理手段と、前記複数バージョンのう
ち、所定の1バージョンを参照または更新するトランザ
クションの存在を表すロックをかける第1のロック手段
と、前記複数バージョンのうち、所定の1バージョンを
参照する意図または更新する意図があるトランザクショ
ンの存在を表すロックをかける第2のロック手段と、前
記複数バージョンのすべてのバージョンを参照または更
新するトランザクションの存在を表すロックをかける第
3のロック手段と、前記複数バージョンのすべてのバー
ジョンを参照する意図または更新する意図があるトラン
ザクションの存在を表すロックをかける第4のロック手
段と、を備え、前記ロック管理手段は、前記第1のロッ
ク手段、前記第2のロック手段、前記第3のロック手
段、前記第4のロック手段のうちいずれか1によるロッ
クに基づいて、前記参照トランザクションまたは前記更
新トランザクションによる操作を禁止することにより、
前記目的を達成する。
According to a fourth aspect of the present invention, a multi-version method that uses ordering by time management for a reference transaction that performs an exclusive resource read operation and a two-phase method for an update transaction that performs an exclusive resource read / write operation In a transaction concurrency control device capable of cooperating with a multi-version system using a rule-based lock system, a request receiving unit for receiving an exclusive request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction. A version creating means for creating a plurality of versions that are copies of the exclusive resource; and the version creating means created by the reference transaction or the update transaction based on the exclusive request received by the request receiving means. A lock management unit that manages an operation on a version by a lock; a first locking unit that locks the existence of a transaction that refers to or updates a predetermined one of the plurality of versions; and a predetermined one of the plurality of versions. Second locking means for locking the existence of a transaction that intends to refer to or update one version of the third version, and third locking means for the existence of a transaction that references or updates all versions of the plurality of versions Locking means and a fourth locking means for locking the existence of a transaction having an intention to refer to or update all versions of the plurality of versions, and the lock management means includes the first locking means. Locking means, said second locking means, front Third locking means, on the basis of a lock according to any one of the fourth locking means, by prohibiting operation of the reference transaction or the update transaction,
To achieve the above objectives.

【0016】[0016]

【発明の実施の形態】以下、本発明の好適な実施の形態
について図1ないし図4を参照して詳細に説明する。図
1は、トランザクション処理を実行するコンピュータシ
ステムの概略構成を示した図である。また、図2は、ト
ランザクション処理システムのソフトウェア構成を示し
た図である。図1に示したように、本実施の形態に係る
コンピュータシステムは、サーバー10と、サーバー1
0内のトランザクション管理システムに対して所定の処
理要求を送信する端末20a、20bとから構成されて
いる。端末20a20bは、コンピュータシステムの利
用者がサーバー10で実行されているトランザクション
管理システム(図2参照)への問い合わせ要求(所定の
処理要求)を入力したり、問い合わせ結果(処理要求に
対する処理結果)を出力したりするために利用するPC
(パーソナルコンピュータ)、ワークステーションなど
の計算機である。図1に示したように、端末20a、2
0bには問い合わせ要求を入力するためのキーボードお
よびマウスなどのポインティングデバイスや、問い合わ
せ結果を表示するためのモニタ(ディスプレイ)が装備
されている。また、端末20a、20bは、CPU(中
央処理装置)、メモリ、ハードディスクを備え、ソフト
ウェアによるプログラムが実行可能である。なお、端末
20a、20bでは、CPUがメモリに格納されている
プログラムに従い、図2の問い合わせ入出力手段21に
よる問い合わせ要求を実行するようになっている。
BEST MODE FOR CARRYING OUT THE INVENTION Preferred embodiments of the present invention will now be described in detail with reference to FIGS. FIG. 1 is a diagram showing a schematic configuration of a computer system that executes transaction processing. 2 is a diagram showing the software configuration of the transaction processing system. As shown in FIG. 1, the computer system according to the present embodiment includes a server 10 and a server 1.
It is composed of terminals 20a and 20b for transmitting a predetermined processing request to the transaction management system within 0. The terminal 20a20b inputs the inquiry request (predetermined processing request) to the transaction management system (see FIG. 2) executed by the user of the computer system and the inquiry result (processing result for the processing request). PC used for output
A computer such as a (personal computer) or a workstation. As shown in FIG. 1, the terminals 20a, 2
0b is equipped with a pointing device such as a keyboard and a mouse for inputting an inquiry request, and a monitor (display) for displaying an inquiry result. The terminals 20a and 20b each include a CPU (central processing unit), a memory, and a hard disk, and can execute a program by software. In the terminals 20a and 20b, the CPU executes the inquiry request by the inquiry input / output unit 21 of FIG. 2 according to the program stored in the memory.

【0017】サーバー10は、端末20a、20bにお
いて利用者から入力された問い合わせ要求に基づいた問
い合わせ処理を行い、その結果を端末20a、20bに
返すコンピュータなどの計算機である。端末20a、2
0bとサーバー10は、通信ネットワークで接続されて
いる。サーバー10は、CPU、所定の処理プログラム
が格納されたメモリ、ハードディスクを備え、ソフトウ
ェアに基づいて、問い合わせ処理プログラムを実行する
ことができるようになっている。サーバー10は、端末
20a、20bからの所定の問い合わせ要求に応じて、
各問い合わせ処理を実行する図2に示したようなトラン
ザクション管理システムを備えている。
The server 10 is a computer such as a computer that performs inquiry processing based on an inquiry request input by a user in the terminals 20a and 20b and returns the result to the terminals 20a and 20b. Terminals 20a, 2
0b and the server 10 are connected by a communication network. The server 10 includes a CPU, a memory in which a predetermined processing program is stored, and a hard disk, and can execute the inquiry processing program based on software. The server 10 responds to a predetermined inquiry request from the terminals 20a and 20b.
The transaction management system as shown in FIG. 2 for executing each inquiry process is provided.

【0018】図2に示したようにトランザクション管理
システムは、メモリに格納されている問い合わせを最適
化するためのプログラムに従って機能し、問い合わせ入
出力手段21、問い合わせ実行手段11、トランザクシ
ョン同時実行制御手段14、バージョン管理手段12、
ロック管理手段13が各処理をCPUによって実行され
るようになっている。また、データベースファイル15
は、ロックをかける対象である排他資源(データベー
ス、表、ページ、レコード、行など)を格納しており、
ハードディスクに記録されているものとする。通信ネッ
トワークは、端末20a、20bおよびサーバー10を
接続する伝送路である。通信ネットワークは、ケーブル
で実現され、通信プロトコルにはTCP/IPが使われ
る。なお、端末20a、20bとサーバー10との通信
プロトコルが一致すれば、ケーブルを使用しない無線L
ANや放送波を使ったネットワークにより構築してもよ
い。
As shown in FIG. 2, the transaction management system functions according to a program for optimizing an inquiry stored in a memory, and an inquiry input / output unit 21, an inquiry execution unit 11, and a transaction simultaneous execution control unit 14 are provided. , Version management means 12,
The lock management means 13 is adapted to execute each processing by the CPU. Also, the database file 15
Stores exclusive resources (databases, tables, pages, records, rows, etc.) to be locked,
It is recorded on the hard disk. The communication network is a transmission line that connects the terminals 20a and 20b and the server 10. The communication network is realized by a cable, and TCP / IP is used as a communication protocol. If the communication protocols of the terminals 20a and 20b and the server 10 match, the wireless L that does not use a cable is used.
It may be constructed by a network using AN or broadcast waves.

【0019】次に、トランザクション管理システムとし
て格納されている各プログラムの機能について説明す
る。問い合わせ入出力手段21は、端末20a、20b
からの問い合わせ要求を受け付ける。そして、この受け
付けた問い合わせ要求を問い合わせ実行手段11によっ
て処理実行させ、その結果を端末20a、20bに対し
て出力する。問い合わせ実行手段11は、問い合わせ入
出力手段21からのデータベース操作要求をバージョン
管理手段12によって処理実行させ、その結果を問い合
わせ入出力手段21に返す。また、問い合わせ実行手段
11は、問い合わせ入出力手段21からのトランザクシ
ョンの開始、終了要求をトランザクション同時実行制御
手段14によって処理実行させる。さらに、問い合わせ
実行手段11は、問い合わせ入出力手段21からの他の
すべてのトランザクションへの排他要求をロック管理手
段13によって処理実行させる。
Next, the function of each program stored as the transaction management system will be described. The inquiry input / output unit 21 includes terminals 20a and 20b.
Accepts inquiry requests from. Then, the received inquiry request is processed and executed by the inquiry execution means 11, and the result is output to the terminals 20a and 20b. The inquiry execution means 11 causes the version management means 12 to process and execute the database operation request from the inquiry input / output means 21, and returns the result to the inquiry input / output means 21. Further, the query execution means 11 causes the transaction concurrency control means 14 to process and execute a transaction start / end request from the query input / output means 21. Further, the inquiry execution means 11 causes the lock management means 13 to process and execute exclusion requests from the inquiry input / output means 21 to all other transactions.

【0020】トランザクション同時実行制御手段14
は、トランザクションを開始、終了するためのインタフ
ェースやトランザクションに関する情報、例えば、トラ
ンザクションの状態や開始時刻などを取得するためのイ
ンタフェースを提供する。また、トランザクション同時
実行制御手段14は、トランザクションの終了時には、
ロック管理手段13およびバージョン管理手段12に対
して、そのトランザクションに関した管理情報の破棄を
指示する。ロック管理手段13は、2相ルールによるロ
ック方式、タイムスタンプによる順序付け方式、マルチ
バージョン方式などのロック管理方式を使用することに
より、データベースファイル15内のデータ、データを
格納する表、表を持つデータベースなどの操作対象に対
する操作の予約確保および放棄を実行するためのインタ
フェースを提供する。
Transaction concurrent execution control means 14
Provides an interface for starting and ending a transaction and an interface for acquiring information about the transaction, for example, the state of the transaction and the start time. Further, the transaction concurrency control means 14 is
The lock management means 13 and the version management means 12 are instructed to discard the management information related to the transaction. The lock management unit 13 uses data in the database file 15, a table storing the data, and a database having a table by using a lock management method such as a two-phase rule locking method, a time stamp ordering method, and a multi-version method. It provides an interface for performing reservation reservation and abandonment of operations for operation targets such as.

【0021】バージョン管理手段12は、データベース
ファイル15内のデータを操作するためのインタフェー
スを提供する。あるトランザクションによって操作が要
求されると、このトランザクションに応じたバージョン
を選択し、選択したバージョンに対しての操作を実行さ
せる。トランザクションに応じたバージョンの選択に
は、参照トランザクションへのタイムスタンプによる順
序付けを用いたマルチバージョン方式と、更新トランザ
クションへの2相ルールによるロック方式、2相ルール
によるロックを用いたマルチバージョン方式を協調させ
る複合方式を使用するようになっている。この使用する
複合方式の必要性に応じて、ロック管理手段13に対し
て操作対象に対するロックを要求したり、トランザクシ
ョン同時実行制御手段14に対して操作を要求している
トランザクションに関する情報を問い合わせる。また、
操作対象となるデータベースファイル15内のデータ
と、そのバージョンのディスクへの入出力をバッファリ
ングする。データベースファイル15は、バージョン管
理手段12が使用するバージョン管理方式に応じた形式
で、データベースファイル15内のデータやそのバージ
ョンなどを記憶する。
The version management means 12 provides an interface for manipulating the data in the database file 15. When an operation is requested by a certain transaction, the version corresponding to this transaction is selected, and the operation for the selected version is executed. For the selection of the version according to the transaction, the multi-version method using the ordering by the time stamp to the reference transaction and the lock method by the two-phase rule for the update transaction cooperate with each other. It is designed to use a complex method. Depending on the necessity of the combined system used, the lock management unit 13 is requested to lock the operation target, and the transaction concurrency control unit 14 is inquired about the information regarding the transaction requesting the operation. Also,
The data in the database file 15 to be operated and the input / output to / from the disk of that version are buffered. The database file 15 stores the data in the database file 15 and the version thereof in a format according to the version management method used by the version management means 12.

【0022】ここで、本実施の形態に係るトランザクシ
ョン管理システムにおけるトランザクション同時実行制
御方法について、図3および図4を参照しながら説明す
る。本実施の形態では、ロック管理手段13が管理する
ロックの種類として、ある1つのバージョンを参照する
ことを表すVSロック、すべてのバージョンを更新する
ことを表すVXロック、ある1つのバージョンの参照の
意図があることを表すIVSロック、すべてのバージョ
ンの更新の意図があることを表すIVXロックの4つの
ロックをさらに加える。これにより、参照トランザクシ
ョンへのタイムスタンプによる順序付けを用いたマルチ
バージョン方式と、更新トランザクションへの2相ルー
ルによるロック方式とを協調してトランザクション同時
実行制御を行う際、あるトランザクションT1がある操
作対象に対してある種類のロックをしたい場合に、他の
トランザクションT0がその操作対象に対してすでにあ
る種類のロックをしているとき、各トランザクションT
0、T1間でのロックの両立性は図3に示した表のよう
になる。なお、図3において、○はロックが共存できる
ことを表し、×はロックが衝突することを表している。
Now, a transaction concurrent execution control method in the transaction management system according to this embodiment will be described with reference to FIGS. 3 and 4. In the present embodiment, as the types of locks managed by the lock management means 13, a VS lock indicating that one version is referred to, a VX lock indicating that all versions are updated, and a reference to one version are referred to. Add four more locks, an IVS lock that indicates intent, and an IVX lock that indicates intent to update all versions. As a result, when performing transaction concurrency control in cooperation with the multi-version method using the ordering of the reference transaction by the time stamp and the lock method of the update transaction by the two-phase rule, a certain transaction T1 becomes an operation target. In the case where a certain type of lock is desired for another transaction T0 and another transaction T0 already has a certain type of lock for the operation target, each transaction T0
The lock compatibility between 0 and T1 is as shown in the table of FIG. In FIG. 3, ◯ means that locks can coexist, and x means that locks collide.

【0023】また、参照トランザクションへのタイムス
タンプによる順序付けを用いたマルチバージョン方式
と、更新トランザクションへの2相ルールによるロック
を用いたマルチバージョン方式とを協調して同時実行制
御を行う際、あるトランザクションT1がある操作対象
に対してある種類のロックをしたい場合に、他のトラン
ザクションT0がその操作対象に対してすでにある種類
のロックをしているとき、各トランザクションT0、T
1間でのロックの両立性は図4に示した表のようにな
る。なお、図3と同様に図4において、○はロックが共
存できることを表し、×はロックが衝突することを表し
ている。
Further, when performing simultaneous execution control by cooperating the multi-version method using the ordering of the reference transaction with the time stamp and the multi-version method using the lock on the update transaction by the two-phase rule, a certain transaction is performed. When T1 wants to perform a certain type of lock on an operation target, and another transaction T0 already has a certain type of lock on the operation target, each transaction T0, T
The compatibility of locks between 1 is as shown in the table shown in FIG. Note that, in FIG. 4 as in FIG. 3, ∘ indicates that locks can coexist, and × indicates that locks collide.

【0024】バージョン管理手段12に対して、データ
ベースファイル15中のデータの参照や更新操作が要求
されると、バージョン管理手段12はロック管理手段1
3によって、ロック管理手段13がロック可能な操作対
象のうち、トランザクション管理システムがすべてのト
ランザクションの排他を提供する単位より上位のロック
対象に対してIVSロック、その単位のロック対象に対
してVSロックの確保を試みる。ロック管理手段13に
よってIVSロックおよびVSロックが確保できた場
合、バージョン管理手段12は、トランザクションの種
類に応じたマルチバージョン方式に従って操作するバー
ジョンを選択する。なお、バージョンは必要があれば生
成してから選択するようにしてもよい。
When the version management means 12 is requested to refer to or update the data in the database file 15, the version management means 12 causes the lock management means 1 to operate.
3, among the operation targets that can be locked by the lock management unit 13, the IVS lock is applied to a lock target higher than the unit for which the transaction management system provides exclusive access to all transactions, and the VS lock is applied to the lock target in that unit. Try to secure. When the IVS lock and the VS lock can be secured by the lock management means 13, the version management means 12 selects the version to be operated according to the multi-version method according to the type of transaction. If necessary, the version may be generated and then selected.

【0025】例えば、ロック管理手段13がデータベー
ス、表、タプルをロックすることができるような場合、
または、トランザクション管理システムがデータベース
単位ですべてのトランザクションの排他を提供するよう
な場合、バージョン管理手段12は、参照や更新操作を
行うデータを保持するタプルを有する表が含まれるデー
タベースに対して、ロック管理手段13によるVSロッ
クの確保を試みる。同様に、表単位の排他を提供するよ
うな場合、バージョン管理手段12はロック管理手段1
3によって、操作するデータを保持するタプルを有する
表が含まれるデータベースに対してはIVSロックを、
操作するデータを保持するタプルに対してはVSロック
を確保することをそれぞれ試みる。一方、問い合わせ実
行手段11に対して、あるロック対象に対する他のすべ
てのトランザクションの排他が要求されると、問い合わ
せ実行手段11はロック管理手段13によって、その上
位のロック対象に対してはIVXロックを、そのロック
対象に対してはVXロックを確保することをそれぞれ試
みる。問い合わせ実行手段11に対して、トランザクシ
ョンの終了が要求されると、問い合わせ実行手段11
は、終了するトランザクションが確保したロックのう
ち、放棄されていないものをロック管理手段13によっ
てすべて放棄させる。
For example, when the lock management means 13 can lock a database, a table, and a tuple,
Alternatively, when the transaction management system provides exclusive access to all transactions on a database-by-database basis, the version management means 12 locks the database that includes a table having tuples that hold data for reference and update operations. The management means 13 tries to secure the VS lock. Similarly, when the table-based exclusion is provided, the version management means 12 uses the lock management means 1
3, an IVS lock on the database containing the table with tuples holding the data to be manipulated,
Each attempts to secure a VS lock on the tuple holding the data to be manipulated. On the other hand, when the query execution unit 11 is requested to lock all other transactions for a certain lock target, the query execution unit 11 causes the lock management unit 13 to acquire the IVX lock for the higher level lock target. , And try to secure a VX lock for the lock target. When the transaction executing unit 11 is requested to end the transaction, the query executing unit 11
Causes the lock management unit 13 to abandon all locks that have not been abandoned among the locks secured by the transaction to be terminated.

【0026】このように、あるトランザクションがある
データの操作を要求したときに、そのデータを含むロッ
ク項目のいずれかに対して、他のすべてのトランザクシ
ョンの排他が要求済であるトランザクションが存在して
いると、図3および図4に示したように、確保を試みた
ロックは衝突することになり、それらのトランザクショ
ンがすべて終了するまで、実行を中断して待つことにな
る。また、あるトランザクションがあるロック対象に対
する他のすべてのトランザクションの排他を要求した場
合に、そのロック対象以上のロック対象に対する他のす
べてのトランザクションの排他を要求済のトランザクシ
ョンや、そのロック対象に含まれるデータのいずれかを
操作済のトランザクションがあるとき、図3および図4
に示したように、確保を試みたロックが衝突し、それら
のトランザクションがすべて終了するまで、実行を中断
して待つことになる。
As described above, when a certain transaction requests the operation of certain data, there exists a transaction for which exclusion of all other transactions has been requested for any of the lock items including the data. Then, as shown in FIGS. 3 and 4, the locks that have been attempted to acquire will collide with each other, and execution will be suspended and waited until all the transactions are completed. In addition, when a transaction requests exclusion of all other transactions for a certain lock target, it is included in the transactions that have already requested exclusion of all other transactions for the lock target and above. 3 and 4 when there is a transaction that has manipulated any of the data
As shown in, execution will be suspended and wait until the locks that are trying to acquire collide and all of those transactions are completed.

【0027】以上のように、本実施の形態のトランザク
ション管理システムによるトランザクション同時実行制
御方法では、トランザクションを読み出し操作のみ行う
参照トランザクションと、読み書き操作を行う更新トラ
ンザクションが混在して実行され、参照トランザクショ
ンへのタイムスタンプによる順序付けを用いたマルチバ
ージョン方式と、更新トランザクションへの2相ルール
によるロック方式を協調した同時実行制御を行う場合、
1バージョンを操作するロック、全バージョンを操作す
るロック、その意図があることを表すロックを導入する
ことにより、自分以外のすべての参照および更新トラン
ザクションによる操作対象への操作を禁止することがで
きる。また、本実施の形態のトランザクション管理シス
テムによるトランザクション同時実行制御方法では、参
照トランザクションへのタイムスタンプによる順序付け
を用いたマルチバージョン方式と、更新トランザクショ
ンへの2相ルールによるロックを用いたマルチバージョ
ン方式を 協調した同時実行制御を行うデータベースシ
ステムにおいて、1バージョンを操作するロック、全バ
ージョンを操作するロック、その意図があることを表す
ロックを導入することにより、自分以外のすべての参照
および更新トランザクションによる操作対象への操作を
禁止することができる。
As described above, in the transaction concurrency control method by the transaction management system according to the present embodiment, the reference transaction for performing only the read operation and the update transaction for performing the read / write operation are executed in a mixed manner, and the reference transaction is executed. When performing concurrent execution control by coordinating the multi-version method using ordering with the time stamp of and the locking method by the two-phase rule for update transactions,
By introducing a lock that operates one version, a lock that operates all versions, and a lock that indicates the intention of the lock, it is possible to prohibit operations on the operation target by all reference and update transactions other than the own transaction. In the transaction concurrency control method by the transaction management system of the present embodiment, there are a multi-version method that uses ordering with a time stamp for a reference transaction and a multi-version method that uses a lock with a two-phase rule for an update transaction. In a database system that performs coordinated concurrency control, by introducing a lock that operates one version, a lock that operates all versions, and a lock that indicates its intention, operation by all reference and update transactions other than itself It is possible to prohibit operations on the target.

【0028】[0028]

【発明の効果】請求項1記載の発明では、第3のステッ
プでは、第4のステップ、第5のステップ、第6のステ
ップ、第7のステップのうちいずれか1のステップにお
けるロックに基づいて、ロックを管理するので、自分以
外のすべての参照および更新トランザクションによるあ
る対象への操作を禁止することができる。
According to the first aspect of the invention, the third step is based on the lock in any one of the fourth step, the fifth step, the sixth step and the seventh step. , It manages locks, so it is possible to prohibit operations on a target by all reference and update transactions other than itself.

【0029】請求項2記載の発明では、第3のステップ
では、第4のステップ、第5のステップ、第6のステッ
プ、第7のステップのうちいずれか1のステップにおけ
るロックに基づいて、ロックを管理するので、自分以外
のすべての参照および更新トランザクションによるある
対象への操作を禁止することができる。
According to the second aspect of the invention, in the third step, the lock is performed based on the lock in any one of the fourth step, the fifth step, the sixth step, and the seventh step. Is managed, it is possible to prohibit operations on a target by all reference and update transactions other than itself.

【0030】請求項3記載の発明では、ロック管理手段
は、第1のロック手段、第2のロック手段、第3のロッ
ク手段、第4のロック手段のうちいずれか1によるロッ
クに基づいて、参照トランザクションまたは更新トラン
ザクションによる操作を管理するので、自分以外のすべ
ての参照および更新トランザクションによるある対象へ
の操作を禁止することができる。
According to a third aspect of the present invention, the lock management means is based on the lock by any one of the first lock means, the second lock means, the third lock means, and the fourth lock means. Since the operation by the reference transaction or the update transaction is managed, it is possible to prohibit the operation to a certain target by all the reference and update transactions other than itself.

【0031】請求項4記載の発明では、ロック管理手段
は、第1のロック手段、第2のロック手段、第3のロッ
ク手段、第4のロック手段のうちいずれか1によるロッ
クに基づいて、参照トランザクションまたは更新トラン
ザクションによる操作を管理するので、自分以外のすべ
ての参照および更新トランザクションによるある対象へ
の操作を禁止することができる。
According to a fourth aspect of the present invention, the lock management means is based on the lock by any one of the first lock means, the second lock means, the third lock means and the fourth lock means. Since the operation by the reference transaction or the update transaction is managed, it is possible to prohibit the operation to a certain target by all the reference and update transactions other than itself.

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

【図1】トランザクション処理を実行するコンピュータ
システムの概略構成を示した図である。
FIG. 1 is a diagram showing a schematic configuration of a computer system that executes a transaction process.

【図2】トランザクション処理システムのソフトウェア
構成を示した図である。
FIG. 2 is a diagram showing a software configuration of a transaction processing system.

【図3】各トランザクションT0、T1間でのロックの
両立性を示した図である。
FIG. 3 is a diagram showing lock compatibility between transactions T0 and T1.

【図4】各トランザクションT0、T1間でのロックの
両立性を示した図である。
FIG. 4 is a diagram showing compatibility of locks between transactions T0 and T1.

【図5】各トランザクションT0、T1間でのロックの
両立性を示した図である。
FIG. 5 is a diagram showing lock compatibility between transactions T0 and T1.

【図6】各トランザクションT0、T1間でのロックの
両立性を示した図である。
FIG. 6 is a diagram showing compatibility of locks between transactions T0 and T1.

【図7】各トランザクションT0、T1間でのロックの
両立性を示した図である。
FIG. 7 is a diagram showing lock compatibility between transactions T0 and T1.

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

10 サーバー 20a、20b 端末 10 servers 20a, 20b terminals

───────────────────────────────────────────────────── フロントページの続き (72)発明者 浅田 一繁 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 Fターム(参考) 5B082 FA17 GB06    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Kazushige Asada             1-3-3 Nakamagome, Ota-ku, Tokyo Stocks             Company Ricoh F-term (reference) 5B082 FA17 GB06

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 排他資源の読み出し操作を行う参照トラ
ンザクションに対して時間管理による順序付けを用いた
マルチバージョン方式と、前記排他資源の読み書き操作
を行う更新トランザクションに対して2相ルールによる
ロック方式とを協調利用可能なトランザクション同時実
行制御方法において、 前記参照トランザクションまたは前記更新トランザクシ
ョンによる前記排他資源内の所定の操作対象への排他要
求を受信する第1のステップと、 前記排他資源の複製であるバージョンを複数作成する第
2のステップと、 前記第1のステップにより受信した排他要求に基づい
て、前記参照トランザクションまたは前記更新トランザ
クションによる前記第2のステップで作成された前記バ
ージョンに対する操作をロックにより管理する第3のス
テップと、 前記複数バージョンのうち、所定の1バージョンを参照
または更新するトランザクションの存在を表すロックを
かける第4のステップと、 前記複数バージョンのうち、所定の1バージョンを参照
する意図または更新する意図があるトランザクションの
存在を表すロックをかける第5のステップと、 前記複数バージョンのすべてのバージョンを参照または
更新するトランザクションの存在を表すロックをかける
第6のステップと、 前記複数バージョンのすべてのバージョンを参照する意
図または更新する意図があるトランザクションの存在を
表すロックをかける第7のステップと、からなり、 前記第3のステップでは、前記第4のステップ、前記第
5のステップ、前記第6のステップ、前記第7のステッ
プのうちいずれか1のステップにおけるロックに基づい
て、前記参照トランザクションまたは前記更新トランザ
クションによる操作を禁止することを特徴とするトラン
ザクション同時実行制御方法。
1. A multi-version method that uses time-based ordering for a reference transaction that performs an exclusive resource read operation, and a lock method that uses a two-phase rule for an update transaction that performs an exclusive resource read / write operation. In the method of controlling transaction concurrency that can be used cooperatively, a first step of receiving an exclusion request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction, and a version that is a copy of the exclusive resource A second step of creating a plurality of operations; and a lock management operation for the version created in the second step by the reference transaction or the update transaction, based on the exclusive request received in the first step. Step 3 A fourth step of applying a lock indicating the existence of a transaction that refers to or updates a predetermined one of the plurality of versions, and intends or updates a predetermined one of the plurality of versions A fifth step of acquiring a lock indicating the existence of an intended transaction, a sixth step of acquiring a lock indicating the existence of a transaction referring to or updating all versions of the plurality of versions, and all versions of the plurality of versions And a seventh step of acquiring a lock indicating the existence of a transaction having the intention of referring to or updating the transaction. In the third step, the fourth step, the fifth step, and the sixth step. Step, any one of the seventh step Based on the rock in the flop, transaction concurrency control method characterized by prohibiting the operation by the reference transaction or the update transaction.
【請求項2】 排他資源の読み出し操作を行う参照トラ
ンザクションに対して時間管理による順序付けを用いた
マルチバージョン方式と、前記排他資源の読み書き操作
を行う更新トランザクションに対して2相ルールによる
ロック方式を用いたマルチバージョン方式とを協調利用
可能なトランザクション同時実行制御方法において、 前記参照トランザクションまたは前記更新トランザクシ
ョンによる前記排他資源内の所定の操作対象への排他要
求を受信する第1のステップと、 前記排他資源の複製であるバージョンを複数作成する第
2のステップと、 前記第1のステップにより受信した排他要求に基づい
て、前記参照トランザクションまたは前記更新トランザ
クションによる前記第2のステップで作成された前記バ
ージョンに対する操作をロックにより管理する第3のス
テップと、 前記複数バージョンのうち、所定の1バージョンを参照
または更新するトランザクションの存在を表すロックを
かける第4のステップと、 前記複数バージョンのうち、所定の1バージョンを参照
する意図または更新する意図があるトランザクションの
存在を表すロックをかける第5のステップと、 前記前記複数バージョンのすべてのバージョンを参照ま
たは更新するトランザクションの存在を表すロックをか
ける第6のステップと、 前記複数バージョンのすべてのバージョンを参照する意
図または更新する意図があるトランザクションの存在を
表すロックをかける第7のステップと、からなり、 前記第3のステップでは、前記第4のステップ、前記第
5のステップ、前記第6のステップ、前記第7のステッ
プのうちいずれか1のステップにおけるロックに基づい
て、前記参照トランザクションまたは前記更新トランザ
クションによる操作を禁止することを特徴とするトラン
ザクション同時実行制御方法。
2. A multi-version method that uses time-based ordering for a reference transaction that performs an exclusive resource read operation, and a lock method that uses a two-phase rule for an update transaction that performs an exclusive resource read / write operation. In the transaction concurrency control method capable of cooperating with the multi-version method, the first step of receiving an exclusive request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction, the exclusive resource A second step of creating a plurality of versions that are duplicates of the above, and an operation for the version created in the second step by the reference transaction or the update transaction based on the exclusion request received in the first step. The A third step of managing by a lock, a fourth step of locking the existence of a transaction that refers to or updates a predetermined one of the plurality of versions, and a predetermined one of the plurality of versions A fifth step of acquiring a lock indicating the existence of a transaction that intends to refer to or update the transaction, and a sixth step of acquiring a lock indicating the existence of a transaction that refers to or updates all versions of the plurality of versions. A seventh step of acquiring a lock indicating the existence of a transaction having an intention to refer to or update all versions of the plurality of versions, the third step, the fourth step, the 5th step, 6th step, 7th step Based on the lock in any one of the steps of the steps, the transaction concurrency control method characterized by prohibiting the operation by the reference transaction or the update transaction.
【請求項3】 排他資源の読み出し操作を行う参照トラ
ンザクションに対して時間管理による順序付けを用いた
マルチバージョン方式と、前記排他資源の読み書き操作
を行う更新トランザクションに対して2相ルールによる
ロック方式とを協調利用可能なトランザクション同時実
行制御装置において、 前記参照トランザクションまたは前記更新トランザクシ
ョンによる前記排他資源内の所定の操作対象への排他要
求を受信する要求受信手段と、 前記排他資源の複製であるバージョンを複数作成するバ
ージョン作成手段と、 前記要求受信手段により受信した排他要求に基づいて、
前記参照トランザクションまたは前記更新トランザクシ
ョンによる前記バージョン作成手段で作成された前記バ
ージョンに対する操作をロックにより管理するロック管
理手段と、 前記複数バージョンのうち、所定の1バージョンを参照
または更新するトランザクションの存在を表すロックを
かける第1のロック手段と、 前記複数バージョンのうち、所定の1バージョンを参照
する意図または更新する意図があるトランザクションの
存在を表すロックをかける第2のロック手段と、 前記複数バージョンのすべてのバージョンを参照または
更新するトランザクションの存在を表すロックをかける
第3のロック手段と、 前記複数バージョンのすべてのバージョンを参照する意
図または更新する意図があるトランザクションの存在を
表すロックをかける第4のロック手段と、を備え、 前記ロック管理手段は、前記第1のロック手段、前記第
2のロック手段、前記第3のロック手段、前記第4のロ
ック手段のうちいずれか1によるロックに基づいて、前
記参照トランザクションまたは前記更新トランザクショ
ンによる操作を禁止することを特徴とするトランザクシ
ョン同時実行制御装置。
3. A multi-version method that uses ordering by time management for a reference transaction that performs an exclusive resource read operation, and a lock method that uses a two-phase rule for an update transaction that performs an exclusive resource read / write operation. In a transaction concurrency control device capable of cooperative use, a request receiving unit that receives an exclusion request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction, and a plurality of versions that are copies of the exclusive resource Based on the version creating means to create, and the exclusive request received by the request receiving means,
The presence of a lock management unit that manages an operation for the version created by the version creation unit by the reference transaction or the update transaction by a lock, and a transaction that references or updates a predetermined one version of the plurality of versions. A first locking unit that locks; a second locking unit that locks the existence of a transaction that intends to refer to or update a predetermined one of the plurality of versions; and all of the plurality of versions Third locking means for locking the existence of a transaction that refers to or updates a version of, and a lock that represents the existence of a transaction that intends to reference or update all versions of the plurality of versions. And a fourth lock means, wherein the lock management means is formed by any one of the first lock means, the second lock means, the third lock means, and the fourth lock means. A transaction concurrency control device for prohibiting an operation by the reference transaction or the update transaction based on a lock.
【請求項4】 排他資源の読み出し操作を行う参照トラ
ンザクションに対して時間管理による順序付けを用いた
マルチバージョン方式と、前記排他資源の読み書き操作
を行う更新トランザクションに対して2相ルールによる
ロック方式を用いたマルチバージョン方式とを協調利用
可能なトランザクション同時実行制御装置において、 前記参照トランザクションまたは前記更新トランザクシ
ョンによる前記排他資源内の所定の操作対象への排他要
求を受信する要求受信手段と、 前記排他資源の複製であるバージョンを複数作成するバ
ージョン作成手段と、 前記要求受信手段により受信した排他要求に基づいて、
前記参照トランザクションまたは前記更新トランザクシ
ョンによる前記バージョン作成手段で作成された前記バ
ージョンに対する操作をロックにより管理するロック管
理手段と、 前記複数バージョンのうち、所定の1バージョンを参照
または更新するトランザクションの存在を表すロックを
かける第1のロック手段と、 前記複数バージョンのうち、所定の1バージョンを参照
する意図または更新する意図があるトランザクションの
存在を表すロックをかける第2のロック手段と、 前記複数バージョンのすべてのバージョンを参照または
更新するトランザクションの存在を表すロックをかける
第3のロック手段と、 前記複数バージョンのすべてのバージョンを参照する意
図または更新する意図があるトランザクションの存在を
表すロックをかける第4のロック手段と、を備え、 前記ロック管理手段は、前記第1のロック手段、前記第
2のロック手段、前記第3のロック手段、前記第4のロ
ック手段のうちいずれか1によるロックに基づいて、前
記参照トランザクションまたは前記更新トランザクショ
ンによる操作を禁止することを特徴とするトランザクシ
ョン同時実行制御装置。
4. A multi-version method that uses time-based ordering for a reference transaction that performs an exclusive resource read operation, and a lock method that uses a two-phase rule for an update transaction that performs an exclusive resource read / write operation. In a transaction concurrency control device capable of cooperating with the multi-version method, a request receiving unit that receives an exclusion request to a predetermined operation target in the exclusive resource by the reference transaction or the update transaction, and the exclusive resource Version creating means for creating a plurality of versions that are duplicates, and based on the exclusive request received by the request receiving means,
The presence of a lock management unit that manages an operation for the version created by the version creation unit by the reference transaction or the update transaction by a lock, and a transaction that references or updates a predetermined one version of the plurality of versions. A first locking unit that locks; a second locking unit that locks the existence of a transaction that intends to refer to or update a predetermined one of the plurality of versions; and all of the plurality of versions Third locking means for locking the existence of a transaction that refers to or updates a version of, and a lock that represents the existence of a transaction that intends to reference or update all versions of the plurality of versions. And a fourth lock means, wherein the lock management means is formed by any one of the first lock means, the second lock means, the third lock means, and the fourth lock means. A transaction concurrency control device for prohibiting an operation by the reference transaction or the update transaction based on a lock.
JP2001339931A 2001-11-05 2001-11-05 Transaction simultaneously execution control method and transaction simultaneous execution control device Pending JP2003140951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001339931A JP2003140951A (en) 2001-11-05 2001-11-05 Transaction simultaneously execution control method and transaction simultaneous execution control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001339931A JP2003140951A (en) 2001-11-05 2001-11-05 Transaction simultaneously execution control method and transaction simultaneous execution control device

Publications (1)

Publication Number Publication Date
JP2003140951A true JP2003140951A (en) 2003-05-16

Family

ID=19154207

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001339931A Pending JP2003140951A (en) 2001-11-05 2001-11-05 Transaction simultaneously execution control method and transaction simultaneous execution control device

Country Status (1)

Country Link
JP (1) JP2003140951A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8131679B2 (en) 2007-05-18 2012-03-06 Hitachi, Ltd. Exclusive control method for database and program
WO2019198824A1 (en) * 2018-04-12 2019-10-17 日本電信電話株式会社 Control processing device, control processing method, and control processing program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8131679B2 (en) 2007-05-18 2012-03-06 Hitachi, Ltd. Exclusive control method for database and program
WO2019198824A1 (en) * 2018-04-12 2019-10-17 日本電信電話株式会社 Control processing device, control processing method, and control processing program
JP2019185492A (en) * 2018-04-12 2019-10-24 日本電信電話株式会社 Control processing device, control processing method, and control processing program

Similar Documents

Publication Publication Date Title
US9424070B2 (en) Combining scalability across multiple resources in a transaction processing system having global serializability
US6738971B2 (en) Using a resource manager to coordinate the comitting of a distributed transaction
JP4842279B2 (en) Infrastructure for performing file operations by database server
JP3672208B2 (en) Hierarchical transaction processing method
US6219675B1 (en) Distribution of a centralized database
EP1459213B1 (en) System and methods for asychronous synchronization
EP1938191B1 (en) Anticipatory changes to resources managed by locks
US6597366B1 (en) Transparent general purpose object isolation for multi-tier distributed object environments
US7167900B2 (en) Methods and systems for managing state changes during an arbitration cycle when multiple computer nodes request changes of shared data
CN100465937C (en) Method and system for transacted file operations over a network
JPH07219792A (en) Equipment and method for lock
US20040078379A1 (en) Distributed concurrency control using serialization ordering
EP3062260B1 (en) A method for controlling access to electronic documents using locks
WO2011163001A2 (en) Shared data collections
US7043478B2 (en) Asynchronous database updates
JPH08241234A (en) Database management method
JPS599764A (en) Method of guaranteeing originality in renewing action of several lines
EP2501106B1 (en) System and method for session synchronization with independent external systems
JP2002501257A (en) Database method
US7689999B2 (en) Sharing dynamically changing resources in software systems
US9501312B2 (en) Using compensation transactions for multiple one-phase commit participants
US7478115B2 (en) System and method for database and filesystem coordinated transactions
JP2003140951A (en) Transaction simultaneously execution control method and transaction simultaneous execution control device
WO2001013202A2 (en) Concurrent commit lock
US9984096B2 (en) System and method for reducing communications overhead in a distributed transactions environment by modifying implementation of the transaction start function

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041026

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20041104

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080107

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080430