JPH07219820A - Managing method for cyclic file - Google Patents

Managing method for cyclic file

Info

Publication number
JPH07219820A
JPH07219820A JP6030910A JP3091094A JPH07219820A JP H07219820 A JPH07219820 A JP H07219820A JP 6030910 A JP6030910 A JP 6030910A JP 3091094 A JP3091094 A JP 3091094A JP H07219820 A JPH07219820 A JP H07219820A
Authority
JP
Japan
Prior art keywords
record
file
stored
data
storage area
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
JP6030910A
Other languages
Japanese (ja)
Inventor
Yoshiaki Nagao
美明 長尾
Hiroyuki Tanaka
裕之 田中
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.)
Kanebo Ltd
Original Assignee
Kanebo 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 Kanebo Ltd filed Critical Kanebo Ltd
Priority to JP6030910A priority Critical patent/JPH07219820A/en
Publication of JPH07219820A publication Critical patent/JPH07219820A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To obtain a cyclic file of large capacity by dividing a physical file into plural pieces even when the idle areas of a storing device are scattered. CONSTITUTION:When the data are stored in the head record of a file, a record number 52 included in a storing area 5 of the next data storing position information is updated and stored in a key information store are 43 so that the next data is stored in the next record of the same file. When the data are stored in a record other than the head one and also in a record other than the final one that is set on a file management table 4, the number 52 is updated in the area 5 so that the next data is stored in the next record of the same file. When the data are stored in the final record, the number 52 is updated so that the in next data is stored in the head record of the next file that is set on the table 4.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【従来の技術】本発明はサイクリック・ファイルの管理
方法に係わり、更に詳細には格納装置内の物理的な空き
状況により、ファイル容量の制約を受けないサイクリッ
ク・ファイルの管理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for managing a cyclic file, and more particularly to a method for managing a cyclic file which is not restricted by the file capacity due to the physical availability of the storage device.

【0002】[0002]

【従来の技術】従来より、予め格納できるレコード数を
設定し、先頭レコードより昇順にデータを格納し、最終
レコードに格納後は先頭レコードに戻り、レコードの内
容を最新データに書き換えていくことにより最新データ
をある一定件数分常時保管していくサイクリック・ファ
イルが知られている。このサイクリック・ファイルによ
る方法は、予め格納できるレコード数が設定されるた
め、ファイル容量が容易にわかることや、常時、最新の
情報から一定件数分の情報が保管できる等の特長を有
し、例えば時系列に発生するログデータを格納するログ
データファイル等に利用される。
2. Description of the Related Art Conventionally, by setting the number of records that can be stored in advance, storing data in ascending order from the first record, returning to the first record after storing it in the last record, and rewriting the contents of the record to the latest data. A cyclic file that keeps the latest data for a certain number of records at all times is known. This cyclic file method has the features that the number of records that can be stored is set in advance, so that the file size can be easily known and that a fixed number of information can be stored from the latest information at all times. For example, it is used for a log data file or the like that stores log data generated in time series.

【0003】従来、これらのサイクリック・ファイルは
1つの論理ファイルを1つの物理ファイル(100)で
作成し、図5の右側に示すように物理ファイル(10
0)の最大レコード数Nと次データを書込むレコード位
置n+1を保有し、次データを書込むレコード位置が、
物理ファイルの最大のレコード数を越えると、先頭レコ
ードに戻るという管理が行われてきた。即ち、第nレコ
ードが最新データ格納位置とした場合、図5の左側に示
すようにNが最新データとなり、以下降順に古いデータ
が格納されるようななる。
Conventionally, these cyclic files create one logical file by one physical file (100), and as shown on the right side of FIG.
The maximum record number N of 0) and the record position n + 1 for writing the next data are held, and the record position for writing the next data is
It has been managed to return to the first record when the maximum number of records in the physical file is exceeded. That is, when the nth record is the latest data storage position, N is the latest data as shown on the left side of FIG. 5, and the oldest data is stored in descending order.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、このよ
うなサイクリック・ファイルの管理方法は、下記のよう
な問題がある。 大容量のサイクリック・ファイルを作成しようとし
た場合、格納装置上にそれに見合った連続したスペース
が必要である。 図6に示すように物理ファイル(100)のファイ
ル容量を増加させた場合、データが最終レコードまで書
き換えられるまで検索時に無効なデータが含まれる。 最新(最旧)レコード位置の管理しか行わないた
め、途中のデータを検索したい場合、順次読取りが必要
となり、検索に時間がかかる。
However, such a cyclic file management method has the following problems. If you want to create a large cyclic file, you need a contiguous space on the storage device. When the file size of the physical file (100) is increased as shown in FIG. 6, invalid data is included in the search until the data is rewritten up to the final record. Since only the latest (oldest) record position is managed, if it is desired to retrieve data in the middle, sequential reading is required, and the retrieval takes time.

【0005】本発明は上述の問題点に鑑みてなされたも
のであって、その目的は、格納装置内の物理的な空き状
況に依存せず、所望の容量のサイクリック・ファイルが
構築でき、検索スピードが速く拡張が容易なサイクリッ
ク・ファイルの管理方法を提供する。
The present invention has been made in view of the above problems, and an object thereof is to construct a cyclic file having a desired capacity without depending on the physical free space in a storage device. It provides a method for managing cyclic files that is fast to search and easy to expand.

【0006】[0006]

【課題を解決するための手段】上述の目的を達成するた
め本発明は次の構成を取る。即ち第1番目の発明は、予
め格納できるレコード数を設定し、先頭レコードより昇
順にデータを格納し、最終レコードに格納後は先頭レコ
ードに戻り、レコードの内容を最終データに書き換えて
いくことにより最新データをある一定の件数分常時保管
していくサイクリック・ファイルを物理的に複数個に分
割すると共に、ファイル名と最終レコード番号と各ファ
イルの先頭レコードに格納したデータのキー情報を格納
するファイル管理テーブルと、次データを格納するファ
イル名とレコード番号を格納する次データ格納位置情報
格納エリアを設け、データを前記次データ格納位置情報
格納エリア内のファイル名とレコード番号に従い格納
後、データをファイルの先頭レコードに格納した場合に
は、同一ファイルの次レコードに次データが格納される
ように次データ格納位置情報格納エリア内のレコード番
号を更新すると共に、該データのキー情報を該ファイル
に関するファイル管理テーブル内の先頭レコードキー情
報格納エリアに格納し、データをファイルの先頭レコー
ドでないレコードかつファイル管理テーブル内に設定さ
れた最終レコードでないレコードに格納した場合には、
同一ファイルの次レコードに次のデータが格納されるよ
うに次データ格納位置情報格納エリア内のレコード番号
を更新し、データをファイル管理テーブル内に設定され
た最終レコードに格納した場合には、ファイル管理テー
ブル内に設定された次のファイルの先頭レコードに次の
データが格納されるように次データ格納位置情報格納エ
リア内のファイル名とレコード番号を更新することを特
徴とするサイクリック・ファイルの管理方法を要旨とす
る。
In order to achieve the above object, the present invention has the following constitution. That is, the first invention is to set the number of records that can be stored in advance, store data in ascending order from the first record, return to the first record after storing it in the last record, and rewrite the contents of the record to the last data. The latest data is always stored for a certain number of times. A cyclic file is physically divided into multiple files, and the file name, last record number, and key information of the data stored in the first record of each file are stored. A file management table and a next data storage location information storage area for storing a file name and a record number for storing the next data are provided, and the data is stored according to the file name and the record number in the next data storage location information storage area. Is stored in the first record of the file, the next data is stored in the next record of the same file. As described above, the record number in the next data storage location information storage area is updated, and the key information of the data is stored in the first record key information storage area in the file management table for the file, and the data is not the first record of the file. If you store in a record that is not the final record set in the file management table,
If the record number in the next data storage location information storage area is updated so that the next data is stored in the next record of the same file, and the data is stored in the last record set in the file management table, The file name and record number in the next data storage location information storage area are updated so that the next data is stored in the first record of the next file set in the management table. The management method is the main point.

【0007】また第2番目の発明は、予めできるレコー
ド数を設定し、先頭レコードより昇順にデータを格納
し、最終レコードに格納後は先頭レコードに戻り、レコ
ードの内容を最新データに書き換えていくことにより最
新データをある一定の件数分常時保管していくサイクリ
ック・ファイルを物理的に複数個に分割すると共に、フ
ァイル名と最終レコード番号と各ファイルの先頭レコー
ドに格納したデータのキー情報と変更後の最終レコード
番号を格納するファイル管理テーブルと、次データを格
納するファイル名とレコード番号を格納する次データ格
納位置情報格納エリアを設け、データを前記次データ格
納位置情報格納エリア内のファイル名とレコード番号に
従い格納後、データをファイルの先頭レコードに格納し
た場合には、同一ファイルの次レコードに次データが格
納されるように次データ格納位置情報格納エリア内のレ
コード番号を更新すると共に、該データのキー情報を該
ファイルに関するファイル管理テーブル内の先頭レコー
ドキー情報格納エリアに格納し、データをファイルの先
頭レコードでないレコードかつファイル管理テーブル内
に設定された最終レコードでないレコードに格納した場
合には、同一ファイルの次レコードに次のデータが格納
されるように次データ格納位置情報格納エリア内のレコ
ード番号を更新し、データをファイル管理テーブル内に
設定された最終レコードに格納した場合には、ファイル
管理テーブル内の変更後の最終レコード番号と最終レコ
ード番号を比較し、変更後の最終レコード番号が最終レ
コード番号よりも大きい時には、同一ファイルの次レコ
ードに次のデータが格納されるように次データ格納位置
情報格納エリア内のレコード番号を更新する共に、最終
レコード番号に1を加算し、一方変更後の最終レコード
番号が最終レコード番号と同一になった時には、ファイ
ル管理テーブル内に設定された次のファイルの先頭レコ
ードに次のデータが格納されるように次データ格納位置
情報格納エリア内のファイル名とレコード番号をを更新
することを特徴とするサイクリック・ファイルの管理方
法を要旨とする。
The second aspect of the invention is to set the number of records that can be created in advance, store data in ascending order from the first record, return to the first record after storing it in the last record, and rewrite the contents of the record to the latest data. By doing so, the cyclic data that always stores the latest data for a certain number of times is physically divided into multiple files, and the file name, the last record number, and the key information of the data stored in the first record of each file are stored. A file management table for storing the changed last record number, a file name for storing the next data and a next data storage location information storage area for storing the record number are provided, and data is stored in the file in the next data storage location information storage area. If the data is stored in the first record of the file after storing according to the name and record number, the same The record number in the next data storage location information storage area is updated so that the next data is stored in the next record of the file, and the key information of the data is stored in the first record key information storage area in the file management table for the file. If the data is stored in a record that is not the first record in the file and is not the last record set in the file management table, the next data storage position is set so that the next data is stored in the next record in the same file. When the record number in the information storage area is updated and the data is stored in the last record set in the file management table, the changed last record number in the file management table and the last record number are compared and changed. Same when the last record number after is larger than the last record number The record number in the next data storage location information storage area is updated so that the next data is stored in the next record of the file, and 1 is added to the last record number, while the changed last record number is the last record number. When it becomes the same, the file name and record number in the next data storage location information storage area must be updated so that the next data is stored in the first record of the next file set in the file management table. The gist is the method of managing cyclic files.

【0008】[0008]

【実施例】以下、図1にブロック図を示したサイクリッ
ク・ファイル管理装置を例に、本発明の第1の方法を説
明する。該サイクリック・ファイルの管理方法は、3個
のデータを格納するサイクリック・ファイルとしてのフ
ァイルA(1)、ファイルB(2)、ファイルC(3)
と、ファイル管理テーブル(4)、次データ格納位置情
報格納エリア(5)、更新手段(6)から構成される。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The first method of the present invention will be described below by taking the cyclic file management device whose block diagram is shown in FIG. 1 as an example. The method of managing the cyclic file is a file A (1), a file B (2), and a file C (3) as cyclic files that store three data.
And a file management table (4), a next data storage location information storage area (5), and an updating means (6).

【0009】サイクリック・ファイルのファイルA
(1)は最終レコード番号はNA であり、レコード番号
=1からレコード番号=NA までデータが昇順に格納さ
れている。サイクリック・ファイルのファイルB(2)
は最終レコード番号はNB であり、レコード番号=1か
らレコード番号=nB −1(nB は次に述べる次データ
格納位置情報格納エリアの次データを格納するレコード
番号)までデータが昇順に格納され、またレコード番号
=nB から最終レコード番号=NB までデータが昇順に
格納されている。サイクリック・ファイルのファイルC
(3)は最終レコード番号はNC であり、レコード番号
=1から最終レコード番号=NC までデータが昇順に格
納されている。
File A of cyclic file
(1) the final record number is N A, the data from the record number = 1 until the record number = N A is stored in ascending order. File B of cyclic file (2)
The last record number is N B , and the data is in ascending order from record number = 1 to record number = n B -1 (n B is the record number that stores the next data in the next data storage location information storage area described below). Data is stored in the ascending order from the record number = n B to the last record number = N B. File C of cyclic file
In (3), the final record number is N C , and data is stored in ascending order from record number = 1 to final record number = N C.

【0010】ファイル管理テーブル(4)はファイル名
と最終レコード番号と各ファイルの先頭レコードに格納
したデータのキー情報を格納する。図中、(41)がフ
ァイル名であり、具体的にはA,B,Cというファイル
名が格納されており、(42)が最終レコード番号であ
り、ファイル名Aに対してNA がファイル名Bに対して
B がファイル名Cに対してNC が格納されており、
(43)が先頭レコードキー情報であり、ファイル名A
に対してKA 、具体的には103115(10時31分
15秒)が、ファイル名Bに対してKB 、具体的には1
22516(12時25分16秒)が、ファイル名Cに
対してKC 、具体的には082312(8時23分12
秒)が格納されている。
The file management table (4) stores the file name, the last record number, and the key information of the data stored in the first record of each file. In the figure, (41) is the file name, specifically, the file names A, B, and C are stored, (42) is the final record number, and N A is the file for the file name A. N B is stored for the name B and N C is stored for the file name C,
(43) is the head record key information, and the file name A
With respect to K A , specifically 103115 (10:31:15), but with respect to the file name B, K B , specifically 1
22516 (12:25:16) is K C for the file name C , specifically 082312 (8:23:12)
(Seconds) is stored.

【0011】次データ格納位置情報格納エリア(5)
は、次データを格納するファイル名とレコード番号を格
納する。図中(51)がファイル名であり、具体的には
Bというファイル名が格納されており、(52)がレコ
ード番号であり、具体的にはnB というレコード番号が
格納されている。
Next data storage location information storage area (5)
Stores the file name for storing the next data and the record number. In the figure, (51) is a file name, specifically a file name of B is stored, (52) is a record number, and specifically, a record number of n B is stored.

【0012】更新手段(6)は、図2に示すようにデー
タが発生すると、次データ格納位置情報格納エリア
(5)内のファイル名(51)とレコード番号(5
2)、具体的にはファイル名=「B」、レコード番号=
「nB 」に従い、発生したデータをファイル名=
「B」、レコード番号=「nB 」に前に格納されている
データに上書きして格納する(ステップS1)。
When data is generated as shown in FIG. 2, the updating means (6) has a file name (51) and a record number (5) in the next data storage location information storage area (5).
2) Specifically, file name = “B”, record number =
The generated data is file name = according to “n B ”.
"B", and stores the overwritten data stored prior to the record number = "n B" (step S1).

【0013】そして、データをファイルの先頭レコード
に格納した場合(ステップS2)には、同一ファイルの
次レコードに次データが格納されるように次データ格納
位置情報格納エリア(5)内のレコード番号(52)を
更新、具体的にはレコード番号=「2」に更新すると共
に、該データのキー情報BK 、具体的には122516
(12時25分16秒)をファイル管理テーブル(4)
内の該当するファイル名の先頭レコードキー情報格納エ
リア(43)、具体的にはファイル名=「B」のキー情
報格納エリア(43)に格納する(ステップS3)。
When the data is stored in the first record of the file (step S2), the record number in the next data storage location information storage area (5) is set so that the next data is stored in the next record of the same file. (52) is updated, specifically, the record number = “2”, and the key information B K of the data, specifically 122516.
(12:25:16) file management table (4)
The data is stored in the first record key information storage area (43) of the corresponding file name, specifically, in the key information storage area (43) of file name = “B” (step S3).

【0014】そして、データをファイルの先頭レコード
でないレコード(ステップS4)かつファイル管理テー
ブル(4)内に設定された最終レコードでないレコード
に格納した場合(ステップS5)には同一ファイルの次
レコードに次データが格納されるように次データ格納位
置情報格納エリア(5)内のレコード番号(52)を更
新、具体的にはレコード番号=「nB +1」にするよう
に更新する(ステップS6)。
When the data is stored in a record which is not the first record of the file (step S4) and a record which is not the last record set in the file management table (4) (step S5), the data is stored next to the next record of the same file. The record number (52) in the next data storage location information storage area (5) is updated so that the data is stored, specifically, the record number = “n B +1” is updated (step S6).

【0015】そして、データをファイル管理テーブル
(4)内に設定された最終レコードに格納した場合(ス
テップS7)には、ファイル管理テーブル(4)内に設
定された次のファイルの先頭レコードに次のデータが格
納されるように、次データ格納位置情報格納エリア
(5)内のファイル名(51)とレコード番号(52)
を更新、具体的には、ファイル名=「C」、レコード番
号=「1」になるように更新する(ステップS8)。
When the data is stored in the last record set in the file management table (4) (step S7), the next record is set to the first record of the next file set in the file management table (4). File name (51) and record number (52) in the next data storage location information storage area (5) so that
Is updated, specifically, the file name = “C” and the record number = “1” are updated (step S8).

【0016】次に、図3にブロック図を示したサイクリ
ック・ファイルの管理装置を例に、本発明の第2の方法
を説明する。本発明の第1の方法と異なる点はファイル
管理テーブル(4)と更新手段(6)であるので、相違
点のみ説明する。
Next, the second method of the present invention will be described by taking the cyclic file management apparatus whose block diagram is shown in FIG. 3 as an example. The difference from the first method of the present invention is the file management table (4) and the updating means (6), so only the differences will be described.

【0017】ファイル管理テーブル(4)はファイル名
と最終レコード番号と各ファイル名の先頭レコードに格
納したデータのキー情報と変更後の最終レコード番号を
格納する。即ち図中(44)の変更後の最終レコード番
号が追加されている点が第1の方法と相違する点であ
り、ファイルAにたいしてNA +EA が、ファイルBに
対してNA +EB が、ファイルCに対してNC +EC
格納されている。
The file management table (4) stores the file name, the last record number, the key information of the data stored in the first record of each file name, and the changed last record number. That point last record Number is in the figure (44) has been added is the point of difference from the first method, N A + E A relative file A, is N A + E B for the file B , File C stores N C + E C.

【0018】次に更新手段(6)を図4に基づいて説明
するが、ステップS7以降が第1の方法と相違する点で
あるので、ステップS7以降につき説明する。
Next, the updating means (6) will be described based on FIG. 4, but since step S7 and subsequent steps are different from the first method, only step S7 and subsequent steps will be described.

【0019】データをファイル管理テーブル(4)内に
設定された最終レコードに格納した場合(ステップS
7)には、ファイル管理テーブル(4)内の変更後の最
終レコード番号(44)と最終レコード番号(42)を
比較し、変更後の最終レコード番号(44)が最終レコ
ード番号(42)よりも大きい時(ステップS8)に
は、同一ファイルの次レコードに次データが格納される
ように次データ格納位置情報格納エリア(5)内のレコ
ード番号(52)を更新、具体的にはレコード番号=
「nB +1」に更新すると共に、最終レコード番号(4
2)に1を加算し(ステップS9)、一方変更後の最終
レコード番号(44)が最終レコード番号(42)と同
一となった時(ステップS10)には、ファイル管理テ
ーブル(4)内に設定された次のファイルの先頭レコー
ドに次のデータが格納されるように、次データ格納位置
情報格納エリア(5)内にのファイル名(51)とレコ
ード番号(52)を更新、具体的にはファイル名=
「C」、レコード番号=「1」になるように更新する
(ステップS11)。このようにして最終レコード番号
を1づつ増加せしめるようにしているので、検索時に無
効データが含まれることがない。
When data is stored in the last record set in the file management table (4) (step S
In 7), the changed final record number (44) and the final record number (42) in the file management table (4) are compared, and the changed final record number (44) is obtained from the final record number (42). If it is also larger (step S8), the record number (52) in the next data storage location information storage area (5) is updated so that the next data is stored in the next record of the same file. =
While updating to “n B +1”, the final record number (4
1 is added to 2) (step S9), and when the changed final record number (44) becomes the same as the final record number (42) (step S10), the file management table (4) is updated. The file name (51) and record number (52) in the next data storage location information storage area (5) are updated so that the next data is stored in the first record of the set next file. Is the file name =
It is updated so that “C” and the record number = “1” (step S11). Since the final record number is incremented by 1 in this way, invalid data will not be included in the search.

【0020】次に、このようなサイクリック・ファイル
の管理方法におけるサイクリック・ファイルの検索方法
について説明する。例えば10時50分30秒以降に発
生したログデータを検索する場合には、ファイル管理テ
ーブル(4)の先頭レコードキー情報(43)検索して
ファイルAの先頭レコードキー情報が10時31分15
秒で、ファイルの先頭レコードキー情報が12時25分
16秒であるので、データはファイルA(1)にあるこ
とがわかるのでファイルA(1)の先頭より検索するこ
とにより行う。即ち、従来はnB の位置より検索するよ
うにしていたので、検索スピードが格段に向上すること
が分かる。
Next, a cyclic file search method in such a cyclic file management method will be described. For example, when searching for log data generated after 10:50:30, the first record key information (43) of the file management table (4) is searched and the first record key information of the file A is 10:31:15.
Since the first record key information of the file is 12:25:16 in seconds, it is known that the data is in the file A (1), and therefore the search is performed from the beginning of the file A (1). That is, since the search is conventionally performed from the position n B , it can be seen that the search speed is remarkably improved.

【0021】[0021]

【発明の効果】以上詳述したように、本発明方法によれ
ば格納装置の空エリアが分散している場合でも、物理フ
ァイルを複数個に分割配置することが可能となり、大容
量のサイクリック・ファイルを構築することが可能であ
る。さらに、各サイクリック・ファイルの先頭レコード
のキー情報をテーブルで別管理するようにしているの
で、検索範囲を容易に限定しうるようになり、検索スピ
ードの向上が図れる。また、最大レコード番号(現在使
用中)と変更後の最大レコード番号を別管理するように
しているので、検索時に無効データを読み取ることがな
く頗る有用である。
As described above in detail, according to the method of the present invention, even if the empty areas of the storage device are dispersed, it becomes possible to divide and arrange the physical file into a plurality of files, and a large capacity cyclic file can be arranged. -It is possible to build a file. Further, since the key information of the first record of each cyclic file is separately managed in the table, the search range can be easily limited and the search speed can be improved. In addition, since the maximum record number (currently in use) and the maximum record number after change are managed separately, it is useful to read invalid data at the time of retrieval.

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

【図1】本発明のサイクリック・ファイルの管理方法に
用いるサイクリック・ファイルの管理装置の全体の構成
を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of a cyclic file management device used in a cyclic file management method of the present invention.

【図2】更新手段の処理フローを示すフローチャートで
ある。
FIG. 2 is a flowchart showing a processing flow of updating means.

【図3】本発明のサイクリック・ファイルの管理方法に
用いるサイクリック・ファイルの管理装置の全体の構成
を示すブロック図である。
FIG. 3 is a block diagram showing an overall configuration of a cyclic file management device used in the cyclic file management method of the present invention.

【図4】更新手段の処理フローを示すフローチャートで
ある。
FIG. 4 is a flowchart showing a processing flow of an updating unit.

【図5】従来のサイクリック・ファイルの管理方法を説
明する図である。
FIG. 5 is a diagram for explaining a conventional cyclic file management method.

【図6】従来のサイクリック・ファイルの管理方法の欠
点を説明する図である。
FIG. 6 is a diagram for explaining a drawback of a conventional cyclic file management method.

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

1 ファイルA 2 ファイルB 3 ファイルC 4 ファイル管理テーブル 5 次データ格納位置情報格納エリア 6 更新手段 1 file A 2 file B 3 file C 4 file management table 5th data storage location information storage area 6 update means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 予め格納できるレコード数を設定し、先
頭レコードより昇順にデータを格納し、最終レコードに
格納後は先頭レコードに戻り、レコードの内容を最新デ
ータに書き換えていくことにより最新データをある一定
の件数分常時保管していくサイクリック・ファイルを物
理的に複数個に分割すると共に、ファイル名と最終レコ
ード番号と各ファイルの先頭レコードに格納したデータ
のキー情報を格納するファイル管理テーブルと、次デー
タを格納するファイル名とレコード番号を格納する次デ
ータ格納位置情報格納エリアを設け、 データを前記次データ格納位置情報格納エリア内のファ
イル名とレコード番号に従い格納後、 データをファイルの先頭レコードに格納した場合には、
同一ファイルの次レコードに次データが格納されるよう
に次データ格納位置情報格納エリア内のレコード番号を
更新すると共に、該データのキー情報を該ファイルに関
するファイル管理テーブル内の先頭レコードキー情報格
納エリアに格納し、 データをファイルの先頭レコードでないレコードかつフ
ァイル管理テーブル内に設定された最終レコードでない
レコードに格納した場合には、同一ファイルの次レコー
ドに次のデータが格納されるように次データ格納位置情
報格納エリア内のレコード番号を更新し、 データをファイル管理テーブル内に設定された最終レコ
ードに格納した場合には、ファイル管理テーブル内に設
定された次のファイルの先頭レコードに次のデータが格
納されるように次データ格納位置情報格納エリア内のフ
ァイル名とレコード番号を更新することを特徴とするサ
イクリック・ファイルの管理方法。
1. The latest data is set by setting the number of records that can be stored in advance, storing data in ascending order from the first record, returning to the first record after storing in the last record, and rewriting the contents of the record to the latest data. A file management table that physically divides a cyclic file that is always stored for a certain number of items into multiple files, and stores the file name, last record number, and key information of the data stored in the first record of each file. And a next data storage location information storage area for storing the file name and record number for storing the next data, and after storing the data according to the file name and record number in the storage area for the next data storage location information, store the data in the file When stored in the first record,
The record number in the next data storage location information storage area is updated so that the next data is stored in the next record of the same file, and the key information of the data is stored in the first record key information storage area in the file management table for the file. If the data is stored in a record that is not the first record of the file and is not the last record set in the file management table, the next data is stored so that the next data is stored in the next record of the same file. If the record number in the location information storage area is updated and the data is stored in the last record set in the file management table, the next data will be stored in the first record of the next file set in the file management table. File name in the next data storage location information storage area so that it is stored Management method of cyclic files and updates the record number.
【請求項2】 予め格納できるレコード数を設定し、先
頭レコードより昇順にデータを格納し、最終レコードに
格納後は先頭レコードに戻り、レコードの内容を最新デ
ータに書き換えていくことにより最新データをある一定
の件数分常時保管していくサイクリック・ファイルを物
理的に複数個に分割すると共に、ファイル名と最終レコ
ード番号と各ファイルの先頭レコードに格納したデータ
のキー情報と変更後の最終レコード番号を格納するファ
イル管理テーブルと、次データを格納するファイル名と
レコード番号を格納する次データ格納位置情報格納エリ
アを設け、 データを前記次データ格納位置情報格納エリア内のファ
イル名とレコード番号に従い格納後、 データをファイルの先頭レコードに格納した場合には、
同一ファイルの次レコードに次データが格納されるよう
に次データ格納位置情報格納エリア内のレコード番号を
更新すると共に、該データのキー情報を該ファイルに関
するファイル管理テーブル内の先頭レコードキー情報格
納エリアに格納し、 データをファイルの先頭レコードでないレコードかつフ
ァイル管理テーブル内に設定された最終レコードでない
レコードに格納した場合には、同一ファイルの次レコー
ドに次のデータが格納されるように次データ格納位置情
報格納エリア内のレコード番号を更新し、 データをファイル管理テーブル内に設定された最終レコ
ードに格納した場合には、ファイル管理テーブル内の変
更後の最終レコード番号と最終レコード番号を比較し、
変更後の最終レコード番号が最終レコード番号よりも大
きい時には、同一ファイルの次レコードに次のデータが
格納されるように次データ格納位置情報格納エリア内の
レコード番号を更新すると共に、最終レコード番号に1
を加算し、一方変更後の最終レコード番号が最終レコー
ド番号と同一になった時にはファイル管理テーブル内に
設定された次のファイルの先頭レコードに次のデータが
格納されるように次データ格納位置情報格納エリア内の
ファイル名とレコード番号を更新することを特徴とする
サイクリック・ファイルの管理方法。
2. The latest data is stored by setting the number of records that can be stored in advance, storing data in ascending order from the first record, returning to the first record after storing the last record, and rewriting the contents of the record to the latest data. A cyclic file that is always stored for a certain number of cases is physically divided into multiple files, and the file name, last record number, key information of the data stored in the first record of each file, and the last record after modification A file management table for storing the number, a file name for storing the next data and a next data storage location information storage area for storing the record number are provided, and the data is stored according to the file name and record number in the next data storage location information storage area. After storing, if the data is stored in the first record of the file,
The record number in the next data storage location information storage area is updated so that the next data is stored in the next record of the same file, and the key information of the data is stored in the first record key information storage area in the file management table for the file. If the data is stored in a record that is not the first record of the file and is not the last record set in the file management table, the next data is stored so that the next data is stored in the next record of the same file. When the record number in the location information storage area is updated and the data is stored in the last record set in the file management table, the last record number after the change in the file management table is compared with the last record number,
When the final record number after change is larger than the final record number, the record number in the next data storage location information storage area is updated so that the next data is stored in the next record of the same file. 1
When the last record number after the change becomes the same as the last record number, the next data storage position information is set so that the next data is stored in the first record of the next file set in the file management table. A method for managing cyclic files, characterized by updating the file name and record number in the storage area.
JP6030910A 1994-02-01 1994-02-01 Managing method for cyclic file Pending JPH07219820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6030910A JPH07219820A (en) 1994-02-01 1994-02-01 Managing method for cyclic file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6030910A JPH07219820A (en) 1994-02-01 1994-02-01 Managing method for cyclic file

Publications (1)

Publication Number Publication Date
JPH07219820A true JPH07219820A (en) 1995-08-18

Family

ID=12316867

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6030910A Pending JPH07219820A (en) 1994-02-01 1994-02-01 Managing method for cyclic file

Country Status (1)

Country Link
JP (1) JPH07219820A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010224948A (en) * 2009-03-24 2010-10-07 Nec Corp File system, access method thereof, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010224948A (en) * 2009-03-24 2010-10-07 Nec Corp File system, access method thereof, and program

Similar Documents

Publication Publication Date Title
KR100886189B1 (en) database
JPH07219820A (en) Managing method for cyclic file
JP3980326B2 (en) Data management method and computer-readable recording medium
JP2000132439A (en) System for retrieving file stored in hard disk of personal computer
JPH0225946A (en) File controller
JPH05151056A (en) Data controller
JPS62287350A (en) Index integrally updating system
JPH08328929A (en) Database partition management system
JP3398672B2 (en) Intermediate data storage device
JP2000066933A (en) Time series data management system
JPH07210563A (en) Index processing method
JPH05250242A (en) Computer system for distributed management of file information
JPH0581100A (en) File management system
KR20000037515A (en) How to configure a non-plus tree for history management
JPS628819B2 (en)
JP2000076106A (en) Management method for indexed sequential file
JPH0283639A (en) File creation control method
JPH04233664A (en) Data base management system
JPH04287140A (en) File managing system for dividing into plural physical files
JPH0789335B2 (en) Inserting and referencing records in indexed sequential files
JPH08328946A (en) Managing method for secondary storage area
JPS62239249A (en) File managing device
JPH02190946A (en) Keyword control system
JPS6358556A (en) File system
JPH04299771A (en) Data retrieving device