JPH0797346B2 - File access device - Google Patents

File access device

Info

Publication number
JPH0797346B2
JPH0797346B2 JP63254186A JP25418688A JPH0797346B2 JP H0797346 B2 JPH0797346 B2 JP H0797346B2 JP 63254186 A JP63254186 A JP 63254186A JP 25418688 A JP25418688 A JP 25418688A JP H0797346 B2 JPH0797346 B2 JP H0797346B2
Authority
JP
Japan
Prior art keywords
index
file
updated
data file
field
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.)
Expired - Lifetime
Application number
JP63254186A
Other languages
Japanese (ja)
Other versions
JPH02100735A (en
Inventor
保 牧野
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 Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP63254186A priority Critical patent/JPH0797346B2/en
Publication of JPH02100735A publication Critical patent/JPH02100735A/en
Publication of JPH0797346B2 publication Critical patent/JPH0797346B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、磁気ディスク装置等の補助記憶装置上にある
レコードの集まりからなるデータファイルに対して、索
引によりアクセスを行うことができるファイルアクセス
装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of use] The present invention relates to a file access capable of accessing a data file consisting of a collection of records on an auxiliary storage device such as a magnetic disk device by an index. Regarding the device.

〔従来の技術〕[Conventional technology]

従来、この種のファイルアクセス装置では、データファ
イルが更新された時、その時に使用されていない索引に
対して、全ての索引を更新する方式と、使用頻度が低い
索引は更新を行わない方式とがある。後者の場合には、
その索引によるアクセスが必要になったとき、その索引
が更新されなくなった後にデータファイルが更新されて
いればその索引を再編成し直す方式となっていた。
Conventionally, in this type of file access device, when a data file is updated, there are a method of updating all indexes for an index that is not used at that time and a method of not updating an index that is rarely used. There is. In the latter case,
When access by the index becomes necessary, if the data file is updated after the index is no longer updated, the index is reorganized.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上述した従来のファイルアクセス装置では、索引による
アクセスが必要になったとき、その索引が更新されなく
なった後にデータファイルが更新されていればその索引
を再編成し直す方式となっているので、索引が更新され
なくなった後にデータファイルが更新されても、その索
引フィールドが変更されていなければ索引を再編成する
必要はないにもかかわらず、索引の再編成が行われ、そ
のために時間がかかってしまうという欠点がある。
In the above-mentioned conventional file access device, when the access by the index is necessary, the index is reorganized if the data file is updated after the index is not updated. Even though the data file is updated after the index is no longer updated, the index reorganization takes place, even though the index does not need to be reorganized if its index fields have not changed, which is a time consuming process. There is a drawback that it ends up.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明のファイルアクセス装置は、磁気ディスク装置等
の補助記憶装置上にあるレコードの集まりからなるデー
タファイルに対して索引によりアクセスを行うファイル
アクセス装置であって、データファイルと索引ファイル
のアクセスを行うファイルアクセス機構と、データファ
イルの更新が行われると、データファイルの更新時に索
引の更新を行う指定となっている索引ファイルの索引を
更新する索引更新機構と、データファイルの更新が行わ
れるとデータファイルの更新時に索引の更新を行わない
指定となっている索引ファイルについて索引フィールド
が更新されたか否かのチェックを行い、索引フィールド
が更新されると以後は該索引ファイルに対して索引フィ
ールドが更新されたかのチェックを行われなくする索引
更新管理機構と、索引ファイルによる索引アクセスの必
要が生じたとき、データファイルの更新時に索引の更新
を行わない指定となっている索引ファイルについて索引
フィールドが更新されている旨を前記索引更新管理機構
が示していれば、当該索引ファイルに対して索引の再編
成を行う索引再編成機構とを有している。
A file access device of the present invention is a file access device for accessing a data file consisting of a collection of records on an auxiliary storage device such as a magnetic disk device by an index, and accessing a data file and an index file. A file access mechanism, an index update mechanism that updates the index when the data file is updated, and an index update mechanism that updates the index when the data file is updated. When the file is updated, it is checked whether the index field is updated for the index file that is specified not to be updated. When the index field is updated, the index field is updated for the index file thereafter. An index update management mechanism that disables the checking of whether or not If the index update management mechanism indicates that the index field is updated for the index file that is specified not to be updated when updating the data file when the index access by the reference file becomes necessary. , And an index reorganization mechanism for reorganizing the index of the index file.

〔作用〕[Action]

索引ファイルによる索引アクセスの必要が生じたとき、
索引ファイルが更新されなくなった後にデータファイル
の更新により索引フィールドが更新されている索引ファ
イルに対してのみ索引の再編成を行なうので、処理時間
が短かくて済む。
When it becomes necessary to access the index by the index file,
Since the index reorganization is performed only for the index file whose index field has been updated by updating the data file after the index file is no longer updated, the processing time is short.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明す
る。
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明のファイルアクセス装置の一実施例の概
略図、第2図は索引更新管理機構2の処理の流れ図であ
る。
FIG. 1 is a schematic diagram of an embodiment of the file access device of the present invention, and FIG. 2 is a flow chart of processing of the index update management mechanism 2.

ファイルアクセス機構1はデータファイル10や索引ファ
イル11,12,13のアクセスを行う機構であり、索引更新管
理機構2はデータファイル10の更新時に索引フィールド
が更新されたかを管理する機構であり、索引更新機構3
はデータファイル10の更新時に索引ファイル11,12,13の
更新を行う機構であり、索引再編成機構4は索引アクセ
ス時にデータファイル10のデータにより索引ファイル1
1,12,13の再編成を行う機構である。
The file access mechanism 1 is a mechanism for accessing the data file 10 and the index files 11, 12, and 13. The index update management mechanism 2 is a mechanism for managing whether the index field is updated when the data file 10 is updated. Update mechanism 3
Is a mechanism for updating the index files 11, 12, 13 when the data file 10 is updated, and the index reorganization mechanism 4 uses the data in the data file 10 for index file 1 when accessing the index.
It is a mechanism to reorganize 1,12,13.

ここで、索引ファイル11はデータファイル10の更新時に
更新を行う索引として指定され、索引ファイル12,13
は、データファイル10の更新時に更新を行わない索引と
して指定されているものとする。さらに、索引ファイル
12,13は索引アクセスのために索引が再編成された後の
ある時点で、データファイル10は更新されていないもの
とする。すなわち、その時点では索引ファイル11,12,13
は全てデータファイル10と整合が取れているものとす
る。
Here, the index file 11 is designated as an index to be updated when the data file 10 is updated, and the index files 12, 13
Is specified as an index that is not updated when the data file 10 is updated. In addition, the index file
It is assumed that the data files 10 and 12 and 13 are not updated at some point after the index is reorganized for index access. That is, at that point the index files 11, 12, 13
Are all consistent with data file 10.

上記時点の後、データファイル10の更新が行われると、
索引ファイル11に対しては、データファイル10の更新時
に更新を行う索引であるため、索引更新機構3により索
引の更新処理が行われる。索引ファイル12,13に対して
は、データファイル10の更新時に更新を行わない索引で
あるため、索引更新管理機構2により、第2図の流れ図
に示される処理が行われる。
After the above point, when the data file 10 is updated,
Since the index file 11 is an index that is updated when the data file 10 is updated, the index update mechanism 3 performs the index update process. Since the index files 12 and 13 are indexes that are not updated when the data file 10 is updated, the index update management mechanism 2 performs the processing shown in the flowchart of FIG.

索引ファイル12,13は、索引が再編成された後にデータ
ファイル10が更新されていないため、データファイル10
の更新時に索引フィールドが更新されたかのチェックが
必要であり、そのチェックが行われる。
Index files 12 and 13 are datafile 10 because datafile 10 was not updated after the index was reorganized.
It is necessary to check whether or not the index field has been updated at the time of updating.

ここでさらに、データファイル10の更新により索引ファ
イル12の索引フィールドは更新され、索引ファイル13の
索引フィールドは更新されなかったとすると、索引ファ
イル12については既に更新されていることがわかってい
るため、以後のデータファイル10の更新時に、索引ファ
イル12に対しては索引フィールドが更新されたかのチェ
ックを行わなくする。索引ファイル13に対してはチェッ
クは行われる。このとき、索引ファイル12,13による索
引アクセスの必要が生じたとすると、索引ファイル12は
上述のように索引フィールドが更新されていることがわ
かっているため、索引再編成機構4によって索引ファイ
ル12の再編成が行われる。また、索引ファイル13は上述
のチェックの結果、索引フィールドが更新されていなけ
れば索引の再編成は行われずにそのまま使用される。
Further, assuming that the update of the data file 10 updates the index field of the index file 12 and the index field of the index file 13 is not updated, it is known that the index file 12 has already been updated. When the data file 10 is updated thereafter, the index file 12 is not checked whether the index field has been updated. A check is made on the index file 13. At this time, if index access by the index files 12 and 13 is required, it is known that the index field of the index file 12 has been updated as described above. Reorganization is performed. As a result of the above check, the index file 13 is used as it is without reorganization of the index unless the index field is updated.

一方、従来の方式では、このような場合、索引ファイル
12,13とも索引ファイル12,13が更新されなくなった後に
データファイル10が更新されているために、索引ファイ
ル12,13による索引アクセスの必要が生じたときには、
索引ファイル12,13のどちらに対しても索引の再編成が
行われる。
On the other hand, in the conventional method, the index file
Since the data file 10 is updated after the index files 12 and 13 are not updated in both 12 and 13, when the index access by the index files 12 and 13 becomes necessary,
Index reorganization is performed on both the index files 12 and 13.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明は、索引アクセス時に、その
索引が更新されなくなった後にデータファイルが更新さ
れても、その索引フィールドが変更されていない場合に
は索引の再編成を行なわないことにより、処理時間が短
かくて済む効果がある。
As described above, according to the present invention, at the time of accessing an index, even if the data file is updated after the index is no longer updated, the index is not reorganized if the index field is not changed. There is an effect that the processing time is short.

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

第1図は本発明のファイルアクセス装置の一実施例の概
要図、第2図は索引更新管理機構2の処理の流れ図であ
る。 1……ファイルアクセス機構、 2……索引更新管理機構、 3……索引更新機構、 4……索引再編成機構、 10……データファイル、 11〜13……索引ファイル。
FIG. 1 is a schematic diagram of an embodiment of the file access device of the present invention, and FIG. 2 is a flow chart of processing of the index update management mechanism 2. 1 ... File access mechanism, 2 ... Index update management mechanism, 3 ... Index update mechanism, 4 ... Index reorganization mechanism, 10 ... Data file, 11-13 ... Index file.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】磁気ディスク装置等の補助記憶装置上にあ
るレコードの集まりからなるデータファイルに対して、
索引によりアクセスを行うファイルアクセス装置であっ
て、 データファイルと索引ファイルのアクセスを行うファイ
ルアクセス機構と、 データファイルの更新が行われると、データファイルの
更新時に索引の更新を行う指定となっている索引ファイ
ルの索引を更新する索引更新機構と、 データファイルの更新が行われると、データファイルの
更新時に索引の更新を行わない指定となっている索引フ
ァイルについて索引フィールドが更新されたか否かのチ
ェックを行い、索引フィールドが更新されると、以後は
該索引ファイルに対して索引フィールドが更新されたか
のチェックを行われなくする索引更新管理機構と、 索引ファイルによる索引アクセスの必要が生じたとき、
データファイルの更新時に索引の更新を行わない指定と
なっている索引ファイルについて索引フィールドが更新
されている旨を前記索引更新管理機構が示していれば、
当該索引ファイルに対して索引の再編成を行う索引再編
成機構とを有するファイルアクセス装置。
1. A data file comprising a collection of records on an auxiliary storage device such as a magnetic disk device,
A file access device that accesses by index, a file access mechanism that accesses the data file and the index file, and a specification that when the data file is updated, the index is updated when the data file is updated. An index update mechanism that updates the index of the index file, and when the data file is updated, checks whether the index field has been updated for the index file that is specified not to be updated when the data file is updated. When an index field is updated, an index update management mechanism that does not check whether the index field has been updated for the index file thereafter, and an index access by the index file occurs,
If the index update management mechanism indicates that the index field is updated for the index file that is specified not to update the index when updating the data file,
A file access device having an index reorganization mechanism for reorganizing an index for the index file.
JP63254186A 1988-10-07 1988-10-07 File access device Expired - Lifetime JPH0797346B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63254186A JPH0797346B2 (en) 1988-10-07 1988-10-07 File access device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63254186A JPH0797346B2 (en) 1988-10-07 1988-10-07 File access device

Publications (2)

Publication Number Publication Date
JPH02100735A JPH02100735A (en) 1990-04-12
JPH0797346B2 true JPH0797346B2 (en) 1995-10-18

Family

ID=17261430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63254186A Expired - Lifetime JPH0797346B2 (en) 1988-10-07 1988-10-07 File access device

Country Status (1)

Country Link
JP (1) JPH0797346B2 (en)

Also Published As

Publication number Publication date
JPH02100735A (en) 1990-04-12

Similar Documents

Publication Publication Date Title
US5806058A (en) Index managing method in database managing system
US6061678A (en) Approach for managing access to large objects in database systems using large object indexes
US5974427A (en) Method and computer system for implementing concurrent accesses of a database record by multiple users
US4498145A (en) Method for assuring atomicity of multi-row update operations in a database system
EP0733238B1 (en) Extended attributes file system
Easton Key-sequence data sets on indelible storage
US6738790B1 (en) Approach for accessing large objects
US20110246491A1 (en) Method and apparatus for tiered storage
WO2013144720A2 (en) Improved performance for large versioned databases
DE69516538D1 (en) STORAGE OF COMPUTER DATA
US8954407B2 (en) System and method for partially deferred index maintenance
JPH0797346B2 (en) File access device
JP3636773B2 (en) Information processing device for database check
JPH0198020A (en) Index management system
JPS62131349A (en) Data base processing system
JP2885625B2 (en) File system with index table
JPH0635779A (en) File control system
JPH06290095A (en) File managing device
JP2747009B2 (en) Record addition method for indexed sequential files
JPH04336340A (en) Disk cache access control system
JPS62276626A (en) File control system
JPH01120647A (en) File managing system
Easton Journal Of Research and Development
JPH01177649A (en) System for managing file
JPH02187837A (en) Data processor