JPH0512094A - Transaction managing device - Google Patents

Transaction managing device

Info

Publication number
JPH0512094A
JPH0512094A JP3192553A JP19255391A JPH0512094A JP H0512094 A JPH0512094 A JP H0512094A JP 3192553 A JP3192553 A JP 3192553A JP 19255391 A JP19255391 A JP 19255391A JP H0512094 A JPH0512094 A JP H0512094A
Authority
JP
Japan
Prior art keywords
transaction
user
database
terminal
long time
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
JP3192553A
Other languages
Japanese (ja)
Inventor
Tatsuki Nishimoto
竜樹 西本
Takashi Ono
隆 大野
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.)
Shimadzu Corp
Original Assignee
Shimadzu 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 Shimadzu Corp filed Critical Shimadzu Corp
Priority to JP3192553A priority Critical patent/JPH0512094A/en
Publication of JPH0512094A publication Critical patent/JPH0512094A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To shorten the waiting time of another terminal by transmitting an answer signal for negating the execution of a transaction to another user's terminal together with a message of a fact being in the course of lock in the case of outputting a transaction from other user when the transaction is locked extending over a long period. CONSTITUTION:A register R provided on the inside of a transaction managing device 5 sets an ID number transmitted from a terminal which necessitates a lock for a long time, and a flag register FR registers a fact of a locking state of a long time. In such a state, when the transaction from respective terminals A-C is received, the bit of the flag register FR is confirmed, and in the case of the transaction of a long time, the fact of a locking state is transmitted to a user's terminal.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、データベースに対す
る複数のユーザーからのトランザクションを管理するた
めの装置に関する。
FIELD OF THE INVENTION This invention relates to an apparatus for managing transactions from multiple users to a database.

【0002】[0002]

【従来の技術】ユーザーがデータベースに対して行う仕
事をトランザクション(transaction)という。広くはデ
ータベースに対するデータ検索などの処理要求、そして
処理の実行、処理の終了確認までの一連の動作のことを
いい、狭くは処理要求そのものを指していう。本明細書
においても、トランザクションとはデータベースに対す
る処理要求、あるいは処理そのもののことをいい、トラ
ンザクションを受け取る、トランザクションを実行す
る、といった具合に用いる。データベースは複数のユー
ザーがデータを共有する目的で作成されるものであるか
ら、各ユーザーからのトランザクションはランダムに発
生する。そこで、これらのトランザクションを管理して
順次実行に移す装置がデータベースに付随している。以
下に図3を参照して従来のトランザクション管理につい
て説明する。
2. Description of the Related Art The work performed by a user on a database is called a transaction. Broadly, it refers to a processing request such as data search for a database, and a series of operations from execution of processing to confirmation of completion of processing, and narrowly refers to the processing request itself. In this specification as well, a transaction means a processing request to a database or processing itself, and is used to receive a transaction, execute a transaction, and the like. Since the database is created for the purpose of sharing data among multiple users, transactions from each user occur randomly. Therefore, a device for managing these transactions and sequentially executing them is attached to the database. The conventional transaction management will be described below with reference to FIG.

【0003】トランザクションの管理は、データベース
1へのアクセスを行うデータベース管理部2によって行
われており、このデータベース管理部2をインターフェ
イスとして、ユーザー側に備えられている各コンピュー
タ端末機A,B,C(以下、単に端末A,B,Cで表
す)と、データベース1とがデータ通信回線3を介して
相互に接続されている。いま、端末Aから出力されるト
ランザクションをTR1とし、端末Bから出力されるト
ランザクションをTR2,端末Cから出力されるトラン
ザクションをTR3とする。
Transaction management is performed by a database management unit 2 that accesses the database 1. Using this database management unit 2 as an interface, each computer terminal A, B, C provided on the user side. (Hereinafter, simply referred to as terminals A, B, and C) and the database 1 are connected to each other via a data communication line 3. Now, let us say that the transaction output from the terminal A is TR1, the transaction output from the terminal B is TR2, and the transaction output from the terminal C is TR3.

【0004】データベース管理部2は、受け取った順に
トランザクションを実行していくが、例えば、トランザ
クションTR1を実行中に、端末B,Cからトランザク
ションTR2,TR3が出力されると、これらのトラン
ザクションTR2,TR3を受け取った後、一旦バッフ
ァ4に蓄えておく。そして、トランザクションTR1を
終了したのちにバッファ4内のトランザクションTR
2,TR3を順次処理していく。
The database management unit 2 executes the transactions in the order in which they are received. For example, when the transactions TR2 and TR3 are output from the terminals B and C during the execution of the transaction TR1, these transactions TR2 and TR3 are output. After receiving, it is temporarily stored in the buffer 4. Then, after the transaction TR1 is completed, the transaction TR in the buffer 4 is
2 and TR3 are sequentially processed.

【0005】これは、データベース1に対してあるユー
ザーがデータの登録や変更等を行っている最中に、他の
ユーザーからのトランザクションを実行すると、その登
録場所や変更等に狂いが生じるからである。したがっ
て、トランザクションTR1を実行している間は、その
トランザクションTR1を出力した端末Aのみにデータ
ベース1を渡して占有させ、その他の端末B,Cを待ち
状態にする。これをトランザクションのロック状態とい
い、複数のユーザーからのトランザクションを管理する
ためには必要な処理の1つである。
This is because if a user executes a transaction from another user while a user is registering or changing data in the database 1, the registration location or change will be wrong. is there. Therefore, while the transaction TR1 is being executed, the database 1 is passed to and occupied by only the terminal A that has output the transaction TR1, and the other terminals B and C are placed in a waiting state. This is called a transaction lock state, and is one of the processes required to manage transactions from multiple users.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、トラン
ザクションのロック状態が長時間に及ぶ場合、例えば、
膨大な量のデータを一括してデータベース1に登録する
ときや、データベース1内のデータを変更するときで
は、その他の端末の待ち時間も長時間に及び、その間に
他の仕事を行うことができず、作業効率が低下するとい
う不都合がある。
However, when the transaction lock state is long, for example,
When enormous amounts of data are collectively registered in the database 1 or when data in the database 1 is changed, the waiting time of other terminals can be long and other work can be performed in the meantime. Therefore, there is an inconvenience that work efficiency is reduced.

【0007】通常、ユーザーは端末に向かってあるプロ
グラムを実行させながら、その傍らで必要に応じてデー
タベース1にアクセスしていく。すなわち、データベー
ス1に対するトランザクションは、そのプログラムの実
行中にオペレータの意志によって任意に発生する「割り
込み処理」である。したがって、トランザクションが終
了するまでは、実行中のプログラムは中断されたままと
なり、上記の不都合を招いている。
[0007] Normally, a user accesses a database 1 as needed while executing a certain program toward a terminal. That is, the transaction with respect to the database 1 is an "interrupt process" arbitrarily generated by the operator's intention during the execution of the program. Therefore, the program being executed remains suspended until the end of the transaction, resulting in the above inconvenience.

【0008】この発明はこのような事情に鑑みてなされ
たものであって、トランザクションのロック状態が長時
間にわたる場合に、他の端末の待ち時間を無くしてその
作業効率を向上させるトランザクション管理装置を提供
することを目的とする。
The present invention has been made in view of the above circumstances, and provides a transaction management apparatus for improving the work efficiency by eliminating the waiting time of other terminals when the transaction lock state is long. The purpose is to provide.

【0009】[0009]

【課題を解決するための手段】この発明は、上記目的を
達成するために次のような構成をとる。すなわち、この
発明は、データベースに対するユーザーからのトランザ
クションを実行している間は他のユーザーからのトラン
ザクションの実行を禁止する(トランザクションをロッ
クする)トランザクション管理装置において、前記トラ
ンザクションのロックが長時間に及ぶものか否かを判断
する第1の判断手段と、前記第1の判断手段で長時間の
ロックが判断された場合に、前記他のユーザーからのト
ランザクションが出力されたことを判断する第2の判断
手段と、前記第2の判断手段の判断に基づいて、他のユ
ーザーのコンピュータ端末機に対しトランザクションが
ロック中であることのメッセージと、トランザクション
の実行を否定する応答信号とを送信する送信手段とを備
えたことを特徴とする。
In order to achieve the above object, the present invention has the following constitution. That is, the present invention is a transaction management device that prohibits execution of transactions from other users (locks transactions) while executing transactions from users to the database, and locks the transactions for a long time. A first judging means for judging whether the transaction is from the other user, and a second judging means for judging that a transaction from the other user is output when a lock for a long time is judged by the first judging means. Based on the judgment means and the judgment of the second judgment means, a transmission means for transmitting a message indicating that the transaction is locked to the computer terminal of another user and a response signal for denying the execution of the transaction. It is characterized by having and.

【0010】[0010]

【作用】この発明の構成による作用は、次のとおりであ
る。あるユーザーがデータベースに対してトランザクシ
ョンを出力すると、トランザクション管理装置はそのユ
ーザーにデータベースを占有させ、他のユーザーからの
トランザクションの実行を禁止する(トランザクション
をロックする)。この際、第1の判断手段がトランザク
ションのロックが長時間に及ぶものか否かを判断し、さ
らに、第2の判断手段がその長時間のロック中に他のユ
ーザーからのトランザクションが出力されたことを判断
する。この第2の判断手段の判断に基づいて送信手段
が、他のユーザーのコンピュータ端末機に対しトランザ
クションがロック中であることのメッセージと、トラン
ザクションの実行を否定する応答信号を送信する。
The function of the present invention is as follows. When a user outputs a transaction to the database, the transaction management device causes the user to occupy the database and prohibits the execution of the transaction by other users (locks the transaction). At this time, the first judging means judges whether the transaction is locked for a long time, and the second judging means outputs a transaction from another user during the long locking. Make a decision. Based on the judgment of the second judging means, the transmitting means transmits a message indicating that the transaction is locked and a response signal denying the execution of the transaction to the computer terminals of other users.

【0011】[0011]

【実施例】以下、この発明の一実施例を図面に基づいて
説明する。図1はこの発明のトランザクション管理装置
を備えたデータベースシステムの概略構成を示したブロ
ック図である。なお、この図において従来例に係る図3
と同じ符号で示しているものは同じ構成部品である。図
示のように、従来はデータベース管理部6の一部機能で
あったトランザクション管理をデータベース管理部2か
ら分離させて、独立した装置として構成している。トラ
ンザクション管理装置5の内部に設けられているレジス
タRは長時間ロックを必要とする端末から送信されてき
たID番号をセットし、フラグレジスタFRは長時間の
ロック状態であることを登録する。以下、図2のフロー
チャートを参照しながらトランザクション管理装置5の
働きについて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of a database system including a transaction management device of the present invention. In addition, in FIG.
Those denoted by the same reference numerals as are the same components. As shown in the figure, transaction management, which has been a partial function of the database management unit 6 in the past, is separated from the database management unit 2 and configured as an independent device. A register R provided inside the transaction management device 5 sets an ID number transmitted from a terminal that requires a long-time lock, and a flag register FR registers that it is in a lock state for a long time. The operation of the transaction management device 5 will be described below with reference to the flowchart of FIG.

【0012】各端末A〜Cからのトランザクションを受
け取ると(ステップS1)、現在、トランザクションが
すでに長時間のロック状態であるかどうかを判断する
(ステップS2)。これはフラグレジスタFRにビット
が立っているかどうかで判断する。長時間のロック状態
であればステップS8に、長時間のロック状態でなけれ
ばステップS3に進む。
When a transaction is received from each of the terminals A to C (step S1), it is judged whether or not the transaction is currently in a locked state for a long time (step S2). This is determined by whether or not the bit is set in the flag register FR. If the locked state is for a long time, the process proceeds to step S8, and if the locked state is not for a long time, the process proceeds to step S3.

【0013】ステップS3では、ステップS1で入力し
たトランザクションが長時間のロックが必要なトランザ
クションであるかどうかの判断を行う。この判断は、ト
ランザクションの種類、すなわち、データベース1に対
する処理要求の種類に応じて判断する。長時間のロック
が必要な処理要求は予め定められており、トランザクシ
ョン管理装置5にはその要求文がすでに登録されてい
る。例えば、全文登録やデータの変更等の処理要求であ
る。トランザクション管理装置5は、ステップS1で入
力した処理要求と、予め登録されている要求文とのマッ
チング処理を行い、マッチングすれば長時間のトランザ
クション、マッチングしなければ短時間のトランザクシ
ョンであると判断する。
In step S3, it is determined whether or not the transaction input in step S1 requires a long-time lock. This determination is made according to the type of transaction, that is, the type of processing request to the database 1. A processing request that requires a long-time lock is determined in advance, and the request statement is already registered in the transaction management device 5. For example, it is a processing request such as full-text registration or data change. The transaction management device 5 performs matching processing between the processing request input in step S1 and a request statement registered in advance, and determines that the transaction is a long transaction if there is a match and a short transaction if there is no match. ..

【0014】長時間のトランザクションであった場合
は、ステップS4に進んで、その他の端末に対してロッ
ク状態になったことのメッセージを送信して、フラグレ
ジスタFRにビットを立てるとともに(ステップS
5)、レジスタRにトランザクションを出力した端末か
らのID番号をセットする(ステップS6)。データベ
ース1に対してアクセスするとき、ユーザーは自身に与
えられているID番号をトランザクションとともに端末
から送信するのが常であり、トランザクション管理装置
5は長時間のロックを必要とするユーザーのID番号を
レジスタRに登録する。そして、ステップS7に進ん
で、トランザクションをデータベース管理部6に渡して
実行する。
If the transaction is for a long time, the process proceeds to step S4, a message indicating that the lock state is set is transmitted to other terminals, and a bit is set in the flag register FR (step S4).
5), the ID number from the terminal that outputs the transaction is set in the register R (step S6). When accessing the database 1, the user usually sends the ID number given to him / her together with the transaction from the terminal, and the transaction management device 5 gives the ID number of the user who needs a long lock. Register in register R. Then, in step S7, the transaction is passed to the database management unit 6 and executed.

【0015】一方、ステップS3で短時間のトランザク
ションであると判断されると(トランザクションがデー
タ検索や一部分の登録のとき)、ステップS7にジャン
プして、データベース管理部6にトランザクションを渡
してこれを実行する。短時間のトランザクションであれ
ば、他の端末の待ち時間もたかが知れているので(大
体、データ検索では数秒ぐらい、これに対し長時間のト
ランザクションでは数分から数十分ぐらい)、従来と同
様にトランザクションを受けた順に実行していく。
On the other hand, when it is determined in step S3 that the transaction is a short time (when the transaction is data retrieval or partial registration), the process jumps to step S7, and the transaction is passed to the database management unit 6 to be processed. Run. Since it is known that the waiting time of other terminals is short if it is a short-time transaction (generally about several seconds for data search, while it is about several minutes to tens of minutes for long-term transaction), the transaction is the same as before. Will be executed in the order received.

【0016】そして、ステップS1にリターンする。仮
に、上記の処理で受け取ったトランザクションが長時間
のロックが必要なトランザクションであったと判断され
た場合、フラグレジスタFRにはビットが立てられてい
るので、次の(2回目の)トランザクションを受け取る
とステップS2からステップS8に進む。
Then, the process returns to step S1. If it is determined that the transaction received in the above process is a transaction that requires a long lock, a bit is set in the flag register FR, so that the next (second) transaction is received. The process proceeds from step S2 to step S8.

【0017】ステップS8では、ロックを行っているユ
ーザーからのトランザクションであるかどうかの判断を
行う。これは、次のトランザクションとともに送られて
きたID番号と、レジスタRにセットされているID番
号とのマッチング処理によって判断する。マッチングす
れば、ロックを行っているユーザーからのトランザクシ
ョンであるとして、ステップS7に進みトランザクショ
ンを実行する。マッチングしなければ、その他のユーザ
ーからのトランザクションであるとしてステップS9に
進む。
In step S8, it is determined whether or not the transaction is from a user who is locking the transaction. This is determined by the matching process between the ID number sent with the next transaction and the ID number set in the register R. If they match, it is determined that the transaction is from the user who is locking, and the process proceeds to step S7 to execute the transaction. If they do not match, the transaction is considered to be from another user and the process proceeds to step S9.

【0018】ステップS9では、要求元、つまり、トラ
ンザクションを出力した端末に対して、ロック中である
ことのメッセージを送信し、次いで、そのトランザクシ
ョンの実行を否定する応答信号を送信する(ステップS
10) 。前述のように、データベース1に対するトランザ
クションは端末にとっての「割り込み処理」であるか
ら、トランザクションが一旦受け取られると、終了する
まで待ち状態に入る。この待ち状態を回避するため、長
時間のロック中であれば、端末の「割り込み処理」を中
断させる信号、例えば、トランザクションを受け取らな
かったという否定的応答信号などを出力する。否定的応
答信号を受け取った端末は、データベース1に対するト
ランザクションを中断して、元のプログラムの実行に戻
る。
In step S9, a message indicating that the transaction is locked is transmitted to the request source, that is, the terminal that has output the transaction, and then a response signal that denies execution of the transaction is transmitted (step S9).
Ten) . As described above, since the transaction to the database 1 is the “interrupt processing” for the terminal, once the transaction is received, it waits until it is completed. In order to avoid this waiting state, if the terminal is locked for a long time, a signal for interrupting the "interrupt processing" of the terminal, for example, a negative response signal that the transaction has not been received is output. The terminal receiving the negative response signal interrupts the transaction to the database 1 and returns to the execution of the original program.

【0019】なお、上述した実施例の構成に加えて、長
時間のロックが解除されたときに、各端末に対してロッ
ク解除のメッセージを出力するようにしてもよい。
In addition to the configuration of the above-mentioned embodiment, a lock release message may be output to each terminal when the lock is released for a long time.

【発明の効果】以上の説明から明らかなように、この発
明のトランザクション管理装置は、トランザクションが
長時間にわたってロックされているときに、他のユーザ
ーからのトランザクションが出されると、ロック中であ
るというメッセージとともにトランザクションの実行を
否定する応答信号を、他のユーザーのコンピュータ端末
機に対して送信するようにしたから、他のユーザーのコ
ンピュータ端末機はデータベースに対するトランザクシ
ョンを中断する。したがって、他のユーザーは長時間の
ロックが解除されるまで待ち続けることなく、コンピュ
ータ端末機上で仕事の続きが行え、その作業効率は向上
する。
As is apparent from the above description, the transaction management device of the present invention is in the lock state when the transaction is locked for a long time and a transaction from another user is issued. Since the response signal denying the execution of the transaction is transmitted to the computer terminal of the other user together with the message, the computer terminal of the other user interrupts the transaction to the database. Therefore, other users can continue their work on the computer terminal without waiting for a long time until the lock is released, and the work efficiency is improved.

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

【図1】この発明のトランザクション管理装置を備えた
データベースシステムの概略的な構成を示すブロック図
である。
FIG. 1 is a block diagram showing a schematic configuration of a database system including a transaction management device of the present invention.

【図2】トランザクション管理装置の機能を示したフロ
ーチャートである。
FIG. 2 is a flowchart showing functions of a transaction management device.

【図3】従来におけるトランザクションの管理を説明す
るデータベースシステムの概略ブロック図である。
FIG. 3 is a schematic block diagram of a database system for explaining conventional transaction management.

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

1・・・データベース 5・・・トランザクション管理装置 A,B,C・・・コンピュータ端末機 1 ... Database 5 ... Transaction Management Device A, B, C ... Computer Terminal

Claims (1)

【特許請求の範囲】 【請求項1】 データベースに対するユーザーからのト
ランザクションを実行している間は他のユーザーからの
トランザクションの実行を禁止する(トランザクション
をロックする)トランザクション管理装置において、前
記トランザクションのロックが長時間に及ぶものか否か
を判断する第1の判断手段と、前記第1の判断手段で長
時間のロックが判断された場合に、前記他のユーザーか
らのトランザクションが出力されたことを判断する第2
の判断手段と、前記第2の判断手段の判断に基づいて、
他のユーザーのコンピュータ端末機に対しトランザクシ
ョンがロック中であることのメッセージと、トランザク
ションの実行を否定する応答信号とを送信する送信手段
とを備えたことを特徴とするトランザクション管理装
置。
What is claimed is: 1. A transaction management device that prohibits execution of a transaction from another user (locks a transaction) while a transaction from a user to a database is being executed. For a long time, and if the first judgment means determines a long-time lock, the transaction from the other user is output. Second to judge
Based on the determination means of the second determination means and the determination means of
A transaction management device comprising: a transmission means for transmitting a message that a transaction is locked to a computer terminal of another user and a response signal that denies execution of the transaction.
JP3192553A 1991-07-05 1991-07-05 Transaction managing device Pending JPH0512094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3192553A JPH0512094A (en) 1991-07-05 1991-07-05 Transaction managing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3192553A JPH0512094A (en) 1991-07-05 1991-07-05 Transaction managing device

Publications (1)

Publication Number Publication Date
JPH0512094A true JPH0512094A (en) 1993-01-22

Family

ID=16293199

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3192553A Pending JPH0512094A (en) 1991-07-05 1991-07-05 Transaction managing device

Country Status (1)

Country Link
JP (1) JPH0512094A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293426A (en) * 1999-04-01 2000-10-20 Nec Soft Ltd Record lock system
WO2004021359A3 (en) * 2002-08-29 2005-02-24 Micron Technology Inc Software refreshed memory device and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293426A (en) * 1999-04-01 2000-10-20 Nec Soft Ltd Record lock system
WO2004021359A3 (en) * 2002-08-29 2005-02-24 Micron Technology Inc Software refreshed memory device and method

Similar Documents

Publication Publication Date Title
JPH0512094A (en) Transaction managing device
JPH08147365A (en) Information service system
JP3161174B2 (en) Key telephone equipment
JPH0761149B2 (en) Password response system
JPH04336354A (en) Decentralized computer system
JPH1021100A (en) Sharing system for multi-transaction processing systems
JPS60250759A (en) Terminal equipment for data transmission
JP3139453B2 (en) Failure analysis file output method and failure analysis file output method
US5732129A (en) Method of improving computer communication speed in key telephone system
JPH0414161A (en) Transaction processing system
JPH0749880A (en) Data base access request device
JPS5981731A (en) Data monitor controller
JPH06339169A (en) Virtual protocol control system
JPH0675917A (en) Transaction execution protection system by time unit in transaction processing system
JPH07117937B2 (en) Online system transaction processor
JPS60225268A (en) Method for shortening line occupation time in data transmitter
JPH07295935A (en) Safety protection system for computer system
JPH1185414A (en) Output device
JPS6284356A (en) Host initiated starting system for terminal software
JPS61118857A (en) Automatic connecting system for non-procedure terminal
JPH06149709A (en) Network system
JPH0675918A (en) Terminal protection system by time unit in transaction processing system
JPS59157735A (en) Data bus control system
JPH086799A (en) Inter-job information communication system and method therefor
JPH05274283A (en) Plurality process cooperation method and computer system