JPWO2018056267A1 - Database management apparatus, database management method, and program - Google Patents

Database management apparatus, database management method, and program Download PDF

Info

Publication number
JPWO2018056267A1
JPWO2018056267A1 JP2018541071A JP2018541071A JPWO2018056267A1 JP WO2018056267 A1 JPWO2018056267 A1 JP WO2018056267A1 JP 2018541071 A JP2018541071 A JP 2018541071A JP 2018541071 A JP2018541071 A JP 2018541071A JP WO2018056267 A1 JPWO2018056267 A1 JP WO2018056267A1
Authority
JP
Japan
Prior art keywords
record
application
control unit
transaction
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018541071A
Other languages
Japanese (ja)
Other versions
JP6784296B2 (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Publication of JPWO2018056267A1 publication Critical patent/JPWO2018056267A1/en
Application granted granted Critical
Publication of JP6784296B2 publication Critical patent/JP6784296B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

データベース管理装置300は、アプリケーション100によってアクセスされるデータベース200を管理するための装置であり、データベース200のレコードに対するアプリケーション100からの要求を受け付ける、要求受付部301と、要求が特定のレコードの排他的使用である場合に、一定条件を満たすことを条件に、要求元アプリケーション100に対して排他的使用を許可し、許可されたアプリケーション100が特定のレコードの更新を完了する旨を宣言すると、排他的な使用を解除して、別のアプリケーション100に特定のレコードの使用を許可する、アクセス処理制御部302とを備える。The database management device 300 is a device for managing the database 200 accessed by the application 100, and receives a request from the application 100 for the record of the database 200. In the case of use, the exclusive use is permitted to the request source application 100 on condition that a certain condition is satisfied, and the authorized application 100 declares that the update of the specific record is completed. And an access processing control unit 302 which allows another application 100 to use a specific record by canceling the use.

Description

本発明は、データベースシステムにおける排他制御を行なうための、データベース管理装置及びデータベース管理方法に関し、更に、これらを実現するためのプログラムを記録したコンピュータ読み取り可能な記録媒体に関する。   The present invention relates to a database management apparatus and database management method for performing exclusive control in a database system, and further relates to a computer-readable recording medium recording a program for realizing these.

従来から、データベースにアクセスする複数のアプリケーションプログラム(以下「アプリケーション」と表記する。)が並列に動作する、データベースシステムにおいては、データの整合性を確保するため、排他制御が導入されている(特許文献1及び2参照)。この排他制御によれば、複数のアプリケーションが、同時にデータベースの特定のレコードを更新しようとした場合に、レコードを更新できるアプリケーションは1つに制限される。   Conventionally, in a database system in which a plurality of application programs (hereinafter referred to as "applications") accessing a database operate in parallel, exclusive control is introduced to ensure data consistency (patented) Reference 1 and 2). According to this exclusive control, when a plurality of applications try to update a specific record of the database at the same time, the application that can update the record is limited to one.

また、データベースシステムでは、一般的に、データベースの原子性を保証するために、一連のレコードの更新は、1つのトランザクションとして制御(以下「トランザクション制御」と表記する。)されている。このトランザクション制御においては、1つのトランザクション内で行なわれたレコードの更新は、トランザクション終了時に実行される確定処理(コミット)によって、データベース上で確定される。一方、トランザクションの途中でトランザクションが破棄(ロールバック)された場合は、トランザクション内で行った全てのレコード更新も破棄される。   Also, in the database system, generally, updating of a series of records is controlled as one transaction (hereinafter referred to as "transaction control") in order to guarantee the atomicity of the database. In this transaction control, record updating performed in one transaction is decided on the database by committing processing (commit) executed at the end of the transaction. On the other hand, if a transaction is discarded (rolled back) in the middle of a transaction, all record updates made in the transaction are also discarded.

また、トランザクション制御を行うデータベースにおいて、上述の排他制御は、多くの場合、悲観的ロックによって実現されている。悲観的ロックでは、アプリケーションは、トランザクション内でこれから更新しようとするレコードに対して排他をかけてから(ロックしてから)、レコードを参照および更新する。また、アプリケーションが、特定のレコードに排他をかけようとした際に、既に、別のアプリケーションが、この特定のレコードに排他をかけていた場合は、このアプリケーションは、別のアプリケーションが更新を確定して排他を解除するまで、排他待ちをすることになる。トランザクション内で更新されたレコードデータは、コミットするまで確定されないため、排他はコミットによって解除されることになる。   Also, in a database that performs transaction control, the above-mentioned exclusive control is often realized by pessimistic locking. In pessimistic locking, the application locks (locks) the record to be updated in the transaction, and then refers to and updates the record. In addition, when an application tries to apply exclusion to a specific record, if another application has already applied exclusion to this specific record, this application causes another application to confirm the update. It will wait for exclusion until the exclusion is released. Since the record data updated in the transaction is not finalized until the commit, the exclusion is released by the commit.

特開2003−308219号公報Japanese Patent Application Publication No. 2003-308219 特開2012−164190号公報JP 2012-164190 A

上述したように、従来のデータベースシステムにおいては、排他制御によって、データの整合性は確保されるが、排他待ちによってアプリケーションの処理性能に悪影響が及ぶという問題がある。即ち、特定のアプリケーションは、レコードを更新する際に、別のアプリケーションが既に排他をかけている場合は、別のアプリケーションのトランザクションがコミットまたはロールバックされるまで待たされることになる。この結果、排他中のトランザクションの完了に時間がかかると、排他待ちをしている特定のアプリケーションによるトランザクションの完了までの時間が長くなってしまい、特定のアプリケーションの処理性能が低下してしまう。   As described above, in the conventional database system, although the integrity of data is secured by exclusive control, there is a problem that exclusive processing adversely affects the processing performance of the application. That is, when updating a record, a specific application will be kept waiting until another application's transaction is committed or rolled back, if the other application has already applied exclusion. As a result, if it takes time to complete the transaction being excluded, the time taken to complete the transaction by the specific application waiting for exclusion becomes long, and the processing performance of the specific application is degraded.

この問題について図16を用いて説明する。図16は、従来からのデータベースシステムにおける排他制御を説明するための図である。図16において、縦軸は時間の経過を表すと共に、アプリケーション1及びアプリケーション2における処理の順序も表している。   This problem is described with reference to FIG. FIG. 16 is a diagram for describing exclusive control in a conventional database system. In FIG. 16, the vertical axis represents the passage of time, and also represents the order of processing in application 1 and application 2.

図16の例では、アプリケーション1及びアプリケーション2は、共に、テーブルAについては、共有レコードを更新するが、テーブルBについては、それぞれ独立して固有レコードを更新する。具体的には、アプリケーション1は、固有レコード1−1、1−2、1−3を更新し、アプリケーション2は、固有レコード2−1、2−2、2−3を更新する。従って、図16の例では、アプリケーション1がコミット完了とするまで、アプリケーション2による共有レコード及び固有レコード2−1〜2−3の更新処理は待たされる。   In the example of FIG. 16, the application 1 and the application 2 both update the shared record for the table A, but independently update the unique record for the table B. Specifically, the application 1 updates the unique records 1-1, 1-2, and 1-3, and the application 2 updates the unique records 2-1, 2-2, and 2-3. Therefore, in the example of FIG. 16, the process of updating the shared record and the unique records 2-1 to 2-3 by the application 2 is waited until the application 1 commits.

このように、従来のデータベースシステムでは、アプリケーションは、1つのレコードの排他待ちのために、他の排他不要のレコードの更新処理を行うことができなくなるため、処理性能が低下し、処理時間に無駄が生じてしまう。   As described above, in the conventional database system, the application can not perform update processing of another exclusion unnecessary record because of waiting for exclusion of one record, processing performance is reduced, and processing time is wasted. Will occur.

また、このようなアプリケーション処理の具体例として、並列動作するトランザクションに対して、受付番号のような通番を発行して、各トランザクションに一意の連番を付与し、以降のアプリケーション処理で連番を使用した制御を行うことが挙げられる。この場合、連番はトランザクションが成功した場合にのみ更新され、ロールバックした場合に抜け番を生成しないようにされている。   Also, as a specific example of such application processing, a serial number such as a reception number is issued for transactions operating in parallel, a unique serial number is assigned to each transaction, and the serial number is given in the subsequent application processing. The control used may be mentioned. In this case, the serial number is updated only when the transaction is successful, and is not generated when rolled back.

また、上述の具体例では、連番を管理するレコードを用意し、複数のアプリケーションでそのレコードを排他して更新することが必要となるため、並行動作するトランザクションが連番付与の処理においてシリアライズされてしまう。この問題は、ロールバック時に抜け番を許容するようにすることで対応できるとも考えられるが、以降のアプリケーションの実装においては、抜け番を考慮することが強いられるため、アプリケーションが複雑になるという別の問題が生じてしまう。   Further, in the above-mentioned specific example, it is necessary to prepare a record for managing the serial number and exclusively update the record with a plurality of applications, so that transactions operating in parallel are serialized in the process of serial number assignment. It will It is thought that this problem can be dealt with by allowing the loop number at the time of rollback, but in the subsequent application implementation, it is forced to consider the loop number, which makes the application complicated. Problems will arise.

本発明の目的の一例は、上記問題を解消し、データベースシステムにおいて並列して処理を実行する複数のアプリケーションプログラムの処理性能の低下を抑制し得る、データベース管理装置、データベース管理方法、及びコンピュータ読み取り可能な記録媒体を提供することにある。   One example of the object of the present invention is a database management apparatus, database management method, and computer readable method capable of solving the above problems and suppressing deterioration in processing performance of a plurality of application programs executing processing in parallel in a database system. Providing a recording medium.

上記目的を達成するため、本発明の一側面におけるデータベース管理装置は、複数のアプリケーションプログラムによってアクセスされるデータベースを管理するための装置であって、
前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、要求受付部と、
前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、アクセス処理制御部と、
を備え、
前記アクセス処理制御部は、使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、
ことを特徴とする。
In order to achieve the above object, a database management apparatus according to an aspect of the present invention is an apparatus for managing a database accessed by a plurality of application programs,
A request receiving unit for receiving a request from the application program for a record stored in the database;
An access processing control unit for permitting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied. When,
Equipped with
The access processing control unit releases the exclusive use of the specific record and permits the use when the application program permitted to use declares that the update of the specific record is to be completed. Allow application programs other than the application program to use the particular record
It is characterized by

また、上記目的を達成するため、本発明の一側面におけるデータベース管理方法は、複数のアプリケーションプログラムによってアクセスされるデータベースを管理するための方法であって、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を有することを特徴とする。
Also, in order to achieve the above object, a database management method according to an aspect of the present invention is a method for managing a database accessed by a plurality of application programs,
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
It is characterized by having.

更に、上記目的を達成するため、本発明の一側面におけるコンピュータ読み取り可能な記録媒体は、コンピュータによって、複数のアプリケーションプログラムによってアクセスされるデータベースを管理するためのプログラムを記録したコンピュータ読み取り可能な記録媒体であって、
前記コンピュータに、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を実行させる命令を含む、プログラムを記録していることを特徴とする。
Further, to achieve the above object, a computer readable recording medium according to one aspect of the present invention is a computer readable recording medium recording a program for managing a database accessed by a plurality of application programs by a computer. And
On the computer
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
And recording a program including an instruction to execute the program.

以上のように本発明によれば、データベースシステムにおいて並列して処理を実行する複数のアプリケーションプログラムの処理性能の低下を抑制することができる。   As described above, according to the present invention, it is possible to suppress a decrease in processing performance of a plurality of application programs that execute processing in parallel in a database system.

図1は、本発明によるデータベースの管理下でのアプリケーションプログラムの動作を説明する図である。FIG. 1 is a diagram for explaining the operation of an application program under the management of a database according to the present invention. 図2は、本発明によるデータベースの管理下でのアプリケーションプログラムの動作を説明する図である。FIG. 2 is a diagram for explaining the operation of an application program under the management of a database according to the present invention. 図3は、本発明によるデータベースの管理下でのアプリケーションプログラムの動作を説明する図である。FIG. 3 is a diagram for explaining the operation of an application program under the management of a database according to the present invention. 図4は、本発明における各アプリケーションプログラムの処理順序と処理結果とを示す図である。FIG. 4 is a diagram showing the processing order of each application program and the processing result in the present invention. 図5は、本発明の実施の形態におけるデータベース管理装置の概略構成を示す図である。FIG. 5 is a diagram showing a schematic configuration of a database management apparatus according to an embodiment of the present invention. 図6は、本発明の実施の形態におけるデータベース管理装置の具体的構成を示すブロック図である。FIG. 6 is a block diagram showing a specific configuration of the database management apparatus in the embodiment of the present invention. 図7は、本発明の実施の形態で用いられるトランザクション更新管理表の一例を示す図である。FIG. 7 is a diagram showing an example of a transaction update management table used in the embodiment of the present invention. 図8は、本発明の実施の形態で用いられるレコード排他管理表の一例を示す図である。FIG. 8 is a diagram showing an example of the record exclusion management table used in the embodiment of the present invention. 図9は、本発明の実施の形態で用いられるトランザクション依存管理表の一例を示す図である。FIG. 9 is a diagram showing an example of a transaction dependency management table used in the embodiment of the present invention. 図10は、アプリケーションによる要求が排他ありレコード読み込みである場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。FIG. 10 is a flowchart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is exclusive record reading. 図11は、アプリケーションによる要求がレコード更新である場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。FIG. 11 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is a record update. 図12は、アプリケーションによる要求がレコードの更新完了である場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。FIG. 12 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is the update completion of the record. 図13は、アプリケーションによる要求がコミットである場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。FIG. 13 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is commit. 図14は、アプリケーションによる要求がロールバックである場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。FIG. 14 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is rollback. 図15は、本発明の実施の形態におけるデータベース管理装置を実現するコンピュータの一例を示すブロック図である。FIG. 15 is a block diagram showing an example of a computer for realizing the database management apparatus in the embodiment of the present invention. 図16は、従来からのデータベースシステムにおける排他制御を説明するための図である。FIG. 16 is a diagram for describing exclusive control in a conventional database system.

(発明の概要)
本発明は、同一のレコードを排他的に使用して更新する複数のアプリケーションプログラム(以下「アプリケーション」と表記する)において、レコード排他待ちによる性能低下の影響を抑制して、各アプリケーションの並列実行性能を向上させる。具体的には、本発明では、トランザクション中にレコードの更新完了を宣言するステップが導入される。よって、レコードの更新完了の宣言によって、トランザクション中にレコードの排他的使用が解除され、他のアプリケーションの排他待ちも解除される。この時、両方のアプリケーションのトランザクションの依存関係を管理することで、トランザクションの原子性を保証しつつ、排他待ち時間を短縮することができる。
(Summary of the Invention)
The present invention, in a plurality of application programs (hereinafter referred to as "application") that update using the same record exclusively, suppresses the influence of performance degradation due to record exclusion waiting, and performs parallel execution performance of each application Improve. Specifically, the present invention introduces the step of declaring record update completion during a transaction. Therefore, the declaration of the update completion of the record cancels exclusive use of the record during the transaction and also cancels exclusion waiting of other applications. At this time, by managing the transaction dependency of both applications, exclusive latency can be reduced while guaranteeing the atomicity of the transaction.

ここで、図1〜図3を用いて、本発明における処理について説明する。図1〜図3は、それぞれ、本発明によるデータベースの管理下でのアプリケーションプログラムの動作を説明する図である。   Here, processing in the present invention will be described using FIGS. 1 to 3. 1 to 3 are diagrams for explaining the operation of an application program under management of a database according to the present invention.

図1に示すように、先に対象レコードに排他をかけたアプリケーション1のトランザクションが更新完了を宣言すると、アプリケーション1のトランザクションのコミットが完了していない状態であっても対象レコードの排他が解除される。これにより、排他待ちをしていた別のアプリケーション2のトランザクションは、対象レコードに対して排他をかけることができるようになり、アプリケーション2の排他待ちが解除される。この時、アプリケーション2のトランザクションは、アプリケーション1のトランザクションによって更新されたコミット未完了の対象レコードを参照できる。   As shown in FIG. 1, when the transaction of the application 1 that has previously locked the target record declares the update completion, the target record is released even if the transaction of the application 1 has not been committed yet. Ru. As a result, the transaction of another application 2 that has been waiting for exclusion can be locked on the target record, and the waiting for exclusion of application 2 is released. At this time, the application 2 transaction can refer to the uncommitted target record updated by the application 1 transaction.

従って、図1に示すように、アプリケーション2における排他待ち区間が短くなるため、アプリケーション2のトランザクションの処理時間の短縮効果が得られることになる。また、アプリケーション1のコミットの発行とアプリケーション2のコミットの発行とが同時に起こる可能性があるため、グループコミット機能を適用できる場合も発生する。   Therefore, as shown in FIG. 1, since the exclusion waiting period in the application 2 is shortened, the effect of shortening the transaction processing time of the application 2 can be obtained. In addition, since the issue of the application 1 commit and the issue of the application 2 commit may occur simultaneously, the group commit function may be applied.

また、アプリケーション2のトランザクションは、アプリケーション1のトランザクションによってコミットされていない状態のレコードを参照しているため、本発明では、各トランザクションに依存関係を持たせることで、データベースの原子性を保証する。具体的には、本発明では、下記の(a)及び(b)の制御が行なわれる。   Also, since the transaction of application 2 refers to a record of a state not committed by the transaction of application 1, the present invention guarantees atomicity of the database by making each transaction have a dependency. Specifically, in the present invention, the following controls (a) and (b) are performed.

(a)アプリケーション1のトランザクションより先に、アプリケーション2のトランザクションが終了した場合、アプリケーション1のトランザクションが終了するまで、アプリケーション2のトランザクションを待機させる(図2参照)。
(b)アプリケーション1のトランザクションがロールバックした場合、アプリケーション2のトランザクションのコミットを拒絶し、アプリケーション2のトランザクションにロールバックさせる(図3参照)。
(A) When the transaction of application 2 ends prior to the transaction of application 1, the transaction of application 2 is made to wait until the transaction of application 1 ends (see FIG. 2).
(B) If the transaction of application 1 is rolled back, the commit of the transaction of application 2 is rejected, and the transaction of application 2 is rolled back (see FIG. 3).

図2に示すように、(a)の制御が行なわれると、先にアプリケーション2のトランザクションがコミットを行っても、アプリケーション2のトランザクションは、アプリケーション1のコミット完了を待ち合わせることになる。   As shown in FIG. 2, when the control of (a) is performed, the transaction of the application 2 waits for the completion of the commit of the application 1 even if the transaction of the application 2 commits first.

図3に示すように、(b)の制御が行なわれると、アプリケーション1のトランザクションがレコードデータ不正などの異常を検知してロールバックしたことにより、アプリケーション2のトランザクションからのコミットが拒絶され、アプリケーション2のトランザクションがロールバックされる。   As shown in FIG. 3, when the control of (b) is performed, the transaction from the application 2 is rejected from the commit from the transaction because the transaction of the application 1 detects an abnormality such as record data corruption and rolls back. Transaction 2 is rolled back.

図4は、本発明における各アプリケーションプログラムの処理順序と処理結果とを示す図である。図4には、アプリケーション1とアプリケーション2とがコミット及びロールバックを実施する順番と、各アプリケーションによる実施の結果とがまとめられている。図4においては、順番1→順番2の順に処理が行われ、矢印の後に記載されている内容が、実施結果を表している。   FIG. 4 is a diagram showing the processing order of each application program and the processing result in the present invention. FIG. 4 summarizes the order in which the application 1 and the application 2 perform commit and rollback, and the result of the execution by each application. In FIG. 4, the process is performed in the order of order 1 → order 2, and the contents described after the arrows represent the implementation results.

(実施の形態)
以下、本発明の実施の形態における、データベース管理装置、データベース管理方法、及びプログラムについて、図5〜図15を参照しながら説明する。
Embodiment
Hereinafter, a database management apparatus, a database management method, and a program according to an embodiment of the present invention will be described with reference to FIGS.

[装置構成]
最初に、図5を用いて、本実施の形態におけるデータベース管理装置の概略構成について説明する。図5は、本発明の実施の形態におけるデータベース管理装置の概略構成を示す図である。
[Device configuration]
First, a schematic configuration of the database management apparatus according to the present embodiment will be described with reference to FIG. FIG. 5 is a diagram showing a schematic configuration of a database management apparatus according to an embodiment of the present invention.

図5に示す、本実施の形態におけるデータベース管理装置300は、複数のアプリケーションプログラム(以下「アプリケーション」と表記する)100によってアクセスされるデータベース200を管理するための装置である。   A database management apparatus 300 in the present embodiment shown in FIG. 5 is an apparatus for managing a database 200 accessed by a plurality of application programs (hereinafter referred to as “application”) 100.

アプリケーション100はデータベース200を利用する任意のアプリケーションであり、データベース200に対して各種操作を要求する。操作としては、「排他ありレコード読み込み」、「レコード更新」、「更新完了」「コミット」、「ロールバック」、が挙げられる。なお、アプリケーション100によって要求される操作は、上記に限定されるものではない。本実施の形態において、アプリケーション100は、従来と同様に、一般的なデータベースに対して要求できる操作を要求することができる。   The application 100 is an arbitrary application that uses the database 200, and requests the database 200 for various operations. The operations include “read exclusive record”, “record update”, “update completion”, “commit”, and “rollback”. The operations required by the application 100 are not limited to the above. In the present embodiment, the application 100 can request an operation that can be requested to a general database as in the conventional case.

また、データベース200は、記憶装置の記憶領域に構築されており、データとして各種テーブルを格納している。また、テーブルは、複数のレコードで構成されている。また、以降の説明において、単に“レコード”と表記したものは、特記しない限りデータベース200に格納されているレコードを指している。   Also, the database 200 is constructed in the storage area of the storage device, and stores various tables as data. Also, the table is composed of a plurality of records. Further, in the following description, what is simply expressed as "record" refers to records stored in the database 200 unless otherwise specified.

図5に示すように、データベース管理装置300は、要求受付部301と、アクセス処理制御部302とを備えている。このうち、要求受付部301は、データベース200に格納されているレコードに対するアプリケーション100からの要求を受け付ける。   As shown in FIG. 5, the database management device 300 includes a request receiving unit 301 and an access processing control unit 302. Among these, the request receiving unit 301 receives a request from the application 100 for a record stored in the database 200.

アクセス処理制御部302は、アプリケーション100からの要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求しているアプリケーション100に対して、排他的使用を許可する。   When the request from the application 100 is exclusive use for a specific record, the access processing control unit 302 is exclusive to the application 100 requesting exclusive use on condition that a certain condition is satisfied. Permit use.

また、アクセス処理制御部302は、使用を許可されたアプリケーション100が特定のレコードの更新を完了する旨を宣言した場合に、特定のレコードに対する排他的な使用を解除する。そして、アクセス処理制御部302は、使用を許可したアプリケーション100以外のアプリケーション100に、特定のレコードの使用を許可する。   In addition, when the application 100 permitted to use declares that the update of the specific record is to be completed, the access processing control unit 302 releases the exclusive use of the specific record. Then, the access processing control unit 302 permits the application 100 other than the application 100 permitted to use to use the specific record.

このように、本実施の形態では、データベース管理装置300は、アプリケーションがトランザクションの実行中にレコードの更新完了を宣言した場合は、コミットが完了していなくても、当該アプリケーションによるレコードの排他的使用を解除する。そして、データベース管理装置は、他のアプリケーションに、当該レコードの使用を許可する。このため、本実施の形態によれば、データベースシステムにおいて並列して処理を実行する複数のアプリケーション100の処理性能の低下を抑制することができる。   As described above, in the present embodiment, when the application declares the update of the record during the execution of the transaction, the database management device 300 exclusively uses the record by the application even if the commit is not completed. Release Then, the database management device permits another application to use the record. Therefore, according to the present embodiment, it is possible to suppress a decrease in processing performance of the plurality of applications 100 executing processes in parallel in the database system.

ここで、図6〜図9を用いて、本実施の形態におけるデータベース管理装置の具体的構成について説明する。図6は、本発明の実施の形態におけるデータベース管理装置の具体的構成を示すブロック図である。図6において、各処理部間を結ぶ実線は、処理部間でのデータのやり取りを行う関係を表している。また、破線は、管理表とそれを操作する処理部との関係を表している。   Here, a specific configuration of the database management device in the present embodiment will be described using FIGS. 6 to 9. FIG. 6 is a block diagram showing a specific configuration of the database management apparatus in the embodiment of the present invention. In FIG. 6, a solid line connecting the processing units represents a relationship in which data is exchanged between the processing units. Also, the broken line represents the relationship between the management table and the processing unit that operates it.

図6に示すように、本実施の形態では、データベース管理装置300は、要求受付部301及びアクセス処理制御部302に加えて、レコード排他制御部303と、依存関係制御部304と、ストレージ処理部305とを備えている。以下に、各処理部について具体的に説明する。   As shown in FIG. 6, in the present embodiment, the database management apparatus 300 includes a record exclusion control unit 303, a dependency relationship control unit 304, and a storage processing unit in addition to the request reception unit 301 and the access processing control unit 302. And 305. Each processing unit will be specifically described below.

要求受付部301は、上述したように、アプリケーション100それぞれからの要求を受け付け、受け付けた要求をアクセス処理制御部302に渡す。また、要求受付部301は、本実施の形態では、複数備えられており、各要求受付部301は、複数存在するアプリケーション100のいずれかと一対一で対応している。   As described above, the request receiving unit 301 receives a request from each of the applications 100, and passes the received request to the access processing control unit 302. Further, in the present embodiment, a plurality of request receiving units 301 are provided, and each of the request receiving units 301 corresponds to any one of the plurality of applications 100 in a one-to-one correspondence.

アクセス処理制御部302は、本実施の形態では、要求受付部301から受け取った要求に応じて、トランザクション更新管理表306の制御データを操作する。また、アクセス処理制御部302は、後述する各処理部を通して、アクセス処理を制御する。更に、アクセス処理制御部302は、要求の種類に応じた処理を行なうため、以下の処理部を有する。   In the present embodiment, the access processing control unit 302 manipulates the control data of the transaction update management table 306 in response to the request received from the request receiving unit 301. Further, the access processing control unit 302 controls access processing through each processing unit described later. Furthermore, the access processing control unit 302 has the following processing unit in order to perform processing according to the type of request.

具体的には、本実施の形態では、アクセス処理制御部302は、排他あり読み込み処理制御部311と、レコード更新処理制御部312と、更新完了処理制御部313と、コミット処理制御部314と、ロールバック処理制御部315とを備えている。   Specifically, in the present embodiment, the access process control unit 302 includes an exclusive process read process control unit 311, a record update process control unit 312, an update completion process control unit 313, and a commit process control unit 314. A rollback processing control unit 315 is provided.

排他あり読み込み処理制御部311は、アプリケーション100が排他的なレコードの読み込み(「排他ありレコード読み込み」とも表記する。)を要求した場合に、要求元のアプリケーション100に対応するトランザクション更新管理表306が存在しているかどうかを判定する。また、排他あり読み込み処理制御部311は、この場合において、後述のレコード排他制御部303による処理結果に基づいて、排他あり読み込みが可能かどうかを判定する。   If the application 100 requests exclusive record reading (also referred to as “exclusive record reading”), the transactional update management table 306 corresponding to the application 100 of the request source is present. Determine if it exists. Further, in this case, the exclusive-case reading process control unit 311 determines whether exclusive-case reading is possible based on the processing result of the record exclusive control unit 303 described later.

図7は、本発明の実施の形態で用いられるトランザクション更新管理表の一例を示す図である。図7に示すように、トランザクション更新管理表306は、アプリケーション100のトランザクション内容の管理に用いられる。また、トランザクション更新管理表306は、アプリケーション100毎に設けられている。   FIG. 7 is a diagram showing an example of a transaction update management table used in the embodiment of the present invention. As shown in FIG. 7, the transaction update management table 306 is used to manage the transaction content of the application 100. Also, a transaction update management table 306 is provided for each application 100.

図7において、[アプリケーションID]は、対応するアプリケーション100を個々に識別する識別子である。アプリケーションIDは、例えば、UNIX(登録商標)システムにおけるプロセスIDのような識別子である。   [Application ID] in FIG. 7 is an identifier for identifying the corresponding application 100 individually. The application ID is, for example, an identifier such as a process ID in a UNIX (registered trademark) system.

[トランザクション状態]は、対応するアプリケーション100の現在のトランザクションの状態を示している。トランザクション状態には、“有効”と“無効”とがある。“有効”の場合は、アクセス処理制御部302は、該当するアプリケーション100からの全ての要求を受け付ける。“無効”の場合は、アクセス処理制御部302は、該当するアプリケーション100からの要求のうち、ロールバックのみを受け付け、それ以外の要求を拒否する。   [Transaction state] indicates the current transaction state of the corresponding application 100. The transaction state includes "valid" and "invalid". In the case of "valid", the access processing control unit 302 receives all the requests from the corresponding application 100. In the case of “invalid”, the access processing control unit 302 accepts only the rollback among the requests from the corresponding application 100, and rejects the other requests.

[テーブル名]、[キー]、[値]、及び[更新]は、該当するトランザクションによる「排他あり読み込み」及び「更新」の対象となるレコードを識別する情報である。[テーブル名]はレコードのテーブル名を表し、[キー]はレコードの主キー値を表し、[値]はレコードのデータ部値を表している。   [Table Name], [Key], [Value], and [Update] are information for identifying a record to be subjected to “exclusive read” and “update” by the corresponding transaction. [Table Name] represents the table name of the record, [Key] represents the primary key value of the record, and [Value] represents the data division value of the record.

[更新]は、対象のレコードが更新されているかどうかを表している。“あり”の場合は更新が行なわれている状態を表し、“なし”の場合は「排他あり読み込み」のみが行なわれた状態を表している。   [Update] indicates whether the target record is updated. In the case of "present" indicates a state in which the update is being performed, and in the case of "none" indicates a state in which only "read with exclusion" is performed.

レコード更新処理制御部312は、アプリケーション100がレコード更新を要求した場合に、要求元アプリケーション100におけるトランザクション更新管理表306を確認する。そして、レコード更新処理制御部312は、トランザクション状態が“有効”である場合は、レコード更新要求に応じて、トランザクション更新管理表306の該当テーブルの該当レコードの値を更新する。   The record update process control unit 312 checks the transaction update management table 306 in the request source application 100 when the application 100 requests a record update. Then, when the transaction state is “valid”, the record update processing control unit 312 updates the value of the corresponding record of the corresponding table of the transaction update management table 306 according to the record update request.

更新完了処理制御部313は、アプリケーション100がレコード更新完了を要求した場合に、要求元アプリケーション100におけるトランザクション更新管理表306を確認する。そして、更新完了処理制御部313は、トランザクション状態が“有効”である場合は、レコード排他制御部303に、後述するレコード排他管理表307(図8参照)を更新させる。   The update completion process control unit 313 checks the transaction update management table 306 in the request source application 100 when the application 100 requests the record update completion. Then, when the transaction state is “valid”, the update completion process control unit 313 causes the record exclusion control unit 303 to update a record exclusion management table 307 (see FIG. 8) described later.

コミット処理制御部314は、アプリケーション100がトランザクションのコミットを要求した場合に、要求元アプリケーション100のトランザクション更新管理表306を確認する。そして、コミット処理制御部314は、トランザクション状態が“有効”である場合は、レコード排他制御部303に、後述するレコード排他管理表307(図8参照)を更新させる。   The commit process control unit 314 checks the transaction update management table 306 of the request source application 100 when the application 100 requests a transaction commit. Then, when the transaction state is “valid”, the commit process control unit 314 causes the record exclusion control unit 303 to update a record exclusion management table 307 (see FIG. 8) described later.

ロールバック処理制御部315は、アプリケーション100がロールバックを要求した場合に、依存関係制御部304にロールバック処理を要求する。   The rollback processing control unit 315 requests the dependency relationship control unit 304 to perform rollback processing when the application 100 requests rollback.

レコード排他制御部303は、図8に示すレコード排他管理表307の制御データを操作し、データベース200のレコードの排他制御を実行する。図8は、本発明の実施の形態で用いられるレコード排他管理表の一例を示す図である。図8に示すように、レコード排他管理表307は、データベース200に格納されているテーブル内の各レコードに対する、アプリケーション100による排他取得要求の管理と排他状態の管理とに用いられる。また、レコード排他管理表307は、複数行の“制御レコード”で構成されている。   The record exclusion control unit 303 manipulates the control data of the record exclusion management table 307 shown in FIG. 8 to execute exclusion control of the records of the database 200. FIG. 8 is a diagram showing an example of the record exclusion management table used in the embodiment of the present invention. As shown in FIG. 8, the record exclusion management table 307 is used to manage exclusion acquisition requests by the application 100 and to manage exclusion states for each record in the table stored in the database 200. Further, the record exclusion management table 307 is composed of a plurality of lines of "control records".

以降の説明において、“制御レコード”は、特記しない限り、レコード排他管理表307に格納されているレコードを示している。レコード排他管理表307は、データベースに格納されているテーブル毎に設けられている。   In the following description, “control record” indicates a record stored in the record exclusion management table 307 unless otherwise specified. The record exclusion management table 307 is provided for each table stored in the database.

また、レコード排他管理表307において、[テーブル名]は、対象のテーブル名を表している。[キー]は、レコードの主キー値を表している。[要求元]は、該当レコードの排他を要求したアプリケーション100のアプリケーションIDを表している。   Further, in the record exclusion management table 307, [table name] represents a target table name. [Key] represents the primary key value of the record. [Requester] represents the application ID of the application 100 that has requested exclusion of the corresponding record.

[直前要求元]は、該当レコードに対して、要求元アプリケーション100の直前に排他取得を要求していたアプリケーション100を表している。[直前要求元]が“なし”となっている場合は、直前に排他要求をしていたアプリケーション100が存在していないか、既に、直前のアプリケーション100のトランザクションが完了していることを表している。   The [immediately previous request source] indicates the application 100 that has requested exclusive acquisition immediately before the request source application 100 for the corresponding record. If [immediately before request source] is "none", this indicates that the application 100 that has issued the exclusion request immediately before does not exist, or that the transaction of the immediately preceding application 100 has already been completed. There is.

また、[キー]が同一となっている制御レコード同士では、一方の[要求元]と他方の[直前要求元]とが一致しており、両者によって、リスト構造が構成され、要求順が管理されている。   Further, in the control records having the same [key], one [request source] and the other [preceding request source] match, and the two form a list structure, and the request order is managed. It is done.

[排他状態]は、データベース200に格納されているレコードに対する要求元アプリケーション100の排他状態を表している。“排他待ち”は、排他取得待ち状態を表している。“取得中”の場合は排他を取得した状態を表している。“更新完了”は、排他取得後に更新完了を宣言された状態であることを表している。[キー]が同一となっている制御レコードにおいては、“取得中”である制御レコードは必ず1つである。   [EXCLUSIVE STATE] represents the exclusive state of the request source application 100 for the record stored in the database 200. “Waiting for exclusion” indicates an exclusion acquisition waiting state. In the case of "acquiring", it indicates a state in which the exclusion has been acquired. "Update completion" indicates that update completion has been declared after obtaining the exclusion. In control records in which the [key] is the same, there is always one control record that is "acquiring".

依存関係制御部304は、アプリケーション100それぞれのトランザクションの依存関係を管理し、アクセス処理制御部302による処理の結果に応じて、依存関係を更新する。本実施の形態では、依存関係制御部304は、図9に示すトランザクション依存管理表308の制御データを操作し、アプリケーション100間のトランザクション依存関係を制御する。本実施の形態では、依存関係制御部304によって、トランザクションの原子性を保証しつつ、排他待ち時間を短縮している。   The dependency control unit 304 manages the dependency of each transaction of the application 100, and updates the dependency according to the result of processing by the access processing control unit 302. In the present embodiment, the dependency control unit 304 manipulates the control data of the transaction dependency management table 308 shown in FIG. 9 to control transaction dependency among the applications 100. In the present embodiment, the dependency control unit 304 reduces the exclusion wait time while guaranteeing the atomicity of the transaction.

図9は、本発明の実施の形態で用いられるトランザクション依存管理表の一例を示す図である。図9に示すように、トランザクション依存管理表308は、トランザクションの依存関係をグラフ構造で表示しており、現在有効なトランザクション間の依存関係の管理に用いられる。   FIG. 9 is a diagram showing an example of a transaction dependency management table used in the embodiment of the present invention. As shown in FIG. 9, the transaction dependency management table 308 displays the dependency of transactions in a graph structure, and is used to manage the dependencies between currently active transactions.

また、トランザクション依存管理表308に示された各ノードには、トランザクションを識別するために、アプリケーションIDが表示されている。トランザクション依存管理表308は、「アプリケーションID」を管理しているともいえる。また、トランザクション依存管理表308において、矢印は、ノード間の依存関係を表しており、矢印の向きは、親ノードから子ノードの方向に設定されている。   Also, for each node shown in the transaction dependency management table 308, an application ID is displayed to identify a transaction. It can be said that the transaction dependency management table 308 manages “application ID”. Also, in the transaction dependency management table 308, the arrows indicate the dependency between nodes, and the direction of the arrow is set from the parent node to the child node.

あるアプリケーション100によって更新完了とされたレコードが、他のアプリケーション100によって排他取得されたとする。この場合、トランザクション依存管理表308においては、更新を完了したアプリケーション100は親ノードとして表示され、排他取得したアプリケーション100は子ノードとして表示される。   It is assumed that a record that has been updated by one application 100 is acquired exclusively by another application 100. In this case, in the transaction dependency management table 308, the application 100 that has completed the update is displayed as a parent node, and the application 100 that has been exclusively acquired is displayed as a child node.

従って、トランザクション依存管理表308によれば、トランザクションがコミット可能かどうかを親ノードの存在によって判断することができる。また、トランザクション依存管理表308において、親ノードが存在しなければ、コミットを即時実行できると判断できる。一方、親ノードが存在すれば、親ノードのトランザクションがコミットされるまでコミットの実行を待つべきと判断できる。   Therefore, according to the transaction dependency management table 308, it can be judged by the existence of the parent node whether the transaction can be committed. Also, in the transaction dependency management table 308, if there is no parent node, it can be determined that the commit can be executed immediately. On the other hand, if the parent node exists, it can be determined that the execution of the commit should be waited until the transaction of the parent node is committed.

更に、トランザクション依存管理表308において、コミットが実行されれば、該当ノードは削除され、ロールバックが実行されれば、該当ノードとその子孫ノードとは削除される。また、トランザクション依存管理表308では、子孫ノードとは、子ノードとその先の子ノードとの全てを含むノードを意味する。   Furthermore, in the transaction dependency management table 308, if commit is executed, the corresponding node is deleted, and if rollback is performed, the corresponding node and its descendant nodes are deleted. Further, in the transaction dependency management table 308, a descendant node means a node including all of a child node and a child node before that.

ストレージ処理部305は、データベース200を構成する記憶装置(ストレージ)に対して、レコードのデータ取得及びデータ更新を実行する。   The storage processing unit 305 executes data acquisition and data update of records on storage devices (storages) that constitute the database 200.

[動作説明]
次に、本発明の実施の形態におけるデータベース管理装置300の動作について図10〜図14を用いて説明する。また、本実施の形態では、データベース管理装置300を動作させることによって、データベース管理方法が実施される。よって、本実施の形態におけるデータベース管理方法の説明は、以下のデータベース管理装置300の動作説明に代える。
[Operation explanation]
Next, the operation of the database management device 300 according to the embodiment of the present invention will be described with reference to FIGS. Further, in the present embodiment, the database management method is implemented by operating the database management device 300. Therefore, the description of the database management method in the present embodiment is replaced with the following description of the operation of the database management apparatus 300.

また、以下においては、アプリケーション100による要求が、「排他ありレコード読み込み」、「レコード更新」、「更新完了」、「コミット」、及び「ロールバック」である場合、それぞれについて説明する。   Also, in the following, when the request by the application 100 is “exclusive record read”, “record update”, “update complete”, “commit”, and “rollback”, each will be described.

[排他ありレコード読み込み]
最初に、図10を用いて、アプリケーション100が排他ありレコード読み込みを要求した場合のデータベース管理装置300の動作について説明する。図10は、アプリケーションによる要求が排他ありレコード読み込みである場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。以降においては、要求元であるアプリケーション100のアプリケーションIDを“AP001”として説明する。
[Exclusive record read]
First, the operation of the database management device 300 when the application 100 requests reading of the exclusive record will be described using FIG. FIG. 10 is a flowchart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is exclusive record reading. Hereinafter, the application ID of the request source application 100 will be described as “AP001”.

図10に示すように、最初に、要求受付部301は、アプリケーション100から、排他ありレコード読み込みの要求を受付ける(ステップA1)。具体的には、要求受付部301は、アプリケーション100から、読み込み対象となるテーブルのテーブル名と、読み込み対象レコードのキー値とを、情報として受け取り、受け取った情報を、アクセス処理制御部302の排他あり読み込み処理制御部311に渡す。   As shown in FIG. 10, first, the request receiving unit 301 receives from the application 100 a request for reading an exclusive record (step A1). Specifically, the request receiving unit 301 receives from the application 100 the table name of the table to be read and the key value of the record to be read as information, and the received information is excluded from the access processing control unit 302. It is passed to the read processing control unit 311.

次に、排他あり読み込み処理制御部311は、アプリケーションIDが要求のあったアプリケーションに該当するトランザクション更新管理表306が存在しているかどうかを判定する(ステップA2)。具体的には、例えば、要求のあったアプリケーションIDが“AP001”であるとすると、排他あり読み込み処理制御部311は、アプリケーションIDが“AP001”に設定されたトランザクション更新管理表306が存在しているどうかを判定する。   Next, the exclusive process read process control unit 311 determines whether the transaction update management table 306 corresponding to the application for which the application ID is requested exists (step A2). Specifically, for example, assuming that the requested application ID is “AP001”, the exclusive-read processing control unit 311 determines that the transaction update management table 306 in which the application ID is set to “AP001” exists. Determine if there is.

ステップA2の判定の結果、該当するトランザクション更新管理表306が存在しない場合は、排他あり読み込み処理制御部311は、アプリケーションIDを“AP001”に設定したトランザクション更新管理表306を新たに作成する(ステップA3)。また、排他あり読み込み処理制御部311は、作成したトランザクション更新管理表306におけるトランザクション状態を“有効”にする。   If the corresponding transaction update management table 306 does not exist as a result of the determination in step A2, the exclusive read processing control unit 311 newly creates the transaction update management table 306 in which the application ID is set to “AP001” (step A3). In addition, the exclusive read processing control unit 311 sets the transaction state in the created transaction update management table 306 to “valid”.

一方、ステップA2の判定の結果、該当するトランザクション更新管理表306が存在する場合、及びステップA3の実行後は、排他あり読み込み処理制御部311は、トランザクション更新管理表306のトランザクション状態が“有効”かどうかを判定する(ステップA4)。   On the other hand, if the corresponding transaction update management table 306 exists as a result of the determination in step A2, and after execution of step A3, the read-with-exclusion processing control unit 311 determines that the transaction state of the transaction update management table 306 is "valid". It is determined whether or not (step A4).

ステップA4の判定の結果、トランザクション状態が“無効”の場合は、排他あり読み込み処理制御部311は、要求受付部301を通して、要求のあったアプリケーション100にエラーを返却する(ステップA5)。この場合、データベース管理装置300における処理は一旦終了する。   As a result of the determination in step A4, when the transaction state is "invalid", the exclusive process read process control unit 311 returns an error to the requested application 100 through the request receiving unit 301 (step A5). In this case, the process in the database management device 300 is temporarily ended.

一方、ステップA4の判定の結果、トランザクション状態が“有効”の場合は、排他あり読み込み処理制御部311は、レコード排他制御部303に、要求元アプリケーションが求めているレコードの排他状態を確認させる(ステップA6)。   On the other hand, if the transaction state is "valid" as a result of the determination in step A4, the exclusive read processing control unit 311 causes the record exclusion control unit 303 to confirm the exclusive state of the record requested by the request source application ( Step A6).

具体的には、排他あり読み込み処理制御部311は、要求元アプリケーション100のID(“AP001”)と、排他対象レコードのテーブル名及びキーの値とを、レコード排他制御部303に渡す。これにより、レコード排他制御部303は、該当テーブル用のレコード排他管理表307から制御レコードを読み込み、排他対象レコードの排他状態を確認する。   Specifically, the exclusive read processing control unit 311 passes the ID (“AP001”) of the request source application 100 and the table name of the exclusion target record and the key value to the record exclusion control unit 303. Thereby, the record exclusion control unit 303 reads the control record from the record exclusion management table 307 for the corresponding table, and confirms the exclusion state of the exclusion target record.

次に、レコード排他制御部303は、要求元アプリケーション100以外の別のアプリケーション100によって、排他対象レコードについて更新完了が宣言されているかどうかを判定する(ステップA7)。   Next, the record exclusion control unit 303 determines whether update completion has been declared for the exclusion target record by another application 100 other than the request source application 100 (step A7).

ステップA7の判定の結果、排他対象レコードについて更新完了が宣言されていない場合は、レコード排他制御部303は、排他状態の状況に応じて、排他制御を実行する(ステップA8)。一方、ステップA7の判定の結果、排他対象レコードについて更新完了が宣言されている場合は、レコード排他制御部303は、依存関係制御部304に、依存関係の状況に応じて処理を実行させる(ステップA9)。   When the update completion is not declared for the exclusion target record as a result of the determination of step A7, the record exclusion control unit 303 executes the exclusion control according to the status of the exclusion state (step A8). On the other hand, as a result of the determination in step A7, when update completion is declared for the exclusion target record, the record exclusion control unit 303 causes the dependency relationship control unit 304 to execute processing according to the status of the dependency relationship (steps A9).

ここで、ステップA7〜A9までについて具体的に説明する。まず、ステップA7においては、レコード排他制御部303は、該当テーブル用のレコード排他管理表307から制御レコードを読み込み、排他対象レコードの排他状態を確認する。続いて、レコード排他制御部303は、排他状態が、下記のパターン1〜5のいずれに該当するかを判定する。   Here, steps A7 to A9 will be specifically described. First, in step A7, the record exclusion control unit 303 reads the control record from the record exclusion management table 307 for the corresponding table, and confirms the exclusion state of the exclusion target record. Subsequently, the record exclusion control unit 303 determines which of the following patterns 1 to 5 the exclusion state corresponds to.

パターン1:制御レコードがレコード排他管理表307に存在しない。
パターン2:[排他状態]が“取得中”の制御レコードが存在し、[要求元]が要求元アプリケーション100(“AP001”)である。
パターン3:[排他状態]が“取得中”の制御レコードが存在し、[要求元]が要求元アプリケーション100(“AP001”)とは別のアプリケーション100である。
パターン4:[排他状態]が“更新完了”の制御レコードのみが存在し、排他取得者が要求元アプリケーション100(“AP001”)である。
パターン5:[排他状態]が“更新完了”の制御レコードのみが存在し、排他取得者が要求元アプリケーション100(“AP001”)とは別のアプリケーション100である。
Pattern 1: A control record does not exist in the record exclusion management table 307.
Pattern 2: A control record in which "exclusive state" is "acquiring" is present, and [request source] is the request source application 100 ("AP001").
Pattern 3: A control record in which “exclusive state” is “acquiring” is present, and “request source” is an application 100 different from the request source application 100 (“AP001”).
Pattern 4: Only the control record of which “exclusion state” is “update completion” exists, and the exclusion acquirer is the request source application 100 (“AP001”).
Pattern 5: Only the control record having the “exclusion state” of “update completed” is present, and the exclusion acquirer is the application 100 different from the request source application 100 (“AP001”).

そして、パターン1〜4に該当する場合は、ステップA7においてNoとなり、レコード排他制御部303は、ステップA8を実行する。ステップA8の具体的な内容は以下の通りである。   And when it corresponds to the patterns 1-4, it becomes No in step A7, and the record exclusion control part 303 performs step A8. The specific content of step A8 is as follows.

パターン1に該当する場合は、他のアプリケーション100が該当レコードを排他していないので、要求元のアプリケーション100は排他取得可能である。また、データベース200にあるレコードのデータが、そのレコードの最新データである。従って、レコード排他制御部303は、該当テーブルのレコード排他管理表307に該当レコードの制御レコードを新規に追加し、[要求元]を要求元アプリケーション100のID(“AP001”)に設定し、[排他状態]を“取得中”に設定する。また、レコード排他制御部303は、[直前要求元]を“なし”に設定する。   In the case where the pattern 1 is applied, since the other application 100 does not exclude the corresponding record, the request source application 100 can obtain exclusive acquisition. Also, the data of the record in the database 200 is the latest data of the record. Therefore, the record exclusion control unit 303 newly adds the control record of the corresponding record to the record exclusion management table 307 of the corresponding table, sets [request source] as the ID (“AP001”) of the request source application 100, and Exclusive status] is set to "acquiring". Also, the record exclusion control unit 303 sets [immediately previous request source] to “none”.

その後、レコード排他制御部303は、排他あり読み込み処理制御部311に“排他取得者なし”を返却する。これにより、排他あり読み込み処理制御部311は、ストレージ処理部305に該当レコードの読み込みを要求し、取得したデータを要求元アプリケーション100のトランザクション更新管理表306に登録する。このとき、[更新]は“なし”とする。その後、排他あり読み込み処理制御部311は、要求受付部301を通して、要求元アプリケーション100にレコードデータを渡す。   Thereafter, the record exclusion control unit 303 returns “exclusive acquirer not present” to the exclusive processing read processing control unit 311. In this way, the exclusive read processing control unit 311 requests the storage processing unit 305 to read the corresponding record, and registers the acquired data in the transaction update management table 306 of the request source application 100. At this time, "update" is "none". Thereafter, the exclusive read processing control unit 311 passes the record data to the request source application 100 through the request reception unit 301.

パターン2に該当する場合は、要求元アプリケーション100が該当レコードに対して再度排他あり読み込みを行った場合である。この時は、レコード排他制御部303は、排他あり読み込み処理制御部311に対して、要求元アプリケーション100のトランザクション更新管理表306から該当レコードのデータを取得させる。この後、排他あり読み込み処理制御部311は、要求受付部301を通して、要求元アプリケーション100にレコードデータを渡す。   When the pattern 2 is applied, the request source application 100 reads the exclusive record again for the corresponding record. At this time, the record exclusion control unit 303 causes the exclusive read processing control unit 311 to acquire data of the corresponding record from the transaction update management table 306 of the request source application 100. Thereafter, the exclusive access reading process control unit 311 passes the record data to the request source application 100 through the request receiving unit 301.

パターン3に該当する場合は、他のアプリケーション100が排他を取得しているため、排他取得待ちとなる。レコード排他制御部303は、該当レコードに対する要求元アプリケーション100の制御レコードが存在しなければ、レコード排他管理表307に制御レコードを新規に追加する。そして、レコード排他制御部303は、[要求元]を要求元アプリケーション100のID(“AP001”)に設定し、[排他状態]を“取得待ち”に設定する。また、レコード排他制御部303は、[直前要求元]には、[キー]が同一で、最後に追加された制御レコードの[要求元]を設定する。   In the case of pattern 3, since another application 100 has acquired exclusion, it is waiting for exclusion acquisition. If the control record of the request source application 100 for the corresponding record does not exist, the record exclusion control unit 303 newly adds a control record to the record exclusion management table 307. Then, the record exclusion control unit 303 sets [request source] to the ID (“AP001”) of the request source application 100, and sets [exclusion state] to “acquisition waiting”. Further, the record exclusive control unit 303 sets the [request source] of the control record added with the same [key] to the [previous request source] last.

一方、レコード排他制御部303は、該当レコードに対する要求元アプリケーション100の制御レコードが既に存在する場合は、制御レコードを追加せず、排他あり読み込み処理制御部311に排他中であることを返却する。これにより、排他あり読み込み処理制御部311は、要求受付部301に、待機後に要求をリトライするように指示する。   On the other hand, when the control record of the request source application 100 with respect to the corresponding record already exists, the record exclusion control unit 303 does not add the control record, and returns the exclusion processing to the exclusive process processing unit 311 with exclusion. By this, the exclusive read processing control unit 311 instructs the request reception unit 301 to retry the request after the standby.

パターン4に該当する場合は、要求元アプリケーション100が一度更新完了を宣言したレコードに対して、再度排他を取得した場合である。一度更新完了を宣言したレコードに対して排他取得は禁止されている。従って、レコード排他制御部303は、排他取得不可を、排他あり読み込み処理制御部311に返却し、要求受付部301を通して、要求元アプリケーション100に排他取得不可を通知する。   When the pattern 4 is applied, the request source application 100 acquires the exclusion again for the record for which the update completion has been once declared. Exclusive acquisition is prohibited for a record that has been declared to be updated once. Therefore, the record exclusion control unit 303 returns the exclusion acquisition rejection to the exclusion processing read processing control unit 311, and notifies the request source application 100 of exclusion acquisition rejection through the request reception unit 301.

パターン5に該当する場合は、ステップA7においてYesとなり、レコード排他制御部303は、ステップA9を実行する。具体的には、パターン5に該当する場合は、要求元のアプリケーション100が、他のアプリケーション100によって更新完了が宣言されたレコードに対して、排他を取得しようとした場合である。   When it corresponds to the pattern 5, it becomes Yes in step A7, and the record exclusion control unit 303 executes step A9. Specifically, in the case where the pattern 5 is applied, the request source application 100 tries to acquire exclusion for a record for which update completion has been declared by another application 100.

ここで、更新完了を宣言したアプリケーション100のIDを“AP002”として、以下に具体例を説明する。この場合、レコード排他制御部303は、レコード排他管理表307において、該当レコードに対する要求元アプリケーション100(“AP001”)の制御レコードが存在していた場合は、[排他状態]を“取得待ち”から“取得中”に更新する。一方、該当レコードに対する要求元アプリケーション100(“AP001”)の制御レコードが存在していない場合は、レコード排他制御部303は、同様の制御レコードを新規に追加する。   Here, a specific example will be described below, assuming that the ID of the application 100 that has declared update completion is “AP002”. In this case, if the control record of the request source application 100 ("AP001") for the corresponding record exists in the record exclusion management table 307, the record exclusion control unit 303 changes the "exclusive status" from "waiting for acquisition". Update to "acquiring". On the other hand, when the control record of the request source application 100 (“AP001”) for the corresponding record does not exist, the record exclusion control unit 303 newly adds the same control record.

その後、レコード排他制御部303は、アクセス処理制御部302の排他あり読み込み処理制御部311に対して、排他取得可能を返却し、更に、更新完了を宣言していたアプリケーション100のID(“AP002”)も返却する。   Thereafter, the record exclusion control unit 303 returns the exclusion acquisition available status to the exclusion processing read processing control unit 311 of the access processing control unit 302, and further, the ID of the application 100 that has declared update completion ("AP002"). ) Also returns.

続いて、アクセス処理制御部302において、排他あり読み込み処理制御部311は、親ノードが“AP002”となり、子ノードが“AP001”となる場合の依存関係の登録を、依存関係制御部304に要求する。依存関係制御部304はトランザクション依存管理表308を参照して、排他あり読み込み処理制御部311からの登録要求に対して登録可能かどうかを確認する。   Subsequently, in the access processing control unit 302, the exclusive processing for reading processing control unit 311 requests the dependency control unit 304 to register the dependency when the parent node becomes “AP002” and the child node becomes “AP001”. Do. The dependency control unit 304 refers to the transaction dependency management table 308 to check whether the registration request from the exclusive read processing control unit 311 can be registered.

具体的には、依存関係制御部304は、以下のパターン6〜9のいずれかに該当するかを判定し、判定結果に応じた処理を実行する。   Specifically, the dependency relationship control unit 304 determines which of the following patterns 6 to 9 corresponds to, and executes processing according to the determination result.

パターン6:既に該当する依存関係が登録されている。
パターン7:新規子ノード(“AP001”)に相当するノードが存在しない。
パターン8:新規子ノード(“AP001”)に相当するノードが存在するが、該当する依存関係は登録されていない。また、新規子ノードの子孫ノードとしても、新規親ノード(“AP002”)は存在していない。
パターン9:新規子ノード(“AP001”)に相当するノードが存在するが、該当する依存関係は登録されていない。但し、新規子ノードの子孫ノードとして、新規親ノード(“AP002”)が存在する。
Pattern 6: The corresponding dependency is already registered.
Pattern 7: A node corresponding to a new child node ("AP001") does not exist.
Pattern 8: A node corresponding to a new child node ("AP001") exists, but the corresponding dependency is not registered. Also, as a descendant node of the new child node, the new parent node ("AP002") does not exist.
Pattern 9: A node corresponding to a new child node ("AP001") exists, but the corresponding dependency is not registered. However, a new parent node ("AP002") exists as a descendant node of the new child node.

パターン6に該当する場合は、既に別のレコードにおいて、アプリケーション100“AP002”が更新完了したレコードに対してアプリケーション100“AP001”が排他を取得していた状態である。従って、既に該当する依存関係が存在するため、依存関係制御部304による登録処理は不要である。   In the case where the pattern 6 is applied, the application 100 “AP001” has acquired exclusion for the record that the application 100 “AP002” has completed updating in another record. Therefore, the corresponding dependency relationship already exists, and the registration processing by the dependency relationship control unit 304 is not necessary.

パターン7及び8に該当する場合は、排他あり読み込み処理制御部311は、要求した依存関係が登録可能な状態であるため、新規に依存関係を登録する。排他あり読み込み処理制御部311は、いずれかのノードが存在しなければノードを追加する。   When the patterns 7 and 8 are satisfied, the exclusive read processing control unit 311 newly registers the dependency because the requested dependency is in a state in which the requested dependency can be registered. If there is any node, the exclusive read processing control unit 311 adds a node.

また、パターン6〜8においては、登録が完了すると、依存関係制御部304は、排他あり読み込み処理制御部311に対して、登録完了を返却する。該当レコードの最新のレコードデータは、更新完了を宣言していたアプリケーション100(“AP002”)の更新したデータである。   In addition, in the patterns 6 to 8, when the registration is completed, the dependency relationship control unit 304 returns the registration completion to the exclusive process read process control unit 311. The latest record data of the corresponding record is the updated data of the application 100 ("AP002") that has declared update completion.

このため、排他あり読み込み処理制御部311はアプリケーションIDが“AP002”のトランザクション更新管理表306から該当レコードのデータを取得し、取得したデータを、要求受付部301を通して、要求元アプリケーション100(“AP001”)に渡す。これにより、他アプリケーション100(“AP002”)のトランザクションで更新されたレコードを排他待ちせずに、排他あり読み込みすることが可能になる。   Therefore, the exclusive process read process control unit 311 acquires the data of the corresponding record from the transaction update management table 306 with the application ID “AP002”, and the acquired data is transmitted to the request source application 100 (“AP001”). Pass to "). As a result, the record updated in the transaction of the other application 100 ("AP002") can be read with exclusion without waiting for exclusion.

更に、パターン9に該当する場合は、登録要求を受けた依存関係と逆の依存関係が既に登録されている場合である。例えば、既にアプリケーション100(“AP001”)が更新完了したレコードをアプリケーション100(“AP002”)が排他取得していた場合が該当する。この場合、依存関係が循環してしまうため、後述するコミット時の親ノードのトランザクション完了待ちにおいて、デッドロックが発生してしまう。そのため、デッドロックにならないように、次に示す処理によって新規親ノードのトランザクションを無効にすることで、デッドロックを解消する。   Furthermore, in the case where pattern 9 applies, a dependency opposite to the dependency that has received the registration request is already registered. For example, the case where the application 100 ("AP002") has exclusively acquired the record on which the application 100 ("AP001") has been updated is already applicable. In this case, since the dependency relationship is circulated, a deadlock occurs in waiting for the completion of the transaction of the parent node at the time of commit described later. Therefore, the deadlock is eliminated by invalidating the transaction of the new parent node by the following process so as not to become a deadlock.

具体的には、依存関係制御部304は、新規親ノード(“AP002”)とその子孫ノードとをトランザクション依存管理表308から削除する。その後、排他あり読み込み処理制御部311に対して、“再判定”を返却し、削除したノードにあたるアプリケーション100のID一覧を返却する。   Specifically, the dependency relationship control unit 304 deletes the new parent node ("AP002") and its descendant nodes from the transaction dependency management table 308. After that, “re-determination” is returned to the exclusive process reading process control unit 311, and the ID list of the application 100 corresponding to the deleted node is returned.

排他あり読み込み処理制御部311は、削除したアプリケーション100全てのトランザクションを無効にするために、該当アプリケーション100のトランザクション更新管理表306のトランザクション状態を“無効”に更新する。   The exclusive read processing control unit 311 updates the transaction state of the transaction update management table 306 of the application 100 to “invalid” in order to invalidate the transactions of all the deleted applications 100.

次に、排他あり読み込み処理制御部311は、無効にしたアプリケーション100のID一覧をレコード排他制御部303に渡し、再度排他取得の判定を要求する。レコード排他制御部303は、レコード排他管理表307を確認し、無効になったアプリケーション100のIDが[要求元]に設定されている制御レコードを削除する。   Next, the exclusive access reading process control unit 311 passes the ID list of the application 100 that has been invalidated to the record exclusion control unit 303, and requests determination of exclusion acquisition again. The record exclusion control unit 303 confirms the record exclusion management table 307, and deletes the control record in which the ID of the invalidated application 100 is set to [request source].

また、レコード排他制御部303は、無効になったアプリケーション100のIDが[直前要求元]に設定されている制御レコードに対して、[直前要求元]の設定値を、削除した制御レコードに設定されていた[直前要求元]の設定値に変更する。つまり、レコード排他制御部303は、排他順を管理している制御レコードのリスト構造から、無効になった要求元アプリケーション100の制御レコードを切り離して、残りの有効な制御レコード同士をつなぎ直す。その後、レコード排他制御部303は、該当レコードの制御レコードで、[要求元]が要求元アプリケーション100であるID(“AP001”)のおける[直前要求元]を確認する。この時、パターンとしては以下の二つがある。   In addition, the record exclusive control unit 303 sets the setting value of [previous request source] in the control record in which the setting value of [previous request source] is deleted to the control record in which the ID of the invalidated application 100 is set to [immediate request source]. Change to the setting value of [Previous request source] that has been set. That is, the record exclusion control unit 303 separates the control record of the request source application 100 that has become invalid from the list structure of the control record that manages the exclusion order, and reconnects the remaining valid control records. After that, the record exclusion control unit 303 confirms the [immediately previous request source] in the ID (“AP001”) whose [request source] is the request source application 100 in the control record of the corresponding record. At this time, there are the following two patterns.

パターン10:[直前要求元]が“なし”である。
パターン11:[直前要求元]に他のアプリケーション100のIDが設定されている。
Pattern 10: [immediately before request source] is "none".
Pattern 11: The ID of another application 100 is set in [immediately before request source].

パターン10の場合は、トランザクションが有効であり、且つ、該当レコードを更新している他のアプリケーション100が存在しないため、データベース200に格納されたレコードデータが最新データになる。これは、上述したパターン1と同じであるため、パターン1の通りの動作を行うことで、要求元アプリケーション100(“AP001”)に対してレコードデータを返却し、排他取得が成立する。   In the case of pattern 10, since the transaction is valid and there is no other application 100 that is updating the corresponding record, the record data stored in the database 200 becomes the latest data. Since this is the same as the pattern 1 described above, the record data is returned to the request source application 100 ("AP001") by performing the operation as in the pattern 1, and the exclusion acquisition is established.

パターン11の場合は、トランザクションが有効であり、且つ、該当レコードを更新している他のアプリケーション100が存在する。このため、要求元アプリケーション100(“AP001”)は、そのアプリケーション100の子ノードとしてトランザクション依存関係を登録する必要がある。これは、上述したパターン5と同じであるので、トランザクション依存関係の登録が再実行される。また、この再登録が繰り返し実行されると、最終的にはパターン6、7、8、10のいずれかのパターンとなって排他取得が完了する。   In the case of pattern 11, there is another application 100 in which the transaction is valid and the corresponding record is updated. Therefore, the request source application 100 ("AP001") needs to register the transaction dependency as a child node of the application 100. Since this is the same as the pattern 5 described above, registration of the transaction dependency is re-executed. In addition, when this re-registration is repeatedly executed, finally, it becomes one of the patterns 6, 7, 8, and 10, and the exclusion acquisition is completed.

[レコード更新]
次に、図11を用いて、アプリケーション100が排他あり読み込み中のレコードに対してレコード更新を要求した場合のデータベース管理装置300の動作について説明する。図11は、アプリケーションによる要求がレコード更新である場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。
Update Record
Next, the operation of the database management device 300 when the application 100 requests a record update to a record being read with exclusion will be described using FIG. FIG. 11 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is a record update.

図11に示すように、最初に、要求受付部301は、アプリケーション100から、レコード更新の要求を受け付ける(ステップB1)。また、要求受付部301は、受付けた要求をアクセス処理制御部302のレコード更新処理制御部312に渡す。   As shown in FIG. 11, first, the request receiving unit 301 receives a request for updating a record from the application 100 (step B1). In addition, the request receiving unit 301 passes the received request to the record update processing control unit 312 of the access processing control unit 302.

次に、レコード更新処理制御部312は、要求元アプリケーション100のトランザクション更新管理表306を確認し、トランザクション状態が“有効”であるかどうかを判定する(ステップB2)。   Next, the record update processing control unit 312 checks the transaction update management table 306 of the request source application 100, and determines whether the transaction state is "valid" (step B2).

ステップB2の判定の結果、トランザクション状態が“無効”である場合は、レコード更新処理制御部312は、要求受付部301を通して、要求元アプリケーション100に更新失敗を通知する(ステップB3)。   If the transaction status is "invalid" as a result of the determination in step B2, the record update processing control unit 312 notifies the request source application 100 of the update failure through the request reception unit 301 (step B3).

一方、ステップB2の判定の結果、トランザクション状態が“有効”である場合は、レコード更新処理制御部312は、トランザクション更新管理表306に格納している該当テーブルにおける該当レコードの値を更新し、[更新]を“あり”に更新する(ステップB4)。   On the other hand, if the transaction state is “valid” as a result of the determination in step B2, the record update processing control unit 312 updates the value of the corresponding record in the corresponding table stored in the transaction update management table 306, Update] is updated to "Yes" (step B4).

次に、ステップB4の実行後、レコード更新処理制御部312は、要求受付部301を通して、要求元アプリケーション100に更新成功を通知する(ステップB5)。   Next, after execution of step B4, the record update processing control unit 312 notifies the request source application 100 of update success via the request reception unit 301 (step B5).

[更新完了]
次に、図12を用いて、アプリケーション100が排他あり読み込み中のレコードに対してレコードの更新完了を要求した場合のデータベース管理装置300の動作について説明する。図12は、アプリケーションによる要求がレコードの更新完了である場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。
[Update completed]
Next, the operation of the database management device 300 when the application 100 requests the record update completion to the record being read with exclusion will be described using FIG. FIG. 12 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is the update completion of the record.

図12に示すように、最初に、要求受付部301は、アプリケーション100から、レコードの更新完了の要求を受け付ける(ステップC1)。また、要求受付部301は、受付けた要求をアクセス処理制御部302の更新完了処理制御部313に渡す。   As shown in FIG. 12, first, the request receiving unit 301 receives a request for update completion of a record from the application 100 (step C1). Further, the request receiving unit 301 passes the received request to the update completion processing control unit 313 of the access processing control unit 302.

次に、更新完了処理制御部313は、要求元アプリケーション100のトランザクション更新管理表306を確認し、トランザクション状態が“有効”であるかどうかを判定する(ステップC2)。   Next, the update completion process control unit 313 checks the transaction update management table 306 of the request source application 100, and determines whether the transaction state is “valid” (step C2).

ステップC2の判定の結果、トランザクション状態が“無効”である場合は、更新完了処理制御部313は、要求受付部301を通して、要求元アプリケーション100に失敗を通知する(ステップC3)。   As a result of the determination in step C2, when the transaction state is "invalid", the update completion processing control unit 313 notifies the request source application 100 of a failure through the request reception unit 301 (step C3).

一方、ステップC2の判定の結果、トランザクション状態が“有効”である場合は、更新完了制御部313は、レコード排他制御部303に、更新完了を要求する。これにより、レコード排他制御部303は、レコード排他管理表307を確認し、該当する制御レコードの状態を“取得中”から“更新完了”に更新し、処理完了を返却する(ステップC4)。   On the other hand, if the transaction state is “valid” as a result of the determination in step C2, the update completion control unit 313 requests the record exclusion control unit 303 to complete the update. Thereby, the record exclusion control unit 303 confirms the record exclusion management table 307, updates the state of the corresponding control record from "acquiring" to "update completion", and returns processing completion (step C4).

次に、ステップC4の実行後、更新完了処理制御部313は、要求受付部301を通して、要求元アプリケーション100に処理完了を通知する(ステップC5)。   Next, after execution of step C4, the update completion processing control unit 313 notifies the request source application 100 of processing completion through the request receiving unit 301 (step C5).

[コミット]
次に、図13を用いて、アプリケーション100がトランザクションのコミットを要求した場合のデータベース管理装置300の動作について説明する。図13は、アプリケーションによる要求がコミットである場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。
[commit]
Next, the operation of the database management device 300 when the application 100 requests a transaction commit will be described using FIG. FIG. 13 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is commit.

図13に示すように、最初に、要求受付部301は、アプリケーション100から、トランザクションのコミットの要求を受け付ける(ステップD1)。   As shown in FIG. 13, first, the request receiving unit 301 receives a request for committing a transaction from the application 100 (step D1).

次に、要求受付部301は、受付けた要求をアクセス処理制御部302のコミット処理制御部314に渡す。これにより、コミット処理制御部314は、要求元アプリケーション100のトランザクション更新管理表306を確認し、トランザクション状態が“有効”であるかどうかを判定する(ステップD2)。   Next, the request receiving unit 301 passes the received request to the commit processing control unit 314 of the access processing control unit 302. Thereby, the commit process control unit 314 confirms the transaction update management table 306 of the request source application 100, and determines whether the transaction state is "valid" (step D2).

ステップD2の判定の結果、トランザクション状態が“無効”である場合は、コミット処理制御部314は、要求受付部301を通して、要求元アプリケーション100にコミット失敗を通知する(ステップD3)。   As a result of the determination in step D2, when the transaction state is "invalid", the commit processing control unit 314 notifies the request source application 100 of commit failure through the request reception unit 301 (step D3).

一方、ステップD2の判定の結果、トランザクション状態が“有効”である場合は、コミット処理制御部314は、依存関係制御部304に、要求元アプリケーション100がコミット可能かどうかの確認を要求する。これにより、依存関係制御部304は、要求元アプリケーション100がコミット可能かどうかを判定する(ステップD4)。   On the other hand, if the transaction state is "valid" as a result of the determination in step D2, the commit processing control unit 314 requests the dependency relationship control unit 304 to confirm whether the request source application 100 can commit. Thereby, the dependency relationship control unit 304 determines whether the request source application 100 can commit (step D4).

具体的には、ステップD4では、依存関係制御部304は、トランザクション依存管理表308を参照し、要求元アプリケーション100のノードに親ノードが存在しているかどうかを判定する。これは、要求元アプリケーション100のノードに親ノードが存在する場合は、要求元アプリケーション100が他のアプリケーション100の更新完了レコードを排他していて、他のアプリケーション100がコミット完了していないことを表しているからである。また、要求元アプリケーション100のノードに親ノードが存在していない場合は、要求元トランザクションは既に他のトランザクションに依存していないため、コミット可能な状態であるからである。   Specifically, in step D4, the dependency control unit 304 refers to the transaction dependency management table 308, and determines whether or not a parent node exists in the node of the request source application 100. This indicates that if the request source application 100 has a parent node, the request source application 100 excludes the update completion record of the other application 100 and the other application 100 has not completed the commit. It is because In addition, when no parent node exists in the node of the request source application 100, the request source transaction does not already depend on another transaction, and therefore, it is possible to commit.

ステップD2の判定の結果、コミット可能ではない場合、即ち、親ノードが存在している場合は、依存関係制御部304は、親ノードのアプリケーション100のコミット待ちが必要と判断し、コミット処理制御部314に“コミット待ち”を返却する。これにより、コミット処理制御部314は、要求受付部301に、待機した後で再度ステップD2を実行するよう要求する(ステップD5)。これにより、要求受付部301は、、待機状態となり、設定時間の経過後に、コミット処理制御部314に、再度ステップD2の判定を実行させる。   As a result of the determination in step D2, if the commit is not possible, that is, if the parent node exists, the dependency relationship control unit 304 determines that the application 100 of the parent node needs to wait for commit, and the commit process control unit "Wait for commit" is returned to 314. As a result, the commit processing control unit 314 requests the request reception unit 301 to execute step D2 again after waiting (step D5). As a result, the request receiving unit 301 enters the standby state, and causes the commit processing control unit 314 to execute the determination of step D2 again after the set time has elapsed.

一方、ステップD2の判定の結果、コミット可能である場合、即ち、親ノードが存在していない場合は、依存関係制御部304は、トランザクション依存管理表308から、要求元アプリケーション100のノードを削除し、コミット処理制御部314に“コミット可能”を返却する。   On the other hand, if the result of determination in step D2 indicates that commit is possible, ie, there is no parent node, the dependency relationship control unit 304 deletes the node of the request source application 100 from the transaction dependency management table 308. , "Committable" is returned to the commit processing control unit 314.

これにより、コミット処理制御部314は、要求元アプリケーション100のトランザクション更新管理表306を参照し、[更新]が“あり”となっている全てのレコードデータを取り出し、ストレージ処理部305に書き込みを要求する。これにより、データベース200のレコードが更新される(ステップD6)。   Thereby, the commit processing control unit 314 refers to the transaction update management table 306 of the request source application 100, extracts all the record data for which "update" is "present", and requests the storage processing unit 305 to write. Do. Thereby, the record of the database 200 is updated (step D6).

次に、ステップD6による書き込みが完了すると、コミット処理制御部314は、要求元アプリケーション100の排他レコードを解除するために、レコード排他制御部303に排他解除を要求する。これにより、レコード排他制御部303は、全てのレコード排他管理表307から、[要求元]が要求元アプリケーション100のアプリケーションIDである制御レコードを全て削除する(ステップD7)。   Next, when the writing in step D6 is completed, the commit process control unit 314 requests the record exclusion control unit 303 to release the exclusion in order to release the exclusion record of the request source application 100. Thereby, the record exclusion control unit 303 deletes all control records whose [request source] is the application ID of the request source application 100 from all the record exclusion management tables 307 (step D7).

また、ステップD7では、レコード排他制御部[直前要求元]が要求元アプリケーション100のアプリケーションIDである制御レコードに対して、[直前要求元]を“なし”に設定する。レコード排他制御部303はコミット処理制御部314に完了を通知する。   Further, in step D7, “previous request source” is set to “none” for a control record in which the record exclusion control unit [previous request source] is the application ID of the request source application 100. The record exclusion control unit 303 notifies the commit processing control unit 314 of the completion.

次に、コミット処理制御部314は、依存関係制御部304に、要求元アプリケーション100のトランザクション依存関係の解除を要求する。依存関係制御部304はトランザクション依存管理表308から、要求元アプリケーション100のノードを削除する(ステップD8)。   Next, the commit processing control unit 314 requests the dependency control unit 304 to release the transaction dependency of the request source application 100. The dependency control unit 304 deletes the node of the request source application 100 from the transaction dependency management table 308 (step D8).

次に、ステップD7のレコード排他とステップD8のトランザクション依存関係の削除とが完了すると、コミット処理制御部314は、要求元アプリケーション100のトランザクション更新管理表306を削除する(ステップD9)。   Next, when the record exclusion in step D7 and the deletion of the transaction dependency relationship in step D8 are completed, the commit processing control unit 314 deletes the transaction update management table 306 of the request source application 100 (step D9).

そして、コミット処理制御部314は、要求受付部301を通して、要求元アプリケーション100にコミット完了を通知する(ステップD10)。   Then, the commit processing control unit 314 notifies the request source application 100 of the completion of the commit through the request receiving unit 301 (step D10).

[ロールバック]
最後に、図14を用いて、ロールバック時におけるデータベース管理装置300の動作について、説明する。図14は、アプリケーションによる要求がロールバックである場合の本発明の実施の形態におけるデータベース管理装置の動作を示すフロー図である。
[roll back]
Finally, the operation of the database management device 300 at the time of rollback will be described using FIG. FIG. 14 is a flow chart showing the operation of the database management apparatus in the embodiment of the present invention when the request by the application is rollback.

図14に示すように、最初に、要求受付部301は、アプリケーション100からロールバック要求を受け付ける(ステップE1)。また、要求受付部301は、受付けた要求をアクセス処理制御部302のロールバック処理制御部315に渡す。   As shown in FIG. 14, first, the request receiving unit 301 receives a rollback request from the application 100 (step E1). Further, the request receiving unit 301 passes the received request to the rollback processing control unit 315 of the access processing control unit 302.

次に、ロールバック処理制御部315は、依存関係制御部304にロールバック処理を要求する。依存関係制御部304は、ロールバック要求を受け取ると、トランザクション依存管理表308を確認し、要求元アプリケーション100のノードとその子孫のノード全てを削除する(ステップE2)。また、ステップE2では、依存関係制御部304は、削除した子孫のノードにあたるアプリケーション100のID一覧をトランザクション無効一覧として、ロールバック処理制御部315に返却する。   Next, the rollback process control unit 315 requests the dependency relationship control unit 304 to perform the rollback process. Upon receiving the rollback request, the dependency relationship control unit 304 confirms the transaction dependency management table 308, and deletes the node of the request source application 100 and all of its descendant nodes (step E2). Further, in step E2, the dependency relationship control unit 304 returns the ID list of the application 100 corresponding to the deleted descendant node to the rollback processing control unit 315 as a transaction invalidity list.

次に、ロールバック処理制御部315は、要求元アプリケーション100のIDと、依存関係制御部304から返却されたトランザクションが無効になったアプリケーション100のID一覧とを、レコード排他制御部303に渡す。そして、ロールバック処理制御部315は、レコード排他制御部303に、これらのアプリケーション100のレコード排他の解除を要求する。   Next, the rollback processing control unit 315 passes the ID of the request source application 100 and the ID list of the application 100 for which the transaction returned from the dependency relationship control unit 304 is invalidated to the record exclusion control unit 303. Then, the rollback processing control unit 315 requests the record exclusion control unit 303 to release the record exclusion of the application 100.

これにより、レコード排他制御部303は、レコード排他管理表307から、渡されたアプリケーションIDが[要求元]に設定されている制御レコードを全て削除する(ステップE3)。また、渡されたアプリケーションIDが[直前要求元]に設定されている制御レコードが存在すれば、レコード排他制御部303は、[直前要求元]の値を更新し、レコード排他要求順番のリストをつなぎ直す。   As a result, the record exclusion control unit 303 deletes all the control records for which the passed application ID is set to [request source] from the record exclusion management table 307 (step E3). In addition, if there is a control record in which the passed application ID is set to [immediately before request source], the record exclusion control unit 303 updates the value of [immediately before request source], and the list of record exclusion request order is displayed. Reconnect.

最後に、ロールバック処理制御部315は、要求元アプリケーション100のトランザクション更新管理表306を削除する(ステップE4)。また、ロールバック処理制御部315は、依存関係制御部304から受け取ったトランザクション無効一覧にあるアプリケーション100全てに対して、トランザクション更新管理表306の[状態]を“無効”に更新する。これにより、要求元アプリケーション100が更新完了したレコードに対して排他を取得した別のアプリケーション100のトランザクションが無効になる。   Finally, the rollback processing control unit 315 deletes the transaction update management table 306 of the request source application 100 (step E4). Further, the rollback processing control unit 315 updates the [state] of the transaction update management table 306 to “invalid” for all the applications 100 in the transaction invalidity list received from the dependency relationship control unit 304. As a result, the transaction of another application 100 for which the request source application 100 has acquired an exclusion for the updated record is invalidated.

[実施の形態による効果]
以上のように、本実施の形態では、排他ありレコード読み込み時に、パターン5、及びパターン6〜8の条件が満たされた場合、同一のレコードを排他する複数のアプリケーション100において、排他取得中のアプリケーション100のトランザクションがコミットされる前に、別のアプリケーション100が排他を取得できるようになる。このため、本実施の形態によれば、排他待ち時間が短縮され、データベースシステムにおいて並列して処理を実行する複数のアプリケーション100の処理性能の低下が抑制される。
[Effect by the embodiment]
As described above, in the present embodiment, when the conditions of pattern 5 and patterns 6 to 8 are satisfied at the time of reading the exclusive record, the application under exclusive acquisition is excluded in the plurality of applications 100 that exclude the same record. Another application 100 will be able to obtain exclusion before 100 transactions are committed. Therefore, according to the present embodiment, the exclusive waiting time is shortened, and a decrease in processing performance of the plurality of applications 100 executing processes in parallel in the database system is suppressed.

[変形例]
続いて、本実施の形態における変形例について説明する。本変形例によれば、同一レコードを排他する2つのトランザクションに対して、グループコミット機能を適用することが可能となる。
[Modification]
Then, the modification in this embodiment is explained. According to this modification, it is possible to apply the group commit function to two transactions that exclude the same record.

ここで、グループコミット機能について説明する。一般に、Oracle(登録商標)又はMySQL(登録商標)などに代表される従来からのデータベースシステムは、複数の完了済みトランザクションをまとめてストレージにコミットするといったグループコミット機能を有している。コミットはストレージへの書き込み等を必要とするコストのかかる処理であるが、グループコミット機能によれば、複数トランザクションのコミット処理を一度に行うことができるので、コミット処理のオーバーヘッドを抑えることが可能となる。よって、グループコミット機能により、トランザクションのスループットの向上が期待できる。   Here, the group commit function will be described. In general, a conventional database system represented by Oracle (registered trademark) or MySQL (registered trademark) has a group commit function of collectively committing a plurality of completed transactions to storage. Although commit is an expensive process that requires writing to storage, etc., the group commit function enables commit processing of multiple transactions to be performed at one time, so overhead of commit processing can be suppressed. Become. Therefore, the group commit function can be expected to improve transaction throughput.

但し、同一レコードを排他するトランザクション同士は、コミット処理がシリアライズされてしまうため、グループコミット機能を用いて、これらのトランザクションを同時に完了させることは不可能である。上述の図16を用いて説明すると、アプリケーション1のコミットとアプリケーション2のコミットとの間に、共有レコードの排他解除があるため、2つのコミットが同時に起きることはない。   However, since transactions that exclude the same record are serialized in the commit process, it is impossible to simultaneously complete these transactions using the group commit function. As described with reference to FIG. 16 described above, two commits do not occur simultaneously because there is an exclusion release of the shared record between the application 1 commit and the application 2 commit.

なお、コミットでのストレージ書き込みをバッファリングすれば、同一レコードを排他する2つのトランザクションに対して、グループコミット機能を適用できるようにも考えられる。しかし、この場合は、コミットに対して、ストレージへのデータの永続化が保証されているわけではないため、耐障害性が低下してしまう。   It is also conceivable that the group commit function can be applied to two transactions excluding the same record by buffering the storage write at the commit. However, in this case, since the data persistence to the storage is not guaranteed for the commit, the fault tolerance is reduced.

このため、本変形例では、決められた個数のコミット要求が集まった場合に、コミットが行なわれるように、コミット時の制御を行なうことで、グループコミット機能への対応が図られている。以下に具体的に説明する。   For this reason, in the present modification, the group commit function is coped with by performing control at the time of commit so that the commit is performed when the determined number of commit requests are collected. The details will be described below.

本変形例では、コミット処理制御部314は、要求受付部301からコミット要求を受け取ると、トランザクション状態が“有効”であることを確認した後で、決められた個数のコミット要求が届いているかを確認する。届いていなければ、コミット処理制御部314は、他の要求受付部301からのコミット要求を受け付けるまで、コミット処理を保留する。既にコミット要求の個数が達している場合は、コミット処理制御部314は、コミット処理を進める。   In this modification, when the commit processing control unit 314 receives a commit request from the request receiving unit 301, after confirming that the transaction state is "valid", whether the determined number of commit requests have arrived or not Check. If not received, the commit process control unit 314 suspends the commit process until the commit request from another request receiving unit 301 is received. If the number of commit requests has already reached, the commit processing control unit 314 proceeds with the commit processing.

また、コミット処理を進める場合、コミット処理制御部314は、依存関係制御部304に、コミット要求中のアプリケーション100のアプリケーションID一覧を渡し、それぞれについてコミット可能かどうかの判定を要求する。これにより、依存関係制御部304は、トランザクション依存管理表308を参照し、各アプリケーション100のノードに親ノードが存在するかを確認する。   Further, when proceeding with the commit process, the commit process control unit 314 passes the application ID list of the application 100 in the commit request to the dependency relationship control unit 304, and requests the determination of whether or not commit is possible for each. Thus, the dependency control unit 304 refers to the transaction dependency management table 308 and confirms whether or not a parent node exists in the node of each application 100.

親ノードが存在した場合であっても、そのノードがコミット要求中のアプリケーション100のノードである場合は、依存関係制御部304は、コミット可能と判定する。依存関係制御部304は、コミット可能なアプリケーション100とコミット待ちのアプリケーション100とを判別して、コミット処理制御部314に判定結果を返却する。   Even when the parent node exists, if the node is a node of the application 100 that is requesting a commit, the dependency relationship control unit 304 determines that the commit is possible. The dependency relationship control unit 304 determines the application 100 capable of committing and the application 100 waiting for committing, and returns the determination result to the commit processing control unit 314.

コミット処理制御部314は、コミット可能と判断されたアプリケーション100について、該当するトランザクション更新管理表306に格納された全ての更新データを取得する。そして、取得された更新データの中に、テーブル名とレコードのキー値とが一致する複数の更新データが存在するとする。この場合、コミット処理制御部314は、依存関係制御部304に対して、その更新レコードを更新していた複数のアプリケーション100のうち、トランザクション依存関係において最も下層の子ノードとなるものがいずれであるかを確認するよう要求する。   The commit process control unit 314 acquires all update data stored in the corresponding transaction update management table 306 for the application 100 determined to be committable. Then, it is assumed that a plurality of update data in which the table name and the key value of the record match exist in the acquired update data. In this case, the commit process control unit 314 causes the dependency relationship control unit 304 to select the child node of the lowest layer in the transaction dependency relationship among the plurality of applications 100 whose update records have been updated. Ask to confirm.

最も下層の子ノードに該当するアプリケーション100を確認できると、コミット処理制御部314は、該当するアプリケーション100のレコードデータのみを残し、親ノードのアプリケーション100が更新していた同一レコードデータについては破棄する。これは、データベース200において、同一レコードを更新する場合は、最も新しいレコードのみを更新する必要があるためである。また、最も下層の子ノードであるアプリケーション100のトランザクション更新管理表306が、最も新しいレコードデータを保持している。   When the application 100 corresponding to the lowermost child node can be confirmed, the commit processing control unit 314 leaves only the record data of the corresponding application 100 and discards the same record data updated by the application 100 of the parent node. . This is because when updating the same record in the database 200, only the newest record needs to be updated. In addition, the transaction update management table 306 of the application 100 which is the lowermost child node holds the newest record data.

そして、コミット処理制御部314は、全ての更新後のレコードデータが揃うと、ストレージ処理部305にデータベース200への書き込みを要求する。また、コミット処理制御部314は、データベース200への書き込みが完了すると、レコード排他制御部303にコミットを実行したアプリケーション100の排他解除を要求し、更に、依存関係制御部304に依存関係削除を要求する。   Then, the commit processing control unit 314 requests the storage processing unit 305 to write to the database 200 when all the updated record data are collected. Further, when writing to the database 200 is completed, the commit process control unit 314 requests the record exclusion control unit 303 to release the exclusion of the application 100 that has performed the commit, and further requests the dependency control unit 304 to delete the dependency relationship. Do.

また、コミット処理制御部314は、それぞれの制御レコードが削除できたら、要求受付部301を通して、コミット完了した全てのアプリケーション100に対し、コミット完了を通知する。   Further, when the control processing unit 314 can delete each control record, the request reception unit 301 notifies all the applications 100 that have completed the commit of the completion of the commit.

これにより、同一レコードを排他する複数のアプリケーション100がグループコミットによってまとめてコミットすることが可能になる。   This enables a plurality of applications 100 exclusive of the same record to collectively commit by group commit.

[デッドロックとその回避策]
ここで、本実施の形態で発生する可能生のあるデッドロックとその回避策とについて説明する。上述した排他ありレコード読み込みにおけるパターン9は、トランザクション依存関係によるデッドロックが発生している状態である。
Deadlocks and their workarounds
Here, possible deadlocks occurring in the present embodiment and their workarounds will be described. The pattern 9 in the exclusive record reading described above is a state in which a deadlock due to a transaction dependency has occurred.

一般的にデッドロックは、2つのトランザクションが2つのレコード(例えば、レコードAとレコードBとする)を排他する際に、一方のトランザクションがレコードA→レコードBの順に排他取得し、もう一方のトランザクションがレコードB→レコードAの順に排他取得するような場合に発生する。   Generally, when two transactions exclude two records (for example, record A and record B), one transaction acquires exclusive acquisition in the order of record A → record B, and the other transaction Occurs when the exclusive acquisition is performed in the order of record B → record A.

そして、このような場合においては、全てのトランザクションにおいて、レコードの排他取得順を統一することで、デッドロックが発生しないようにできる。しかしながら、本実施の形態では、レコードの排他取得順を統一したとしてもデッドロックが発生する可能性がある。例えば、2つのトランザクション(例えば、トランザクション1とトランザクション2とする)が、レコードA→レコードBという順番で排他を取得する場合を考える。   In such a case, deadlock can be prevented from occurring by unifying the exclusive acquisition order of records in all transactions. However, in the present embodiment, even if the exclusive acquisition order of records is unified, there is a possibility that a deadlock will occur. For example, consider a case where two transactions (for example, transaction 1 and transaction 2) acquire exclusions in the order of record A → record B.

トランザクション1が、レコードAを排他して更新した直後に更新完了を宣言する。別のトランザクション2が、トランザクション1の更新完了後にレコードAを排他して更新し、更新完了を宣言する。その後、トランザクション2がトランザクション1よりも先にレコードBの排他を取得して更新し、更新完了を宣言する。その後、トランザクション1がレコードBの排他を取得する。この時、トランザクション1とトランザクション2との依存関係が循環するため、本実施の形態では、片方または両方のトランザクションが無効となる。   Transaction 1 declares update completion immediately after exclusive update of record A. Another transaction 2 exclusively updates the record A after update completion of transaction 1 and declares update completion. Thereafter, transaction 2 acquires and updates the exclusion of record B earlier than transaction 1 and declares the update completed. Thereafter, transaction 1 gets the exclusion of record B. At this time, since the dependency between transaction 1 and transaction 2 circulates, one or both transactions become invalid in the present embodiment.

このようなトランザクションの異常が発生しないようにするには、レコードAの排他を取得して更新した後すぐには、レコードAを更新完了をせず、レコードBの排他を取得した後でレコードAの更新完了を宣言すればいい。つまり、トランザクション1がレコードBを排他した後でレコードAの更新完了をすることで、トランザクション2は、トランザクション1よりも先にレコードBを排他することを防ぐことができる。このため、本実施の形態では、上述の処理が行なわれる。   In order to prevent such a transaction abnormality from occurring, immediately after acquiring and updating the exclusion of record A, updating of record A is not completed, but after acquiring exclusion of record B, record A Declare the update completion of. That is, by completing update of record A after transaction 1 excludes record B, transaction 2 can be prevented from excluding record B earlier than transaction 1. Therefore, in the present embodiment, the above-described processing is performed.

[プログラム]
本実施の形態におけるプログラムは、コンピュータに、図10に示すステップA1〜A9、図11に示すステップB1〜B5、図12に示すステップC1〜C5、図13に示すステップD1〜D10、図14に示すステップE1〜E4を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、本実施の形態におけるデータベース管理装置300とデータベース管理方法とを実現することができる。この場合、コンピュータのCPU(Central Processing Unit)は、要求受付部301、アクセス処理制御部302、レコード排他制御部303、依存関係制御部304、及びストレージ処理部305として機能し、処理を行なう。
[program]
The program according to the present embodiment includes steps A1 to A9 shown in FIG. 10, steps B1 to B5 shown in FIG. 11, steps C1 to C5 shown in FIG. 12, steps D1 to D10 shown in FIG. It may be a program that executes steps E1 to E4 shown. By installing this program in a computer and executing it, the database management apparatus 300 and the database management method in the present embodiment can be realized. In this case, a central processing unit (CPU) of the computer functions as the request reception unit 301, the access processing control unit 302, the record exclusion control unit 303, the dependency relationship control unit 304, and the storage processing unit 305 to perform processing.

また、本実施の形態におけるプログラムは、複数のコンピュータによって構築されたコンピュータシステムによって実行されても良い。この場合は、例えば、各コンピュータが、それぞれ、要求受付部301、アクセス処理制御部302、レコード排他制御部303、依存関係制御部304、及びストレージ処理部305のいずれかとして機能しても良い。また、記憶部50は、本実施の形態におけるプログラムを実行するコンピュータとは別のコンピュータ上に構築されていても良い。   Also, the program in the present embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as any of the request reception unit 301, the access processing control unit 302, the record exclusion control unit 303, the dependency relationship control unit 304, and the storage processing unit 305. In addition, the storage unit 50 may be constructed on a computer different from the computer that executes the program in the present embodiment.

[物理構成]
ここで、本実施の形態におけるプログラムを実行することによって、データベース管理装置300を実現するコンピュータについて図15を用いて説明する。図15は、本発明の実施の形態におけるデータベース管理装置を実現するコンピュータの一例を示すブロック図である。
Physical configuration
Here, a computer for realizing the database management apparatus 300 by executing the program according to the present embodiment will be described with reference to FIG. FIG. 15 is a block diagram showing an example of a computer for realizing the database management apparatus in the embodiment of the present invention.

図15に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。   As shown in FIG. 15, the computer 110 includes a CPU 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader / writer 116, and a communication interface 117. These units are communicably connected to each other via a bus 121.

CPU111は、記憶装置113に格納された、本実施の形態におけるプログラム(コード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。   The CPU 111 develops the program (code) in the present embodiment stored in the storage device 113 in the main memory 112 and executes various operations by executing these in a predetermined order. The main memory 112 is typically a volatile storage device such as a dynamic random access memory (DRAM). In addition, the program in the present embodiment is provided in the state of being stored in computer readable recording medium 120. The program in the present embodiment may be distributed on the Internet connected via communication interface 117.

また、記憶装置113の具体例としては、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。   Further, as a specific example of the storage device 113, besides a hard disk drive, a semiconductor storage device such as a flash memory may be mentioned. The input interface 114 mediates data transmission between the CPU 111 and an input device 118 such as a keyboard and a mouse. The display controller 115 is connected to the display device 119 and controls the display on the display device 119.

データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。   The data reader / writer 116 mediates data transmission between the CPU 111 and the recording medium 120, and executes reading of a program from the recording medium 120 and writing of the processing result in the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and another computer.

また、記録媒体120の具体例としては、CF(CompactFlash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記録媒体、又はCD−ROM(Compact DiskRead Only Memory)などの光学記録媒体が挙げられる。   In addition, specific examples of the recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash (registered trademark) and SD (Secure Digital), magnetic recording media such as flexible disk (Flexible Disk), or CD-ROM. Optical recording media such as (Compact Disk Read Only Memory) can be mentioned.

なお、本実施の形態におけるデータベース管理装置300は、プログラムがインストールされたコンピュータではなく、各部に対応したハードウェアを用いることによっても実現可能である。更に、データベース管理装置300は、一部がプログラムで実現され、残りの部分がハードウェアで実現されていてもよい。   Note that the database management device 300 in the present embodiment can also be realized by using hardware corresponding to each unit, not a computer on which a program is installed. Furthermore, the database management device 300 may be partially realized by a program, and the remaining portion may be realized by hardware.

上述した実施の形態の一部又は全部は、以下に記載する(付記1)〜(付記12)によって表現することができるが、以下の記載に限定されるものではない。   A part or all of the embodiment described above can be expressed by (Appendix 1) to (Appendix 12) described below, but is not limited to the following description.

(付記1)
複数のアプリケーションプログラムによってアクセスされるデータベースを管理するための装置であって、
前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、要求受付部と、
前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、アクセス処理制御部と、
を備え、
前記アクセス処理制御部は、使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、
ことを特徴とするデータベース管理装置。
(Supplementary Note 1)
An apparatus for managing a database accessed by a plurality of application programs, the apparatus comprising:
A request receiving unit for receiving a request from the application program for a record stored in the database;
An access processing control unit for permitting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied. When,
Equipped with
The access processing control unit releases the exclusive use of the specific record and permits the use when the application program permitted to use declares that the update of the specific record is to be completed. Allow application programs other than the application program to use the particular record
Database management apparatus characterized in that.

(付記2)
前記アクセス処理制御部は、使用を許可された前記アプリケーションプログラムが、トランザクションの途中で、前記特定のレコードの更新を完了する旨を宣言した場合でも、前記特定のレコードに対する排他的な使用を解除する、
付記1に記載のデータベース管理装置。
(Supplementary Note 2)
The access processing control unit cancels exclusive use of the specific record even when the application program permitted to use declares that the update of the specific record is completed in the middle of a transaction. ,
The database management device according to appendix 1.

(付記3)
前記複数のアプリケーションプログラムそれぞれのトランザクションの依存関係を管理する、依存関係制御部を更に備え、
前記依存関係制御部は、前記アクセス処理制御部による処理の結果に応じて、前記依存関係を更新する、
付記2に記載のデータベース管理装置。
(Supplementary Note 3)
The system further comprises a dependency control unit that manages the transaction dependency of each of the plurality of application programs,
The dependency control unit updates the dependency according to the result of processing by the access processing control unit.
The database management device according to appendix 2.

(付記4)
前記アクセス処理制御部が、前記要求がトランザクションのコミットである場合に、要求されたコミットの数が設定数以上であることを条件に、要求している前記アプリケーション全てのトランザクションをコミットする、
付記1〜3のいずれかに記載のデータベース管理装置。
(Supplementary Note 4)
The access processing control unit commits transactions of all the requesting applications, on condition that the number of requested commits is equal to or greater than a set number, when the request is a transaction commit.
The database management device according to any one of appendices 1 to 3.

(付記5)
複数のアプリケーションプログラムによってアクセスされるデータベースを管理するための方法であって、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を有することを特徴とするデータベース管理方法。
(Supplementary Note 5)
A method for managing a database accessed by a plurality of application programs, comprising:
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
A database management method comprising:

(付記6)
前記(c)のステップにおいて、使用を許可された前記アプリケーションプログラムが、トランザクションの途中で、前記特定のレコードの更新を完了する旨を宣言した場合でも、前記特定のレコードに対する排他的な使用を解除する、
付記5に記載のデータベース管理方法。
(Supplementary Note 6)
In the step (c), even if the application program authorized for use declares that the update of the specific record is completed in the middle of a transaction, exclusive use of the specific record is released. Do,
The database management method according to appendix 5.

(付記7)
(d)前記複数のアプリケーションプログラムそれぞれのトランザクションの依存関係を管理する、ステップを更に有し、
前記(d)のステップにおいて、前記(b)及び(c)のステップによる処理の結果に応じて、前記依存関係を更新する、
付記6に記載のデータベース管理方法。
(Appendix 7)
(D) managing the transaction dependency of each of the plurality of application programs;
In the step (d), the dependency is updated according to the result of the process in the steps (b) and (c),
The database management method according to appendix 6.

(付記8)
(e)前記要求がトランザクションのコミットである場合に、要求されたコミットの数が設定数以上であることを条件に、要求している前記アプリケーション全てのトランザクションをコミットする、ステップを更に有する、
付記5〜7のいずれかに記載のデータベース管理方法。
(Supplementary Note 8)
(E) committing the transactions of all the requesting applications on condition that the number of requested commits is equal to or greater than a set number if the request is a transaction commit;
The database management method according to any one of appendices 5 to 7.

(付記9)
コンピュータによって、複数のアプリケーションプログラムによってアクセスされるデータベースを管理するためのプログラムを記録したコンピュータ読み取り可能な記録媒体であって、
前記コンピュータに、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を実行させる命令を含む、プログラムを記録しているコンピュータ読み取り可能な記録媒体。
(Appendix 9)
A computer readable recording medium having recorded thereon a program for managing a database accessed by a plurality of application programs by a computer.
On the computer
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
A computer readable storage medium storing a program, comprising: instructions for executing the program.

(付記10)
前記(c)のステップにおいて、使用を許可された前記アプリケーションプログラムが、トランザクションの途中で、前記特定のレコードの更新を完了する旨を宣言した場合でも、前記特定のレコードに対する排他的な使用を解除する、
付記9に記載のコンピュータ読み取り可能な記録媒体。
(Supplementary Note 10)
In the step (c), even if the application program authorized for use declares that the update of the specific record is completed in the middle of a transaction, exclusive use of the specific record is released. Do,
The computer-readable recording medium according to appendix 9.

(付記11)
前記プログラムが、前記コンピュータに、
(d)前記複数のアプリケーションプログラムそれぞれのトランザクションの依存関係を管理する、ステップを実行させる命令を更に含み、
前記(d)のステップにおいて、前記(b)及び(c)のステップによる処理の結果に応じて、前記依存関係を更新する、
付記10に記載のコンピュータ読み取り可能な記録媒体。
(Supplementary Note 11)
The program is stored in the computer
(D) further including an instruction to execute a step of managing a transaction dependency of each of the plurality of application programs,
In the step (d), the dependency is updated according to the result of the process in the steps (b) and (c),
The computer-readable recording medium according to appendix 10.

(付記12)
前記プログラムが、前記コンピュータに、
(e)前記要求がトランザクションのコミットである場合に、要求されたコミットの数が設定数以上であることを条件に、要求している前記アプリケーション全てのトランザクションをコミットする、ステップを更に実行させる命令を更に含む、
付記9〜11のいずれかに記載のコンピュータ読み取り可能な記録媒体。
(Supplementary Note 12)
The program is stored in the computer
(E) an instruction to further execute the step of committing the transaction of all the requesting applications, on condition that the number of requested commits is equal to or greater than a set number, when the request is a transaction commit; Further include,
The computer readable recording medium according to any one of appendices 9-11.

以上、実施の形態を参照して本願発明を説明したが、本願発明は上記実施の形態に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。
Although the present invention has been described above with reference to the embodiment, the present invention is not limited to the above embodiment. The configurations and details of the present invention can be modified in various ways that can be understood by those skilled in the art within the scope of the present invention.

この出願は、2016年9月20日に出願された日本出願特願2016−183492を基礎とする優先権を主張し、その開示の全てをここに取り込む。 This application claims priority based on Japanese Patent Application No. 2016-183492 filed on Sep. 20, 2016, the entire disclosure of which is incorporated herein.

以上のように本発明によれば、データベースシステムにおいて並列して処理を実行する複数のアプリケーションプログラムの処理性能の低下を抑制することができる。本発明は、大量のトランザクションを高速に処理するシステム、例えば、航空管制システムに代表される追跡システム、勘定系システム等に有用である。   As described above, according to the present invention, it is possible to suppress a decrease in processing performance of a plurality of application programs that execute processing in parallel in a database system. The present invention is useful for a system that processes a large number of transactions at high speed, for example, a tracking system represented by an air traffic control system, a accounting system, and the like.

100 アプリケーションプログラム
110 コンピュータ
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
121 バス
200 データベース
300 データベース管理装置
301 要求受付部
302 アクセス処理制御部
303 レコード排他制御部
304 依存関係制御部
305 ストレージ処理部
306 トランザクション更新管理表
307 レコード排他管理表
308 トランザクション依存管理表
311 排他あり読み込み処理制御部
312 レコード更新処理制御部
313 更新完了処理制御部
314 コミット処理制御部
315 ロールバック処理制御部
100 application program 110 computer 111 CPU
112 main memory 113 storage device 114 input interface 115 display controller 116 data reader / writer 117 communication interface 118 input device 119 display device 120 recording medium 121 bus 200 database 300 database management device 301 request reception unit 302 access processing control unit 303 record exclusive control Part 304 Dependency control part 305 Storage processing part 306 Transaction update management table 307 Record exclusion management table 308 Transaction dependence management table 311 Exclusive read processing control part 312 Record update processing control part 313 Update completion processing control part 314 Commit processing control part 315 Rollback processing control unit

本発明は、データベースシステムにおける排他制御を行なうための、データベース管理装置及びデータベース管理方法に関し、更に、これらを実現するためのプログラムに関する。 The present invention, for performing exclusive control of the database system, a database management method device and database management, further relates to a program for implementing them.

本発明の目的の一例は、上記問題を解消し、データベースシステムにおいて並列して処理を実行する複数のアプリケーションプログラムの処理性能の低下を抑制し得る、データベース管理装置、データベース管理方法、及びプログラムを提供することにある。 One example of the object of the present invention is to provide a database management apparatus, database management method, and program capable of solving the above problems and suppressing deterioration in processing performance of a plurality of application programs executing processing in parallel in a database system It is to do.

更に、上記目的を達成するため、本発明の一側面におけるプログラムは、コンピュータによって、複数のアプリケーションプログラムによってアクセスされるデータベースを管理するためのプログラムであって、
前記コンピュータに、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を実行させる、ことを特徴とする。
Furthermore, in order to achieve the above object, a program according to an aspect of the present invention, by a computer, a program for managing the database accessed by the plurality of application programs,
On the computer
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
Ru allowed to run, and wherein a call.

(付記9)
コンピュータによって、複数のアプリケーションプログラムによってアクセスされるデータベースを管理するためのプログラムであって、
前記コンピュータに、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を実行させる、プログラム。
(Appendix 9)
The computer, a program for managing the database accessed by the plurality of application programs,
On the computer
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
Ru is the execution, program.

(付記10)
前記(c)のステップにおいて、使用を許可された前記アプリケーションプログラムが、トランザクションの途中で、前記特定のレコードの更新を完了する旨を宣言した場合でも、前記特定のレコードに対する排他的な使用を解除する、
付記9に記載のプログラム
(Supplementary Note 10)
In the step (c), even if the application program authorized for use declares that the update of the specific record is completed in the middle of a transaction, exclusive use of the specific record is released. Do,
The program described in Supplementary Note 9.

(付記11)
記コンピュータに、
(d)前記複数のアプリケーションプログラムそれぞれのトランザクションの依存関係を管理する、ステップを更に実行させ、
前記(d)のステップにおいて、前記(b)及び(c)のステップによる処理の結果に応じて、前記依存関係を更新する、
付記10に記載のプログラム
(Supplementary Note 11)
Before Symbol computer,
(D) further executing the step of managing the transaction dependency of each of the plurality of application programs ;
In the step (d), the dependency is updated according to the result of the process in the steps (b) and (c),
The program according to appendix 10.

(付記12)
記コンピュータに、
(e)前記要求がトランザクションのコミットである場合に、要求されたコミットの数が設定数以上であることを条件に、要求している前記アプリケーション全てのトランザクションをコミットする、ステップを更に実行させる、
付記9〜11のいずれかに記載のプログラム
(Supplementary Note 12)
Before Symbol computer,
When (e) the request is a transaction commit, on condition that the number of the requested committed is equal to or greater than a set number, to commit all said application transaction requesting, Ru further perform the steps ,
The program according to any one of appendices 9-11.

Claims (6)

複数のアプリケーションプログラムによってアクセスされるデータベースを管理するための装置であって、
前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、要求受付部と、
前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、アクセス処理制御部と、
を備え、
前記アクセス処理制御部は、使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、
ことを特徴とするデータベース管理装置。
An apparatus for managing a database accessed by a plurality of application programs, the apparatus comprising:
A request receiving unit for receiving a request from the application program for a record stored in the database;
An access processing control unit for permitting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied. When,
Equipped with
The access processing control unit releases the exclusive use of the specific record and permits the use when the application program permitted to use declares that the update of the specific record is to be completed. Allow application programs other than the application program to use the particular record
Database management apparatus characterized in that.
前記アクセス処理制御部は、使用を許可された前記アプリケーションプログラムが、トランザクションの途中で、前記特定のレコードの更新を完了する旨を宣言した場合でも、前記特定のレコードに対する排他的な使用を解除する、
請求項1に記載のデータベース管理装置。
The access processing control unit cancels exclusive use of the specific record even when the application program permitted to use declares that the update of the specific record is completed in the middle of a transaction. ,
The database management device according to claim 1.
前記複数のアプリケーションプログラムそれぞれのトランザクションの依存関係を管理する、依存関係制御部を更に備え、
前記依存関係制御部は、前記アクセス処理制御部による処理の結果に応じて、前記依存関係を更新する、
請求項2に記載のデータベース管理装置。
The system further comprises a dependency control unit that manages the transaction dependency of each of the plurality of application programs,
The dependency control unit updates the dependency according to the result of processing by the access processing control unit.
The database management device according to claim 2.
前記アクセス処理制御部が、前記要求がトランザクションのコミットである場合に、要求されたコミットの数が設定数以上であることを条件に、要求している前記アプリケーション全てのトランザクションをコミットする、
請求項1〜3のいずれかに記載のデータベース管理装置。
The access processing control unit commits transactions of all the requesting applications, on condition that the number of requested commits is equal to or greater than a set number, when the request is a transaction commit.
The database management device according to any one of claims 1 to 3.
複数のアプリケーションプログラムによってアクセスされるデータベースを管理するための方法であって、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を有することを特徴とするデータベース管理方法。
A method for managing a database accessed by a plurality of application programs, comprising:
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
A database management method comprising:
コンピュータによって、複数のアプリケーションプログラムによってアクセスされるデータベースを管理するためのプログラムを記録したコンピュータ読み取り可能な記録媒体であって、
前記コンピュータに、
(a)前記データベースに格納されているレコードに対する前記アプリケーションプログラムからの要求を受け付ける、ステップと、
(b)前記要求が特定のレコードに対する排他的使用である場合に、一定条件を満たすことを条件に、排他的使用を要求している前記アプリケーションプログラムに対して、排他的使用を許可する、ステップと、
(c)使用を許可された前記アプリケーションプログラムが前記特定のレコードの更新を完了する旨を宣言した場合に、前記特定のレコードに対する排他的な使用を解除して、使用を許可した前記アプリケーションプログラム以外のアプリケーションプログラムに、前記特定のレコードの使用を許可する、ステップと、
を実行させる命令を含む、プログラムを記録している、コンピュータ読み取り可能な記録媒体。
A computer readable recording medium having recorded thereon a program for managing a database accessed by a plurality of application programs by a computer.
On the computer
(A) receiving a request from the application program for a record stored in the database;
(B) granting exclusive use to the application program requiring exclusive use, provided that the request is exclusive use for a specific record, on condition that a certain condition is satisfied; When,
(C) When the application program authorized for use declares that the update of the specific record is completed, the exclusive use for the specific record is released and the application program other than the application program authorized for use Allowing the application program in question to use the particular record,
A computer readable storage medium storing a program, comprising instructions for executing the program.
JP2018541071A 2016-09-20 2017-09-19 Database management device, database management method, and program Active JP6784296B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2016183492 2016-09-20
JP2016183492 2016-09-20
PCT/JP2017/033758 WO2018056267A1 (en) 2016-09-20 2017-09-19 Database management device, database management method, and computer-readable recording medium

Publications (2)

Publication Number Publication Date
JPWO2018056267A1 true JPWO2018056267A1 (en) 2019-07-04
JP6784296B2 JP6784296B2 (en) 2020-11-11

Family

ID=61689982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018541071A Active JP6784296B2 (en) 2016-09-20 2017-09-19 Database management device, database management method, and program

Country Status (2)

Country Link
JP (1) JP6784296B2 (en)
WO (1) WO2018056267A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7298145B2 (en) 2018-12-04 2023-06-27 富士通株式会社 Securities trading device, securities trading method and securities trading program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4295333B2 (en) * 2007-05-18 2009-07-15 株式会社日立製作所 Database control method and program
JP2013200601A (en) * 2012-03-23 2013-10-03 Nec Corp Database system, commitment method in database system, and program

Also Published As

Publication number Publication date
JP6784296B2 (en) 2020-11-11
WO2018056267A1 (en) 2018-03-29

Similar Documents

Publication Publication Date Title
US9268810B2 (en) Locking across multiple RID spaces
US8473950B2 (en) Parallel nested transactions
JP4833590B2 (en) Concurrent transactions (CONCURRENT TRANSACTIONS) and page synchronization (PAGESYNCHRONIZATION)
CN1755635B (en) Hybrid hardware and software implementation of transactional memory access
US8655859B2 (en) Concurrency control for extraction, transform, load processes
KR101203297B1 (en) Direct update software transactional memory
US7240057B2 (en) System and method for implementing journaling in a multi-node environment
US8595446B2 (en) System and method for performing dynamic mixed mode read validation in a software transactional memory
US9658900B2 (en) Reentrant read-write lock algorithm
US7912821B2 (en) Apparatus and method for data management
US10970273B2 (en) Aiding resolution of a transaction
WO2016045605A2 (en) Concurrency control in a shared storage architecture supporting on-page implicit locks
US20150052529A1 (en) Efficient task scheduling using a locking mechanism
JP2017515229A (en) System and method for providing distributed transaction locks in a transaction middleware machine environment
CN109933606B (en) Database modification method, device, equipment and storage medium
US11113251B2 (en) Transaction manager
US8046633B2 (en) Improving data availability during failure detection and recovery processing in a shared resource system
US7346747B1 (en) Exclusive lease instruction support for transient blocking synchronization
CN110520845B (en) Method and system for updating Hardware Transactional Memory (HTM) user abort metadata
CN110546609B (en) Method and system for assisting database transaction by Hardware Transactional Memory (HTM)
US11449241B2 (en) Customizable lock management for distributed resources
JP6784296B2 (en) Database management device, database management method, and program
WO2008039618A1 (en) Persistent locks/resources for concurrency control
US10459810B2 (en) Technique for higher availability in a multi-node system using replicated lock information to determine a set of data blocks for recovery
US11356325B1 (en) Accelerating transactions from a trusted source

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190315

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190315

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200407

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200604

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200707

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200903

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200923

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201006

R150 Certificate of patent or registration of utility model

Ref document number: 6784296

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150