JPS592159A - Data controlling system - Google Patents

Data controlling system

Info

Publication number
JPS592159A
JPS592159A JP57111265A JP11126582A JPS592159A JP S592159 A JPS592159 A JP S592159A JP 57111265 A JP57111265 A JP 57111265A JP 11126582 A JP11126582 A JP 11126582A JP S592159 A JPS592159 A JP S592159A
Authority
JP
Japan
Prior art keywords
record
user
registered
control
control table
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
JP57111265A
Other languages
Japanese (ja)
Inventor
Susumu Murakami
進 村上
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP57111265A priority Critical patent/JPS592159A/en
Publication of JPS592159A publication Critical patent/JPS592159A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/468Specific access rights for resources, e.g. using capability register

Abstract

PURPOSE:To reduce frequency generated by an undesired waiting state, by executing a registration onto a control table as necessary by a user, and inhibiting an access from other user against the registered access unit. CONSTITUTION:When a user checks one record in some access unit, and thereafter, executes write to a record in other access unit, in case when he desires an exclusive control to the latter record, an entry regarding the latter record is added onto a control table 3 by an inserting command. When the entry concerned is registered, a data base control system 2 operates to a record corresponding to the registered entry as if the access is executed in a locked state, and inhibits updating from other user, etc.

Description

【発明の詳細な説明】 (4)発明の技術分野 本発明は、データ制御方式、特にデータベース管理シス
テムが行う排他制御の制御単位を比較的小さくして置い
た上で、ユーザからのコマンドによって、所望する制御
単位を一時的にロックできるように制御するようにし、
非所望な待ち状態が生じる頻度を極力抑制するようにし
九データ制御方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (4) Technical Field of the Invention The present invention provides a data control method, in particular, a data control system, in which the control unit of exclusive control performed by a database management system is kept relatively small, and then The desired control unit is controlled so that it can be temporarily locked,
This invention relates to nine data control methods that suppress the frequency of occurrence of undesired waiting states as much as possible.

(6)技術の背景と問題点 データベースにおいては、1つまたは複数のレコードに
よって構成されるアクセス単位を最小アクセス単位とし
て取扱い、データベース管理システムDBMSと呼ばれ
るプログラムの制御の下でユーザを論理的な構造を用い
てレコードをアクセスできるように構成されている。そ
して、成るレコードに対して更新を行おうとするとき、
上記データベース管理システムは上記アクセス単位にも
とづいて排他制御を行うようにされるd即ち、複数のユ
ーザが当該レコードに対して同時に更新を行おうとして
いるとき1人だけの処理を許し他は当該処理が終るまで
待つようにされる。
(6) Technical background and problems In databases, an access unit consisting of one or more records is treated as the minimum access unit, and users are organized into a logical structure under the control of a program called a database management system DBMS. It is configured so that records can be accessed using . Then, when trying to update a record consisting of
The database management system performs exclusive control based on the access unit. In other words, when multiple users are attempting to update the record at the same time, only one user is allowed to perform the process, and the others are not allowed to perform the process. will be forced to wait until the end.

このような排他制御の単位を大きくとると、1人のユー
ザが成るレコードに対して更新を行っている間に他のユ
ーザが当該排他制御の単位内の異なるレコードに対して
更新を行おうとする場合にも、待をされることが生じ、
上記排他制御の単位が大きくなる程1問題が大となる。
If such a unit of exclusive control is set to a large size, while one user is updating a record, another user may try to update a different record within the unit of exclusive control. In some cases, you may have to wait,
The larger the unit of exclusive control is, the more serious one problem becomes.

このために。For this.

上記排他制御の単位を小さくとることとなるが。However, the unit of exclusive control mentioned above will be made smaller.

例えばユーザが会話形式で処理を行うような場合とは、
成るアクセス単位内の成るレコードの内容をチェックし
た上で他のアクセス単位内の成るレコードに対してライ
トし、その間に他のユーザによって後者のレコードの内
容が更新されることを禁止したい場合が生じる。
For example, when a user performs processing conversationally,
There may be cases where you want to check the contents of a record in an access unit, write to a record in another access unit, and then prevent other users from updating the contents of the latter record. .

このような場合、上記排他制御の単位を大きくすること
は好ましくなく、ユーザが一時的に登録することによっ
て、所望のレコードをロック状態に置くことができるよ
うにすることが望まれる。
In such a case, it is not preferable to increase the unit of exclusive control, and it is desirable that the user be able to place a desired record in a locked state by temporarily registering it.

本発明は上記の問題を解決することを目的としており2
本発明のデータ制御方式は、1つまたは複数のレコード
によって構成されるアクセス単位が複数個格納されるデ
ータベースをそなえると共に、複数のアプリケーション
・プログラムからの制御に対応して上記アクセス単位に
つbての排他制御を行うデータベース管理システムをそ
なえてなるデータ処理システムにおいて、レコードを識
別するキーとユーザを識別できるiDとレコード自答と
を組として当該レコードを制御テーブル上に登録するよ
う構成し、ユーザがコマンドによって上記制御テーブル
上にロック依頼および/またはロック解除依頼を登録し
た状態にもとづいて。
The present invention aims to solve the above problems.
The data control method of the present invention includes a database in which a plurality of access units each consisting of one or more records are stored, and the access unit is controlled in response to control from a plurality of application programs. In a data processing system equipped with a database management system that performs exclusive control of Based on the state in which the lock request and/or lock release request is registered on the control table by the command.

上記データベース管理システムが上記登録しであるレコ
ードに対する更新を禁止するようにしたことを特徴とし
ている。以下図面を参照しつつ説明する。
The database management system is characterized in that the database management system prohibits updates to the registered records. This will be explained below with reference to the drawings.

0発明の実施例 第1図は本発明の一実施例構成を説明図的に示したもの
であり、第2図は本発明にいう制御テーブルに対するア
クセスを説明する一実施例フローチャート、第3図はコ
マンドと制御テーブルとの内容とを対応づけて説明する
説明図を示す。
0 Embodiment of the Invention FIG. 1 is an explanatory diagram showing the configuration of an embodiment of the present invention, FIG. 2 is a flowchart of an embodiment illustrating access to a control table according to the present invention, and FIG. shows an explanatory diagram illustrating the correspondence between commands and the contents of the control table.

第1図において、lはデータベース、2はデータベース
管理システム(DBMS)、3は制御テーブルであって
本発明においてil)を付した形でもうけられるもの、
4−0.4−1.・・・・・・は夫々アプリケ゛−ジョ
ン・プログラム、5−.0.5−1.叫・−i夫々ユー
ザ(又はユーザが用いる端末)、6は本発明に幹込て用
いるコマンド(又はコマンドのデータフォーマット)を
表わしている。また甲、乙・・曲は夫々ファイル甲、乙
のエリア全表わし、7はアクセス単位であって図示の場
合にはデータベース管理システムが行う排他制御の単位
でもあるものを表わしてbる。
In FIG. 1, l is a database, 2 is a database management system (DBMS), and 3 is a control table, which can be provided in the form of il) in the present invention.
4-0.4-1. . . . are application programs, 5-. 0.5-1. -i respectively the user (or the terminal used by the user), 6 represents the command (or the data format of the command) used in the present invention. Also, songs A, B, etc. represent the entire areas of files A and B, respectively, and 7 represents the access unit, which in the illustrated case is also the unit of exclusive control performed by the database management system.

データベース管理システム2は1本来の機能として2例
えば1つのアクセス単位が成るユーザによって更新処理
が行われる間に他のユーザが当該アクセス単位をアクセ
スすることを禁止する機能をもっていると考えてよく9
本発明の場合、この機能を利用するようにしている。本
発明の場合。
It may be considered that the database management system 2 has an original function of, for example, a function of prohibiting other users from accessing an access unit while an update process is being performed by the user who constitutes the access unit.
In the case of the present invention, this function is utilized. In the case of the present invention.

コマンド6を用意して、ユーザが必要に応じて制御テー
ブル3上に登録を行い、データベース管理システム2か
らみた場合に、当該登録されたアクセス単位があたかも
現に更新中であるかの如くみられるようにし、尚該登録
されたアクセス単位に対する他ユーザからのアクセスを
禁止せしめるようにしている。なお制御テーブル3上の
キー(Key )はレコードを識別するキーであり、L
Dハユーザを識別できるキーであり、「データ」は実際
のレコードの内容を表わしている。
Command 6 is prepared so that the user can register it on the control table 3 as necessary, and when viewed from the database management system 2, the registered access unit can be seen as if it were actually being updated. Furthermore, access from other users to the registered access unit is prohibited. Note that the key on the control table 3 is a key for identifying records, and L
D is a key that can identify the user, and "data" represents the actual contents of the record.

コマンド6のオペレーション−コードOPとしては。As for the operation code OP of command 6.

(I)R+r#αd(読み)・・・・・・制御テーブル
3上の成るエントリを読みとる。
(I) R+r#αd (reading) Read the entries on the control table 3.

(1)  i s 1FzJ1ert (追加)・・・
・・・制御テーブル3上に成るエントリを追加する。
(1) is 1FzJ1ert (addition)...
...Add an entry on control table 3.

(110u : updαta (変更)・・・・・・
制御テーブル3上の成るエントリの内容を変更する。
(110u: updαta (change)...
The contents of the entries on the control table 3 are changed.

などがあるものと考えてよい。It can be assumed that there are such things.

ユーザは、成るアクセス単位内のlりのレコードをチェ
ックした上で他のアクセス単位内のレコードに対してラ
イトを行うに当って、後者レコードに対する排他制御を
希望する場合、第2図図示ステートS1に示す如きイン
サート・コマンドによって上記後者レコードに関するエ
ントリを制御テーブル3上に追加せしめるようにする。
When a user checks one record in an access unit and then writes to a record in another access unit, if he desires exclusive control over the latter record, the user selects state S1 shown in FIG. An entry related to the latter record is added to the control table 3 using an insert command as shown in FIG.

なお当該追加によって当該エントリが登録されると、デ
ータベース管理システム2は、当該登録されたエントリ
に対応するレコードに対して、あたかもロック状態でア
クセスが行われているかの如く動作し、他ユーザからの
更新などを禁止する形となる。
Note that when the entry is registered by the addition, the database management system 2 operates as if the record corresponding to the registered entry is being accessed in a locked state, preventing other users from accessing it. Updates etc. will be prohibited.

上記ステートS1による追加に際して、制御テーブルs
上に、当該レコードが登録されていなかったとすると、
ステートS2からステートS6に進み、ロックが完了す
る。もしも、制御テーブル3上に既に登録されていたと
すると、上記追加はエラーとなる。このとき、当該アク
セス単位に対するロックが場合によっては解除(アンロ
ック)されている場合もあることから2図示ステートS
3の如く、アップディト・コマンドをかけてみる。なお
当該アップディトφコマンドにお−てiDをプランクロ
として偽るのは、制御テーブル3上のiDがブランクに
なっていれば変更せよということを意味してhると考え
てよい。
When adding in the above state S1, the control table s
Assuming that the record is not registered above,
The process advances from state S2 to state S6, and locking is completed. If it has already been registered on the control table 3, the above addition will result in an error. At this time, since the lock for the access unit may have been released (unlocked) depending on the case, state S shown in FIG.
Try executing the update command as shown in step 3. Note that disguising the iD as PlankLo in the update φ command can be considered to mean that if the iD on the control table 3 is blank, it should be changed.

アップディト・コマンドを発した上で9図におりては省
略したが、リード・コマンドを発して制御テーブル3上
のエントリが変更されたか否かを読取ってみる。変更で
きた場合には、ステートS4からステート86に進み、
ロックが完了する。
After issuing an update command, a read command (not shown in FIG. 9) is issued to read whether or not the entry on the control table 3 has been changed. If the change was successful, proceed from state S4 to state 86,
The lock is completed.

もしも変更されていなかった場合には9図示ステートS
5の如くビジー状態となる。
If it has not been changed, state S shown in 9
It becomes busy as shown in 5.

制御テーブル3上に登録されたエントリは、必要な処理
が終了すると、コマンドによって当該登録を解除するよ
うにされる。この場合には1図示ステートS7の如く、
アップディト・コマンドが用いられるが、コマンド中の
データ部におけるiDがプランクロとされた形が用いら
れる。これは、制御テーブル上の当該エントリのiDを
ブランクに変更せしめることを意味する。
Entries registered on the control table 3 are unregistered by a command when necessary processing is completed. In this case, as in the illustrated state S7,
An update command is used, and the iD in the data section of the command is set to Plankro. This means that the iD of the entry on the control table is changed to blank.

第3図を参照しつつ、よシ具体的に説明する。This will be explained in detail with reference to FIG.

今仮に、第3図(4)図示の如く、制御テーブル3(3
−A)上に、(1)キーKlをもつレコードに対応する
エントリがアンロックされた状態で残っており、(1)
キーに2をもつレコードに対応するエントリがユーザI
8によって使用中であり、 (+10キーに3をもつレ
コードに対応するエントリがアンロックされた状態で残
ってbるものとする。
Now, suppose that the control table 3 (3
-A), the entry corresponding to the record with (1) key Kl remains unlocked, and (1)
The entry corresponding to the record with 2 in the key is user I.
8, and the entry corresponding to the record with 3 in the +10 key remains unlocked.

この状態の下で、第3図(B)図示の如く、キーに4を
もつレコードをユーザI6がロックすべくインサート・
コマンドを発したとする。このとき当該コマンドが受入
れられると1図示テーブル3−Bの如く、キーに4をも
つレコードに対応するエントリが登録される。
Under this state, as shown in FIG. 3(B), user I6 inserts a record with key 4 to lock it.
Suppose you issue a command. At this time, if the command is accepted, an entry corresponding to the record having 4 in the key is registered as shown in Table 3-B.

この状態の下で、キーに1をもつレコートニついて第3
図0図示の如くユーザ110がインサートコマンドを発
したとする。この場合、キーKlをもつレコードについ
てのエントリがアンロック状態のままで制御テーブル3
(3−B)上に残つているためにエラーとなる。そして
ユーザIIOがアップディト・コマンドを発し九とき、
当該アップディトが受入れられると、テーブル3−Cの
如くtDがIIOとされる。
Under this condition, for the record number 2 with 1 in the key, the third
Assume that the user 110 issues an insert command as shown in FIG. In this case, the entry for the record with the key Kl remains unlocked in the control table 3.
(3-B) An error occurs because it remains on the top. And when user IIO issues an update command,
When the update is accepted, tD is set to IIO as shown in Table 3-C.

次いで、キーに1をもつレコードについて第3図0図示
の如くユーザI12がインサート・コマンドを発したと
する。この場合、キーに1をもつレコードについてのエ
ントリがロック状態のままで制御テーブル3(3−C)
上に存在することから、エラーとなる。そして、ユーザ
IIOがアップディト・コマンドを発したときも、当該
変更は受入れられないで、テーブル3−Dの如くなる。
Next, it is assumed that the user I12 issues an insert command as shown in FIG. 30 for a record having a key of 1. In this case, the entry for the record with key 1 remains locked and is sent to control table 3 (3-C).
An error occurs because it exists above. Then, even when the user IIO issues an update command, the change is not accepted and results as shown in Table 3-D.

なお、第3図0図示の状態のもとで1例えばユーザエ6
がキーに4をもつレコードに対して。
Note that under the condition shown in FIG.
for records with 4 in the key.

コマンド<(14,に4.l6)(K4tu、D)>の
如きアップディト・コマンドを発して、アンロック処理
を行うと、テーブル3上には、rK4゜、D  Jの如
き形でエントリが残り、アンロック状態となる。
When you issue an update command such as the command <(14, ni 4.l6) (K4tu, D)> and perform the unlock process, entries will appear in table 3 in the form rK4゜, D J. The rest will be unlocked.

■発明の詳細 な説明した如く1本発明によれば、排他制御の単位を小
さくして置いた上で、ユーザかコマンドによって見掛は
上、成るレコードがアクセス中であるかの如き態様をデ
ータベース管理システムに見せるようにし、いわば予約
を行うことが可能となる。このために、非所望な形で待
ち状態が生じる頻度が軽減され、かつ必要な予約を行う
ことが可能となる。
■As described in detail, according to the present invention, the unit of exclusive control is set small, and a database is controlled in a manner as if a record consisting of the above is being accessed by a user or a command. It becomes possible to make a reservation by showing it to the management system. This reduces the frequency of undesired waiting states and makes it possible to make necessary reservations.

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

第1図は本発明の一実施例構成を説明図的に示したもの
であり、第2図は本発明にいう制御テーブルに対するア
クセスを説明する説明図、第3図はコマンドと制御テー
ブルの内容とを対応づけて説明する説明図を示す。 図中、1はデータ・ベース、2はデータベース管理シス
テム、3は制御テーブル、4はアプリケーション中プロ
グラム、5はユーザ、6はコマンドを表わす。 才1m 才11 ′1′3閃
FIG. 1 is an explanatory diagram showing the configuration of an embodiment of the present invention, FIG. 2 is an explanatory diagram illustrating access to a control table according to the present invention, and FIG. 3 is a diagram showing commands and contents of the control table. An explanatory diagram illustrating the relationship between the two is shown. In the figure, 1 is a database, 2 is a database management system, 3 is a control table, 4 is an application program, 5 is a user, and 6 is a command. Sai1m Sai11 '1'3 flash

Claims (1)

【特許請求の範囲】 1つまたは複数のレコードによって構成されるアクセス
単位が複数個格納され、るデータベースをそなえると共
に、複数のアプリケーション・プログラムからの制御に
対応して上記アクセス単位についての排他制御を行うデ
ータベース管理システムをそなえてなるデータ処理シス
テムにおいて。 レコードを識別するキーとユーザを識別できるiDとレ
コード内容とを組として当該レコードを制御テーブル上
に登録するよう構成し、ユーザがコマンドによって上記
制御テーブル上にロック依頼および/またはロック解除
依頼を登録した状態にもとづいて、上記データベース管
理システムが上記登録しであるレコードに対する更新を
禁止するようにしたことを特徴とするデータ・・自制御
方式。
[Scope of Claims] A database is provided in which a plurality of access units constituted by one or more records are stored, and exclusive control of the access units is provided in response to control from a plurality of application programs. In a data processing system comprising a database management system that performs The record is configured to be registered on a control table as a pair of a key that identifies the record, an ID that can identify the user, and the record contents, and the user registers a lock request and/or a lock release request on the control table by a command. The data self-control system is characterized in that the database management system prohibits updating of the registered record based on the state of the registered record.
JP57111265A 1982-06-28 1982-06-28 Data controlling system Pending JPS592159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57111265A JPS592159A (en) 1982-06-28 1982-06-28 Data controlling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57111265A JPS592159A (en) 1982-06-28 1982-06-28 Data controlling system

Publications (1)

Publication Number Publication Date
JPS592159A true JPS592159A (en) 1984-01-07

Family

ID=14556813

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57111265A Pending JPS592159A (en) 1982-06-28 1982-06-28 Data controlling system

Country Status (1)

Country Link
JP (1) JPS592159A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60250448A (en) * 1984-05-24 1985-12-11 Fujitsu Ltd Logical resource control method
JPS63196956A (en) * 1987-02-10 1988-08-15 Nec Corp File exclusion system
JPH01279339A (en) * 1988-04-30 1989-11-09 Fujitsu Ltd File writing processing system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5441629A (en) * 1977-09-09 1979-04-03 Casio Comput Co Ltd Output control system of program information
JPS55116155A (en) * 1979-02-28 1980-09-06 Hitachi Ltd Memory protective system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5441629A (en) * 1977-09-09 1979-04-03 Casio Comput Co Ltd Output control system of program information
JPS55116155A (en) * 1979-02-28 1980-09-06 Hitachi Ltd Memory protective system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60250448A (en) * 1984-05-24 1985-12-11 Fujitsu Ltd Logical resource control method
JPS63196956A (en) * 1987-02-10 1988-08-15 Nec Corp File exclusion system
JPH01279339A (en) * 1988-04-30 1989-11-09 Fujitsu Ltd File writing processing system

Similar Documents

Publication Publication Date Title
US8868577B2 (en) Generic database manipulator
KR0126245B1 (en) Locking mechanism for check in/check out model
US5386559A (en) Variant domains and variant maps in a versioned database management system
US6772155B1 (en) Looking data in a database system
CN101111840B (en) Techniques for providing locks for file operations in a database management system
JP3621433B2 (en) Database exclusive control method
JPS592159A (en) Data controlling system
EP1417595A1 (en) A method for concurrency control for a secundary index
JPH05307478A (en) Constituting method for data base management system
JPH0619769A (en) Record lock control method
JP3970524B2 (en) Exclusive control method between multiple operations
JPH06119227A (en) Distributed data base control system
US6075930A (en) Programs maintenance procedures in parallel processing system
JP3741388B2 (en) Database reserved access processing method
US20030018653A1 (en) Database management method, system for practicing the method and medium recording process program
JPH03123946A (en) Exclusive control method for data base
JPH04282733A (en) Method for managing data base
JPH0330027A (en) Exclusive control system
JP2546101B2 (en) Distributed database update method
JPH0367342A (en) File access control method for operating system
JPH10240553A (en) Exclusive control system and method for resource for distributed transaction processing system
JPS61194551A (en) Common space control mechanism
JPH07230402A (en) Data base management device
JPH03118645A (en) Exclusive control method for data base
JPH04109343A (en) Exclusive control system for index