JPH05282186A - Method for constituting data base management system - Google Patents

Method for constituting data base management system

Info

Publication number
JPH05282186A
JPH05282186A JP4077046A JP7704692A JPH05282186A JP H05282186 A JPH05282186 A JP H05282186A JP 4077046 A JP4077046 A JP 4077046A JP 7704692 A JP7704692 A JP 7704692A JP H05282186 A JPH05282186 A JP H05282186A
Authority
JP
Japan
Prior art keywords
module
transaction
modules
execution
management system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4077046A
Other languages
Japanese (ja)
Inventor
Tetsuji Sato
哲司 佐藤
Yasuhiro Hirano
泰宏 平野
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP4077046A priority Critical patent/JPH05282186A/en
Publication of JPH05282186A publication Critical patent/JPH05282186A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To provide a data base management system constituting method capable of improving the usability of a data base management system, and executing the addition/deletion/subtraction of modules without stopping the system for driving the management system without interrupting it for 24 hours. CONSTITUTION:At the start (step 1) of the execution of a transaction using an individual module as a unit, using status that the transaction uses the module is registered (step 2) in a module management part as registering information, and at the end of the transaction execution (step 3)F the registering information is removed from a module management part (step 4) and a new module is added, or an old module is removed or substituted in the execution process of the transaction (step 5).

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データベース管理シス
テムの構成方法に係り、特に、トランザクション実行中
に、システムを構成しているモジュールの入れ替えを実
現する複数のモジュールで構成されたデータベース管理
システムの構成方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of constructing a database management system, and more particularly to a database management system composed of a plurality of modules for replacing modules constituting the system during transaction execution. Regarding the configuration method.

【0002】[0002]

【従来の技術】データベース管理システムは、複数のト
ランザクションから参照あるいは、更新される共通のデ
ータを矛盾なく、永続的に管理するためのシステムであ
り、管理対象となる共通データを一般にデータベースと
呼ぶ。
2. Description of the Related Art A database management system is a system for permanently managing common data referenced or updated by a plurality of transactions without contradiction, and the common data to be managed is generally called a database.

【0003】データベース管理システムが対象とする処
理は、データベースに対する一連の問い合わせや、デー
タベースの内容を変更する更新処理で、一般にトランザ
クションと呼ばれている。トランザクションは、処理対
象となるデータが格納されているディスク装置等をアク
セスする。更に、トランザクションを並行処理すること
により演算装置であるCPU(Central Processing Uni
t)の使用効率を高める。即ち、1つのトランザクション
がディスク装置からデータを読み出している間は、その
トランザクションは当該ディスクへの入出力待ちとなっ
てCPUを開放することから、他のトランザクションが
CPUを使用することができる。このため、複数のトラ
ンザクションを並行して処理することによって、システ
ムを構成するCPUやディスク装置の使用効率が向上す
る。
The processing targeted by the database management system is a series of inquiries to the database and update processing for changing the contents of the database, and is generally called a transaction. A transaction accesses a disk device or the like that stores data to be processed. Furthermore, by processing transactions in parallel, a CPU (Central Processing Uni
Improve the usage efficiency of t). That is, while one transaction is reading data from the disk device, that transaction waits for input / output to / from the disk and releases the CPU, so that another transaction can use the CPU. Therefore, by processing a plurality of transactions in parallel, the usage efficiency of the CPU and the disk device that form the system is improved.

【0004】しかし、並行処理しているトランザクショ
ンがデータベース内の同一データ項目を同時に、更新す
るとデータベースの内容に矛盾が生じる場合がある。こ
のため、通常のデータベース管理システムでは、並行処
理制御機構と呼ばれるトランザクションの実行を制御す
る機構を設け、複数の並行処理を行っているトランザク
ション間、あるいは、トランザクションによって操作さ
れるデータベースの内容に矛盾が生じないように制御し
ている。データベース管理システムは、上述の並行処理
機能以外に、トランザクションの実行を認可し、その実
行を制御するトランザクション実行制御機能や、データ
ベースを永続的に矛盾なく維持管理するための機能であ
るデータベースの磁気ディスク等への格納と読み出し機
構等、複数の機能モジュールで構成されている。
However, there is a case where the contents of the database become inconsistent when a transaction executing parallel processing updates the same data item in the database at the same time. Therefore, in a normal database management system, a mechanism called a concurrency control mechanism that controls the execution of transactions is provided so that there is no contradiction between transactions performing multiple parallel processes or the contents of the database operated by the transactions. It is controlled so that it does not occur. In addition to the above-mentioned parallel processing function, the database management system is a transaction execution control function that authorizes and controls the execution of transactions, and a magnetic disk of a database that is a function for maintaining and managing the database permanently and consistently. It is composed of multiple functional modules such as a storage and read-out mechanism.

【0005】一般に、複数のモジュールで構成されたシ
ステムを実現する手順は個々のモジュールを別々に作成
し、コンパイルした後に、リンク操作によって一体化す
るコンパイル方式と、個々の機能モジュールを独立に実
現しておいて、必要な時に、呼び出すインタープリタ方
式とがある。コンパイル方式は、実行する命令の列を最
適化できる割合が高いため、実行速度が速いという利点
があり、データベース管理システムにおいてもコンパイ
ル方式を用いているものが通例である。しかし、コンパ
イル方式では、リンクするモジュールの名前や、場合に
よっては、モジュール間の関係さえも静的に決定される
ために、システム構成が柔軟性に欠けるという問題があ
った。
Generally, the procedure for realizing a system composed of a plurality of modules is such that the individual modules are separately created, compiled, and then integrated by link operation, and the individual functional modules are realized independently. In particular, there is an interpreter method that calls when necessary. The compile method has an advantage that the execution speed is high because the rate of optimizing the sequence of instructions to be executed is high, and the compile method is usually used also in the database management system. However, the compile method has a problem that the system configuration lacks flexibility because the names of the modules to be linked and, in some cases, even the relationships between the modules are statically determined.

【0006】一方、インタープリタ方式は、原始モジュ
ールを入力して直ちに実行できるため呼び出すモジュー
ルの決定は、実行時まで遅らせることが可能であり、柔
軟なシステム構成を実現することが可能である。
On the other hand, in the interpreter method, since the source module can be input and immediately executed, the determination of the module to be called can be delayed until the time of execution, and a flexible system configuration can be realized.

【0007】近年、データベース管理システムを用いた
応用システムの利用形態は高度になり、24時間無中断
でサービスを提供する必要性が高まってきている。この
ため、システムの停止がサービスに与える影響が大き
く、システムの運用を停止せずに、維持・管理が行える
データベース管理システムを提供することが望まれてい
る。例えば、システム運用開始時には判明しなかったプ
ログラムの誤りが運用中に発見された場合に、システム
を停止せずに誤った箇所を訂正する。また、運用中のシ
ステム稼働率が除々に高くなるようなシステム運用や、
さらに、データベースの規模が大きくなるに伴って新た
なハードウェアを追加し、それに伴うソフトウェアを追
加しなければならなくなった時に、システム運用したま
まで新規モジュールの追加が可能となること等が望まれ
ている。
In recent years, the usage of application systems using a database management system has become more sophisticated, and there is an increasing need to provide services without interruption for 24 hours. Therefore, the suspension of the system has a great influence on the service, and it is desired to provide a database management system that can be maintained and managed without stopping the operation of the system. For example, when an error in a program that was not found at the start of system operation is discovered during operation, the incorrect part is corrected without stopping the system. In addition, system operation such that the system operation rate during operation gradually increases,
Furthermore, it is desirable that new modules can be added while the system is operating when new hardware needs to be added as the database grows in size and software accompanying it must be added. ing.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、従来の
データベース管理システムは、システム運用中にモジュ
ール、特に、ソフトウェアモジュールを入れ替えること
は考慮されておらず、モジュールの入れ替えや、追加・
削除を行うためにはシステムを停止しなければならな
い。これは、単に従来のデータベース管理システムがコ
ンパイル方式で実現されていたことに起因するのではな
く、例えインタープリタ方式で実現されたとしてもモジ
ュールを入れ替える契機を知る手段がない。さらに、モ
ジュールを入れ替えた前後で、処理に矛盾を生じないこ
とを保証できないことが大きな要因である。
However, the conventional database management system does not consider replacing modules, particularly software modules, during system operation, and does not replace or add modules.
The system must be stopped to perform the deletion. This is not simply due to the fact that the conventional database management system is realized by the compile method, and even if it is realized by the interpreter method, there is no means for knowing the trigger for replacing the module. Furthermore, it is a major factor that it cannot be guaranteed that there will be no inconsistency in processing before and after the modules are replaced.

【0009】通常、データベース管理システムは、複数
のトランザクションを並行処理していることから、トラ
ンザクションの実行処理過程でモジュールが入れ替わる
と処理に矛盾が生じる可用性がある。従って、従来のデ
ータベース管理システムはモジュールを入れ替えようと
すると、実行中の全トランザクションの実行完了を待た
なければならず、システムの運用を停止するか、あるい
は、運用停止と同程度のサービス低下を避けることがで
きない。
Since a database management system normally processes a plurality of transactions in parallel, there is availability that a process becomes inconsistent when modules are replaced in the transaction execution process. Therefore, when the conventional database management system tries to replace the modules, it has to wait for the completion of execution of all the transactions being executed, and stops the operation of the system, or avoids the service degradation equivalent to the operation stop. I can't.

【0010】以上示したように、従来のデータベース管
理システムは、モジュールの1つに後から誤りが発見さ
れた場合には、複数の機能モジュールで構成されたとし
ても、データベース管理システムを停止させて、モジュ
ールの入れ替え操作を行わなければならないという問題
がある。
As described above, in the conventional database management system, if an error is found later in one of the modules, the database management system is stopped even if it is composed of a plurality of functional modules. However, there is a problem that the module replacement operation must be performed.

【0011】また、データベースの容量が大きくなっ
て、既存のディスク装置では格納できなくなり、新規の
ディスク装置を追加する場合や、システムの構成要素を
変更する場合にもサービスを中断して、対応するモジュ
ールの追加や入れ替えを行い、システム構成を変更しな
ければならないという問題もある。
Also, the capacity of the database becomes so large that it cannot be stored in the existing disk device, and when the new disk device is added or the system components are changed, the service is interrupted and dealt with. There is also the problem that the system configuration must be changed by adding or replacing modules.

【0012】本発明は上記の点に鑑みなされたもので、
データベース管理システムの可用性を高め、24時間無
中断でシステムを運用するには、システムを停止せずに
モジュールの追加・削除や入れ替えを行うことが可能な
データベース管理システムの構成方法を提供することを
目的とする。
The present invention has been made in view of the above points,
In order to increase the availability of the database management system and operate the system without interruption for 24 hours, it is necessary to provide a method for configuring the database management system that enables addition / deletion or replacement of modules without stopping the system. To aim.

【0013】[0013]

【課題を解決するための手段】図1は本発明の原理説明
図を示す。
FIG. 1 shows the principle of the present invention.

【0014】本発明は、トランザクションの実行を制御
するトランザクション実行部と、該トランザクション実
行部の制御を受けて、トランザクションの処理を行う複
数のモジュールからなるモジュール群とで構成されたデ
ータベース管理システムにおいて、データベース管理シ
ステムを構成している個々のモジュールの使用状況を管
理するモジュール管理部を具備し、モジュール管理部に
おいて、個々のモジュールを単位としてトランザクショ
ンの実行開始時、あるいは、トランザクションがモジュ
ールの使用を開始した時点(ステップ1)で、トランザ
クションが該モジュールを使用している情報を登録情報
としてモジュール管理部に登録し(ステップ2)、トラ
ンザクションの実行終了時(ステップ3)、あるいは、
該トランザクションが該モジュールの使用を終了した時
点で(ステップ3)、トランザクションが使用している
状況を登録している該登録情報をモジュール管理部より
除去し(ステップ4)、トランザクションを実行してい
る過程で、新規のモジュールの追加、あるいは、使用さ
れていないモジュールの少なくとも1個を削除あるい
は、他に予め用意したモジュールと置換する(ステップ
5)。
According to the present invention, there is provided a database management system comprising a transaction execution unit for controlling the execution of a transaction and a module group composed of a plurality of modules for processing the transaction under the control of the transaction execution unit, It is equipped with a module management unit that manages the usage status of the individual modules that make up the database management system. At the module management unit, when the execution of a transaction is started for each module, or the transaction starts using the module. At the point of time (step 1), the information that the transaction is using the module is registered in the module management unit as registration information (step 2), and at the end of the execution of the transaction (step 3), or
When the transaction finishes using the module (step 3), the registration information that registers the status used by the transaction is removed from the module management unit (step 4), and the transaction is executed. In the process, a new module is added, or at least one of the unused modules is deleted or replaced with another previously prepared module (step 5).

【0015】[0015]

【作用】本発明のデータベース管理システムは、トラン
ザクションの実行を制御するトランザクション実行部と
トランザクション実行部の制御を受けてトランザクショ
ンの処理を行う複数のモジュールからなるモジュール群
とで構成したデータベース管理システムに、個々のモジ
ュールの使用状況を管理するモジュール管理部を備え
て、トランザクションがモジュールの使用を開始した時
点で、モジュール使用を登録し、トランザクションの実
行終了時あるいは、トランザクジョンがモジュール使用
を終了した時に、トランザクションがモジュールを使用
していた情報をモジュール管理部より除去することによ
り、実行中即ち、コミットかロールバック処理によって
トランザクションの終了が宣言される前のトランザクシ
ョンが使用しているモジュールの使用状況を把握できる
ことから、運用中のデータベース管理システムを構成す
る複数のモジュール内で、現在使用されていないモジュ
ールを検出することができる。従って、削除あるいは置
換しようとするモジュールが使用されていない状態にな
るのを検出して、未使用状態にあるモジュールを削除あ
るいは、他のモジュールと置換する。
The database management system of the present invention is a database management system comprising a transaction execution unit for controlling the execution of a transaction and a module group consisting of a plurality of modules for processing transactions under the control of the transaction execution unit. It has a module management unit that manages the usage status of individual modules, registers module usage when a transaction starts using the module, and when transaction execution ends or transaction ends module usage, By removing the information that the transaction used the module from the module manager, it is used by the transaction being executed, that is, before the end of the transaction is declared by the commit or rollback process. Because it can grasp the use status of joules, in a plurality of modules constituting a database management system in operation, it is possible to detect the module that is not currently used. Therefore, it is detected that the module to be deleted or replaced is in an unused state, and the unused module is deleted or replaced with another module.

【0016】また、新規のモジュールを追加する場合で
あっても、モジュール追加によって影響を受けるモジュ
ールが存在する場合は、影響を受けるモジュールが未使
用状態にある時にモジュールを追加する。
Further, even when a new module is added, if there is a module affected by the addition of the module, the module is added when the affected module is in the unused state.

【0017】このように、本発明のデータベース管理シ
ステムはトランザクション処理を実行している時に、モ
ジュールの追加、削除或いは、置換を行うことができ、
システムを停止させる回数と時間を削減できる。
As described above, the database management system of the present invention can add, delete, or replace modules while executing transaction processing.
The number of times and the time to stop the system can be reduced.

【0018】[0018]

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

【0019】図2は本発明の一実施例のデータベース管
理システムの構成図である。データベース管理システム
1は、通常端末装置等から入力されたトランザクション
の実行を認可し、複数の認可されたトランザクションの
実行をスケジューリングするトランザクション実行部2
と、データベース管理システムを構成するモジュール群
M1〜M7のモジュール群4と、該モジュール群をモジ
ュール管理表で管理するモジュール管理部3より構成さ
れる。
FIG. 2 is a block diagram of a database management system according to an embodiment of the present invention. The database management system 1 normally authorizes the execution of a transaction input from a terminal device or the like, and schedules the execution of a plurality of authorized transactions.
And a module group 4 of module groups M1 to M7 forming the database management system, and a module management section 3 for managing the module group with a module management table.

【0020】モジュール群4は、例えば、一般に並行処
理制御モジュール、ディスク入出力モジュール、バッフ
ァ管理モジュール等で構成され、トランザクション実行
部2を含めてモジュールとして管理する場合もある。
The module group 4 is generally composed of, for example, a parallel processing control module, a disk input / output module, a buffer management module, etc., and may be managed as a module including the transaction execution unit 2.

【0021】図3は本発明の一実施例のモジュール管理
部を構成するモジュール管理表の例である。モジュール
管理表は、データベース管理システムを構成するモジュ
ールを識別するモジュール識別子と、そのモジュールを
現在使用しているトランザクションの識別子とを登録し
て管理する表である。
FIG. 3 is an example of a module management table that constitutes a module management unit according to an embodiment of the present invention. The module management table is a table for registering and managing a module identifier that identifies a module that constitutes the database management system and an identifier of a transaction that is currently using the module.

【0022】図3の例において、現在トランザクション
T1からトランザクションT3の3個のトランザクショ
ンが実行されている。トランザクションT1は、モジュ
ールM1,M3,M5を使用しており、トランザクショ
ンT2は、モジュールM2,M3を、トランザクション
T3は、モジュールM5,M6,M7を使用している。
モジュールM4はどのトランザクションも使用していな
い。
In the example of FIG. 3, three transactions, transaction T1 to transaction T3, are currently being executed. The transaction T1 uses modules M1, M3, M5, the transaction T2 uses modules M2, M3, and the transaction T3 uses modules M5, M6, M7.
Module M4 is not using any transactions.

【0023】以下に、トランザクションの実行過程を追
って、モジュール管理表への登録、削除処理の手順を説
明する。図4は本発明の一実施例のトランザクションの
実行過程とモジュールの登録・削除を説明するためのフ
ローチャートである。
The procedures of registration and deletion in the module management table will be described below by following the execution process of transactions. FIG. 4 is a flow chart for explaining a transaction execution process and module registration / deletion according to an embodiment of the present invention.

【0024】ステップ41: トランザクションが、ト
ランザクション実行部2に入力される。
Step 41: The transaction is input to the transaction execution unit 2.

【0025】ステップ42: トランザクション実行部
2は、利用が認められているユーザであり、アクセス権
利のあるデータベースに対する操作であれば、トランザ
クションの実行を認可する。一方、利用が認められてい
ないユーザが不正にデータベースを操作する場合や、ア
クセス権利のないデータベースに対する操作である場合
には、トランザクションの実行は認可しない。
Step 42: The transaction execution unit 2 is a user who is authorized to use the transaction, and authorizes the execution of the transaction if the operation is for a database that has access rights. On the other hand, if a user who is not authorized to use the database operates it illegally or if it is an operation on a database for which there is no access right, transaction execution is not authorized.

【0026】ステップ43: 認可されたトランザクシ
ョンが処理内容に応じてデータベース管理システムを構
成するモジュールを利用して操作を行う。モジュールを
使用する際には、トランザクション実行部2は、モジュ
ール管理部3に対して、使用するモジュールの識別子と
自トランザクションの識別子を送付する。例えば、図3
の場合にはトランザクションT1はモジュール識別子M
1とトランザクション識別子T1をモジュール管理部3
に送付する。
Step 43: The authorized transaction operates according to the processing contents by using the module constituting the database management system. When using a module, the transaction execution unit 2 sends the module management unit 3 the identifier of the module to be used and the identifier of its own transaction. For example, in FIG.
, The transaction T1 is a module identifier M
1 and the transaction identifier T1 to the module management unit 3
To send to.

【0027】ステップ44: モジュール管理部3は、
トランザクション実行部2から送付されたモジュール識
別子とトランザクション識別子の組(M1,T1)から
トランザクションが初めてモジュールを使用するのか、
2回目以降に同一モジュールを使用するのかを確認す
る。
Step 44: The module management section 3
Whether the transaction uses the module for the first time from the combination of the module identifier and the transaction identifier (M1, T1) sent from the transaction execution unit 2,
Confirm whether to use the same module after the second time.

【0028】ステップ45: トランザクションが初め
てモジュールを使用する場合には、モジュール管理表の
対応する位置にモジュールが使用状態にあることを登録
する。また、モジュール管理部3が、同一のモジュール
に対して2回目以降、その使用要求を受け取った場合に
は、特にモジュール管理表に登録等の操作は行わない。
Step 45: If the transaction uses the module for the first time, register that the module is in use at the corresponding position in the module management table. Further, when the module management unit 3 receives a usage request for the same module from the second time onward, no particular operation such as registration in the module management table is performed.

【0029】ステップ46: モジュール管理部3は、
要求されたモジュールが使用可能な状況であるか、また
は、モジュールの入れ替え操作等によって、要求された
モジュールが使用可能な状況にない場合は、モジュール
の使用を待たせる。
Step 46: The module management section 3
If the requested module is in a usable state, or if the requested module is not in a usable state due to a module replacement operation or the like, use of the module is made to wait.

【0030】ステップ47: トランザクションを実行
する(例えば、トランザクションT1はモジュールM1
で処理を実行する)。
Step 47: Execute transaction (eg transaction T1 is module M1)
To execute the process).

【0031】ステップ48: トランザクションは、実
行が全て完了するとトランザクションのコミット操作あ
るいは、ロールバック操作を行う。
Step 48: The transaction performs a commit operation or a rollback operation of the transaction when all the executions are completed.

【0032】ステップ49: モジュール管理部3は、
トランザクションによるモジュールの使用情報を削除す
る。即ち、トランザクション実行部2は、個々のトラン
ザクションがコミット操作あるいは、ロールバック操作
を行うことを、トランザクション識別子と共に、モジュ
ール管理部3に送付する。これにより、モジュール管理
部3は、モジュール管理表から当該トランザクションが
使用していたモジュールの登録情報を削除する。
Step 49: The module management section 3
Delete the usage information of the module by the transaction. That is, the transaction execution unit 2 sends to the module management unit 3 together with the transaction identifier that each transaction performs a commit operation or a rollback operation. As a result, the module management unit 3 deletes the registration information of the module used by the transaction from the module management table.

【0033】以上の操作により、実行中のトランザクシ
ョンが使用しているモジュールは、そのトランザクショ
ンの実行が終了するまで、即ち、トランザクションが、
コミットかロールバックするまで、モジュール管理表に
モジュール毎に登録されている。
By the above-mentioned operation, the module used by the transaction being executed continues until the execution of the transaction is completed, that is, the transaction is
Each module is registered in the module management table until it is committed or rolled back.

【0034】一旦終了したトランザクションは、同一の
トランザクション識別子でモジュールを使用する事はな
いので、トランザクション終了時点でモジュールの使用
情報をモジュール管理部3のモジュール管理表より削除
する(トランザクションT1はモジュール管理部3より
削除される)。
Since a transaction that has ended once does not use the module with the same transaction identifier, the usage information of the module is deleted from the module management table of the module management unit 3 at the end of the transaction (transaction T1 is the module management unit. 3 will be deleted).

【0035】次にモジュールの入れ替え手順を示す。Next, the procedure for replacing the modules will be described.

【0036】データベースを操作する通常のトランザク
ションは、データベース管理システムを構成するモジュ
ールを読み出し専用で利用している。即ち、通常のトラ
ンザクションは、モジュールの内容を変更することはな
い。これに対して、モジュールの入れ替え、或いは、追
加、削除は、モジュールの内容を変更する操作として扱
うことができる。そこで、データベース処理における並
行処理制御で多用されているモジュールを他のトランザ
クションと共用する共用ロックとモジュールを他のトラ
ンザクションとは排他的に使用する排他ロックを用いた
2相ロック法を用いてモジュールの入れ替え操作を矛盾
なく実行する方法を示す。
A normal transaction for operating a database uses a read-only module that constitutes a database management system. That is, a normal transaction does not change the contents of the module. On the other hand, module replacement, addition, or deletion can be handled as an operation for changing the content of the module. Therefore, the two-phase lock method is used, which uses a shared lock that shares a module that is frequently used in parallel processing control in database processing with other transactions and an exclusive lock that uses the module exclusively with other transactions. Shows how to perform a swap operation consistently.

【0037】一般に複数のトランザクションを並行して
処理しているデータベース管理システムは、入れ替えよ
うとするモジュールが未使用状態にあることを保証する
ために、モジュールの入れ替えを行う操作もデータベー
ス処理におけるトランザクションと同様に扱い、2相ロ
ック法の処理対象とすることができる。
In general, in a database management system which processes a plurality of transactions in parallel, the operation for replacing the module is also a transaction in the database processing in order to guarantee that the module to be replaced is in an unused state. It can be treated in the same manner and can be processed by the two-phase lock method.

【0038】上述の考え方によれば、通常のトランザク
ションは、モジュールをその使用時に共用ロックし、モ
ジュール使用終了時、即ちコミットかロールバック時に
共用ロックを解除する。一方、モジュールを交換するト
ランザクションは、交換対象とするモジュールに排他ロ
ックを掛ける。即ち、通常トランザクションがモジュー
ルを使用していない(共用ロックを掛けていない)場合
に、当該モジュールを入れ替える操作を排他的に行い、
モジュールの入れ替えが完了した時点で排他ロックを解
除する。
According to the above idea, a normal transaction locks a module when it is used, and releases the shared lock when the module is used, that is, when it is committed or rolled back. On the other hand, in a transaction for exchanging modules, an exclusive lock is applied to the modules to be exchanged. That is, when a normal transaction does not use a module (does not have a shared lock), the operation to replace the module is exclusively performed,
The exclusive lock is released when the replacement of modules is completed.

【0039】図3の例では、モジュールを入れ替えるト
ランザクションは1つであると仮定して、通常トランザ
クションがロックする共用ロックについてもに表示して
いる。同図の例では、現在モジュールM4だけが通常の
トランザクションによって使用されていない。この時、
トランザクションはモジュールM4に排他ロックを掛け
てモジュールの入れ替えを行うことができる。図4のフ
ローチャートのステップ36のトランザクションの実行
過程で示した、要求されたモジュールが使用可能な状況
ない場合とは、モジュールを入れ替えるトランザクショ
ンによって、当該モジュールに排他ロックが掛けられた
状態であり、入れ替えが完了して、排他ロックが解除さ
れるまで、当該モジュールの使用要求は待機する。入れ
替えを行うモジュールの新旧2つのバージョンは、シス
テム内に共存して配置しておくことができる。排他ロッ
ク期間中に必要な処理は、図3に示したモジュール管理
表を書き換える操作だけに限定できるため、この操作は
極めて短時間で行うことができ、通常のトランザクショ
ンの実行に与える影響は小さい。
In the example of FIG. 3, assuming that there is only one transaction that replaces a module, a shared lock that a normal transaction locks is also shown in. In the example of the figure, only the module M4 is not currently used by a normal transaction. At this time,
A transaction can switch modules by locking the module M4 exclusively. The case where the requested module is not available, which is shown in the process of executing the transaction in step 36 of the flowchart of FIG. 4, means that the module is locked by the transaction for exchanging the module, and the module is exchanged. Is completed and the exclusive lock is released, the usage request of the module waits. The two versions, old and new, of the module to be swapped can coexist in the system. Since the processing required during the exclusive lock period can be limited to the operation of rewriting the module management table shown in FIG. 3, this operation can be performed in an extremely short time, and the influence on the execution of a normal transaction is small.

【0040】以下にモジュールの入れ替えの手順につい
て説明する。
The procedure for replacing the modules will be described below.

【0041】図5は本発明の一実施例のモジュールの入
れ替え手順を示すフローチャートである。 ステップ51: 新しい(入れ替える)モジュールをメ
モリ上にロードする。 ステップ52: モジュール管理表上で、古い(入れ替
えられる)モジュールに排他ロックを掛ける。通常トラ
ンザクションが使用しているロックが確保できない場合
は、ロックできるまでこの段階で待機する。 ステップ53: モジュール管理部3のモジュール管理
表の管理情報を更新する。 ステップ54: ステップ52で確保した排他ロックを
開放する。 ステップ55: 古いモジュールを削除する。
FIG. 5 is a flow chart showing a procedure for replacing modules according to an embodiment of the present invention. Step 51: Load a new (replacement) module into memory. Step 52: Put an exclusive lock on the old (replaced) module on the module management table. If the lock used by a normal transaction cannot be acquired, wait at this stage until the lock can be acquired. Step 53: Update the management information in the module management table of the module management unit 3. Step 54: Release the exclusive lock secured in Step 52. Step 55: Delete the old module.

【0042】なお、以上のように、本発明の実施例で
は、トランザクションが実際に、モジュールの使用を開
始する時点で、モジュール管理部3にモジュールの使用
を登録する方法を示したが、この例に限定されることな
く、トランザクション実行部2がトランザクションの実
行を認可した時点で、実行に必要なモジュールを判定し
て、一括してモジュールの使用をモジュール管理部3の
モジュール管理表に登録することもできる。この場合に
は、同時に複数のモジュールに対して共用ロックを確保
することになる。
As described above, in the embodiment of the present invention, the method of registering the use of the module in the module management unit 3 at the time when the transaction actually starts the use of the module has been described. The module required for execution is determined when the transaction execution unit 2 authorizes the execution of the transaction, and the use of the module is collectively registered in the module management table of the module management unit 3. You can also In this case, a shared lock is secured for a plurality of modules at the same time.

【0043】また、上記の実施例では、トランザクショ
ン終了時、即ち、コミットかロールバック時に、モジュ
ール管理部3のモジュール管理表からモジュール使用中
の情報(共用ロックに相当)を削除する例を示したが、
モジュールの使用が終了した時点で、モジュール使用中
の情報を削除することもできる。
Further, in the above-mentioned embodiment, an example in which the information on the module being used (corresponding to the shared lock) is deleted from the module management table of the module management unit 3 at the end of the transaction, that is, at the time of commit or rollback is shown. But,
When the use of the module is finished, the information on the use of the module can be deleted.

【0044】さらに、データベース管理システムを構成
するモジュール単位と入れ替えや削除する単位が違う場
合でも、複数のモジュールに対して排他ロックを掛ける
ことで矛盾なく、複数のモジュールを一度に置き換える
ことができる。
Further, even if the module unit constituting the database management system is different from the unit to be replaced or deleted, it is possible to replace a plurality of modules at once without conflict by locking the plurality of modules exclusively.

【0045】また、2相ロック法以外の並行処理制御方
法として、タイムスタンプを用いる方法でも、更新を行
うトランザクションと読み出しを行うトランザクション
の間で直列可能性を満たすことを保証できる並行処理制
御方法であれば、モジュールの入れ替えを更新を行うト
ランザクションに割り当て、通常のトランザクション処
理を読み出しを行うトランザクションに割り当てること
で、本発明における通常のトランザクション実行中のモ
ジュール置き換えを実現できる。
As a parallel processing control method other than the two-phase lock method, a method using a time stamp is also a parallel processing control method capable of guaranteeing that seriality is satisfied between a transaction for updating and a transaction for reading. If so, the module replacement during the execution of the normal transaction according to the present invention can be realized by allocating the module replacement to the transaction for updating and the normal transaction processing for the transaction for reading.

【0046】さらに、本実施例では、モジュールの入れ
替え方法について述べたが、新規モジュールの追加や既
存モジュールの削除についても同様に、追加や削除を行
う処理を更新を行うトランザクションに割り当て、通常
のトランザクション処理を読み出しを行うトランザクシ
ョンに割り当てることで実現できる。
Further, in the present embodiment, the method of replacing the modules has been described. Similarly, for the addition of a new module or the deletion of an existing module, the processing for adding or deleting is assigned to the transaction for updating, and a normal transaction is performed. It can be realized by assigning the process to the transaction for reading.

【0047】[0047]

【発明の効果】上述のように本発明によれば、複数のモ
ジュールで構成されたデータベース管理システムにおい
て、トランザクション処理を実行している過程で、モジ
ュールの追加・削除あるいは、置換を行うことが実現さ
れ、システムを停止する回数と時間を大幅に削減でき
る。
As described above, according to the present invention, in a database management system composed of a plurality of modules, it is possible to add, delete, or replace modules in the process of executing transaction processing. Therefore, the number of times the system is stopped and the time can be significantly reduced.

【0048】さらに、データベース管理システムを運用
中にシステム構成を変更できるため、システムの可用性
を大幅に向上できる。
Furthermore, since the system configuration can be changed during operation of the database management system, the availability of the system can be greatly improved.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】本発明の一実施例のデータベース管理システム
の構成図である。
FIG. 2 is a configuration diagram of a database management system according to an embodiment of the present invention.

【図3】本発明の一実施例のモジュール管理部を構成す
るモジュール管理表の例を示す図である。
FIG. 3 is a diagram showing an example of a module management table forming a module management unit according to an embodiment of the present invention.

【図4】本発明の一実施例のトランザクションの実行過
程とモジュールの登録・削除を説明するためのフローチ
ャートである。
FIG. 4 is a flowchart illustrating a transaction execution process and module registration / deletion according to an embodiment of the present invention.

【図5】本発明の一実施例のモジュールの入れ替え手順
を示すフローチャートである。
FIG. 5 is a flowchart showing a module replacement procedure according to an embodiment of the present invention.

【符号の説明】 1 データベース管理システム 2 トランザクション実行部 3 モジュール管理部 4 モジュール群[Explanation of symbols] 1 database management system 2 transaction execution unit 3 module management unit 4 module group

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 トランザクションの実行を制御するトラ
ンザクション実行部と、該トランザクション実行部の制
御を受けて、トランザクションの処理を行う複数のモジ
ュールからなるモジュール群とで構成されたデータベー
ス管理システムにおいて、 データベース管理システムを構成している個々のモジュ
ールの使用状況を管理するモジュール管理部を具備し、 該個々のモジュールを単位としてトランザクションの実
行開始時、あるいは、トランザクションがモジュールの
使用を開始した時点で、該トランザクションが該モジュ
ールを使用している情報を登録情報として該モジュール
管理部に登録し、 該トランザクションの実行終了時、あるいは、該トラン
ザクションが該モジュールの使用を終了した時点で、該
トランザクションが使用している状況を登録している該
登録情報を該モジュール管理部より除去し、 該トランザクションを実行している過程で、新規のモジ
ュールの追加、あるいは、使用されていないモジュール
の少なくとも1個を削除あるいは、他に予め用意したモ
ジュールと置換することを特徴とするデータベース管理
システムの構成方法。
1. A database management system comprising a transaction execution unit for controlling the execution of a transaction and a module group composed of a plurality of modules for performing transaction processing under the control of the transaction execution unit. The system includes a module management unit that manages the usage status of the individual modules that make up the system, and when the execution of a transaction is started for each individual module or when the transaction starts using the module, the transaction Registers the information using the module in the module management unit as registration information, and the transaction is used by the transaction at the end of execution of the transaction or when the transaction finishes using the module. The registered information that has registered the existing status is removed from the module management unit, and in the process of executing the transaction, a new module is added, or at least one of the unused modules is deleted, or A method for configuring a database management system, characterized in that it is replaced with a module prepared in advance.
JP4077046A 1992-03-31 1992-03-31 Method for constituting data base management system Pending JPH05282186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4077046A JPH05282186A (en) 1992-03-31 1992-03-31 Method for constituting data base management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4077046A JPH05282186A (en) 1992-03-31 1992-03-31 Method for constituting data base management system

Publications (1)

Publication Number Publication Date
JPH05282186A true JPH05282186A (en) 1993-10-29

Family

ID=13622841

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4077046A Pending JPH05282186A (en) 1992-03-31 1992-03-31 Method for constituting data base management system

Country Status (1)

Country Link
JP (1) JPH05282186A (en)

Similar Documents

Publication Publication Date Title
JP2566717B2 (en) Conditional operation providing apparatus and method
US6282700B1 (en) Mechanism for maintaining revisions of objects in flash memory
JPH0728679A (en) Locking system of checkin/checkout model
US8087027B2 (en) Computer program product and system for deferring the deletion of control blocks
KR101623631B1 (en) Cache memory structure and method
CN110377614B (en) Order processing lock system under distributed environment
JPH1063557A (en) Distributed file synchronization system
JPH05307478A (en) Constituting method for data base management system
JPH05282186A (en) Method for constituting data base management system
JP3970524B2 (en) Exclusive control method between multiple operations
JPH08129492A (en) Resource exclusion checking system and resource exclusion checking method
JP3330006B2 (en) Network system including information storage system, input system of the system, and
JP2004295272A (en) Transaction control method
JP2610926B2 (en) Transaction control method
JPH1091405A (en) Software maintenance method
JPH04199339A (en) Distributed transaction file control method for distributed processing system
JPH09269912A (en) Information processing method and information processor
JPH03123946A (en) Exclusive control method for data base
JP3608206B2 (en) Private branch exchange
JPH0430220A (en) Maintenance system for software
JP3575236B2 (en) Database exclusive control method and system and storage medium storing database exclusive control program
JPS63196956A (en) File exclusion system
JPS61220036A (en) Method for controlling plural operation systems
JPH08129501A (en) Reservation access processing method for data base
JPH0398128A (en) Serial number control system