JPH0395645A - Control system for decentralized data base - Google Patents

Control system for decentralized data base

Info

Publication number
JPH0395645A
JPH0395645A JP1231448A JP23144889A JPH0395645A JP H0395645 A JPH0395645 A JP H0395645A JP 1231448 A JP1231448 A JP 1231448A JP 23144889 A JP23144889 A JP 23144889A JP H0395645 A JPH0395645 A JP H0395645A
Authority
JP
Japan
Prior art keywords
lock
update
history information
transaction
reference history
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
JP1231448A
Other languages
Japanese (ja)
Inventor
Miho Muranaga
村永 美帆
Koichi Sekiguchi
幸一 関口
Norihiro Kato
加藤 宣弘
Yojiro Morimoto
森本 陽二郎
Yoshikazu Yamashita
義和 山下
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP1231448A priority Critical patent/JPH0395645A/en
Publication of JPH0395645A publication Critical patent/JPH0395645A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the parallelism of transaction operations and at the same time to increase the processing speed by releasing the lock of a table as soon as possible by making use of the update/reference history information on an update/reference history information store table. CONSTITUTION:A lock manager 4 accepts a lock request and lock the corresponding area by reference to a lock table 5 and carries on a transaction to which the lock request is granted. In this case, a specific part of the data item locked by the transaction and its operating way are recorded into an update/ reference history information table. Then this table is stored in an update/ reference history information store device 6. While the lock is released before execution of a comitting operation for the items to which no reference/update of a data base 2 are not actually carried out during the execution of the transaction out of a data base table which is locked based on the information on the update/reference history information store table. Thus it is possible to improve the parallelism of transaction operations and also to increase the processing speed.

Description

【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明は、データベースを備えた計算機サイトを通信回
線を介して互いに接続してなるネットワークシステムの
分散データベース管理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to a distributed database management method for a network system in which computer sites equipped with databases are connected to each other via communication lines.

(従来の技術) 金融機関のオンラインシステムや、発券業務など、複数
の計算機サイトから通信回線を介して互いに接続してな
る分散型のデータベースシステムでは、各サイトに備え
たデータベースに対して他のサイトからの更新、参照、
追加、削除が頻繁に行われる。
(Prior art) In distributed database systems, such as online systems of financial institutions and ticketing operations, in which multiple computer sites are connected to each other via communication lines, each site has a database that is connected to other sites. Updates, references,
Additions and deletions occur frequently.

この場合、1つのデータベースに対してアクセス要求が
集中することが多々ある。従ってデータの一貫性を保つ
ためにロックが行われる。ロック状態とは1つのトラン
ザクシ璽ンがトランサクション終了時まで、他のトラン
ザクシッンからのアクセスを禁止することである。デー
タベースは項目とい5oック可能な部分からなシ、項百
の大きさはシステム設計者が選択可能である。例えばリ
レーシ冒ナルモデルでハ、リレーシ曹ンそのものが項目
となbうる。また、個々のタプルやタプルを構成する項
目を選択することも可能である。しかし項目の大きさは
それを管理するためのオーパ一ヘッドやトランザクショ
ンの並列度に影響する。
In this case, access requests often concentrate on one database. Therefore, locking is performed to maintain data consistency. A locked state means that one transaction prohibits access from other transactions until the transaction ends. The database consists of 5 octable parts called items, and the size of the 100 items can be selected by the system designer. For example, in the relation model, the relation itself can be an item. It is also possible to select individual tuples or items that make up the tuples. However, the size of an item affects the overhead for managing it and the degree of parallelism of transactions.

例えばりレーション全体や複数個のタプルに対丁るロッ
クなどの大きい単位のロックでは、ロック管理システム
のオーバーヘッドが軽減されるが、ロックの衝突確率が
高くなう、多くのトランザクシッンが同時に並列的に動
作することが難しくなる。
Large units of locks, such as locks on entire transactions or on multiple tuples, reduce the overhead of the lock management system, but the probability of lock collisions is high, and many transactions are parallel at the same time. It becomes difficult to function properly.

一方、トランザクション処理の原子性を保つために、コ
ミットメント制御が行われる。これは、トランザクショ
ンが複数のデータを更新するとき、全てのデータを更新
したか、または、全く更新しなかったかを保証するもの
である。具体例を第6図に示す。トランザクションAの
発生サイトSから更新する目的のデータベースDBSl
,DBSnに対し、更新データを送信する。各サイトで
はそれを一旦ログに格納し、Precorrmitte
d 信号をサイトSに返すが、全ての更新サイトからの
信号が返されれば、コミットが行われる。ここで更新デ
ータに対するロックはトランザクシッンA開始後、更新
先データに対してかけられ、ロックの解放はコミット後
1で遅延される。従ってn個のサイトに対する更新の場
合は、ロックの解放壕で4n回の通信を持たなければな
らないことになる。このことはロックをかけてから解放
1で、相当の時間がかかる可能性があることを示してい
る。
On the other hand, commitment control is performed to maintain atomicity of transaction processing. This ensures that when a transaction updates multiple pieces of data, all or none of the data is updated. A specific example is shown in FIG. Database DBSl to be updated from site S where transaction A occurs
, DBSn. At each site, it is stored in a log and Precorrmitte
d returns a signal to site S, and if signals from all update sites are returned, a commit is performed. Here, a lock on updated data is placed on the updated data after transaction A starts, and release of the lock is delayed until 1 after commit. Therefore, in the case of updating to n sites, it is necessary to perform 4n communications in the lock release trench. This indicates that it may take a considerable amount of time to release 1 after locking.

(発明が解決しようとする課題) 従来の分散データベース管理方式では、前述した様にト
ランザクションが多数生じ、それらのデータへのアクセ
スが衝突して待状態のトランザクションが多数発生する
可能性があシ、最悪の場合にはデッドロソクを引き起こ
すことも有シ得る。
(Problem to be Solved by the Invention) In the conventional distributed database management system, as described above, there is a possibility that a large number of transactions occur and accesses to the data collide, resulting in a large number of waiting transactions. In the worst case, it may lead to deadlock.

1た、コミットメント制御によう、特に複数サイトへの
更新などを行うトランザクションの場合、ロックをかけ
てから解放壕でに相当の時間がかかる。これらのことは
多くのCPU処理時間を消費し、高速処理に制動を与え
ているという問題点があった。
Also, due to commitment control, especially in the case of transactions involving updates to multiple sites, it takes a considerable amount of time to release the lock after locking. There is a problem in that these things consume a lot of CPU processing time and put a damper on high-speed processing.

そこで本発明は、テーブルの更新・参照履歴情報を利用
してテーブルに対するロックをできる限シ早く解放する
ことによって、トランザクション動作の並列性を向上さ
せ、高速処理を可能とする分散データベース管理方式を
提供丁ること金目的とする。
Therefore, the present invention provides a distributed database management method that improves the parallelism of transaction operations and enables high-speed processing by releasing locks on tables as quickly as possible using table update/reference history information. The goal is to earn money.

〔発明の構或〕[Structure of the invention]

(課題を解決するための手段) 上記課題を解決する本発明は、データベースを備えた計
算機サイトを通信回線を介して互いに接続してなるネッ
トワークシステムの分散データベース管理方式に訃いて
、各サイトにテーブルに対するロックtiir@′fI
:格納丁るロックテーブルと、ロックテーブルf’W理
するロックマネージャと、ロックされたテーブルに対す
る更新・参照要求の履歴情報を格納する更新・参照履歴
情報格納装置と、更新●参照要求の履歴情報を利用して
ロックの解放変更を行うロックテープル操作マネージャ
を設ける。
(Means for Solving the Problems) The present invention solves the above problems by using a distributed database management method for a network system in which computer sites equipped with databases are connected to each other via communication lines, and each site has a table. Lock tiir@'fI for
: A lock table to store, a lock manager to manage the lock table f'W, an update/reference history information storage device to store history information of update/reference requests for the locked table, and history information of update/reference requests. A lock table operation manager is provided to perform lock release changes using .

(作用) 本発明の分散データベース管理方式では、ロック要求を
ロックマネージャが受け付けると、ロックテーブル金参
照し、該当箇所金ロックする。ロック要求が通ったトラ
ンザクションはその筐1トランザクションを続行する。
(Operation) In the distributed database management system of the present invention, when the lock manager receives a lock request, it refers to the lock table and locks the corresponding location. The transaction that passed the lock request continues its casing 1 transaction.

このとき上記トランザクションによってロックされたデ
ータ項目の中でもどの部分がどう操作されたかを更新●
参照履歴情報格納テーブルに記録し、このテーブル金更
新・参照履歴情報格納装置に格納する。この更新・参照
履歴情報格納テーブルの情報によう、ロックが行われた
データベーステーブルのうちでも、トランザクシ讐ン中
に実際にデータベースの参照●更新などの操作が行われ
なかった項目に関しては、コミット操作を待たずにロッ
クを解放する。
At this time, update which part of the data items locked by the above transaction was manipulated and how.
It is recorded in the reference history information storage table and stored in this table update/reference history information storage device. According to the information in this update/reference history information storage table, even among locked database tables, items for which no database reference or update operations were actually performed during a transaction are subject to commit operations. Release the lock without waiting.

(実施例) 以下、図面を用いて本発明の実施例を説明する。(Example) Embodiments of the present invention will be described below with reference to the drawings.

第1図を参照丁るに、ネットワークシステムの一部を構
或する複数の計算機サイ}A,B,Cは通信回線を介し
て接続されている。
Referring to FIG. 1, a plurality of computer sizes A, B, and C forming part of a network system are connected via communication lines.

サイ}Aは、一般的なCPU 1 @主体とし、これに
データベース2、通信手段3、ロックマネージャ4、ロ
ックテーブル5、及び更新・参照履歴情報格納手段6を
接続してなる。他のサイ}B,Cについても同様である
The system A has a general CPU 1 as its main body, and is connected to a database 2, a communication means 3, a lock manager 4, a lock table 5, and an update/reference history information storage means 6. The same applies to the other sizes}B and C.

更新●参照履歴情報格納千段6は、第2図に示す更新・
参照履歴情報格納テーブルを持つ。第2図の更新●参照
履歴情報格納テーブルは、データベースに対してかけら
れたロックと、トランザクションでデータベースがどの
様に操作されたかという履歴を持つ。この場合、第2図
は、第3図のリレーショナルデータベースについての更
新●参照履歴情報格納テーブルである。第3図はリレー
ショナルデータベースの一部であるが、属性xl持ち、
A,B,C,・・・などのデータを持つ。第2図は、第
3図の属性Xに対応して3シ、各項目には更新・参照B
歴情報が格納できるようになっている。第2図(a) 
, (b)ともに大枠で囲まれた部分が、あるトランザ
クションがデータベースに対してロックをかけている箇
所を表している。
Update●Reference history information storage 6 is the update/reference history information storage stage 6 shown in Figure 2.
It has a reference history information storage table. The update ● reference history information storage table in FIG. 2 has a history of locks placed on the database and how the database was manipulated in transactions. In this case, FIG. 2 is an update/reference history information storage table for the relational database of FIG. 3. Figure 3 shows a part of the relational database, which has the attribute xl,
It has data such as A, B, C, etc. Figure 2 shows 3 columns corresponding to attribute X in Figure 3, and each item has an update/reference B.
Historical information can be stored. Figure 2(a)
, (b) The areas surrounded by large frames represent the locations where a certain transaction has locked the database.

よう詳細に説明する。M2図(a)では、あるトランザ
クションによb1属性XのデータBからFiでロックが
かけられて訟リ、しかし、実際の操作は、データCに対
丁る更新操作と、データDに対する参照操作であったこ
とを示す。トランザクションのデータベースに対する操
作が掲2図(a)に示丁ものならば、このトランザクシ
ョンのコミット前にロックマネージャ4は第2図(a)
のロック状態から、第2図(b)のロック状態にする。
This will be explained in detail. In M2 diagram (a), a lock is placed on Fi from data B of b1 attribute X by a certain transaction, but the actual operations are an update operation on data C and a reference operation on data D. Indicates that If the transaction's operations on the database are as shown in Figure 2(a), the lock manager 4 performs the operations shown in Figure 2(a) before committing this transaction.
The locked state shown in FIG. 2(b) is changed from the locked state shown in FIG.

つまシ第2図(a)でデータBとデータE,Fに対して
かけられテイたロックを解放する。これによシ、他のト
ランザクションは、初めのトランザクションのコミット
を待たずにデータベースに対してアクセスすることが可
能となる。
The locks held on data B, E, and F in FIG. 2(a) are released. This allows other transactions to access the database without waiting for the first transaction to commit.

第4図フローチャートを用いてよシ詳細に説明する。あ
るサイトAでトランザクション1実行要求が受け入れら
れると(401)、トランザクション1の実行が開始さ
れる(402)。例えばトランザクション1の場合では
、データベース凡に対する操作が行われ、その中でも属
性Xへのアクセスがスケジューラによって予想されれば
、ロックマネージャは第2図(a)に示されるように、
属性Xに対してロックをかける(403)。トランザク
ションlはデータベースRの属性Xのロックを獲得した
ので、実際にアクセスし(404) 、データ操作内容
を第2図(a)のように更新・参照履歴情報格納テーブ
ルに格納する(405)。トランザク7=r冫lのデー
タ操作が終了したと同時に、更析●参照履歴情報格納テ
ーブルを調べ、更新●参照などのデータ操作が行われた
最小単位の項目以外のロック金解除する(406)。一
方でトランザクションマネージャは他のトランザクショ
ンを受け付ける(407)。一方、更新・参照が行われ
た項目はコミットを行う(408)。
This will be explained in detail using the flowchart in FIG. When a transaction 1 execution request is accepted at a certain site A (401), execution of transaction 1 is started (402). For example, in the case of transaction 1, if an operation is performed on the database and the scheduler expects that attribute X will be accessed among them, the lock manager will execute the
A lock is placed on attribute X (403). Since transaction l has acquired a lock on attribute X of database R, it actually accesses it (404) and stores the data operation contents in the update/reference history information storage table as shown in FIG. 2(a) (405). At the same time as the data manipulation for transaction 7=rxl is completed, check the data storage table for analysis and reference history information, and release the lock for items other than the smallest unit of data operations such as update and reference (406). . Meanwhile, the transaction manager accepts other transactions (407). On the other hand, the updated/referenced items are committed (408).

ロックの変更方法について第5図を用いて詳細に述べる
。ロノクは第5図に示すロックテーフルを月いて管理し
ている。ロックテーブルでは、テーブルRと同等の形式
金してむシ各項はテーブル凡の項目に対応している。ロ
ックテーブルはデータベースに対して一意で、アクセス
要求のある全てのトランザクションが参照し、ロックが
かかつていると他のトランザクションはその項目にアク
セスできない。ロックテーブルでは、ロックがかかって
いる項目にフラッグ金立てる。第5図では本例でのロッ
ク状態、つまシデータBからF1でのロックを表してい
る。第4図406でのロック内容の変更は、ロックテー
プルと更新・参照,護歴情報格納テーブルとを用いて各
レコードを比較し、更新・参照履歴情報格納テーブルに
おいてデータの更新●参照操作などがあったレコードに
ついてはフラッグはその筐1で、操作がなかったレコー
ドについてはフラッグヲ卦ろす。これによシロック状態
を変更することができる。
The method of changing the lock will be described in detail using FIG. Ronok manages the rock table full shown in Figure 5. In the lock table, each entry in the same formal format as table R corresponds to an entry in the table. The lock table is unique to the database and is referenced by all transactions requesting access, and when locked, other transactions cannot access the item. On lock tables, flags are raised on locked items. FIG. 5 shows the locked state in this example, which is a lock from data B to F1. To change the lock contents in 406 of FIG. 4, each record is compared using the lock table and the update/reference/history information storage table, and data update/reference operations are performed in the update/reference history information storage table. For records that have been touched, the flag is in box 1, and for records that have not been touched, the flag is removed. This allows you to change the lock state.

本例では、早くロック金解除することが可能で、これに
ようトランザクションの並列度が上がシ、効率的なトラ
ンザクション処理が可能になる。
In this example, it is possible to release the lock quickly, which increases the parallelism of transactions and enables efficient transaction processing.

本発明は、上述した実施例に限定されるものではない。The invention is not limited to the embodiments described above.

例えばロックの単位などは種々変形でき、本実施例の場
合の複数個のレコードの集合であるブロック単位に限ら
ず、リレー7Mン単位、タブル単位などがある。
For example, the unit of locking can be modified in various ways, and is not limited to the block unit, which is a set of a plurality of records in this embodiment, but may also be a relay unit, a table unit, etc.

寸たロックの解除方法についても種々考えられる。第2
図で、(a)から(b)へと、更新●参照された属性X
のデータC,D以外のロックを解放しているが、例えば
データEに関してもコミット操作1でロックを保ち続け
ることも可能である。
Various methods can be considered for unlocking the lock. Second
In the diagram, from (a) to (b), update ●Referenced attribute
Although the locks on data other than data C and D have been released, for example, it is also possible to continue locking data E with commit operation 1.

つlシ、その要旨を逸脱しない範囲で適宜変形して実施
できる。
However, the present invention may be modified and implemented as appropriate without departing from the gist thereof.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明に因れば、ロックがかけられ
ていても結果的に実際にデータベースに対し更新e参照
などの操作が行われなかった場合にコミット前にロック
を解放することで、他のトランザクションとの並行動作
が可能となシ、分散データベースにおける並列性が向上
し、効率的なデータベース処理を実現することが出来、
実用上多大なる効果を奏しうる分散データベースシステ
ムを実現することが可能となる。
As explained above, according to the present invention, even if a lock is placed, if an operation such as update or reference is not actually performed on the database, by releasing the lock before committing, It is possible to operate in parallel with other transactions, improve parallelism in distributed databases, and realize efficient database processing.
It becomes possible to realize a distributed database system that can have great practical effects.

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

第1図は本発明の一実施例にかかわる分散データベース
の管理方式の構戚を示すブロック説明図、第2図は更新
●参照履歴情報格納手段に格納される更新・参照履歴情
報格納テーブルの内容を示す説明図、第3図は本実施例
におけるデータベースの一例を示す図、第4図は本発明
の処理方式を示すフローチャート、第5図は本実施例に
おけるロックテーブルを示す図、第6図は二相コミット
の手順を示す図である。 1・・・CPU 2・・・データベース 3・・・通信手段 4・・・ロックマネージャ 5・・・ロックテーブル 6・・・更新・参照履歴情報格納装置
Fig. 1 is a block explanatory diagram showing the structure of a distributed database management system according to an embodiment of the present invention, and Fig. 2 is an update/reference history information storage table stored in the update/reference history information storage means. 3 is a diagram showing an example of the database in this embodiment, FIG. 4 is a flowchart showing the processing method of the present invention, FIG. 5 is a diagram showing the lock table in this embodiment, and FIG. 6 is a diagram showing a two-phase commit procedure. 1... CPU 2... Database 3... Communication means 4... Lock manager 5... Lock table 6... Update/reference history information storage device

Claims (1)

【特許請求の範囲】[Claims] データベースを備えた計算機サイトを通信回線を介して
互いに接続してなるネットワークシステムの分散データ
ベース管理システムにおいて、各サイトは、テーブルに
対するロック情報を格納するロックテーブルと、ロック
情報に対する更新・参照要求の履歴情報を格納する更新
・参照履歴情報格納手段と、更新・参照要求の履歴情報
を利用してロックの解放変更を行うロックマネージャと
を備えたことを特徴とする分散データベース管理方式。
In a distributed database management system that is a network system in which computer sites equipped with databases are connected to each other via communication lines, each site has a lock table that stores lock information for tables and a history of update/reference requests for lock information. A distributed database management method comprising: an update/reference history information storage means for storing information; and a lock manager that performs lock release changes using update/reference request history information.
JP1231448A 1989-09-08 1989-09-08 Control system for decentralized data base Pending JPH0395645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1231448A JPH0395645A (en) 1989-09-08 1989-09-08 Control system for decentralized data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1231448A JPH0395645A (en) 1989-09-08 1989-09-08 Control system for decentralized data base

Publications (1)

Publication Number Publication Date
JPH0395645A true JPH0395645A (en) 1991-04-22

Family

ID=16923687

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1231448A Pending JPH0395645A (en) 1989-09-08 1989-09-08 Control system for decentralized data base

Country Status (1)

Country Link
JP (1) JPH0395645A (en)

Similar Documents

Publication Publication Date Title
CN107977376B (en) Distributed database system and transaction processing method
US6353828B1 (en) Concurrency control for transactions that update base tables of a materialized view using different types of locks
US5287473A (en) Non-blocking serialization for removing data from a shared cache
AU2016244128B2 (en) Processing database transactions in a distributed computing system
EP4254183A1 (en) Transaction processing method and apparatus, computer device, and storage medium
US5263155A (en) System for selectively registering and blocking requests initiated by optimistic and pessimistic transactions respectively for shared objects based upon associated locks
EP1040433B1 (en) A fine-grained consistency mechanism for optimistic concurrency control using lock groups
US8868577B2 (en) Generic database manipulator
US5832519A (en) System and method for updating database values without the use of locking operations
US9208191B2 (en) Lock-free, scalable read access to shared data structures
US5276835A (en) Non-blocking serialization for caching data in a shared cache
US7149736B2 (en) Maintaining time-sorted aggregation records representing aggregations of values from multiple database records using multiple partitions
US6961729B1 (en) Processing in parallel units of work that perform DML operations on the same spanning rows
EP4029191B1 (en) Supporting blockchain collections in a database
US20060190504A1 (en) Simulating multi-user activity while maintaining original linear request order for asynchronous transactional events
JPH04229344A (en) Method for supporting sequential batch application using continuous restartable cursor
JPH04255041A (en) Database controlling method
US20030041227A1 (en) Distributed database system
JP2781092B2 (en) Exclusive control method between systems
US7970787B2 (en) Access concurrency for cached authorization information in relational database systems
JP3621433B2 (en) Database exclusive control method
US6732239B2 (en) Concurrent access scheme for exclusive mode cache
Duan et al. Incremental materialized view maintenance on distributed log-structured merge-tree
US11423003B2 (en) Optimistic concurrency control for database transactions
JPH0395645A (en) Control system for decentralized data base