JPH01120647A - File managing system - Google Patents

File managing system

Info

Publication number
JPH01120647A
JPH01120647A JP62279727A JP27972787A JPH01120647A JP H01120647 A JPH01120647 A JP H01120647A JP 62279727 A JP62279727 A JP 62279727A JP 27972787 A JP27972787 A JP 27972787A JP H01120647 A JPH01120647 A JP H01120647A
Authority
JP
Japan
Prior art keywords
record
key
index table
relative position
file
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
JP62279727A
Other languages
Japanese (ja)
Inventor
Tetsuji Hino
日野 哲治
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 JP62279727A priority Critical patent/JPH01120647A/en
Publication of JPH01120647A publication Critical patent/JPH01120647A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the file access efficiency and to omit a file recompiling process by attaining the addition, deletion, reference, updating, etc., of keys by means of an index table. CONSTITUTION:The record of an index table 21 stores the keys and a flag 24 showing the using condition of the record. At the same time, a record relative number 22 corresponds in 1:1 to a record relative number 26 of a data file 25. A file 28 is prepared for the table 21 for back-up in case of the discontinuation and the breakdown of a system. In case a data record having a key is added, an additional key is set with a relevant flag 24' set at 1 to back up the relevant record of the file 28 as long as no additional key is contained in the table 21. Then an idle record 27' of the file 25 is defined as a working record.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ファイル管理方式、特に、ディスクファイル
を備えたコンピュータシステムにおけるファイル管理方
式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a file management system, and particularly to a file management system in a computer system equipped with disk files.

〔共通的技術〕[Common technology]

一般に、汎用コンピュータ争ミニコンピユータの基本オ
ペレーティングシステムのファイル管理方式は、順編成
、相対編成、索引順編成の3種類を管理する。これらの
うち、索引順編成ファイルでは、キーによるレコードア
クセスを可能にしている。
Generally, the basic operating system of a general-purpose minicomputer manages three types of file management methods: sequential organization, relative organization, and indexed sequential organization. Among these, indexed sequential files enable record access using keys.

〔従来の技術〕[Conventional technology]

従来のファイル管理方式は、キーによるレコードアクセ
スには索引順編成ファイルを用いていた。
Conventional file management systems use indexed sequential files for keyed record access.

−〔発明が解決しようとする問題点〕 上述した索引順編成ファイルでは、追加レコードが多く
なるとオーバフロー領域を設けてキーデータを挿入する
ため、ファイルのアクセス効率が著しく低下し、その効
率を回復するためには、定期的にファイルの再編成をし
なければならないという欠点があった。
- [Problem to be solved by the invention] In the indexed sequential file described above, when the number of additional records increases, an overflow area is created and key data is inserted, resulting in a significant drop in file access efficiency, and it is necessary to restore the efficiency. To do this, the disadvantage is that files must be reorganized periodically.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のファイル管理方式は、主記憶上に展開されたイ
ンデックステーブルに対して追加するキーを持つレコー
ドの既存をチェックするステップと、上記インデックス
テーブルの0フラグを持つレコードを検索するステップ
と、上記レコードへ追加するキーをセットするステップ
と、上記レコードの0フラグを1にするステップと、上
記レコードの相対位置と同じレコード相対位置にある相
対編成形式のインデックステーブル・バックアップファ
イルのレコードへ上記レコードの内容をバックアップす
るステップと、上記レコードの相対位置と同じレコード
相対位置にある相対編成形式のデータファイルのレコー
ドを使用レコードにするステップから構成されるレコー
ド追加処理と、上記インデックステーブルに対して削除
するキーを持つレコードを検索するステップと、上記レ
コードのキーをクリアーするステップと、上記レコード
のフラグを0にするステップと、上記レコードの相対位
置と同じレコード相対位置にある相対編成形式のインデ
ックステーブル・バックアップファイルのレコードへ上
記レコードの内容をバックアップするステップと、上記
レコードの相対位置と同じレコード相対位置にある相対
編成形式のデータファイルのレコードを空きレコードに
するステップとから構成されるレコード削除処理と、上
記インデックステーブルに対して参照するキーを持つレ
コードを検索するステップと、上記レコードの相対位置
と同じレコード相対位置にある相対編成形式のデータフ
ァイルのレコードを読み出すステップとから構成される
レコード参照処理と、を持つレコードを検索するステッ
プと、上記レコードの相対位置と同じレコード相対位置
にある相対編成形式のデータファイルのレコードを更新
するステップとから構成されるレコード更新処理とを含
んで構成される。
The file management method of the present invention includes the steps of: checking the existing record with a key to be added to the index table expanded on the main memory; searching for a record with a 0 flag in the index table; A step of setting the key to be added to the record, a step of setting the 0 flag of the above record to 1, and a step of adding the above record to the record of the index table/backup file in the relative organization format at the same record relative position as the relative position of the above record. A record addition process consisting of a step of backing up the contents, a step of making a record of a relative organization data file at the same record relative position as the record relative position of the above record a used record, and a process of deleting the record from the above index table. A step of searching for a record with a key, a step of clearing the key of the above record, a step of setting the flag of the above record to 0, and an index table in relative organization format at the same record relative position as the relative position of the above record. A record deletion process comprising the steps of backing up the contents of the record to a record of a backup file, and making a record of a data file in a relative organization format at the same record relative position as the record relative position as an empty record. , a record reference process consisting of a step of searching the index table for a record having a key to be referenced, and a step of reading a record of a relative organization format data file at the same record relative position as the relative position of the above record. and a record update process consisting of a step of searching for a record having the above record, and a step of updating a record of a relative organization format data file at the same record relative position as the relative position of the above record. .

〔実施例〕〔Example〕

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

第1図は、本発明のキーによるレコード追加の一実施例
を示すフローチャート、第2図は、本発明のキーによる
レコード削除の一実施例を示すフローチャート、第3図
は、本発明のキーによるレコード参照の一実施例を示す
フローチャート、第4図は1本発明のキーによるレコー
ド更新の一実施例を示すフローチャート、第5図は、前
記実施例のテーブルとファイルの構成を示す模式図であ
る。
FIG. 1 is a flowchart showing an example of record addition using the key of the present invention, FIG. 2 is a flowchart showing an example of record deletion using the key of the present invention, and FIG. 3 is a flowchart showing an example of record deletion using the key of the present invention. FIG. 4 is a flowchart showing an example of record reference; FIG. 4 is a flowchart showing an example of record updating using a key of the present invention; FIG. .

本発明のファイル管理方式は、第1図において、主記憶
上に展開された第5図に示すインデックステーブル21
に対して追加するキーを持つレコ−ドの既存をチェック
するステップ1と、上記インデックステーブル21のO
フラグ24′を持つレコード23′を検索するステップ
2と、上記レコード23′へ追加するキーをセットする
ステップ3と、上記レコードの0フラグ24′を1にす
るステップ4と、上記レコードの相対位置と同じレコー
ド相対位置にある相対編成形式のインデックステーブル
・バックアップファイル28のレコード23′へ上記レ
コード23′の内容をバックアップするステップ5と、
上記レコードの相対位置と同じレコード相対位置にある
相対編成形式のデータファイル25のレコード27′を
使用レコードにするステップ6から構成されるレコード
追加処理と、第2図において、上記インデックステーブ
ル21に対して削除するキーを持つレコードを検索する
ステップ7と、上記レコードのキーをクリアーするステ
ップ8と、上記レコードのフラグを0にするステップ9
と、上記レコードの相対位置と同じレコード相対位置に
ある相対編成形式のインデックステーブル・バックアッ
プファイル28のレコードへ上記レコードの内容をバッ
クアップするステップと、上記レコードの相対位置と同
じレコード相対位置にある相対編成形式のデータファイ
ル25のレコードを空きレコードにするステップ11と
から構成されるレコード削除処理と、第3図において、
上記インデックステーブル21に対して参照するキーを
持つレコードを検索するステップ12と、上記レコード
の相対位置と同じレコード相対位置にある相対編成形式
のデータファイルのレコードを読み出すステップ13と
から構成されるレコード参照処理と、第4図において、
上記インデックステーブル21に対して更新するキーを
持つレコードを検索するステップ14と、上記レコード
の相対位置と同じレコード相対位置にある相対編成形式
のデータファイルのレコードを更新するステップ15と
から構成されるレコード更新処理とを含んで構成される
In the file management system of the present invention, in FIG. 1, an index table 21 shown in FIG.
Step 1 of checking the existing record with the key to be added to the index table 21
Step 2 of searching for the record 23' with flag 24', Step 3 of setting the key to be added to the record 23', Step 4 of setting the 0 flag 24' of the record to 1, and the relative position of the record. step 5 of backing up the contents of the record 23' to the record 23' of the index table backup file 28 in the relative organization format located at the same record relative position;
A record addition process consisting of step 6 in which the record 27' of the relative organization format data file 25 at the same record relative position as the above record relative position is made a use record; step 7 to search for a record with the key to be deleted; step 8 to clear the key of the record; and step 9 to set the flag of the record to 0.
and a step of backing up the contents of the above record to a record of the index table/backup file 28 in the relative organization format located at the same record relative position as the relative position of the above record; In FIG.
A record consisting of a step 12 of searching the index table 21 for a record having a key to be referenced, and a step 13 of reading a record of a relative organization format data file located at the same record relative position as the above record. In the reference process and FIG.
It consists of a step 14 in which the index table 21 is searched for a record having a key to be updated, and a step 15 in which a record in a relative organization format data file located at the same record relative position as the above record is updated. It consists of record update processing.

次に本発明の詳細な説明する。Next, the present invention will be explained in detail.

第5図において、インデックステーブル21のレコード
には、キーとそのレコードの使用状態を示すフラグ24
が格納されている。フラグ24が1のとき対応するレコ
ード23には使用中キーが格納され、フラグ24′が0
のとき対応するレコード23′は空きレコードである。
In FIG. 5, a record in the index table 21 includes a key and a flag 24 indicating the use status of the record.
is stored. When the flag 24 is 1, the corresponding record 23 stores the in-use key, and the flag 24' is 0.
When , the corresponding record 23' is an empty record.

また、インデックステーブル21のレコード相対番号2
2は、データファイル25のレコード相対番号26と一
対一に対応している。なお、上記フラグ24は、データ
ファイル25のレコードの使用状態も示し、フラグ24
が1のとき対応するレコードは使用中レコード27であ
シ、フラグ24′が0のとき対応するレコードは空きレ
コード27′である。インデックスチーフル21には、
システム停止、システムダウン時のバックアップとして
インデックステーブル・バックアップファイル28が用
意されている。インデックステーブル・バックアップフ
ァイル28は、インデックステーブル21と同様の構造
を持った相対編成形式のデータファイルである。
Also, the record relative number 2 of the index table 21
2 has a one-to-one correspondence with the record relative number 26 of the data file 25. Note that the flag 24 also indicates the usage status of the record in the data file 25.
When flag 24' is 1, the corresponding record is the in-use record 27, and when flag 24' is 0, the corresponding record is empty record 27'. Index Chiful 21 has
An index table backup file 28 is prepared as a backup in case of system stop or system down. The index table backup file 28 is a relative organization data file having a structure similar to that of the index table 21.

このインデックステーブル21とデータファイル25を
使用するプロ0.ダラムが、キーを持つデータレコード
を追加する一合には、追加キーがインデックステーブル
21に既に存在するがチェックし、インデックステーブ
ル21のフラグ24′が0のレコードを検索し空きレコ
ード23′を得る。得られたレコードは、追加キーをセ
ットし該当フラグ24′を1にし、インデックステーブ
ル・バックアップファイル28の該当レコードへバック
アップする。その後、上記レコードと同じレコード相対
位置にあるデータファイル25の空きレコード27′を
使用レコードにする。
Professional 0.0 that uses this index table 21 and data file 25. When Durham adds a data record with a key, it checks whether the additional key already exists in the index table 21, searches for a record in which the flag 24' of the index table 21 is 0, and obtains a free record 23'. . The obtained record is backed up to the corresponding record in the index table backup file 28 by setting an additional key and setting the corresponding flag 24' to 1. Thereafter, an empty record 27' of the data file 25 located at the same record relative position as the above record is made a used record.

キーを持つデータレコードを削除する場合には、削除キ
ーによってインデックステーブル21を検索し該当レコ
ード24を得る。得られたレコードは、削除キーをクリ
アーし該当フラグ24を0にし、インデックステーブル
・バックアップファイル28の該当レコードへバックア
ップする。その後、上記レコードと同じレコード相対位
置にあるデータファイル25の使用レコード27を空き
レコードにする。
When deleting a data record having a key, the index table 21 is searched using the deletion key to obtain the corresponding record 24. The obtained record is backed up to the corresponding record in the index table backup file 28 by clearing the deletion key and setting the corresponding flag 24 to 0. Thereafter, the used record 27 of the data file 25 located at the same record relative position as the above record is made an empty record.

キーを持つデータレコードを参照する場合には、−参照
キーによってイン、デックステーブル21を検索し、該
当レコードを得る。
When referring to a data record having a key, the index table 21 is searched using the reference key to obtain the corresponding record.

キーを持つデニタレコードを更新する場合には、更新キ
ーによってインデックステーブル21を検索し、該当レ
コードを得て更新する。
When updating a digital record having a key, the index table 21 is searched using the update key, and the corresponding record is obtained and updated.

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

本発明のファイル管理方式は、インデックステーブルに
よってキーの追加、削除、参照、更新が行えるためファ
イルのアクセス効率が良くなシ、ファイルの再編成処理
も不要となるという効果がある。
The file management method of the present invention has the advantage that since keys can be added, deleted, referenced, and updated using an index table, file access efficiency is improved and file reorganization processing is not required.

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

第1図は、本発明の第1の実施例を示すフローチャート
、第2図は、本発明の第2の実施例を示すフローチャー
ト、第3図は、本発明の第3の実施例を示すフローチャ
ート、第4図は、本発明の第4の実施例を示すフローチ
ャート、第5図は、前記実施例のテーブルとファイルの
構成を説明する模式図である。 21・・・インデックステーブル、22・・・レコード
相対番号を示す数字、  23.23’ 、23’・・
・キーレコード、  24.24’・・・フラグ、25
・・・相対編成形式のデータファイル、26・・・レコ
ード相対番号を示す数字、27.27’・・・レコード
、28・・・インデックステーブル−バックアップファ
イル。 代理人 弁理士  内 原   音 第 1 図 茅 2 ズ $41!l
FIG. 1 is a flowchart showing a first embodiment of the invention, FIG. 2 is a flowchart showing a second embodiment of the invention, and FIG. 3 is a flowchart showing a third embodiment of the invention. , FIG. 4 is a flowchart showing a fourth embodiment of the present invention, and FIG. 5 is a schematic diagram illustrating the structure of tables and files of the embodiment. 21... Index table, 22... Number indicating relative record number, 23.23', 23'...
・Key record, 24.24'...Flag, 25
. . . Data file in relative organization format, 26 . . . Number indicating relative record number, 27.27' . . . Record, 28 . . . Index table-backup file. Agent Patent Attorney Uchihara Otodai 1 Figure 2 $41! l

Claims (1)

【特許請求の範囲】 (A)主記憶上に展開されたインデックステーブルに対
して追加するキーを持つレコードの既存をチェックする
ステップと、上記インデックステーブルの0フラグを持
つレコードを検索するステップと、上記レコードへ追加
するキーをセットするステップと、上記レコードの0フ
ラグを1にするステップと、上記レコードの相対位置と
同じレコード相対位置にある相対編成形式のインデック
ステーブル・バックアップファイルのレコードへ上記レ
コードの内容をバックアップするステップと、上記レコ
ードの相対位置と同じレコード相対位置にある相対編成
形式のデータファイルのレコードを使用レコードにする
ステップとから構成されるレコード追加処理(B)上記
インデックステーブルに対して削除するキーを持つレコ
ードを検索するステップと、上記レコードのキーをクリ
アーするステップと、上記レコードのフラグを0にする
ステップと、上記レコードの相対位置と同じレコード相
対位置にある相対編成形式のインデックステーブル・バ
ックアップファイルのレコードへ上記レコードの内容を
バックアップするステップと、上記レコードの相対位置
と同じレコード相対位置にある相対編成形式のデータフ
ァイルのレコードを空きレコードにするステップとから
構成されるレコード削除処理 (C)上記インデックステーブルに対して参照するキー
を持つレコードを検索するステップと、上記レコードの
相対位置と同じレコード相対位置にある相対編成形式の
データファイルのレコードを読み出すステップとから構
成されるレコード参照処理 (D)上記インデックステーブルに対して更新するキー
を持つレコードを検索するステップと、上記レコードの
相対位置と同じレコード相対位置にある相対編成形式の
データファイルのレコードを更新するステップとから構
成されるレコード更新処理 を含むことを特徴とするファイル管理方式。
[Scope of Claims] (A) A step of checking the existing record with a key to be added to the index table developed on the main memory, and a step of searching for a record with a 0 flag in the index table; A step of setting a key to be added to the above record, a step of setting the 0 flag of the above record to 1, and a step of setting the above record to the record of the relative organization format index table/backup file at the same record relative position as the above record. Record addition process (B) consisting of the step of backing up the contents of the above record, and the step of making the record of the relative organization format data file at the same record relative position as the record relative position as the use record (B) for the above index table. a step of searching for a record with the key to be deleted, a step of clearing the key of the above record, a step of setting the flag of the above record to 0, and a step of searching for the record with the key to be deleted. A record consisting of the step of backing up the contents of the above record to the record of the index table/backup file, and the step of making the record of the relative organization format data file at the same record relative position as the relative position of the above record an empty record. Deletion processing (C) consists of a step of searching the index table for a record having a reference key, and a step of reading a record of a data file in a relative organization format at the same record relative position as the relative position of the above record. (D) A step of searching the index table for a record having a key to be updated, and a step of updating a record of a data file in a relative organization format at the same record relative position as the relative position of the above record. A file management method characterized by including record update processing consisting of.
JP62279727A 1987-11-04 1987-11-04 File managing system Pending JPH01120647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62279727A JPH01120647A (en) 1987-11-04 1987-11-04 File managing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62279727A JPH01120647A (en) 1987-11-04 1987-11-04 File managing system

Publications (1)

Publication Number Publication Date
JPH01120647A true JPH01120647A (en) 1989-05-12

Family

ID=17615041

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62279727A Pending JPH01120647A (en) 1987-11-04 1987-11-04 File managing system

Country Status (1)

Country Link
JP (1) JPH01120647A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61160133A (en) * 1985-01-09 1986-07-19 Hitachi Ltd Data input management method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61160133A (en) * 1985-01-09 1986-07-19 Hitachi Ltd Data input management method

Similar Documents

Publication Publication Date Title
ATE192249T1 (en) STORAGE OF COMPUTER DATA
JP2022501747A (en) Data backup methods, equipment, servers and computer programs
WO2020207010A1 (en) Data backup method and device, and computer-readable storage medium
US20060129618A1 (en) Method and a computer system for synchronising backups of objects and of meta data about the objects
JP2001344139A (en) Database management device
JPS62197840A (en) File managing device
JPH01120647A (en) File managing system
CN115328864A (en) Management method, device, device and storage medium for deleted files
JPH0934758A (en) Relational data base access control system
JPH0385650A (en) Disk volume restoration system
JPS58114149A (en) Electronic filing system
JP3178671B2 (en) File system and its file recovery method
JP2507604B2 (en) Information processing device
JPH08328929A (en) Database partition management system
JPH0744426A (en) File system file management method
JPH0319044A (en) Automatic file deletion system
JPH04195559A (en) Subfile management system
CN111831231A (en) Method and device for merging and splitting partitions
JPH0228846A (en) Data storing system
JPH0293959A (en) File management system
JPH04145548A (en) File controlling system
O'Brien Retrieval with dBase II
JPH0797346B2 (en) File access device
EP1669870A2 (en) A method and a computer system for synchronising backups of objects and of meta data about the objects
JPH04170672A (en) Article data deleting system