JPH02208750A - File access system - Google Patents
File access systemInfo
- Publication number
- JPH02208750A JPH02208750A JP1031295A JP3129589A JPH02208750A JP H02208750 A JPH02208750 A JP H02208750A JP 1031295 A JP1031295 A JP 1031295A JP 3129589 A JP3129589 A JP 3129589A JP H02208750 A JPH02208750 A JP H02208750A
- Authority
- JP
- Japan
- Prior art keywords
- file
- key file
- key
- management table
- application program
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、データの検索処理方式に関し、特に、ファイ
ルアクセス方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data search processing method, and particularly to a file access method.
従来、アプリケーション・プログラムなどから索引アク
セスを行う場合、予めキーファイルが存在していなけれ
ばならなかった。そのため、ファイル情報管理テーブル
の中にあるキーファイル情報管理テーブルに対して、−
度、使用するキーファイルが登録されているか否かの検
索を行い、使用するキーファイルがなければ、ユーティ
リティなどを用いてキーファイルを作成しなければなら
なかった。Conventionally, when accessing an index from an application program, etc., a key file had to exist in advance. Therefore, for the key file information management table in the file information management table, -
Each time, a search was performed to see if the key file to be used was registered, and if the key file to be used was not found, a key file had to be created using a utility or the like.
上述した従来のファイルアクセス方式においては、予め
アプリケーション・プログラム上で指定されたキーファ
イルが存在しなければ、索引アクセス処理を行うことが
できないという欠点がある。The conventional file access method described above has the disadvantage that index access processing cannot be performed unless a key file specified in advance on an application program exists.
また、索引アクセスを行う場合、データファイルのファ
イル形式が索引編成ファイル形式でなければならないと
いう欠点もある。Another drawback is that when performing index access, the file format of the data file must be an index organization file format.
本発明の目的は、上述の欠点を除去するためにデータフ
ァイルのファイル形式を意識せずに、アプリケーション
・プログラム上で指定されたキーファイルが存在しない
場合に、−時的にキーファイルを生成できるようにした
ファイルアクセス方式を提供することにある。In order to eliminate the above-mentioned drawbacks, it is an object of the present invention to generate a key file temporarily when the key file specified on the application program does not exist, without being aware of the file format of the data file. The purpose of this invention is to provide a file access method that allows for
本発明は、ファイルの情報を管理しているファイル情報
管理テーブルと、
アプリケーション・プログラム上で指定されたキーファ
イルが実際に存在するか否かを、ファイル情報管理テー
ブルに対して検索を行うキーファイル検索処理部と、
キーファイルを使用して、実際にファイルアクセスを行
う索引アクセス処理部とを具備するファイルアクセス方
式において。The present invention includes a file information management table that manages file information, and a key file that searches the file information management table to determine whether or not a key file specified on an application program actually exists. In a file access method comprising a search processing section and an index access processing section that actually accesses files using a key file.
前記キーファイル検索処理部によってキーファイルが存
在しないと判断された場合に、アプリケーション・プロ
グラム上に指定されたキーファイルに必要な領域を求め
、求めた領域を確保できるか否かを、空き領域管理テー
ブルに対してチェックを行い、確保された領域にキーフ
ァイルの生成を行うキーファイル生成部と、
前記キーファイル生成部において確保された領域を解放
する解放処理部と
を具備することを特徴とするものである。If the key file search processing unit determines that the key file does not exist, the area required for the key file specified on the application program is determined, and free space management is performed to determine whether or not the requested area can be secured. The present invention is characterized by comprising: a key file generation unit that checks a table and generates a key file in the secured area; and a release processing unit that releases the area secured by the key file generation unit. It is something.
次に本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.
第1図は本発明の一実施例の構成図である。FIG. 1 is a block diagram of an embodiment of the present invention.
このファイルアクセス方式は、電子計算機1と、外部記
憶装置2とから構成されている。電子計算機1は、アプ
リケーション・プログラム11と、キーファイル検索処
理部12と、キーファイル生成部13と、索引アクセス
処理部14と、解放処理部15とを含んで構成されてい
る。外部記憶装置2には、ファイル情報管理テーブル2
1と、空き領域管理テーブル22と、データファイル群
23と、キーファイル群24とが格納されている。This file access method consists of a computer 1 and an external storage device 2. The computer 1 includes an application program 11, a key file search processing section 12, a key file generation section 13, an index access processing section 14, and a release processing section 15. The external storage device 2 has a file information management table 2.
1, a free space management table 22, a data file group 23, and a key file group 24 are stored.
キーファイル検索処理部12は、アプリケーション・プ
ログラム11上で指定されたキーファイルが存在するか
否かを、ファイル情報管理テーブル21に対して検索を
行う処理部である。キーファイル生成部13は、キーフ
ァイル検索処理部12によってキーファイルが存在しな
いと判断された場合に、アプリケーション・プログラム
11上に指定されたキーファイルの生成を行う処理部で
ある。索引アクセス処理部14は、キーファイルを用い
て索引アクセスを行う処理部である。解放処理部15は
、前記キーファイル生成部13で生成したキーファイル
の領域を解放する処理部である。The key file search processing unit 12 is a processing unit that searches the file information management table 21 to determine whether a key file specified on the application program 11 exists. The key file generation unit 13 is a processing unit that generates a key file specified on the application program 11 when the key file search processing unit 12 determines that the key file does not exist. The index access processing unit 14 is a processing unit that performs index access using a key file. The release processing unit 15 is a processing unit that releases the area of the key file generated by the key file generation unit 13.
第2図(a) 、 (b)は、ファイル情報管理テーブ
ル21の構成例を示したもので、キーファイル群24を
管理するキーファイル情報管理テーブル211と、デー
タファイル群23を管理するデータファイル情報管理テ
ーブル212とから構成されている。キーファイル情報
管理テーブル211は、キーファイル名、データファイ
ル名、デバイス名。FIGS. 2(a) and 2(b) show an example of the configuration of the file information management table 21, in which the key file information management table 211 manages the key file group 24, and the data file manages the data file group 23. It consists of an information management table 212. The key file information management table 211 includes key file names, data file names, and device names.
キー長、およびキー位置を1エントリとして複数エント
リを格納するようになっており、データファイル情報管
理テーブル212は、データファイル名、デバイス名、
レコード長、ブロック長、およびキーファイル名を1エ
ントリとして複数エントリを格納するようになっている
。Multiple entries are stored with key length and key position as one entry, and data file information management table 212 stores data file name, device name,
Multiple entries are stored with record length, block length, and key file name as one entry.
第3図(a) 、 (b)は、空き領域管理テーブル2
2の具体例を示す。デバイス名と空き領域サイズと空き
領域開始位置と空き領域終了位置と各デバイス毎の総合
空き領域サイズとからなっている。Figures 3(a) and 3(b) show the free space management table 2.
A specific example of 2 is shown below. It consists of a device name, free space size, free space start position, free space end position, and total free space size for each device.
次に、このように構成された本実施例の動作について、
第1図乃至第3図を参照して説明する。Next, regarding the operation of this embodiment configured in this way,
This will be explained with reference to FIGS. 1 to 3.
アプリケーション・プログラム11から索引アクセスを
行う命令が発行されると、キーファイル検索処理部12
は、アプリケーション・プログラム11からのデータフ
ァイル名、キーファイル名。When the application program 11 issues a command to perform index access, the key file search processing unit 12
are the data file name and key file name from the application program 11.
キー長、キー位置の情報をもとにデータファイル情報管
理テーブル212に対して、データファイルの検索を行
い、検出したデータファイルに対応するキーファイル群
24中に、アプリケーション・プログラム11から索引
アクセスを行うために指定されたキーファイルが実際に
存在するか否かのチェックをキーファイル情報管理テー
ブル211を参照して行う0例えば、アプリケーション
・プログラム11からデータファイル名としてDATA
2−F、キーファイル名としてKEY22−F、キー長
5.キー位置0という情報が入力された場合、データフ
ァイル情報管理テーブル212に対して、データファイ
ル名にDATA2−Fかあるか否かのチェックを行う。A data file search is performed in the data file information management table 212 based on the information on the key length and key position, and the application program 11 performs index access to the key file group 24 corresponding to the detected data file. Check whether the specified key file actually exists or not by referring to the key file information management table 211.0 For example, if the application program 11 selects DATA as the data file name.
2-F, KEY22-F as the key file name, key length 5. When the information of key position 0 is input, the data file information management table 212 is checked to see if DATA2-F is included in the data file name.
DATA2−Fを検出したら、キーファイル情報管理テ
ーブル211からKEY22−Fというキーファイル名
を検索する。第2図(a)に示す状態では、結果とじて
KEY22−Fは存在しない。When DATA2-F is detected, the key file name KEY22-F is searched from the key file information management table 211. In the state shown in FIG. 2(a), as a result, KEY22-F does not exist.
キーファイル検索処理部12において、実際にキーファ
イルが存在すると判断された場合、索引アクセス処理部
14に制御が移り、存在するキーファイルを使用して索
引アクセスを行う。If the key file search processing unit 12 determines that a key file actually exists, control is transferred to the index access processing unit 14, which performs index access using the existing key file.
次にKEY22−Fのようにキーファイル検索処理部1
2において、実際にキーファイルが存在しないと判断さ
れた場合、キーファイル生成部13に制御が移り、アプ
リケーション・プログラム上で指定されたキーファイル
を生成するに必要な領域を確保するためにデータファイ
ル情報管理テーブル212からデータファイルの情報を
読み取り、必要な領域を求める。この場合、KEY22
−Fの必要な領域は500セクタとする。Next, like KEY22-F, the key file search processing section 1
In step 2, if it is determined that the key file does not actually exist, control is transferred to the key file generation unit 13, and the data file is created in order to secure the area necessary to generate the key file specified on the application program. The information of the data file is read from the information management table 212 and the required area is determined. In this case, KEY22
-F's required area is 500 sectors.
求められたキーファイルの領域が、実際にデバイス上に
確保可能か否かのチェックを行うために空き領域管理テ
ーブル22を参照し、データファイル情報管理テーブル
212を参照した時に得られたデータファイルが存在す
るデバイスに限定して、求められたキーファイルの領域
が確保できる領域サイズを空き領域サイズから検索する
。キーファイルの領域を確保できる領域サイズが空き領
域サイズから検出された場合、キーファイルを確保し、
空き領域管理テーブル22からキーファイルを領域分の
領域サイズを削除し、キーファイル情報管理テーブル2
11に作成したキーファイルの情報を登録する。In order to check whether the requested key file area can actually be secured on the device, the free space management table 22 is referred to, and the data file information obtained when the data file information management table 212 is referred to is Search for the area size that can secure the requested key file area from the free area size, limited to existing devices. If the area size that can secure the key file area is detected from the free area size, secure the key file,
Delete the area size for the key file area from the free area management table 22 and create the key file information management table 2.
11. Register the information of the created key file.
本例の場合には、データファイルDATA2−Fはデバ
イス1に存在するため、空き領域管理テーブル22のデ
バイス1の空き領域サイズから500セクタを確保でき
る場所を検索する。この場合には、10000セクタか
ら19999セクタまでの10000セクタの空き領域
があるので、ここにKEY22−Fを確保すると同時に
、空き領域管理テーブル22からキーファイルの領域5
0oセクタを削除し、キーファイル情報管理テーブル2
11に作成したKEY22−Fの情報を登録(第2図(
b)、第3図(b)参照)する。In this example, since the data file DATA2-F exists in the device 1, a location where 500 sectors can be secured is searched from the free space size of the device 1 in the free space management table 22. In this case, there is a free space of 10,000 sectors from sector 10,000 to sector 19,999, so at the same time, secure KEY22-F here, and at the same time, select the key file area 5 from the free space management table 22.
Delete 0o sector and create key file information management table 2
Register the KEY22-F information created in step 11 (Figure 2 (
b), see Figure 3(b)).
次にデータファイルからデータレコードを順次読み込み
、キーファイル情報管理テーブル211に登録しである
キー位置、キー長の情報をもとにキー値とデータファイ
ル内のレコード位置を索引ブロック内の1エントリとし
て1階層構造のキーファイルを生成し、索引アクセス処
理部14に起動要求を出す。Next, data records are sequentially read from the data file, and based on the key position and key length information registered in the key file information management table 211, the key value and the record position in the data file are set as one entry in the index block. A key file with a one-layer structure is generated and an activation request is issued to the index access processing unit 14.
キーファイル生成部13から要求を受けた索引アクセス
処理部14は、アプリケーション・プログラム11から
の条件式を解読し、キーファイル生成部13で生成され
たキーファイルを使用して最上位レベルの索引ブロック
から第2レベルの索引ブロックへ最終的には最下位レベ
ルの索引ブロックへと階層毎に降りていき条件式に当て
はまるデータの検索を行い、その結果をもとにデータフ
ァイルから条件式に当てはまるレコードを導び出しアプ
リケーション・プログラム11に結果を返す。The index access processing unit 14, which has received a request from the key file generation unit 13, decodes the conditional expression from the application program 11 and uses the key file generated by the key file generation unit 13 to create the top level index block. Search for data that matches the conditional expression by descending to the second-level index block and finally to the lowest-level index block, and based on the results, search for records that match the conditional expression from the data file. is derived and the result is returned to the application program 11.
解放処理部15は、アプリケーション・プログラム11
の処理終了後、キーファイル生成部13によって作成さ
れたキーファイルの削除を行い空き領域管理テーブル2
2にキーファイルの領域分の領域サイズを追加し、キー
ファイル情報管理テーブル211から削除したキーファ
イルの情報を削除する。例にあげたキーファイルKEY
22−Fもアプリケーション・プログラム11の処理終
了後、解放処理部15によって解放され、空き領域管理
テーブル22とキーファイル情報管理テーブル211は
、最初の状態(第2図(a)、第3図(a))となる。The release processing unit 15 executes the application program 11
After the processing is completed, the key file created by the key file generation unit 13 is deleted and the free space management table 2 is
The area size for the area of the key file is added to 2, and the information of the deleted key file is deleted from the key file information management table 211. Key file KEY as an example
22-F is also released by the release processing unit 15 after the processing of the application program 11 is completed, and the free space management table 22 and the key file information management table 211 are returned to their initial states (Fig. 2(a), Fig. 3(a)). a)).
なお、上記実施例では、ファイル情報管理テーブル21
および空き領域管理テーブル22を外部記憶装置2内に
設けるようにしたが、ファイル情報管理テーブル21お
よび空き領域管理テーブル22は電子計算機1のメモリ
上に設けるようにしてもよい。Note that in the above embodiment, the file information management table 21
Although the free space management table 22 and the free space management table 22 are provided in the external storage device 2, the file information management table 21 and the free space management table 22 may be provided in the memory of the computer 1.
以上説明したように本発明は、−時的にアプリケーショ
ン・プログラム上で指定されたキーファイルを作成する
ようにしたことにより、予めキーファイルを作成するこ
となく、索引アクセス処理を行うことができる効果、お
よびデータファイルのファイル形式に制約を受けず索引
アクセス処理を行う効果を奏する。As explained above, the present invention has the following advantages: - By creating a key file specified on an application program from time to time, index access processing can be performed without creating a key file in advance. , and index access processing is performed without being restricted by the file format of the data file.
第1図は本発明の一実施例の構成図、第2図(a) 、
(b)は第1図中のファイル情報管理テーブルの内容
を示す図、第3図(a) 、 (b)は第1図中の空き
領域管理テーブルの詳細を示す図である。
1・・・電子計算機、2・・・外部記憶装置、11・・
・アプリケーション・プログラム、12・・・キーファ
イル検索処理部、13・・・キーファイル生成部、14
・・・索引アクセス処理部、15・・・解放処理部、2
1・・・ファイル情報管理テーブル、22・・・空き領
域管理テーブル、23・・・データファイル群、24・
・・キーファイル群、211・・・キーファイル情報管
理テーブル、212・・・データファイル情報管理テー
ブル。Fig. 1 is a configuration diagram of an embodiment of the present invention, Fig. 2(a),
3(b) is a diagram showing the contents of the file information management table in FIG. 1, and FIGS. 3(a) and 3(b) are diagrams showing details of the free space management table in FIG. 1. 1...Electronic computer, 2...External storage device, 11...
-Application program, 12...Key file search processing unit, 13...Key file generation unit, 14
... Index access processing section, 15 ... Release processing section, 2
1...File information management table, 22...Free space management table, 23...Data file group, 24.
...Key file group, 211...Key file information management table, 212...Data file information management table.
Claims (1)
ルと、 アプリケーション・プログラム上で指定されたキーファ
イルが実際に存在するか否かを、ファイル情報管理テー
ブルに対して検索を行うキーファイル検索処理部と、 キーファイルを使用して、実際にファイルアクセスを行
う索引アクセス処理部とを具備するファイルアクセス方
式において、 前記キーファイル検索処理部によってキーファイルが存
在しないと判断された場合に、アプリケーション・プロ
グラム上に指定されたキーファイルに必要な領域を求め
、求めた領域を確保できるか否かを、空き領域管理テー
ブルに対してチェックを行い、確保された領域にキーフ
ァイルの生成を行うキーファイル生成部と、 前記キーファイル生成部において確保された領域を解放
する解放処理部と を具備することを特徴とするファイルアクセス方式。[Claims] A file information management table that manages file information, and a search performed on the file information management table to determine whether a key file specified on the application program actually exists. In a file access method that includes a key file search processing unit and an index access processing unit that uses the key file to actually access the file, when the key file search processing unit determines that the key file does not exist. Next, the area required for the key file specified on the application program is determined, the free space management table is checked to see if the requested area can be secured, and the key file is generated in the secured area. A file access method comprising: a key file generation section that performs the above operations; and a release processing section that releases an area secured by the key file generation section.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1031295A JPH02208750A (en) | 1989-02-09 | 1989-02-09 | File access system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1031295A JPH02208750A (en) | 1989-02-09 | 1989-02-09 | File access system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02208750A true JPH02208750A (en) | 1990-08-20 |
Family
ID=12327310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1031295A Pending JPH02208750A (en) | 1989-02-09 | 1989-02-09 | File access system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02208750A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012064088A (en) * | 2010-09-17 | 2012-03-29 | Yamatake Corp | Access right management system and method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61243542A (en) * | 1985-04-22 | 1986-10-29 | Mitsubishi Electric Corp | Dynamic index management system for data base |
-
1989
- 1989-02-09 JP JP1031295A patent/JPH02208750A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61243542A (en) * | 1985-04-22 | 1986-10-29 | Mitsubishi Electric Corp | Dynamic index management system for data base |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012064088A (en) * | 2010-09-17 | 2012-03-29 | Yamatake Corp | Access right management system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2005309727A (en) | File system | |
JP2007527074A (en) | System and method for searching efficient file content in a file system | |
EP0461046B1 (en) | File access processing system | |
JP2000357115A (en) | Device and method for file retrieval | |
JPH0317753A (en) | File access system | |
JPH02208750A (en) | File access system | |
US7606789B2 (en) | Data access and retrieval mechanism | |
JP2912657B2 (en) | File access processor | |
JP2675088B2 (en) | Information collection method | |
JPH04336340A (en) | Disk cache access control system | |
JPH0744426A (en) | File management method for file system | |
JPH0465427B2 (en) | ||
JPH04112253A (en) | Data accessing method using multilayer buffer | |
JPH01253024A (en) | Buffer control method for data base management | |
JP3398672B2 (en) | Intermediate data storage device | |
JP2747009B2 (en) | Record addition method for indexed sequential files | |
JPH03174654A (en) | Filing method and its device | |
JP2581145B2 (en) | Security processing method | |
JPH02287641A (en) | Access control system for direct organizing file | |
JPH04336341A (en) | File access control system | |
JPS61276040A (en) | File access system | |
JPH0312337B2 (en) | ||
JPH10240744A (en) | System for processing retrieval of range division chart and method therefor and recording medium for recording retrieval processing program | |
JPH04314129A (en) | File managing system | |
JPH04264674A (en) | Method and device for retrieving file |