JPH0498331A - Retrieval system for unused record of data file - Google Patents

Retrieval system for unused record of data file

Info

Publication number
JPH0498331A
JPH0498331A JP2210507A JP21050790A JPH0498331A JP H0498331 A JPH0498331 A JP H0498331A JP 2210507 A JP2210507 A JP 2210507A JP 21050790 A JP21050790 A JP 21050790A JP H0498331 A JPH0498331 A JP H0498331A
Authority
JP
Japan
Prior art keywords
data
file
record
deleted
data 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
JP2210507A
Other languages
Japanese (ja)
Inventor
Akira Fukuda
章 福田
Kunio Miyazaki
宮崎 邦男
Shuichi Matsuda
修一 松田
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 JP2210507A priority Critical patent/JPH0498331A/en
Publication of JPH0498331A publication Critical patent/JPH0498331A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To shorten processing time at the time of adding data in a data file by retrieving a record where data on the data file is eliminated from key information which is read and writing data into the record. CONSTITUTION:An application program and a file control 3 control a file 1 and a file 2. At first, data on the file 1 is eliminated by an arrow (1) and elimination information is written into the file 2. Key information corresponds to the address of the data file 1. Then elimination information are sequentially read from the head of the file 2 and the unused record of the file 1 is directly retrieved by key information of elimination information which is read and data is added. Then, the file control 3 eliminates head elimination information in the file 2. Thus, processing time at the time of adding data, namely, the access time of the unused record in the data file can be shortened.

Description

【発明の詳細な説明】 〔概 要〕 情報処理装置におけるデータを格納するファイルの未使
用レコード検索方式、特にデータを格納するファイルの
アクセスなしに検索する方式に関し、 データファイルにおけるデータ追記時の処理時間、すな
わち未使用レコードのアクセス時間を短縮することを目
的とし、 データファイルの未使用レコード検索方式において、1
つのデータファイルにデータを書き込む要求が生じた時
、初期状態における順次書き込まれるレコードが存在し
ない時は、該データファイルからデータを削除したレコ
ードのキー情報を管理する他のファイルを参照し、該他
のファイルに該データファイルにおけるデータを削除し
たレコードの記録が存在する時は、該レコードのキー情
報を読み出し、該読み出されたキー情報から、該データ
ファイルのデータが削除されたレコードを索引し、該索
引されたデータファイルのレコードに書き込みを行うよ
う構成する。
[Detailed Description of the Invention] [Summary] Regarding a method for searching for unused records in a file storing data in an information processing device, in particular a method for searching without accessing a file storing data, processing when data is added to a data file. In order to shorten the access time for unused records, in an unused record search method for data files, 1
When a request to write data to one data file occurs and there is no record that is written sequentially in the initial state, another file that manages the key information of the record whose data was deleted from the data file is referred to, and the corresponding When a record of a record in which data in the data file has been deleted exists in the file, the key information of the record is read, and the record in which the data in the data file has been deleted is indexed from the read key information. , is configured to write to a record of the indexed data file.

〔産業上の利用分野] 本発明は情報処理装置におけるデータを格納するファイ
ルの未使用レコード検索方式に関し、特にデータを格納
するファイルのアクセスなしに検索する方式に関するも
のである。
[Industrial Application Field] The present invention relates to an unused record search method for a file storing data in an information processing device, and particularly to a method for searching without accessing a file storing data.

〔従来の技術〕 従来、データの書き込み、削除を行うファイルにデータ
を追記するには、データが削除されて未使用となった未
使用レコードを検出する処理が必要となるため、処理時
間が多くかかるという問題点があった。
[Conventional technology] Conventionally, in order to add data to a file where data is written or deleted, it is necessary to perform processing to detect unused records where data has been deleted and become unused, which takes a lot of processing time. There was a problem that it took a while.

すなわち、第4図に示されるように、ステップ11 (
311)から320の過程を要している。まず、過程、
S11では、データファイルの書き込み位置(WP)が
最終レコード(EOF)に等しいか否か判定し、等しく
なければS12へ進み、等しければS14へ進む。S1
2ではWPがEOFに達しておらず、未だ追記の前の段
階であるからWPレコードに書き込みが可能であり、書
き込みが終われば終了する。S14ではデータファイル
の読み出し位置(RP)を先頭レコードに設定する。次
いで S15でRPレコードを読み込み、RPレコード
が使用中レコードが否か判定する(S16)。使用中レ
コードでなければS17へ進み、使用中レコードであれ
ばS18へ進む。S17ではRPレコードにデータを書
き込む。318ではRPを更新してS19へ進み、S1
9ではRPがEOFに達しない時はS15へ戻り、達し
た時には書き込み不可(S20)として終了する。これ
らの過程において315から319迄の繰り返しに時間
を要する。ここにレコードとは記憶領域を示す。
That is, as shown in FIG. 4, step 11 (
311) to 320 are required. First, the process
In S11, it is determined whether the write position (WP) of the data file is equal to the last record (EOF). If not, the process advances to S12, and if they are equal, the process advances to S14. S1
In No. 2, the WP has not reached EOF and is still in the stage before additional writing, so it is possible to write to the WP record, and the process ends when the writing is completed. In S14, the read position (RP) of the data file is set to the first record. Next, in S15, the RP record is read, and it is determined whether the RP record is in use (S16). If the record is not in use, the process advances to S17, and if the record is in use, the process advances to S18. In S17, data is written to the RP record. In 318, the RP is updated and the process advances to S19.
In step 9, when RP does not reach EOF, the process returns to S15, and when it does, writing is disabled (S20) and the process ends. In these processes, it takes time to repeat steps 315 to 319. A record here indicates a storage area.

〔発明が解決しようとする課題] 上述のように、大量のレコードを持つファイルの未使用
レコードを使用し、データを追記するには、未使用レコ
ード(データが削除されて未使用になったレコード)を
探索するため処理時間が多くかかる。このため処理時間
の短縮が課題であった。
[Problems to be Solved by the Invention] As mentioned above, in order to use unused records in a file with a large number of records and add data, it is necessary to add unused records (records that have become unused due to data deletion). ), it takes a lot of processing time. Therefore, shortening the processing time was an issue.

従って、本発明の目的は、データファイルにおけるデー
タ追記時の処理時間、すなわち未使用レコードのアクセ
ス時間を短縮することにある。
Therefore, an object of the present invention is to shorten the processing time when adding data to a data file, that is, the access time for unused records.

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

本発明の第1の形態においては、第1図に例示されるよ
うに、データファイルの未使用レコード検索方式におい
て、1つのデータファイルにデータを書き込む要求が生
した時、初期状態における順次書き込まれるレコードが
存在しない時は(S1)、該データファイルからデータ
を削除したレコードのキー情報を管理する他のファイル
を参照し(S2)、咳他のファイルに該データファイル
におけるデータを削除したレコードの記録が存在する時
は(S3)、該レコードのキー情報を読み出し、vgB
lみ出されたキー情報から、該データファイルのデータ
が削除されたレコードを索引し(S5)、該索引された
データファイルのレコードに書き込みを行う(S6)こ
とを特徴とするデータファイルの未使用レコード検索方
式が提供される。
In the first embodiment of the present invention, as illustrated in FIG. 1, in the data file unused record search method, when a request to write data to one data file occurs, data is written sequentially in the initial state. If the record does not exist (S1), refer to another file that manages the key information of the record whose data has been deleted from the data file (S2), and add the record whose data has been deleted from the data file to another file. If a record exists (S3), read the key information of the record, and
A method for storing a data file characterized by indexing a record from which data in the data file has been deleted from the retrieved key information (S5), and writing to the indexed record in the data file (S6). A usage record search method is provided.

本発明の第2の形態においては、第2図および第3図に
例示されるように、データファイルの未使用レコード検
索方式であって、該方式はデータファイル1および該デ
ータファイルからデータを削除したレコードのキー情報
を管理する削除レコード管理ファイル2を具備し、該デ
ータファイル1のデータの削除により空きレコードが生
じ、該空きレコードに書き込みをしようとする時、前記
削除レコード管理ファイル2を参照し、データが削除さ
れたレコードのキー情報がら、前記空きレコードを索引
し、書き込みを行うようにしたデータファイルの未使用
レコード検索方式が提供される。
In a second embodiment of the present invention, as illustrated in FIGS. 2 and 3, there is provided a method for searching for unused records in a data file, which method deletes data from data file 1 and the data file. A deleted record management file 2 is provided for managing key information of records that have been deleted, and when an empty record is generated due to deletion of data in the data file 1 and an attempt is made to write to the empty record, the deleted record management file 2 is referred to. However, there is provided an unused record search method for a data file in which the empty record is indexed and written based on the key information of the record from which data has been deleted.

〔作 用〕[For production]

第2図および第3図を用いて本発明の作用について説明
する。図中1はデータを格納するデータファイルであり
、2はファイル1からデータを削除する場合に、その削
除情報を追記しファイルlの未使用レコードを管理する
削除レコード管理ファイルである。第2図に示すように
、ファイル1からデータが削除される時の処理を説明す
る。ファイル1およびファイル2はアプリケーションプ
ログラムおよびファイル管理3によって管理される。ま
ず、ファイルlのデータが矢印■で削除される。次に削
除情報(ファイル種別およびキー情報)がファイル2に
書き込まれる(矢印■)。キー情報はデータファイル1
のアドレスに対応する。
The operation of the present invention will be explained using FIGS. 2 and 3. In the figure, 1 is a data file that stores data, and 2 is a deleted record management file that adds deletion information when data is deleted from file 1 and manages unused records in file 1. As shown in FIG. 2, the process when data is deleted from file 1 will be explained. File 1 and File 2 are managed by an application program and file management 3. First, the data in file l is deleted using the arrow ■. Next, deletion information (file type and key information) is written to file 2 (arrow ■). Key information is data file 1
corresponds to the address of

次いで、第3図に示すように、ファイル2の先頭から順
に削除情報を読み出す(矢印■)。さらに読み出した削
除情報のキー情報によりファイル1の未使用レコードを
直接検索し、データを追記する(矢印■)。ファイル管
理3によりファイル2の先頭の削除情報を削除する。こ
のようにすれば、ファイル1を探索して空きレコードを
検出する代わりにファイル2の削除情報を探索すればよ
いから、アクセス時間の短縮が可能となる。
Next, as shown in FIG. 3, the deletion information is read out in order from the beginning of the file 2 (arrow ■). Furthermore, an unused record in file 1 is directly searched using the key information of the read deletion information, and data is added (arrow ■). File management 3 deletes the deletion information at the beginning of file 2. In this way, instead of searching file 1 to find empty records, it is sufficient to search for deletion information in file 2, thereby making it possible to shorten the access time.

〔実施例] 本発明の一実施例としてのデータファイルの未使用レコ
ードの検索方式を行う処理過程の流れ図が第1図に示さ
れる。
[Embodiment] FIG. 1 shows a flowchart of a process for searching for unused records in a data file as an embodiment of the present invention.

データファイル1の書き込み処理はステップ1(Sl)
から37によって実行される。SlではWP(ファイル
lの書き込み位置)がファイルlの最終レコード位置に
あるか判定する。もし最終レコード位置でなければ、デ
ータファイルはイニシャル段階における順次データを格
納する段階であって追記の段階ではないので36へ進む
。S6ではWPの位置にデータの書き込みが行われ書き
込みが可とされ(S7)終了する。Slで最終レコード
位1に達していれば、追記の段階であるので52へ進む
。S2ではファイル2(削除したレコードのキー情報を
管理するファイル)の先頭データを読み出し、S3に進
む。S3ではファイル2にデータがあるかないか判定し
、もしなければデータ書き込みは不可(S4)として終
了し、もしあれば(S3のイエス)削除情報から未使用
レコードを検索する(S5)。次いでS6へ進み、前記
検索されたレコードのキー情報に対応するアドレスのデ
ータファイルに追記データを書き込む。このデータは書
き込みは可(S7)として処理され終了する。
Data file 1 writing process is step 1 (Sl)
37. In Sl, it is determined whether WP (write position of file l) is at the last record position of file l. If it is not the final record position, the data file is in the initial stage of storing sequential data and not in the additional writing stage, so the process goes to 36. In S6, data is written to the WP position, writing is enabled (S7), and the process ends. If the final record position 1 has been reached in Sl, the process advances to step 52 because it is at the additional recording stage. In S2, the first data of file 2 (a file that manages key information of deleted records) is read, and the process advances to S3. In S3, it is determined whether or not there is data in file 2. If there is no data, data writing is disabled (S4) and the process ends. If there is data (YES in S3), an unused record is searched from the deletion information (S5). Next, the process advances to S6, and additional data is written to the data file at the address corresponding to the key information of the retrieved record. This data is processed as write-enabled (S7), and the process ends.

データファイルの検索を直接行う場合は最長の場合、全
ファイルを読み出して判定しなければならないが、ファ
イル2においては削除レコードの情報が先頭位置から格
納されているからファイル2から削除したレコードのキ
ー情報を読み出した後にそのキー情報に対応するアドレ
スからデータファイルを検索する方が確率的に時間短縮
となる。
If you directly search for a data file, in the longest case, you will have to read all the files to make a decision, but in file 2, the information about deleted records is stored from the beginning position, so the key of the record deleted from file 2 is Searching for a data file from the address corresponding to the key information after reading the information will probably save time.

またファイル2はファイル1以外のデータファイルの削
除レコードの情報も管理できる。
File 2 can also manage information on deleted records of data files other than File 1.

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

本発明によれば、データファイルにおけるデータ追記時
の処理時間、すなわち未使用レコードのアクセス時間を
短縮することができる。
According to the present invention, it is possible to shorten the processing time when additionally writing data in a data file, that is, the time to access unused records.

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

第1図は本発明の一実施例としてのデータファイルの未
使用レコードの検索方式における処理過程を示す流れ図
、 第2図および第3図は本発明を説明するためのプロ・ツ
ク図、および 第4図は従来方式の処理過程の流れ図である。 図において、 1・・・データファイル、 2・・・削除レコード管理ファイル、 3・・・ファイル管理、 4・・・アプリケーションプログラム、である。
FIG. 1 is a flowchart showing the process of searching for unused records in a data file as an embodiment of the present invention, and FIGS. 2 and 3 are process diagrams for explaining the present invention. FIG. 4 is a flowchart of the processing process of the conventional method. In the figure, 1...data file, 2...deletion record management file, 3...file management, 4...application program.

Claims (1)

【特許請求の範囲】 1、データファイルの未使用レコード検索方式において
、 1つのデータファイルにデータを書き込む要求が生じた
時、初期状態における順次書き込まれるレコードが存在
しない時は(S1)、該データファイルからデータを削
除したレコードのキー情報を管理する他のファイルを参
照し(S2)、 該他のファイルに該データファイルにおけるデータを削
除したレコードの記録が存在する時は(S3)、該レコ
ードのキー情報を読み出し、該読み出されたキー情報か
ら、該データファイルのデータが削除されたレコードを
索引し(S5)、該索引されたデータファイルのレコー
ドに書き込みを行う(S6)ことを特徴とするデータフ
ァイルの未使用レコード検索方式。 2、データファイルの未使用レコード検索方式であって
、該方式はデータファイル(1)および該データファイ
ルからデータを削除したレコードのキー情報を管理する
削除レコード管理ファイル(2)を具備し、 該データファイル(1)のデータの削除により空きレコ
ードが生じ、該空きレコードに書き込みをしようとする
時、前記削除レコード管理ファイル(2)を参照し、デ
ータが削除されたレコードのキー情報から、前記空きレ
コードを索引し、書き込みを行うようにしたデータファ
イルの未使用レコード検索方式。
[Claims] 1. In an unused record search method for a data file, when a request to write data to one data file occurs and there is no record to be written sequentially in the initial state (S1), the data is Refers to another file that manages the key information of the record from which data has been deleted from the file (S2), and if the record of the record from which data in the data file has been deleted exists in the other file (S3), the record is The key information of the data file is read out, a record from which data of the data file has been deleted is indexed from the read key information (S5), and a record of the indexed data file is written (S6). Unused record search method for data files. 2. An unused record search method for a data file, which method includes a data file (1) and a deleted record management file (2) that manages key information of records from which data has been deleted from the data file. When an empty record is created by deleting data in the data file (1) and an attempt is made to write to the empty record, the deleted record management file (2) is referred to and the key information of the record from which the data was deleted is used. An unused record search method for data files that indexes and writes empty records.
JP2210507A 1990-08-10 1990-08-10 Retrieval system for unused record of data file Pending JPH0498331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2210507A JPH0498331A (en) 1990-08-10 1990-08-10 Retrieval system for unused record of data file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2210507A JPH0498331A (en) 1990-08-10 1990-08-10 Retrieval system for unused record of data file

Publications (1)

Publication Number Publication Date
JPH0498331A true JPH0498331A (en) 1992-03-31

Family

ID=16590515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2210507A Pending JPH0498331A (en) 1990-08-10 1990-08-10 Retrieval system for unused record of data file

Country Status (1)

Country Link
JP (1) JPH0498331A (en)

Similar Documents

Publication Publication Date Title
EP0487331B1 (en) Directory management system
US7895164B1 (en) Efficient checkpoint process
JP2553751B2 (en) Disk sector replacement method
JPH0498331A (en) Retrieval system for unused record of data file
JP2822869B2 (en) Library file management device
US20060015681A1 (en) Apparatus and method for writing and reading data
JPH03166634A (en) Information recording and playback method
JPH05151056A (en) Data controller
JPS62245574A (en) Data storing system to rotating type recording medium
JP3178671B2 (en) File system and its file recovery method
JPH04252342A (en) Data storage management device in information processing system
JPS62177642A (en) File management system for postscript filing device
JPH01255028A (en) How to access external storage devices
JP2000066933A (en) Time series data management system
JP2000099533A (en) File access method/system
CN119883741A (en) Method for improving NTFS incremental backup speed
JPH04156626A (en) File entry generating system for vtoc
JPS63311451A (en) Access system for low-speed access medium incapable of rewriting
JPH04140825A (en) Optical disk device access system
JPH05250243A (en) Data processing system for extended storage device
JPH0340018A (en) Information recording method for rewritable optical disk
JPH0566976A (en) Master file managing system
JPH11353212A (en) Method and device for managing member in area sharing file
JPH06324812A (en) External storage writing method of image data
JPH0574859B2 (en)