JPH04114244A - File reading system - Google Patents

File reading system

Info

Publication number
JPH04114244A
JPH04114244A JP2234830A JP23483090A JPH04114244A JP H04114244 A JPH04114244 A JP H04114244A JP 2234830 A JP2234830 A JP 2234830A JP 23483090 A JP23483090 A JP 23483090A JP H04114244 A JPH04114244 A JP H04114244A
Authority
JP
Japan
Prior art keywords
records
record
file
memory
reading
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
JP2234830A
Other languages
Japanese (ja)
Inventor
Masahiko Noguchi
雅彦 野口
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 Engineering Ltd
Original Assignee
NEC Engineering 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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP2234830A priority Critical patent/JPH04114244A/en
Publication of JPH04114244A publication Critical patent/JPH04114244A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten time for reading an arbitrary record by storing pointers showing the existent positions of all the records in the form of a table in the ascending order of records on the memory of a computer. CONSTITUTION:When the instruction of declaring the usage of a file (such as a file open instruction or the like) is issued to an external storage device driver 3, the driver 3 secures a table area 5 on a memory 4 of a computer 1. Simultaneously, the driver 3 reads a preceding pointer part 7 and a next pointer part 8 of all the records in the file on an external storage device 2, edits them, prepares a pointer table showing the existent positions in the ascending order of records from the first record to the final record and stores the table in the table area 5 on the memory 4. Thus, since the pointers showing the existent positions of all the records are stored in the form of the table in the ascending order of records on the memory 4 of the computer 1, time for reading the arbitrary record of the file is sharply shortened by a file editing system having the pointers showing the existent positions of records before and behind the arbitrary record.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、外部記憶装置のファイル読み取り方式に関し
、特に、任意のレコードの前後のレコードの所在位置を
示すポインタを有するファイル編成方式によるファイル
の読み取り方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a file reading method for an external storage device, and in particular to a method for reading a file using a file organization method having pointers indicating the locations of records before and after an arbitrary record. Regarding the reading method.

〔従来の技術〕[Conventional technology]

従来、この種のファイルの編成は、レコードの追加、削
除、並び換えを容易に行うため、レコードはデータ部に
加えて、前後のレコードの所在位置を示すポインタ部よ
りなっている。
Conventionally, in the organization of this type of file, in order to easily add, delete, and rearrange records, each record consists of a data section and a pointer section that indicates the location of the preceding and succeeding records.

これより、従来、この種のファイルのレコードの読み取
りは、レコードのポインタ部により、前もしくは後のレ
コードの所在位置を割り出し、これを読み取ることによ
って行われている。
Conventionally, records of this type of file are read by determining the location of the previous or next record using the pointer section of the record, and reading this.

ここで、従来のファイル読み取り方式について図面を参
照して説明する。
Here, a conventional file reading method will be explained with reference to the drawings.

第2図はファイルのレコードの構成を示す図である。FIG. 2 is a diagram showing the structure of records of a file.

第2図において、ファイルのレコードは、データを実際
に格納するデータ部6、これらのレコードを昇順に並べ
たときの、このレコードの前のレコードの所在位置を格
納する前ポインタ部7、同様に、このレコードの後のレ
コードの所在位置を格納する次ポインタ部8より構成さ
れている。
In FIG. 2, the records of the file include a data section 6 that actually stores data, a previous pointer section 7 that stores the location of the record before this record when these records are arranged in ascending order, and a previous pointer section 7 that stores the location of the record before this record when these records are arranged in ascending order. , and a next pointer section 8 that stores the location of the record after this record.

そして、このレコードによりファイルを構成する場合、
レコードの追加、削除、並び換えを容易に行えるという
特徴がある。
And when configuring a file with this record,
It is characterized by the ability to easily add, delete, and rearrange records.

例えば、先頭より1番目のレコードの間に新規にレコー
ドを挿入するには、新規レコード自体はファイルの空き
領域に任意に書き込み、新規レコードの前ポインタ部7
と次ポインタ部8をそれぞれ1番目、2番目のレコード
に当て、同時に、1番目のレコードの次ポインタ部8と
2番目のレコードの前ポインタ部7を新規レコードに当
てることにより、容易にレコードの追加が可能である。
For example, to insert a new record between the first records from the beginning, the new record itself is arbitrarily written in an empty area of the file, and the previous pointer part of the new record is 7.
By applying the and next pointer parts 8 to the first and second records, respectively, and at the same time applying the next pointer part 8 of the first record and the previous pointer part 7 of the second record to the new record, you can easily change the record. Can be added.

しかし、この種のファイルの読み取り動作においては、
通常、レコードが物理的にレコードの昇順に格納されて
いるとは限らないため、先頭レコードより順に、次ポイ
ンタ部8を追って読み取りを行うことになる。
However, in this kind of file read operation,
Normally, records are not necessarily physically stored in ascending order of records, so reading is performed sequentially starting from the first record and following the next pointer section 8.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述したように、従来のファイル読み取り方式では、例
えば、先頭よりn番目のレコードを読み取ろうとする場
合、まず先頭のレコードを読み取り、このレコードの次
ポインタにより2番目のレコードの位置をシークし、2
番目のレコードを読み取るという動作を繰り返すため、
レコードの読み取りを0回、シークをn回必要とし、大
量の時間を要するという欠点がある。
As mentioned above, in the conventional file reading method, for example, when attempting to read the nth record from the beginning, the first record is read, the position of the second record is sought using the next pointer of this record, and the second record is read.
To repeat the operation of reading the th record,
This method has the disadvantage that it requires reading the record 0 times and seeking n times, which takes a large amount of time.

本発明は上記の欠点を解決し、上記の任意レコードの読
み取り時間の短縮を図ったファイル読み取り方式を提供
することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a file reading method that solves the above drawbacks and reduces the time required to read any record.

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

本発明のファイル読み取り方式は、任意のレコードの前
後のレコードの所在位置を示すポインタを有するファイ
ル編成方式によりファイルの任意のレコードを読み取る
ファイル読み取り方式において、コンピュータのメモリ
上に、全レコードの所在位置を示すポインタを、レコー
ドの昇順に、テーブル形式で格納している。
The file reading method of the present invention reads an arbitrary record of a file using a file organization method that has pointers indicating the locations of records before and after an arbitrary record. Pointers indicating the records are stored in table format in ascending order of records.

〔実施例〕〔Example〕

本発明の実施例について図面に基づいて説明する。 Embodiments of the present invention will be described based on the drawings.

第1図は本発明の一実施例のファイル読み取り方式のブ
ロック図、第2図はファイルのレコードの構成を示す図
である。
FIG. 1 is a block diagram of a file reading method according to an embodiment of the present invention, and FIG. 2 is a diagram showing the structure of a file record.

第1図に示すように、本実施例のファイル読み取り方式
は、外部記憶装置ドライバ3、メモリ4より成るコンピ
ュータ1と、外部記憶装置2とから構成され、メモリ4
上にはテーブルエリア5が確保されている。
As shown in FIG. 1, the file reading method of this embodiment is composed of a computer 1 consisting of an external storage device driver 3 and a memory 4, and an external storage device 2.
A table area 5 is secured above.

そして、第2図のファイルのレコードの構成は、従来の
技術の項で述べたようになっている。
The record structure of the file shown in FIG. 2 is as described in the section of the prior art.

第1図において、本実施例のファイル読み取り方式では
、まず、ファイルの使用を宣言する命令(ファイルオー
ブン命令など)が、外部記憶装置ドライバ3(以降ドラ
イバと略す、)に発行されると、ドライバ3はコンピュ
ータ1のメモリ4上に、テーブルエリア5を確保する。
In FIG. 1, in the file reading method of this embodiment, first, when a command (such as a file open command) that declares the use of a file is issued to the external storage device driver 3 (hereinafter abbreviated as driver), the driver 3 secures a table area 5 on the memory 4 of the computer 1.

同時に、ドライバ3は外部記憶装置2上のファイルの全
レコードの、第2図における前ポインタ部7および次ポ
インタ部8を読み取り、これを編集して1番目のレコー
ドから最終レコードまで、レコードの昇順に、その所在
位置を示すポインタテーブルを作成し、メモリ4上のテ
ーブルエリア5に格納する。
At the same time, the driver 3 reads the previous pointer part 7 and next pointer part 8 in FIG. Then, a pointer table indicating the location is created and stored in the table area 5 on the memory 4.

このポインタテーブルは、レコードの追加、削除、並び
換えなどを行う都度、ドライバ3により更新される。
This pointer table is updated by the driver 3 every time records are added, deleted, rearranged, etc.

ドライバ3に対し、レコード読み取り命令が発行される
と、任意のレコードを読み取る場合に限り、まず、テー
ブルエリア5のポインタテーブルを参照し、このポイン
タテーブルにより指示される所在位置のレコードを読み
取る。
When a record reading command is issued to the driver 3, only when reading an arbitrary record, the pointer table in the table area 5 is first referred to, and the record at the location indicated by this pointer table is read.

この結果、前述の例のように先頭よりn番目のレコード
を読み取る場合、各1回のシーク時間、レコード読み取
り時間内に読み取り処理を終了し、読取り時間を短縮す
ることになる。
As a result, when reading the n-th record from the beginning as in the above example, the reading process is completed within each seek time and record reading time, thereby shortening the reading time.

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

以上説明したように本発明によれば、コンピュータのメ
モリ上に、全レコードの所在位置を示すポインタをレコ
ードの昇順に、テーブル形成で格納することにより、任
意のレコードの前後のレコードの所在位置を示すポイン
タを有するファイル編成方式によりファイルの任意のレ
コードの読み取り時間を大幅に短縮できるという効果が
ある。
As explained above, according to the present invention, by storing pointers indicating the locations of all records in the memory of a computer in ascending order of the records in a table formation, the locations of records before and after an arbitrary record can be determined. The file organization method that has pointers that indicate this has the effect of greatly reducing the time it takes to read any record in the file.

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

第1図は本発明の一実施例のファイル読み取り方式のブ
ロック図、第2図はファイルのレコードの構成を示す図
である。 1・・・コンピュータ、2・・・外部記憶装置、3・・
・外部記憶装置ドライバ、4・・・メモリ、5・・・テ
ーブルエリア、6・・・データ部、7・・・前ポインタ
部、8・・・次ポインタ部。 コ沈1−タ
FIG. 1 is a block diagram of a file reading method according to an embodiment of the present invention, and FIG. 2 is a diagram showing the structure of a file record. 1... Computer, 2... External storage device, 3...
- External storage device driver, 4...Memory, 5...Table area, 6...Data section, 7...Previous pointer section, 8...Next pointer section. Co-sinking 1-ta

Claims (1)

【特許請求の範囲】 任意のレコードの前後のレコードの所在位置を示すポイ
ンタを有するファイル編成方式によりファイルの任意の
レコードを読み取るファイル読み取り方式において、 コンピュータのメモリ上に、全レコードの所在位置を示
すポインタを、レコードの昇順に、テーブル形式で格納
することを特徴とするファイル読み取り方式。
[Claims] In a file reading method that reads an arbitrary record of a file using a file organization method that has pointers that indicate the location of records before and after an arbitrary record, the location of all records is indicated on the memory of a computer. A file reading method characterized by storing pointers in table format in ascending order of records.
JP2234830A 1990-09-05 1990-09-05 File reading system Pending JPH04114244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2234830A JPH04114244A (en) 1990-09-05 1990-09-05 File reading system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2234830A JPH04114244A (en) 1990-09-05 1990-09-05 File reading system

Publications (1)

Publication Number Publication Date
JPH04114244A true JPH04114244A (en) 1992-04-15

Family

ID=16977048

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2234830A Pending JPH04114244A (en) 1990-09-05 1990-09-05 File reading system

Country Status (1)

Country Link
JP (1) JPH04114244A (en)

Similar Documents

Publication Publication Date Title
JPH04114244A (en) File reading system
JPH0254346A (en) File switching processing method
JPH0239225A (en) Filing system
JPH01114948A (en) File edition supporting method
JPS6222160B2 (en)
JPH01255028A (en) Method for making access to external storage device
JPH0212346A (en) Data assurance system
JP2549155Y2 (en) Optical filing system
JPH0233786A (en) Optical disk device
JPH03280136A (en) Record positioning system for sequentially programmed file
JPH04373039A (en) Volume save control system
JPH03125238A (en) Information control system
JPS61213920A (en) Control system for disk file
JPH03209542A (en) System and device for automatic production of interlocking test data on communication control program
JPS63228348A (en) Filing device
JPH03250260A (en) Method for outputting result of logic simulation
JPH0652019A (en) File controller
JPS63175948A (en) Message logging system
JPS6457501U (en)
JPS62113231A (en) Virtual disk control system for extended storage device
JPH0670050U (en) Flight recorder
JPH0338741A (en) Working data managing system for main storage
JPH05113922A (en) Data storage device
JPS6130299B2 (en)
JPH012133A (en) file management device