[go: up one dir, main page]

JPH0267647A - Exclusive control system for plural records - Google Patents

Exclusive control system for plural records

Info

Publication number
JPH0267647A
JPH0267647A JP63220155A JP22015588A JPH0267647A JP H0267647 A JPH0267647 A JP H0267647A JP 63220155 A JP63220155 A JP 63220155A JP 22015588 A JP22015588 A JP 22015588A JP H0267647 A JPH0267647 A JP H0267647A
Authority
JP
Japan
Prior art keywords
records
index
record
item
value
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
JP63220155A
Other languages
Japanese (ja)
Inventor
Ryoichi Minowa
箕輪 良一
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP63220155A priority Critical patent/JPH0267647A/en
Publication of JPH0267647A publication Critical patent/JPH0267647A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To shorten a queuing time by providing the title system with processing for locking data records without accessing them and processing for collectively unlocking index records which are not objects for updating processing. CONSTITUTION:In order to find out the record number of a record satisfying the condition of (item - 1) 100, the index of (item - 1) is retrieved 100 times, an index record i1 -1 is accessed and searched and the just preceding value 010 of a value first exceeding the value 100 is found out. In order to find out the record number of a record satisfying the condition of (item - 2) < K, the index of (item - 2) is retrieved by K, an index (i2 - 1) is accessed and searched and the just preceding value A of a value first exceeding K is found out. The AND operation of the record numbers found out by the processing is executed and, record numbers R11, R12 satisfying both the conditions are found out and the records with the number R11, R12 are locked without accessing the records. Records which are not objects for updating processing out of records constituting the indexes of (item - 1) and (item - 2) are collectively unlocked.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は複数レコードの排他制御方式、特に、ランダム
アクセス可能な記憶装置に格納され、複数の索引を有す
るデータファイルから検索処理により求っな複数レコー
ドの排他制御方式に関するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to an exclusive control method for multiple records, and in particular, to a method for controlling exclusive control of multiple records, in particular, a method for controlling records by searching from a data file stored in a randomly accessible storage device and having multiple indexes. This relates to an exclusive control method for multiple records.

〔従来の技術〕[Conventional technology]

従来、この種の排他制御方式は、索引を利用して条件を
満足するデータレコードを求めた場合、検索処理でアク
セスした索引レコードに対してのみロックが実施され、
求まったデータレコードに対してはロックは実施されて
いない。このため、求っなデータレコード内の検索処理
の対象となった項目が他の利用者により更新されデータ
の持つ意味を損ねることを防ぐなめに、索引レコードに
対し実施したロックは利用者が明確に解除するまで保持
するようになっていた。
Conventionally, in this type of exclusive control method, when an index is used to find a data record that satisfies a condition, a lock is placed only on the index record accessed during the search process.
No locks are placed on the determined data records. Therefore, in order to prevent the items targeted for search processing in the desired data record from being updated by other users and spoiling the meaning of the data, users must clearly specify the locks they have applied to index records. It was supposed to be retained until it is released.

C発明が解決しようとする課題〕 上述した従来の排他制御方式では、索引レコードに対し
実施したロックは先発の利用者が処理を行っている間保
持されるなめ、後発の索引を使用する利用者は先発の利
用者の処理が終了するのを待ち合わせる必要が生じるが
、索引レコードをロックしてしまうため、その影響範囲
が広く、索引を使用した検索を行う場合、ファイルをア
クセスしデータレコードを処理する時間に待ち合せの時
間が加わる確率が高くなり、例えばオンラインリアルタ
イム処理における応答時間が長くなるといつ欠点がある
[Problems to be solved by the invention C] In the conventional exclusive control method described above, the lock applied to the index record is held while the first user is processing it, , it is necessary to wait for the first user to finish processing, but since it locks the index record, its influence is wide, and when searching using the index, it is necessary to access the file and process the data record. There is a high probability that waiting time will be added to the time spent waiting for a meeting, and for example, if the response time in online real-time processing becomes longer, there will be a drawback.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の方式は、ランダムアクセス可能な記憶装置に格
納された複数の索引を有するデータファイルから検索処
理により求まった複数レコードの排他制御方式において
、 データレコードをアクセうすることなくロックを実施す
る処理及びすでにロックが実施されている索引レコード
のうち更新処理の対象となっていない索引レコードのロ
ックを一括して解除する処理を含むことを特徴とする。
The method of the present invention is a process for locking data records without accessing them in an exclusive control method for multiple records determined by search processing from a data file having multiple indexes stored in a randomly accessible storage device. The method is characterized in that it includes a process of collectively releasing locks of index records that are not subject to update processing among index records that have already been locked.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の処理方式を示す図である。第1図に従
い、第2図に示す索引を2個有するファイルを対象とし
、項目−1>=100AND項目2く=“K゛°の条件
を満足するレコードを求める場合の処理について第2図
を用いて説明する。
FIG. 1 is a diagram showing the processing method of the present invention. According to Fig. 1, Fig. 2 shows the processing when searching for a record that satisfies the conditions of item - 1 > = 100 AND item 2 - "K゛°" for a file that has two indexes shown in Fig. 2. I will explain using

(1)項目−1>=100の条件を満たすレコードの番
号を求めるために項目−1索引を100で検索する。
(1) Search the item-1 index for 100 to find the number of the record that satisfies the condition of item-1>=100.

索引レコード11−1をアクセスし、その中を捜し初め
て100を超える値の一つ前の値010を求める。値0
10のポインタで指定される索引レコード1l−21を
アクセスしその中を捜し初めて100を超える値の一つ
前の値090を求める。値090のポインタで指定され
る索引1l−33をアクセスし、項目−1の値が100
であるレコードの番号R10を求める。
The index record 11-1 is accessed, and the value 010 immediately before the value exceeding 100 is found by searching therein. value 0
The index record 1l-21 specified by the pointer 10 is accessed and searched to find the value 090 immediately before the value exceeding 100. The index 1l-33 specified by the pointer with the value 090 is accessed, and the value of item-1 is 100.
Find the record number R10.

次に、値100以上の値を有する索引レコード1l−3
4,1l−35,1l−361l−37,1l−38を
この順にアクセスし、項目−1の値が100以上のレコ
ードの番号であるRIO〜R32を求める。
Next, index record 1l-3 having a value of 100 or more
4, 1l-35, 1l-361l-37, and 1l-38 are accessed in this order, and RIO to R32, which are the numbers of records in which the value of item-1 is 100 or more, are obtained.

この処理によりアクセスした項目−1索引を構成する索
引レコード1l−1,1l−21,1133,1l−3
4,1l−35,1l−36゜1f−37,1l−38
に対して第2図にelで示すようにロックが実施されて
いる。
Index records 1l-1, 1l-21, 1133, 1l-3 that constitute the item-1 index accessed through this process
4, 1l-35, 1l-36゜1f-37, 1l-38
A lock is implemented as shown by el in FIG.

(ロ)項目−2く°“K ”の条件を満たすレコードの
番号を求めるなめに項目−2索引を“K″で検索する。
(b) Search the item-2 index for "K" to find the number of the record that satisfies the condition of item-2.

索引12−1をアクセスし、その中を捜し初めて゛に′
を超える値の一つ前の値“A′”を求める。次いで、索
引レコード12−21をアクセスし、その中を捜し初め
て“K′′を超える値の一つ前の値II I I+を求
める。続いて索引レコード12−33をアクセスし、項
目−2の値が゛に°″であるレコードの番号R11を求
める。最後に索引レコード12−32,12−31の順
にアクセスし、項目−2の値が°゛K”以下のレコード
の番号R11,RIO,R9,R8,R7,R6,R5
、R4,R3,R2,R1を求める。
Access index 12-1 and search within it for the first time.
Find the value "A'" immediately before the value exceeding . Next, index record 12-21 is accessed and searched therein to find the value II II I+ that is the one before the value exceeding "K''. Next, index record 12-33 is accessed and the value of item-2 is found. Find the number R11 of the record whose value is "°". Finally, index records 12-32 and 12-31 are accessed in order, and the record numbers R11, RIO, R9, R8, R7, R6, R5 where the value of item-2 is less than °゛K''
, R4, R3, R2, and R1.

この処理により、アクセスした項目−2索引を構成する
索引レコード12−1,12−21゜i2 31.i2
 32.i2 33に対しては第2図に22で示すよう
にロックが実施されている。
Through this process, the index records 12-1, 12-21°i2 31. which constitute the accessed item-2 index. i2
32. A lock is implemented for i2 33 as shown at 22 in FIG.

(ハ) (イ)、(ロ)の処理で求めたレコード番号に
対し、AND演算を行い、両方の条件を満足するレコー
ドの番号R11,R12を求める。
(c) Perform an AND operation on the record numbers obtained in the processes of (a) and (b) to obtain record numbers R11 and R12 that satisfy both conditions.

次にレコード番号R11,R12のレコードに対しアク
セスすることなくロックを実施する。
Next, the records with record numbers R11 and R12 are locked without being accessed.

この処理により、R11,R12のレコードには第2図
に!!3で示すようにロックが実施されている。
Through this process, the records of R11 and R12 are as shown in Figure 2! ! A lock is implemented as shown in 3.

(ニ)項目−1索引2項目−2索引を構成するレコード
のうち更新処理の対象となっていないレコードのロック
を一括して解除する。
(d) Among the records constituting the item-1 index 2 item-2 index, records that are not subject to update processing are unlocked all at once.

この処理のより、項目索引−12項目索引−2を構成す
る索引レコード1l−1,1l−21゜1l−33,1
l−34,1l−35,1l−36,1l−37,1l
−38,12−1,1221,1l−31,12−32
,12−33に対するロック11および12が解除され
る。
Through this process, index records 1l-1, 1l-21゜1l-33, 1 constituting item index-12 item index-2
l-34, 1l-35, 1l-36, 1l-37, 1l
-38,12-1,1221,1l-31,12-32
, 12-33 are released.

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

以上説明したように、本発明は索引処理によって求っな
データレコードに対しロックを実施することにより、他
に利用者からの更新を防ぎ検索結果の正当性を保証し、
その後検索処理で利用した索引レコードに実施されてい
るロックの内、更新処理の対象となっていない索引レコ
ードに対するものを一括して解除することにより、索引
を利用した検索を行う後発の利用者が先発を利用者がロ
ックを実施したレコードにアクセスする確率を低くし、
待ち合せの時間を短くできる効果がある。
As explained above, the present invention prevents updates from other users by locking desired data records through index processing, guarantees the validity of search results,
Afterwards, by releasing locks on index records that are not subject to update processing among the locks held on index records used in search processing, subsequent users who perform searches using the index can Lower the probability that the first user will access the locked record,
This has the effect of shortening the waiting time.

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

第1図は本発明を示すフローチャート、第2図は索引を
2個有するファイルにおけるロックの状態遷移を説明す
る図である。 11−1ないし1l−38・・・項目−1の索引、12
−1ないし12−38・・・項目−2の索引、R1ない
しR32・・・データレコード、er、e2゜!!3・
・・ロック。     代理人フ1゛埋十内原晋/図
FIG. 1 is a flowchart illustrating the present invention, and FIG. 2 is a diagram illustrating a lock state transition in a file having two indexes. 11-1 to 1l-38... Index of item-1, 12
-1 to 12-38...index of item-2, R1 to R32...data record, er, e2°! ! 3.
··rock. Agent Fu 1 Buried by Susumu Jouchihara/Figure

Claims (1)

【特許請求の範囲】 ランダムアクセス可能な記憶装置に格納された複数の索
引を有するデータファイルから検索処理により求まった
複数レコードの排他制御方式において、 データレコードをアクセスすることなくロックを実施す
る処理及びすでにロックが実施されている索引レコード
のうち更新処理の対象となつていない索引レコードのロ
ックを一括して解除する処理を含むことを特徴とする複
数レコードの排他制御方式。
[Claims] In an exclusive control method for a plurality of records obtained by a search process from a data file having a plurality of indexes stored in a randomly accessible storage device, a process for locking without accessing the data records; 1. An exclusive control method for a plurality of records, characterized by including a process for collectively releasing locks on index records that are not subject to update processing among index records that have already been locked.
JP63220155A 1988-09-01 1988-09-01 Exclusive control system for plural records Pending JPH0267647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63220155A JPH0267647A (en) 1988-09-01 1988-09-01 Exclusive control system for plural records

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63220155A JPH0267647A (en) 1988-09-01 1988-09-01 Exclusive control system for plural records

Publications (1)

Publication Number Publication Date
JPH0267647A true JPH0267647A (en) 1990-03-07

Family

ID=16746752

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63220155A Pending JPH0267647A (en) 1988-09-01 1988-09-01 Exclusive control system for plural records

Country Status (1)

Country Link
JP (1) JPH0267647A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0492934A (en) * 1990-08-06 1992-03-25 Nippon Telegr & Teleph Corp <Ntt> Content retrieval device
JPH04319734A (en) * 1991-02-22 1992-11-10 Internatl Business Mach Corp <Ibm> Apparatus and method for controlling locking state within locking range of addressable element
JP2009158735A (en) * 2007-12-27 2009-07-16 Taiyo Yuden Co Ltd Surface-mounting coil component

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62162136A (en) * 1986-01-10 1987-07-18 Nippon Denki Software Kk Simultaneous-updating control system for file with indices in hierarchy structure
JPS63159949A (en) * 1986-12-24 1988-07-02 Hitachi Ltd File access method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62162136A (en) * 1986-01-10 1987-07-18 Nippon Denki Software Kk Simultaneous-updating control system for file with indices in hierarchy structure
JPS63159949A (en) * 1986-12-24 1988-07-02 Hitachi Ltd File access method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0492934A (en) * 1990-08-06 1992-03-25 Nippon Telegr & Teleph Corp <Ntt> Content retrieval device
JPH04319734A (en) * 1991-02-22 1992-11-10 Internatl Business Mach Corp <Ibm> Apparatus and method for controlling locking state within locking range of addressable element
JP2009158735A (en) * 2007-12-27 2009-07-16 Taiyo Yuden Co Ltd Surface-mounting coil component

Similar Documents

Publication Publication Date Title
US5924103A (en) Works-in-progress in an information management system
US6122640A (en) Method and apparatus for reorganizing an active DBMS table
US8176023B2 (en) Hierarchical locking in B-tree indexes
US5210686A (en) Multilevel bill of material processing
US6442543B1 (en) Method and apparatus for changing temporal database information
US5603024A (en) Lossless distribution of time series data in a relational data base network
US4914569A (en) Method for concurrent record access, insertion, deletion and alteration using an index tree
EP0455440B1 (en) Method of operating a data processing system to perform database transactions
US6185556B1 (en) Method and apparatus for changing temporal database
US20050102255A1 (en) Computer-implemented system and method for handling stored data
EP1159692A1 (en) Tiered hashing for data access
JPH02217940A (en) Data-base access system
CA2279028C (en) Dropped database table recovery
JPH032939A (en) Data management method
US6768985B1 (en) Method and apparatus for administration of database partitions
JPH0267647A (en) Exclusive control system for plural records
US7693819B2 (en) Database access system and method for transferring portions of an ordered record set responsive to multiple requests
JPH04347747A (en) Security system for information retrieval system
US20070073655A1 (en) Enhancing tables and SQL interaction with queue semantics
JPH06215037A (en) Automatic updating device for index
JPH05307478A (en) Constituting method for data base management system
JPH0619769A (en) Record lock control method
JPH03123946A (en) Exclusive control method for data base
JPH07129452A (en) Exclusive control system
US20170103096A1 (en) Enhancing tables and sql interaction with queue semantics