JPH04330534A - File retrieval system - Google Patents

File retrieval system

Info

Publication number
JPH04330534A
JPH04330534A JP3100845A JP10084591A JPH04330534A JP H04330534 A JPH04330534 A JP H04330534A JP 3100845 A JP3100845 A JP 3100845A JP 10084591 A JP10084591 A JP 10084591A JP H04330534 A JPH04330534 A JP H04330534A
Authority
JP
Japan
Prior art keywords
file
record
index information
index
memory
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
JP3100845A
Other languages
Japanese (ja)
Inventor
Tetsuo Kikuchi
菊地 哲男
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 JP3100845A priority Critical patent/JPH04330534A/en
Publication of JPH04330534A publication Critical patent/JPH04330534A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To increase the speed of record insertion or change processing independently of the number of indexes set to a record. CONSTITUTION:When a record is inserted to or changed in a data file storage part 14, index information corresponding to the new record as the insertion or change object is only stored in a memory 12 but is not written in an indexed file storage part 13. Index information stored in the memory 12 is written in the indexed file storage part 13 at the time of system stop, and thereby, index information in the indexed file storage part 13 is reconstituted. Thus, the record insertion or change processing is executed at a high speed independently of the number of indexes set to the record.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】この発明はファイル検索システム
に関し、特に索引を用いてファイルデータを検索するフ
ァイル検索システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention This invention relates to a file search system, and more particularly to a file search system that uses an index to search for file data.

【0002】0002

【従来の技術】近年、索引を用いてファイルデータを検
索するファイル検索システムが種々開発されている。こ
のファイル検索システムは、索引を用意することによっ
てファイルからレコードを効率良く取り出す構成のもの
である。
2. Description of the Related Art In recent years, various file search systems have been developed that search for file data using indexes. This file search system is configured to efficiently retrieve records from files by preparing an index.

【0003】すなわち、この索引を用いたファイル検索
システムにおいては、データファイルにレコードを書き
出す時には、レコード中のデータ項目とデータファイル
上の格納位置との対応を示す索引が作成され、それが索
引ファイルに登録される。そして、データファイルから
レコードを読み込む時には、索引ファイル上の索引を用
いてレコードの格納位置が調べられ、その格納位置のレ
コードが読み出される。
[0003] In other words, in a file search system using this index, when a record is written to a data file, an index is created that indicates the correspondence between data items in the record and storage positions on the data file. will be registered. When reading a record from a data file, the storage position of the record is checked using the index on the index file, and the record at that storage position is read.

【0004】このように、索引を用いたレコード検索を
行えば、レコードの格納位置を知ることによって、デー
タファイルから直接的にレコードを読み出すことができ
、レコードの検索効率を高めることができる。
[0004] In this way, by performing a record search using an index, by knowing the storage position of the record, the record can be read directly from the data file, and the record search efficiency can be improved.

【0005】最近では、さらにレコードの検索効率を高
めるため、1個のデータ項目だけでなく、レコードに含
まれる複数種類のデータ項目について索引が付与される
場合が増えている。
[0005] Recently, in order to further improve record search efficiency, indexes are increasingly being provided not only for one data item but also for multiple types of data items included in a record.

【0006】例えば、会社内の人事管理システム等で使
用されるデータベースのファイルにおいては、そのファ
イル内の従業員レコードに含まれるデータ項目のうち、
従業員番号を示すデータ項目、入社年月日を示すデータ
項目、従業員名を示すデータ項目、および給与を示すデ
ータ項目にそれぞれ索引が設定される。この様にすれば
、従業員番号、入社年月日、従業員名、および給与のど
れを用いても、必要なレコードを探し出すことが可能と
なり、効率良く検索を行うことができる。
For example, in a database file used in a company's human resources management system, among the data items included in employee records in the file,
Indexes are set for each data item indicating the employee number, the date of joining, the employee name, and the salary. In this way, it becomes possible to find the necessary record using any of the employee number, date of joining, employee name, and salary, and the search can be performed efficiently.

【0007】しかしながら、このように索引のためのデ
ータ項目を複数種類設定した場合には、索引ファイル上
に作成すべき索引情報の種類も増えるので、データファ
イルにレコードを書き出す時には、索引ファイルに対し
て索引の種類(数)だけ索引情報を書き込む必要が生じ
る。
[0007] However, when multiple types of data items for indexes are set in this way, the number of types of index information to be created on the index file also increases, so when writing records to the data file, Therefore, it becomes necessary to write index information for each type (number) of indexes.

【0008】このため、例えば、前述のようにレコード
に従業員番号、入社年月日、従業員名、および給与の4
種類の索引を設定した場合には、レコードをデータファ
イルに書き込む度に、索引ファイルに対して4回の書き
込みを行うことが必要となる。
[0008] For this reason, for example, as mentioned above, the record contains the employee number, date of joining, employee name, and salary.
If a type index is set, each time a record is written to the data file, it is necessary to write to the index file four times.

【0009】したがって、一人の従業員レコードをデー
タファイルに登録するのに必要な全体の書き込み回数は
、データファイルへの従業員レコードの書き込み(1回
)を含めると、全部で5回となる。
[0009] Therefore, the total number of times of writing required to register one employee record in the data file is five times, including writing the employee record to the data file (one time).

【0010】以上のように、複数種類の索引を設定する
と、レコードの検索効率を向上できる反面、索引ファイ
ルに対する書き込み回数の増加を招くことになる。この
ため、複数種類の索引が設定されている場合には、デー
タファイルを更新(例えば、レコードの挿入や変更)す
る度に、何回も索引ファイルにデータを書き込まなけれ
ばならず、レコードの挿入や変更処理に時間がかかると
いう不具合が引き起こされる。
As described above, setting a plurality of types of indexes can improve record retrieval efficiency, but at the same time increases the number of writes to the index file. Therefore, if multiple types of indexes are set, data must be written to the index file many times each time the data file is updated (for example, by inserting or changing a record). This may cause problems such as the change process taking a long time.

【0011】[0011]

【発明が解決しようとする課題】従来では、複数種類の
索引を設定すると、レコードの検索効率を向上できる反
面、レコードの挿入や変更処理に時間がかかる欠点があ
った。
Conventionally, setting a plurality of types of indexes can improve record retrieval efficiency, but has the disadvantage that record insertion and modification processing takes time.

【0012】この発明はこのような点に鑑みてなされた
もので、レコードに設定された索引の数によらず、レコ
ードの挿入や変更処理を高速に実行することができるフ
ァイル検索システムを提供することを目的とする。
The present invention has been made in view of the above points, and provides a file search system that can perform record insertion and modification processing at high speed regardless of the number of indexes set for a record. The purpose is to

【0013】[0013]

【課題を解決するための手段および作用】この発明によ
るファイル検索システムは、複数のレコードから構成さ
れるファイルデータを記憶する第1ファイルと、前記第
1ファイル上における前記複数のレコードの格納位置を
、それらレコードに含まれる所定のデータ項目に対応づ
けて示す索引情報を記憶する第2ファイルと、前記第1
ファイル上のファイルデータを検索する検索手段と、前
記第1ファイルに対するレコードの挿入または変更を行
うデータ更新手段と、前記レコードの挿入または変更が
実行される度、前記挿入または変更対象の新レコードに
対応する索引情報を作成して主記憶上に蓄積する手段と
、システム停止時に、前記主記憶上に蓄積されている索
引情報を前記第2ファイルに書き込み前記第2ファイル
の索引情報を再構成する手段とを具備することを特徴と
する。
[Means and operations for solving the problems] A file search system according to the present invention includes a first file that stores file data consisting of a plurality of records, and storage positions of the plurality of records on the first file. , a second file that stores index information shown in association with predetermined data items included in the records;
a search means for searching file data on a file; a data update means for inserting or changing a record in the first file; and a data updating means for inserting or changing a record in the first file; means for creating corresponding index information and storing it on a main memory; and when the system stops, writing the index information stored on the main memory into the second file to reconstruct the index information in the second file. It is characterized by comprising means.

【0014】このファイル検索システムにおいては、レ
コードの挿入または変更が実行される際に、その挿入ま
たは変更対象の新レコードに対応する索引情報はメモリ
上に蓄積されるだけで、第2ファイルには書き込まれな
い。メモリ上に蓄積されている索引情報は、システム停
止時に第2ファイルに書き込まれ、これによりその第2
ファイルの索引情報の再構成が行われる。したがって、
レコードに複数種類の索引が設定されている場合でも、
レコードの挿入または変更時にはそのレコードが第1フ
ァイルに書き込まれるだけで第2ファイルへの書き込み
は実行されないので、レコードに設定された索引の数に
よらずに、レコードの挿入または変更を高速に実行する
事ができる。
[0014] In this file search system, when a record is inserted or changed, the index information corresponding to the new record to be inserted or changed is only stored in the memory, and the index information is not stored in the second file. Not written. The index information stored in memory is written to a second file when the system is stopped, thereby
File index information is reorganized. therefore,
Even if multiple types of indexes are set for a record,
When inserting or changing a record, the record is only written to the first file and not written to the second file, so inserting or changing records can be performed quickly regardless of the number of indexes set for the record. I can do that.

【0015】[0015]

【実施例】以下、図面を参照してこの発明の実施例を説
明する。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings.

【0016】図1にはこの発明の一実施例に係わるファ
イル検索システムのシステム構成が示されている。この
ファイル検索システムは、CPU、主記憶、および磁気
ディスク装置等を備えたコンピュータシステム上に実現
されるものであり、制御部11、メモリ12、索引ファ
イル記憶部13、データファイル記憶部14、およびバ
ッテリバックアップ機構15から構成されている。
FIG. 1 shows the system configuration of a file search system according to an embodiment of the present invention. This file search system is realized on a computer system equipped with a CPU, a main memory, a magnetic disk device, etc., and includes a control unit 11, a memory 12, an index file storage unit 13, a data file storage unit 14, and It is composed of a battery backup mechanism 15.

【0017】制御部11は、CPUによって構成される
ものであり、所定のプログラムにしたがって、データフ
ァイルの検索処理を初め、そのデータファイルにおける
レコードの更新処理(変更、挿入、削除)を実行する。 レコードの変更、挿入処理の実行時においては、制御部
11は、変更または挿入すべきレコードに対応する索引
情報を生成し、それをメモリ12に蓄積する。また、検
索処理時においては、制御部11は、まずメモリ12の
索引情報を調べ、この索引情報に該当する索引がない場
合に、索引ファイル記憶部13の索引情報を調べる。メ
モリ12は、主記憶内の一部に割り当てられた記憶領域
であり、変更または挿入対象の新たなレコードに対応す
る索引情報を一時的に保持する。
The control unit 11 is constituted by a CPU, and executes data file search processing and record update processing (change, insertion, deletion) in the data file according to a predetermined program. When performing record modification or insertion processing, the control unit 11 generates index information corresponding to the record to be modified or inserted, and stores it in the memory 12. Further, during the search process, the control unit 11 first checks the index information in the memory 12, and if there is no index corresponding to this index information, checks the index information in the index file storage unit 13. The memory 12 is a storage area allocated to a part of the main memory, and temporarily holds index information corresponding to a new record to be changed or inserted.

【0018】索引ファイル記憶部13は、磁気ディスク
装置から構成されるものであり、データファイル記憶部
14のデータファイルを検索するための索引情報が格納
されている。この索引情報は、データファイルを構成す
るレコード中のデータ項目とデータファイル上の格納位
置との対応を示すものであり、これはレコード中に設定
される索引の種類毎にそれぞれ設けられる。この索引情
報の具体例については図2を参照して後述する。
The index file storage unit 13 is composed of a magnetic disk device, and stores index information for searching data files in the data file storage unit 14. This index information indicates the correspondence between data items in records constituting the data file and storage positions on the data file, and is provided for each type of index set in the record. A specific example of this index information will be described later with reference to FIG.

【0019】データファイル記憶部14は、磁気ディス
ク装置から構成されるものであり、複数のレコードから
成るデータファイルが格納されている。各レコードは、
索引として使用される複数のデータ項目(検索キー)を
含んでいる。
The data file storage section 14 is composed of a magnetic disk device, and stores a data file consisting of a plurality of records. Each record is
Contains multiple data items (search keys) used as an index.

【0020】バッテリバックアップ機構15は、電源切
断時等のシステム停止時に、メモリ12上に蓄積されて
いる索引情報をバッテリを用いて索引ファイル記憶部1
3に書き込む。
The battery backup mechanism 15 uses a battery to transfer the index information stored in the memory 12 to the index file storage unit 1 when the system is stopped such as when the power is turned off.
Write in 3.

【0021】図2には、データファイル記憶部14のデ
ータファイルと索引ファイル記憶部13の索引ファイル
の具体的な内容の一例を示されている。ここでは、各レ
コードが従業員番号、従業員名、入社年月日、…等を示
す複数のデータ項目から構成され、これらデータ項目の
うちで、従業員番号と従業員名の2つのデータ項目が索
引として使用される場合について説明する。
FIG. 2 shows an example of specific contents of the data file in the data file storage section 14 and the index file in the index file storage section 13. Here, each record consists of multiple data items indicating employee number, employee name, date of joining, etc. Among these data items, two data items are employee number and employee name. The case where is used as an index will be explained.

【0022】このように業員番号と従業員名の2つのデ
ータ項目が索引が設定された場合、索引ファイル記憶部
13の索引ファイルには、図示のように、第1および第
2の2種類の索引情報131,132が設定される。
[0022] When the two data items of the employee number and the employee name are indexed in this way, the index file in the index file storage section 13 has two types, the first and second types, as shown in the figure. Index information 131 and 132 are set.

【0023】第1の索引情報131は、従業員名のデー
タ項目に対応付けてレコードの格納位置を示すものであ
り、レコードの格納位置を示すポインタを従業員名毎に
保持している。図2の例においては、従業員名“安藤”
に対してポインタE1 、従業員名“菊地”に対してポ
インタEi、従業員名“渡辺”に対してポインタEnが
付与されており、これらポインタE1、Ei、Enは、
データファイル上におけるレコードR1、Ri、Rnの
格納位置をそれぞれ示している。この格納位置は、デー
タファイル記憶部14上の物理的格納位置、またはレコ
ード番号等の論理的格納位置のどちらであっても良い。
The first index information 131 indicates the storage position of a record in association with the data item of employee name, and holds a pointer indicating the storage position of the record for each employee name. In the example in Figure 2, the employee name “Ando”
A pointer E1 is assigned to ``Kikuchi'', a pointer Ei is assigned to the employee name "Kikuchi", and a pointer En is assigned to the employee name "Watanabe", and these pointers E1, Ei, and En are assigned as follows.
The storage positions of records R1, Ri, and Rn on the data file are shown. This storage location may be either a physical storage location on the data file storage unit 14 or a logical storage location such as a record number.

【0024】第2の索引情報132は、従業員番号のデ
ータ項目に対応付けてレコードの格納位置を示すもので
あり、レコードの格納位置を示すポインタを従業員番号
毎に保持している。図2の例においては、従業員番号“
0001”に対してポインタE1 、従業員番号“00
0i”に対してポインタEi、従業員番号“000n”
に対してポインタEnが付与されており、これらポイン
タE1、Ei、Enは、データファイル上におけるレコ
ードR1、Ri、Rnの格納位置をそれぞれ示している
。この格納位置は、データファイル記憶部14上の物理
的格納位置、またはレコード番号等の論理的格納位置の
どちらであっても良い。ここで、図3に示すレコードR
xを、データファイル記憶部14のデータファイルに挿
入する場合について考える。
The second index information 132 indicates the storage position of the record in association with the data item of the employee number, and holds a pointer indicating the storage position of the record for each employee number. In the example of Figure 2, the employee number “
Pointer E1 for "0001", employee number "00"
0i”, pointer Ei, employee number “000n”
A pointer En is assigned to , and these pointers E1, Ei, and En indicate the storage positions of records R1, Ri, and Rn, respectively, on the data file. This storage location may be either a physical storage location on the data file storage unit 14 or a logical storage location such as a record number. Here, the record R shown in FIG.
Consider the case where x is inserted into a data file in the data file storage section 14.

【0025】レコードRxをデータファイルに書き込む
とき、通常は、索引ファイルの索引情報131,132
を再構成するために索引ファイル記憶部13への書き込
みも同時に行われるが、この実施例では、レコードRx
の索引情報はメモリ12に書き込まれるだけで、索引フ
ァイル記憶部13には書き込まれない。
[0025] When writing the record Rx to the data file, usually the index information 131, 132 of the index file
Writing to the index file storage unit 13 is also performed at the same time in order to reconstruct the record Rx.
The index information is only written to the memory 12 and not to the index file storage section 13.

【0026】この場合、メモリ12に書き込まれる索引
情報の内容は図4のようになる。すなわち、メモリ12
には、レコードRxの従業員番号“000Q”とそのレ
コードRxの格納位置を示すポインタEk との対応を
示す索引情報と、レコードRxの従業員名“佐藤”とそ
のレコードRxの格納位置を示すポインタEk との対
応を示す索引情報とが蓄積される。次に、データファイ
ル内のレコードRiの従業員名を、“菊地”から“佐藤
”に変更する場合について考える。
In this case, the contents of the index information written to the memory 12 are as shown in FIG. That is, memory 12
contains index information indicating the correspondence between the employee number “000Q” of the record Rx and the pointer Ek indicating the storage location of the record Rx, and the employee name “Sato” of the record Rx and the storage location of the record Rx. Index information indicating the correspondence with the pointer Ek is stored. Next, consider the case where the employee name of record Ri in the data file is changed from "Kikuchi" to "Sato".

【0027】この場合、レコードRiがデータファイル
記憶部14から削除され、代わりに図5に示すレコード
Ri´がデータファイル記憶部14に書き込まれる。こ
の時、メモリ12には、図6に示すように、旧レコード
Riの従業員名“菊地”とそのレコードRiの格納位置
を示すポインタEiとの対応を示す情報と、新レコード
Ri´の従業員名“佐藤”とそのレコードRi´の格納
位置を示すポインタEiとの対応を示す情報とが、1つ
の索引情報として格納される。
In this case, the record Ri is deleted from the data file storage section 14, and the record Ri' shown in FIG. 5 is written into the data file storage section 14 instead. At this time, as shown in FIG. 6, the memory 12 contains information indicating the correspondence between the employee name "Kikuchi" of the old record Ri and the pointer Ei indicating the storage position of the record Ri, and information indicating the correspondence between the employee name "Kikuchi" of the old record Ri and the employee name of the new record Ri'. Information indicating the correspondence between the member name "Sato" and the pointer Ei indicating the storage position of the record Ri' is stored as one piece of index information.

【0028】このように、新旧2つのレコードについて
の情報を索引情報として保持するのは、メモリ12上の
索引情報を索引ファイルに反映させる際に、従業員名“
菊地”に代えて“佐藤”を索引情報131に登録するた
めである。次に、図7乃至図10のフローチャートを参
照して、図1のファイル検索システムの動作を説明する
。まず、図7のフローチャートを参照して、レコードを
データファイルに挿入する場合の動作について説明する
In this way, the reason why the information about the new and old records is held as index information is that when the index information on the memory 12 is reflected in the index file, the employee name "
This is to register "Sato" in place of "Kikuchi" in the index information 131.Next, the operation of the file search system of FIG. 1 will be explained with reference to the flowcharts of FIGS. 7 to 10. First, FIG. The operation when inserting a record into a data file is explained with reference to the flowchart.

【0029】この挿入処理においては、制御部11は、
まず、レコードに索引が定義されているかを判断し(ス
テップS11)、索引が定義されている場合には、挿入
対象の新レコード(図3のレコードRx)に対応する索
引情報(図4参照)を作成し、それをメモリ12に書き
込む(ステップS12)。ステップS12の処理は設定
されている索引の数分だけ繰り返し行われる。
In this insertion process, the control unit 11:
First, it is determined whether an index is defined for the record (step S11), and if an index is defined, the index information (see FIG. 4) corresponding to the new record to be inserted (record Rx in FIG. 3) is determined. is created and written into the memory 12 (step S12). The process of step S12 is repeated for the number of indexes that have been set.

【0030】制御部11は、全ての索引についての索引
情報をメモリ12に登録し終えると(ステップA13)
、挿入対象の新レコードをデータファイル記憶部14に
書き込み(ステップS14)、これによって挿入処理が
終了する。次に、図8のフローチャートを参照して、デ
ータファイルのレコードを変更する場合の動作について
説明する。
When the control unit 11 finishes registering index information for all indexes in the memory 12 (step A13)
, the new record to be inserted is written in the data file storage unit 14 (step S14), and the insertion process is thus completed. Next, with reference to the flowchart of FIG. 8, the operation when changing a record in a data file will be described.

【0031】この変更処理においては、制御部11は、
まず、索引として使用されるデータ項目が変更対象とな
っているか否かを判断し(ステップS21)、変更対象
となっている場合には、変更前の旧レコードの情報と変
更後の新レコードの情報とを含む索引情報(図6参照)
を作成し、それをメモリ12に書き込む(ステップS2
2)。ステップS22の処理は設定されている索引の数
分だけ繰り返し行われる。
In this change process, the control section 11
First, it is determined whether the data item used as an index is subject to change (step S21), and if it is subject to change, the information of the old record before change and the new record after change are determined. Index information (see Figure 6)
and write it into the memory 12 (step S2
2). The process of step S22 is repeated for the number of indexes that have been set.

【0032】制御部11は、全ての索引についての索引
情報をメモリ12に登録し終えると(ステップA23)
、旧レコードの格納位置に新レコードをデータファイル
記憶部14に書き込み(ステップ24)、これによって
変更処理が終了する。次に、図9のフローチャートを参
照して、データファイルに対する検索処理の動作につい
て説明する。
[0032] When the control unit 11 finishes registering index information for all indexes in the memory 12 (step A23),
, a new record is written in the data file storage unit 14 at the storage location of the old record (step 24), and the change process is thus completed. Next, with reference to the flowchart of FIG. 9, the operation of search processing for data files will be described.

【0033】この検索処理においては、制御部11は、
まず、メモリ12の索引情報を調べて、その索引情報内
に検索キーに該当する索引があるか否かを検出する(ス
テップS31)。メモリ12に該当する索引がある場合
には、制御部11は、そのメモリ12の索引情報に定義
されているポインタを用いてデータファイル記憶部14
をアクセスし、該当のレコードを読み込む(ステップS
33)。
[0033] In this search process, the control unit 11
First, the index information in the memory 12 is checked to detect whether there is an index corresponding to the search key in the index information (step S31). If there is a corresponding index in the memory 12, the control unit 11 uses the pointer defined in the index information of the memory 12 to access the data file storage unit 14.
and read the corresponding record (step S
33).

【0034】一方、メモリ12に該当する索引がない場
合には、制御部11は、索引ファイル記憶部13から索
引情報を読み込み、その索引情報に定義されているポイ
ンタを用いてデータファイル記憶部14をアクセスし、
該当のレコードを読み込む(ステップS32)。次に、
図10のフローチャートを参照して、システム停止時の
動作について説明する。
On the other hand, if there is no corresponding index in the memory 12, the control unit 11 reads the index information from the index file storage unit 13, and uses the pointer defined in the index information to store the index in the data file storage unit 14. access and
The corresponding record is read (step S32). next,
The operation when the system is stopped will be described with reference to the flowchart in FIG.

【0035】電源切断時等のシステム停止時においては
、まず、制御部11は、メモリ12上に蓄積されている
旧レコードの情報(レコードの変更時に蓄積された索引
情報の一部)を削除し(ステップS41)、次いで、メ
モリ12上の索引情報を索引ファイル記憶部13に書き
込んで、索引情報の再構成を行う(ステップS42)。
When the system is stopped, such as when the power is turned off, the control unit 11 first deletes the information of the old record stored in the memory 12 (part of the index information stored when the record was changed). (Step S41) Next, the index information on the memory 12 is written to the index file storage section 13, and the index information is reconfigured (Step S42).

【0036】以上のように、この実施例のファイル検索
システムにおいては、データファイル記憶部14へのレ
コードの挿入または変更が実行される際に、その挿入ま
たは変更対象の新レコードに対応する索引情報はメモリ
12上に蓄積されるだけで、索引ファイル記憶部13に
は書き込まれない。メモリ12上に蓄積されている索引
情報は、システム停止時に索引ファイル記憶部13に書
き込まれ、これによりその索引ファイル記憶部13の索
引情報の再構成が行われる。
As described above, in the file search system of this embodiment, when inserting or changing a record into the data file storage unit 14, the index information corresponding to the new record to be inserted or changed is is only accumulated on the memory 12 and is not written to the index file storage section 13. The index information stored in the memory 12 is written to the index file storage section 13 when the system is stopped, and thereby the index information in the index file storage section 13 is reconfigured.

【0037】したがって、レコードに複数種類の索引が
設定されている場合でも、レコードの挿入または変更時
にはそのレコードがデータファイル記憶部14に書き込
まれるだけで、索引ファイル記憶部13への索引情報の
書き込みは実行されないので、レコードに設定された索
引の数によらずに、レコードの挿入または変更処理を高
速に実行する事ができる。
Therefore, even if multiple types of indexes are set for a record, when a record is inserted or changed, the record is simply written to the data file storage section 14, and the index information is not written to the index file storage section 13. is not executed, so record insertion or modification processing can be executed at high speed regardless of the number of indexes set for the record.

【0038】[0038]

【発明の効果】以上のように、この発明によれば、レコ
ードに設定された索引の数によらず、レコードの挿入や
変更処理を高速に実行することが可能となる。
As described above, according to the present invention, record insertion and modification processing can be executed at high speed regardless of the number of indexes set for a record.

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

【図1】この発明の一実施例に係わるシステム構成を示
すブロック図。
FIG. 1 is a block diagram showing a system configuration according to an embodiment of the present invention.

【図2】同実施例におけるデータファイルと索引ファイ
ルの具体的な構成の一例を示す図。
FIG. 2 is a diagram showing an example of a specific configuration of a data file and an index file in the same embodiment.

【図3】同実施例のデータファイルに挿入されるレコー
ドの構成の一例を示す図。
FIG. 3 is a diagram showing an example of the structure of records inserted into the data file of the same embodiment.

【図4】同実施例に設けられたメモリに蓄積される索引
情報の一例を示す図。
FIG. 4 is a diagram showing an example of index information stored in a memory provided in the embodiment.

【図5】同実施例のデータファイルを変更する際に使用
される新たなレコードの構成の一例を示す図。
FIG. 5 is a diagram showing an example of the structure of a new record used when changing the data file of the same embodiment.

【図6】同実施例に設けられたメモリに蓄積される索引
情報の他の例を示す図。
FIG. 6 is a diagram showing another example of index information stored in the memory provided in the embodiment.

【図7】同実施例におけるレコードの挿入処理の動作を
説明するフローチャート。
FIG. 7 is a flowchart illustrating the operation of record insertion processing in the same embodiment.

【図8】同実施例におけるレコードの変更処理の動作を
説明するフローチャート。
FIG. 8 is a flowchart illustrating the operation of record change processing in the same embodiment.

【図9】同実施例における検索処理の動作を説明するフ
ローチャート。
FIG. 9 is a flowchart illustrating the operation of search processing in the same embodiment.

【図10】同実施例におけるシステム停止時の動作を説
明するフローチャート。
FIG. 10 is a flowchart illustrating the operation when the system is stopped in the same embodiment.

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

11…制御部、12…メモリ、13…索引ファイル記憶
部、14…データファイル記憶部、15…バッテリバッ
クアップ機構。
DESCRIPTION OF SYMBOLS 11... Control part, 12... Memory, 13... Index file storage part, 14... Data file storage part, 15... Battery backup mechanism.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  複数のレコードから構成されるファイ
ルデータを記憶する第1ファイルと、前記第1ファイル
上における前記複数のレコードの格納位置を、それらレ
コードに含まれる所定のデータ項目に対応づけて示す索
引情報を記憶する第2ファイルと、前記第1ファイル上
のファイルデータを検索する検索手段と、前記第1ファ
イルに対するレコードの挿入または変更を行うデータ更
新手段と、前記レコードの挿入または変更が実行される
度、前記挿入または変更対象の新レコードに対応する索
引情報を作成してメモリ上に蓄積する手段と、システム
停止時に、前記メモリ上に蓄積されている索引情報を前
記第2ファイルに書き込み前記第2ファイルの索引情報
を再構成する手段とを具備することを特徴とするファイ
ル検索システム。
1. A first file that stores file data consisting of a plurality of records, and storage positions of the plurality of records on the first file are associated with predetermined data items included in those records. a second file for storing index information indicating index information; a search means for searching file data on the first file; a data update means for inserting or changing a record in the first file; means for creating and storing index information corresponding to the new record to be inserted or changed each time the system is executed, and storing the index information stored in the memory in the second file when the system is stopped; A file search system comprising: means for reconstructing index information of the second file.
【請求項2】  前記検索手段は、前記メモリおよび前
記第2ファイルの順番で索引情報を参照し、これらメモ
リ主記憶および第2ファイル上の索引情報を用いて前記
第1ファイル上における検索対象レコードの格納位置を
調べることを特徴とする請求項1記載のファイル検索シ
ステム。
2. The search means refers to index information in the memory and the second file in order, and uses the index information on the main memory and the second file to search for a record to be searched on the first file. 2. The file search system according to claim 1, wherein the storage location of the file search system is checked.
JP3100845A 1991-05-02 1991-05-02 File retrieval system Pending JPH04330534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3100845A JPH04330534A (en) 1991-05-02 1991-05-02 File retrieval system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3100845A JPH04330534A (en) 1991-05-02 1991-05-02 File retrieval system

Publications (1)

Publication Number Publication Date
JPH04330534A true JPH04330534A (en) 1992-11-18

Family

ID=14284658

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3100845A Pending JPH04330534A (en) 1991-05-02 1991-05-02 File retrieval system

Country Status (1)

Country Link
JP (1) JPH04330534A (en)

Similar Documents

Publication Publication Date Title
US5560006A (en) Entity-relation database
US4961134A (en) Method for minimizing locking and reading in a segmented storage space
US6088705A (en) Method and apparatus for loading data into a database in a multiprocessor environment
US5864849A (en) System and method for restoring a multiple checkpointed database in view of loss of volatile memory
US5581750A (en) System and method for improving data recovery performance
US7222133B1 (en) Method for reducing database recovery time
US6898688B2 (en) Data management appliance
US7340645B1 (en) Data management with virtual recovery mapping and backward moves
US6772177B2 (en) System and method for parallelizing file archival and retrieval
US20070118547A1 (en) Efficient index versioning in multi-version databases
JPH0812631B2 (en) Database transaction and query processing system
US6584555B2 (en) Information storage and retrieval system
CA2419883A1 (en) Discriminatory replay of log files during table space recovery in a database management system
US6230243B1 (en) Method, system and program products for managing changed data of castout classes
WO2021150563A1 (en) Efficient io processing in a storage system with instant snapshot, xcopy, and unmap capabilities
US9411692B2 (en) Applying write elision
EP0583108B1 (en) Entity-relation database
JPH04330534A (en) File retrieval system
JPH0256680A (en) Image data retrieving system
JP2721034B2 (en) Clustering control system
JPH0283640A (en) Data base updating method
JPS63291145A (en) Method for managing file
JPH03252738A (en) File managing system
JPH04155548A (en) Log management and recovery processing system
JPS61276040A (en) File access system