JP2001022622A - File managing method - Google Patents

File managing method

Info

Publication number
JP2001022622A
JP2001022622A JP11194589A JP19458999A JP2001022622A JP 2001022622 A JP2001022622 A JP 2001022622A JP 11194589 A JP11194589 A JP 11194589A JP 19458999 A JP19458999 A JP 19458999A JP 2001022622 A JP2001022622 A JP 2001022622A
Authority
JP
Japan
Prior art keywords
file
field
variable length
block
record
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.)
Granted
Application number
JP11194589A
Other languages
Japanese (ja)
Other versions
JP4251725B2 (en
Inventor
Mitsunori Kori
光則 郡
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP19458999A priority Critical patent/JP4251725B2/en
Publication of JP2001022622A publication Critical patent/JP2001022622A/en
Application granted granted Critical
Publication of JP4251725B2 publication Critical patent/JP4251725B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To manage variable length data by using a variable length field. SOLUTION: In this file managing method, a variable length logic record including variable length data constituting a record included in an original file is converted to a variable length internal field. The record constituting the internal field is divided into a plurality of record groups 11. A block 12 is generated by dividing each record for every plural internal fields inside each record group 11, and a group 13 is generated by linking these divided blocks 12. A inverted file 14 is generated by further linking these groups 13. An offset position in the inverted file 14 in each block 12 inside each group 13 is set to a managing file 15. In a file management system, the relevant variable length data are read out from the inverted file 14 by specifying the block 12 including the variable length data while referring to the managing file 15 for a data read request to the original file.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はファイル管理方法、
特に可変長データを取り扱うことのできる改良されたフ
ァイル管理方法に関する。
TECHNICAL FIELD The present invention relates to a file management method,
In particular, the present invention relates to an improved file management method capable of handling variable length data.

【0002】[0002]

【従来の技術】データがレコード単位に格納されたファ
イルから所望するデータを取り出す場合、当該データを
含むレコード全体を入出力バッファに書き込み、その入
出力バッファの中から該当するフィールドのみを切り出
す処理が必要であった。つまり、例えば512バイトで
1レコードが形成されている場合には、所望するデータ
が4バイトであっても1レコードすなわち512バイト
分をファイルから読み出さなければならなかった。例を
あげて説明すると、社員データベースの中から氏名と住
所だけを取り出して社員の住所録を作成する場合、上記
のデータ読出し方法に従えば社員全員のレコードを入出
力バッファへ読み出して、その中から氏名と住所だけを
取り出さなければならない。このような方法だと必要以
外のデータも読み出さなくてはならず、効率的でない
し、処理負荷が無用に増大してしまう。
2. Description of the Related Art When extracting desired data from a file in which data is stored in a record unit, a process of writing an entire record including the data into an input / output buffer and cutting out only a corresponding field from the input / output buffer is performed. Was needed. That is, for example, when one record is formed by 512 bytes, even if the desired data is 4 bytes, one record, that is, 512 bytes has to be read from the file. To give an example, when creating an address book of employees by extracting only names and addresses from the employee database, according to the above data reading method, records of all employees are read to the input / output buffer, and Only the name and address must be retrieved. With such a method, unnecessary data must be read out, which is not efficient, and the processing load is unnecessarily increased.

【0003】そこで、本願と同一の出願人は、データを
レコード単位に読み出すのではなく各レコードにおいて
フィールド単位で読み出すことができるようにしたファ
イル管理方法を提案した(特願平9−319527号、
以下「先行文献」)。
In view of this, the same applicant as the present application has proposed a file management method in which data can be read out in units of fields in each record, instead of in units of records (Japanese Patent Application No. 9-319527,
Hereinafter, "prior art documents").

【0004】この管理方法について図8を用いて説明す
る。元ファイル1には複数のフィールド2から構成され
るレコ−ド3が複数格納されているとき、レコード3を
一定件数、例えばNレコードずつ分割する。次に、分割
した各グループにおいて各レコードの先頭から順に一フ
ィールドずつ分割することによって同一位置すなわち同
一項目を格納するために設けられたフィールドをまとめ
てブロック4を生成する。レコード3においてフィール
ド2が行方向に並んでいるとしたならば、フィールド2
をグループ内において列方向にまとめることでブロック
4を生成するということができる。そして、分割した各
グループにおいて分割したブロック4を先頭から行方向
に順次連結してグループ5を再編成する。これをレコー
ド3の全件について行い、その後グループ5を連結する
ことで転置ファイル6を生成する。
[0004] This management method will be described with reference to FIG. When a plurality of records 3 each composed of a plurality of fields 2 are stored in the original file 1, the records 3 are divided by a certain number, for example, N records. Next, in each of the divided groups, the field provided for storing the same position, that is, the same item is collectively generated by dividing one field at a time from the beginning of each record, and a block 4 is generated. If field 2 is arranged in the row direction in record 3, field 2
Are grouped in the column direction in the group to generate the block 4. Then, in each divided group, the divided blocks 4 are sequentially connected in the row direction from the head, and the group 5 is reorganized. This is performed for all the records 3, and then the group 5 is connected to generate an inverted file 6.

【0005】このような構成の転置ファイル6を生成す
ることにより、例えば、上記例において各レコード3に
含まれる氏名のみを取り出したいときには氏名が記憶さ
れたフィールド2を含むブロック4のみを転置ファイル
6から順次読み出せば、社員番号や年齢など氏名以外の
データを社員データベースから読み出す必要がないの
で、入出力データ量の少ない効率的なデータ読出し処理
を行うことができる。
[0005] By generating the transposition file 6 having such a configuration, for example, when it is desired to retrieve only the names included in each record 3 in the above example, only the blocks 4 including the field 2 in which the names are stored are transposed to the transposition file 6. , It is not necessary to read data other than the name such as the employee number and the age from the employee database, so that an efficient data reading process with a small input / output data amount can be performed.

【0006】ところで、先行文献においては、処理速度
の高速化を実現するためにブロック4を構成する各フィ
ールド(以下、「内部フィールド」)2を固定長として
いる。特に、内部フィールド長をワード境界などの固定
境界と合致させることでディスク装置に対する物理的な
入出力回数が増えないように配慮している。従って、元
ファイル1を構成する各フィールド(以下、「論理フィ
ールド」)が可変長である場合、図9に示したように、
論理フィールドを1乃至複数の固定境界に従った固定長
の内部フィールドに変換していた。そして、論理フィー
ルドのデータで満たされなかった内部フィールド内の領
域に対してパディング(padding)を施してい
る。
In the prior art, each field (hereinafter referred to as "internal field") 2 constituting the block 4 has a fixed length in order to increase the processing speed. In particular, by making the internal field length coincide with a fixed boundary such as a word boundary, consideration is given so that the number of physical input / output operations to / from the disk device does not increase. Therefore, when each field (hereinafter, “logical field”) constituting the original file 1 has a variable length, as shown in FIG.
Logical fields have been converted to fixed-length internal fields according to one or more fixed boundaries. Then, padding is performed on an area in the internal field that is not filled with the data of the logical field.

【0007】なお、転置ファイルの生成処理の説明に関
し、元ファイル1に含まれるフィールド2からブロック
4が生成されるように図8を用いて上述したが、実際に
は、図9に示したように論理フィールドから固定長の内
部フィールドに変換する処理と、内部フィールドを集め
てブロック4を生成する処理という2段階の手順で構成
されている。
[0007] The description of the process of generating the transposed file has been described above with reference to FIG. 8 so that the block 4 is generated from the field 2 included in the original file 1, but actually, as shown in FIG. 9. And a process of converting a logical field into a fixed-length internal field and a process of collecting the internal fields to generate a block 4.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、先行文
献においては、同一項目を格納するための内部フィール
ド長は、フィールド内に格納するデータ長に関係なく全
レコード共通の長さとなる。上記例に従って説明する
と、社員データベースに格納される住所の実際のデータ
長は全て同じではないが、先行文献においては、住所デ
ータを登録するために同一長であって固定長の論理フィ
ールドが全レコード共通に割り当てられる。例えば、住
所データのために100バイト分の論理フィールドが用
意された場合、住所データが40バイトであっても60
バイトであっても100バイト分のフィールド長が割り
当てられる。
However, in the prior art, the internal field length for storing the same item is the length common to all records regardless of the data length stored in the field. Explaining according to the above example, the actual data lengths of addresses stored in the employee database are not all the same, but in the prior art document, in order to register the address data, the logical fields of the same length and fixed length are used for all records. Assigned commonly. For example, if a logical field of 100 bytes is prepared for address data, even if the address data is 40 bytes, 60 bytes are required.
Even a byte is assigned a field length of 100 bytes.

【0009】本発明は以上のような問題を解決するため
になされたものであり、その目的は、可変長データを可
変長フィールドを用いて管理しうる改良されたファイル
管理方法を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to provide an improved file management method capable of managing variable-length data using variable-length fields. is there.

【0010】[0010]

【課題を解決するための手段】以上のような目的を達成
するために、本発明に係るファイル管理方法は、少なく
とも1つの可変長のフィールドを含むレコードを複数格
納した元ファイルの管理を行うファイル管理方法におい
て、元ファイルに格納されたレコードを構成する各フィ
ールドを内部フィールドに1対1に変換する際、可変長
データを含む可変長フィールドを可変長内部フィールド
に変換することによって各レコードにおける同一内部フ
ィールドの長さを可変とするフィールド変換ステップ
と、変換された内部フィールドにより構成される全レコ
ードを、複数の群に分割することによってレコードグル
ープを生成するレコードグループ生成ステップと、各レ
コードグループにおいて、各レコードにおける同一フィ
ールドが同じグループに含まれるように分割することで
ブロックを生成するブロック生成ステップと、各レコ−
ドグループにおいて生成されたブロックを全て連結する
ことで新たなグループを編成するとともにその編成した
グループを連結することによって転置ファイルを生成
し、更に可変長データを含むブロックの転置ファイルに
おける格納位置を特定できるブロック管理情報を生成す
る転置ファイル生成ステップとを含み、元ファイルから
の可変長データ読出し要求に対して当該格納位置情報を
参照することによって転置ファイルから該当する可変長
データを特定して読み出すものである。
To achieve the above object, a file management method according to the present invention provides a file for managing an original file storing a plurality of records including at least one variable length field. In the management method, when each field constituting a record stored in the original file is converted to an internal field on a one-to-one basis, a variable-length field including variable-length data is converted to a variable-length internal field so that the same A field conversion step of making the length of the internal field variable, a record group generation step of generating a record group by dividing all records constituted by the converted internal fields into a plurality of groups, , The same field in each record A block generating step of generating a block by dividing to be included in each record -
A new group is formed by connecting all the blocks generated in the group, and an inverted file is generated by connecting the formed groups. Further, the storage position of the block including variable length data in the inverted file is specified. Generating a permissible block management information, and identifying and reading the corresponding variable-length data from the transposed file by referring to the storage location information in response to the variable-length data read request from the original file It is.

【0011】他の発明に係るファイル管理方法は、少な
くとも1つの可変長のフィールドを含むレコードを複数
格納した元ファイルの管理を行うファイル管理方法にお
いて、元ファイルに格納されたレコードを構成する各フ
ィールドを内部フィールドに1対1に変換する際、可変
長データを含む可変長フィールドに対して当該可変長デ
ータを可変長データ記憶手段に登録するとともに、可変
長データ記憶手段における当該可変長データ格納位置情
報を内部フィールドに設定するフィールド変換ステップ
と、変換された内部フィールドにより構成される全レコ
ードを、複数の群に分割することによってレコードグル
ープを生成するレコードグループ生成ステップと、各レ
コードグループにおいて、各レコードにおける同一フィ
ールドが同じグループに含まれるように分割することで
ブロックを生成するブロック生成ステップと、各レコ−
ドグループにおいて生成されたブロックを全て連結する
ことで新たなグループを編成するとともにその編成した
グループを連結することによって転置ファイルを生成す
る転置ファイル生成ステップとを含み、元ファイルから
の可変長データ読出し要求に対して転置ファイルに格納
された当該可変長データの格納位置情報を参照すること
によって可変長データ記憶手段に格納された当該可変長
データを特定して読み出すものである。
According to another aspect of the present invention, there is provided a file management method for managing an original file storing a plurality of records including at least one variable length field, wherein each field constituting a record stored in the original file is managed. Is converted into an internal field on a one-to-one basis, the variable length data including the variable length data is registered in the variable length data storage means, and the variable length data storage position in the variable length data storage means is changed. A field conversion step of setting information in an internal field, a record group generation step of generating a record group by dividing all records constituted by the converted internal fields into a plurality of groups, The same field in the record is the same group A block generating step of generating a block by dividing to be included in flops, each record -
And generating a transposed file by connecting all the blocks generated in the original group to form a new group and connecting the formed groups, and reading variable-length data from the original file. The variable length data stored in the variable length data storage means is specified and read by referring to the storage position information of the variable length data stored in the transposed file in response to the request.

【0012】また、上記各発明において、前記フィール
ド変換ステップは、内部フィールドに空き領域を付加す
ることによって各内部フィールドの区切りを物理的な処
理単位となる境界に合致させるものである。
In each of the above-mentioned inventions, the field conversion step is to add a free space to the internal field so that the delimiter of each internal field matches a boundary serving as a physical processing unit.

【0013】また、上記各発明において、前記ブロック
生成ステップは、生成したブロックサイズが物理的な最
小入出力単位の整数倍と一致しないときには、最小入出
力単位の整数倍になるように当該ブロックに空き領域を
付加するものである。
In each of the above inventions, when the generated block size does not match an integer multiple of the physical minimum input / output unit, the block generation step includes adding the block to the block so as to be an integral multiple of the minimum input / output unit. An empty area is added.

【0014】[0014]

【発明の実施の形態】以下、図面に基づいて、本発明の
好適な実施の形態について説明する。
Preferred embodiments of the present invention will be described below with reference to the drawings.

【0015】実施の形態1.図1は、本発明に係るファ
イル管理方法の実施の形態1に用いられる転置ファイル
の生成方法を示すための模式図であり、図2は、元ファ
イルに含まれているレコードを構成する論理フィールド
の構造と本実施の形態におけるファイル管理システムが
取り扱う内部フィールドの構造並びに各フィールドの対
応関係を示した図である。これらの図及び図3に示した
フローチャートを用いて本実施の形態における転置ファ
イル生成処理について説明する。
Embodiment 1 FIG. 1 is a schematic diagram for illustrating a method of generating an inverted file used in Embodiment 1 of the file management method according to the present invention, and FIG. 2 is a diagram illustrating a logical field constituting a record included in an original file. FIG. 3 is a diagram showing the structure of the internal fields handled by the file management system according to the present embodiment, and the correspondence between the fields. The transposed file generation processing according to the present embodiment will be described with reference to these figures and the flowchart shown in FIG.

【0016】本実施の形態におけるこの処理の手順自体
は、先行文献に記載された手順と基本的には同様であ
る。すなわち、元ファイルの論理フィールドを内部フィ
ールドに変換し、同一の内部フィールドをまとめること
でブロックを生成し、そのブロックを連結することで転
置ファイルを生成する。以下、この各処理について詳述
する。
The procedure of this processing in the present embodiment is basically the same as the procedure described in the prior art. That is, a logical field of the original file is converted into an internal field, a block is generated by combining the same internal fields, and an inverted file is generated by connecting the blocks. Hereinafter, these processes will be described in detail.

【0017】ステップ101において、まず、図2に示
したようにレコードを構成するM個の各論理フィールド
Field0,Field1,...,Field(M-1)をM個の内部フィールド
Field#0,Field#1,...,Field#(M-1)に変換する。本実施
の形態における論理フィールドには、図2(a)に示し
たように実際のフィールドデータに加えてフィールド長
が付加されており、このため各論理フィールドを可変長
に形成することができる。各論理フィールドを内部フィ
ールドに変換する際、内部フィールドの区切りがワード
境界に合致するように必要に応じて空き領域を設け、そ
の空き領域に図2(b)に示したようにpadding
(パディング)を挿入する。これは、処理効率を向上さ
せるためにワード境界などの固定境界に内部フィールド
の区切りを合致させるためである。この空き領域の大き
さは、論理フィールド長と固定境界を意識した内部フィ
ールド長との差分に相当する。従って、図2(b)にお
けるField1とField#1の関係から明らかなように、論理
フィールドの対応する内部フィールドの長さがその論理
フィールドと一致するとは限らない。なお、図2(b)
にはデータの後ろにパディングを挿入した例を示した
が、一内部フィールド内におけるパディングの挿入箇所
及び数はこの例に限定されるものではない。
In step 101, first, as shown in FIG. 2, each of M logical fields constituting a record
Field0, Field1, ..., Field (M-1) is M internal fields
Convert to Field # 0, Field # 1, ..., Field # (M-1). As shown in FIG. 2A, a field length is added to the logical field in the present embodiment in addition to the actual field data, so that each logical field can be formed to have a variable length. When converting each logical field into an internal field, an empty area is provided as necessary so that the delimiter of the internal field coincides with a word boundary, and padding is performed in the empty area as shown in FIG.
Insert (padding). This is because the boundary of the internal field is matched with a fixed boundary such as a word boundary in order to improve processing efficiency. The size of this free area corresponds to the difference between the logical field length and the internal field length with a fixed boundary in mind. Therefore, as is clear from the relationship between Field1 and Field # 1 in FIG. 2B, the length of the corresponding internal field of the logical field does not always match the logical field. FIG. 2 (b)
Shows an example in which padding is inserted after data. However, the position and number of padding in one internal field are not limited to this example.

【0018】本実施の形態において特徴的なことは、内
部フィールドにより構成されるレコード(以下「内部レ
コード」ともいう)に含まれる各内部フィールド(Fiel
d#0,Field#1,...,Field#(M-1))の長さが可変であるこ
とのみならず、同一内部フィールド、例えば図2
(a),(b)に示した各Field#1のように各内部レコ
ードにおける同一位置におけるフィールド長をも可変と
して扱うことができるようにしたことである。これによ
り、可変長データを可変長のまま取り扱うことができ
る。上記例に従って説明すると、社員データベースに格
納される住所データが40バイトであれば40バイト長
の内部フィールドを、60バイトであれば60バイト長
の内部フィールドを割り当てることができるようにな
る。
A feature of this embodiment is that each internal field (Fiel) included in a record (hereinafter also referred to as an "internal record") constituted by internal fields.
d # 0, Field # 1,..., Field # (M-1)) is not only variable in length, but also the same internal field, for example, FIG.
The field length at the same position in each internal record can be treated as variable, as in each of Field # 1 shown in FIGS. As a result, the variable length data can be handled with the variable length. Explaining according to the above example, if the address data stored in the employee database is 40 bytes, an internal field having a length of 40 bytes can be allocated. If the address data is 60 bytes, an internal field having a length of 60 bytes can be allocated.

【0019】以上のようにして元ファイルに含まれてい
たレコード(以下「論理レコード」ともいう)が内部レ
コードへ変換されると、次に、内部レコードを複数の群
に分割することによってレコードグループ11を生成す
る(ステップ102)。本実施の形態の場合、先行文献
と同様に元ファイルを予め決められたNレコードずつに
分割して等しい大きさのレコードグループ11を生成す
るものとする。
When the records (hereinafter, also referred to as "logical records") included in the original file are converted into internal records as described above, the internal records are then divided into a plurality of groups to form a record group. 11 is generated (step 102). In the case of the present embodiment, it is assumed that the original file is divided into predetermined N records and a record group 11 having the same size is generated as in the case of the preceding document.

【0020】続いて、各レコードグループ11内におい
てブロック12を生成する(ステップ103)。これ
は、各レコードグループ11に対して同じ処理が施され
る。また、各レコードグループ11における生成ブロッ
ク数は全て同じであり、本実施の形態の場合、内部レコ
ードを先頭から一内部フィールドずつ行方向へ順番に分
割する。そして、分割した同一の内部フィールドをまと
めることによってブロック12を生成する。つまり、例
えば図1によると、先頭のNレコードから構成される先
頭のレコードグループ11に含まれる先頭のブロック1
2は、1番目からN番目の内部レコードにおける同一内
部レコードField#0により生成されることになる。端的
に言うと、このブロック生成処理は、各内部レコードを
行方向に一内部フィールドずつ分割した後、内部フィー
ルドを列方向にまとめてブロック12を生成する。結果
として、内部フィールドの数と等しい個数のブロック1
2が各レコードグループ11において生成されることに
なる。本実施の形態のように、固定数Nのレコードで構
成されるレコードグループを一内部グループずつに分割
してブロックを生成する場合の処理自体は先行文献と同
じである。
Subsequently, a block 12 is generated in each record group 11 (step 103). In this case, the same processing is performed on each record group 11. Further, the number of generated blocks in each record group 11 is the same, and in the case of the present embodiment, the internal records are sequentially divided in the row direction by one internal field from the head. Then, the block 12 is generated by combining the same divided internal fields. That is, for example, according to FIG. 1, the first block 1 included in the first record group 11 including the first N records
2 is generated by the same internal record Field # 0 in the first to Nth internal records. In short, this block generation process generates a block 12 by dividing each internal record by one internal field in the row direction and then grouping the internal fields in the column direction. As a result, the number of blocks 1 equal to the number of internal fields
2 will be generated in each record group 11. As in the present embodiment, the processing itself in generating a block by dividing a record group composed of a fixed number N of records into one internal group is the same as that of the preceding document.

【0021】ところで、本実施の形態における内部フィ
ールドは、論理フィールドからの変換時にパディングが
施されることによって隣接する内部フィールドとの区切
りがワード境界に合致するように調整されている。しか
し、ブロック12の大きさが物理的な入出力単位の整数
倍となるとは限らない。すなわち、ディスク装置などの
記憶装置では、物理的に入出力できる最小単位は固定さ
れている場合が多い。この最小単位を以下、「セクタサ
イズ」と呼ぶ。ディスク装置に格納されているファイル
にアクセスを行うときの入出力単位がセクタサイズの整
数倍であれば、記憶装置と入出力バッファとの間で直接
入出力を行うことができる。しかし、入出力単位がセク
タサイズの整数倍でなければ、ディスク装置内のデータ
をメモリにいったん読み出した後、改めて入出力バッフ
ァにコピーを行うようにしなければ入出力を行えない場
合がある。このことは、本実施の形態においても同様な
ことがいえ、効率的な入出力を行うためにはブロック1
2の大きさをセクタサイズの整数倍にすることが望まし
い。本実施の形態においては、内部フィールド長をワー
ド境界などの固定境界に合致させるようにはしたが、内
部フィールドをまとめて生成するブロック12の大きさ
が必ずしもセクタサイズの整数倍になるとは限らない。
例えば、セクタサイズが512バイト、ワード境界が4
バイトである場合、10バイトの論理フィールドは12
バイトの内部フィールドに変換されるが、このとき12
×42+8=512であるから42レコード分の12バ
イト長の内部フィールドをまとめて生成されたブロック
12は、セクタサイズの整数倍にはならない。
By the way, the internal fields in the present embodiment are adjusted so that the boundary between adjacent internal fields matches the word boundary by padding at the time of conversion from the logical field. However, the size of the block 12 is not always an integral multiple of the physical input / output unit. That is, in a storage device such as a disk device, the minimum unit that can be physically input and output is often fixed. This minimum unit is hereinafter referred to as “sector size”. If the input / output unit for accessing a file stored in the disk device is an integral multiple of the sector size, direct input / output can be performed between the storage device and the input / output buffer. However, if the input / output unit is not an integral multiple of the sector size, data may not be input / output unless data in the disk device is once read into the memory and then copied to the input / output buffer. This can be said to be the same in the present embodiment.
It is desirable that the size of 2 be an integral multiple of the sector size. In the present embodiment, the internal field length is made to match a fixed boundary such as a word boundary. However, the size of the block 12 that collectively generates the internal fields is not always an integral multiple of the sector size. .
For example, a sector size is 512 bytes and a word boundary is 4
If it is a byte, the 10-byte logical field is 12 bytes.
Is converted to a byte internal field,
Since × 42 + 8 = 512, the block 12 generated by collecting 12-byte internal fields for 42 records does not become an integral multiple of the sector size.

【0022】そこで、本実施の形態においては、内部フ
ィールドをまとめてブロック12を生成した結果、その
ブロック12の大きさがセクタサイズの整数倍にならな
かったときにはパディングを施してセクタサイズの整数
倍となるように調整する。図4は、可変長である一ブロ
ック12のデータ構造例を示した図であるが、内部フィ
ールドを連結したときのブロックサイズがセクタサイズ
の整数倍とならない場合には、最終内部フィールドに続
けて空き領域16を設けて、そこにパディングを施す。
このようにして、ブロックサイズがセクタサイズの整数
倍となるように調整され、このようなブロックサイズの
調整を行うようにすることで入出力処理の効率化を図る
ことができる。
Therefore, in the present embodiment, when the size of the block 12 does not become an integral multiple of the sector size as a result of generating the block 12 by grouping the internal fields, padding is performed to make the block an integral multiple of the sector size. Adjust so that FIG. 4 is a diagram showing an example of the data structure of one variable-length block 12. If the block size when the internal fields are concatenated does not become an integral multiple of the sector size, the data is added immediately after the final internal field. An empty area 16 is provided, and padding is applied thereto.
In this way, the block size is adjusted to be an integral multiple of the sector size, and the input / output processing can be made more efficient by adjusting the block size.

【0023】なお、このブロック生成処理においてパデ
ィングを挿入するのであれば、内部フィールド内にパデ
ィングを施す必要がなくなる。つまり、ブロック12の
生成の元になる論理フィールド長の総和とセクタサイズ
の整数倍との差異の数のパディングをブロック12に施
せばよいことになる。内部フィールド内にパディングを
施さず、内部フィールドの区切りをワード境界に合致さ
せないようにするのであれば、論理フィールドを内部フ
ィールドにマッピング(変換)する必要もなくなる。
If padding is inserted in the block generation processing, it is not necessary to perform padding in the internal field. In other words, the block 12 may be padded with the number of differences between the sum of the logical field lengths from which the block 12 is generated and an integral multiple of the sector size. If padding is not performed in the internal field so that the delimiter of the internal field does not match a word boundary, it is not necessary to map (convert) the logical field to the internal field.

【0024】最後に、転置ファイルを生成するわけであ
るが(ステップ104)、ここでは、まず各レコードグ
ループ11において生成されたブロック12を先頭から
順番に連結していくことによってグループ13を新たに
生成する。図1に基づけば、横(行)方向に並んでいる
ブロック12をグループというファイルに順番(列方
向)に追加登録していくようなイメージである。この処
理ではレコードグループ数個のグループ13が作成され
ることになる。各レコードグループ11に対してブロッ
ク生成処理が行われると、各グループ13を連結するこ
とで転置ファイル14を生成する。なお、レコードグル
ープ11と、レコードグループ11に対応するグループ
13とは、それぞれを構成する内部フィールドは同一で
あるが、内部フィールドの並び順の相違により内部構造
が異なるので、異なる符号を付け異なる構成要素として
示している。
Finally, an inverted file is generated (step 104). Here, the groups 13 are newly formed by connecting the blocks 12 generated in each record group 11 in order from the head. Generate. FIG. 1 shows an image in which blocks 12 arranged in the horizontal (row) direction are additionally registered in a file called a group in the order (column direction). In this process, several record groups 13 are created. When the block generation processing is performed on each record group 11, an inverted file 14 is generated by connecting the groups 13. Note that the record group 11 and the group 13 corresponding to the record group 11 have the same internal fields, but have different internal structures due to the difference in the arrangement order of the internal fields. It is shown as an element.

【0025】更に、可変長の内部フィールドから構成さ
れる各ブロック12の大きさも可変であるため、ブロッ
ク12を連結する際に各ブロック12の大きさを特定す
るための情報を生成しておく必要がある。本実施の形態
では、管理ファイル15を生成し、ブロック管理情報と
して各グループ13における各ブロック12の転置ファ
イル14におけるオフセット位置を管理ファイル15で
保持管理するようにした。これにより、転置ファイル1
4へアクセスする際には管理ファイル15に基づき転置
ファイル14における所望するブロック12の格納位置
を特定でき、アクセス対象となるフィールドデータを読
み出すことができる。以上のようにして、単一の元ファ
イルからフィールドが転置した単一の転置ファイル14
が生成される。
Further, since the size of each block 12 composed of variable-length internal fields is also variable, it is necessary to generate information for specifying the size of each block 12 when the blocks 12 are connected. There is. In the present embodiment, the management file 15 is generated, and the offset position of each block 12 in each group 13 in the transposed file 14 is held and managed as the block management information in the management file 15. As a result, the transposed file 1
When accessing the file 4, the storage location of the desired block 12 in the transposed file 14 can be specified based on the management file 15, and the field data to be accessed can be read. As described above, a single transposed file 14 in which fields are transposed from a single original file
Is generated.

【0026】本実施の形態では、以上のようにして転置
ファイル14を事前に生成し、元ファイルからのデータ
読出し要求に対して転置ファイル14へアクセスを行う
ことで処理効率を向上させることを特徴としている。次
に、本実施の形態におけるファイル管理方法に基づくデ
ータの読出し処理について図5に示したフローチャート
を用いて説明する。
The present embodiment is characterized in that the transposition file 14 is generated in advance as described above, and the processing efficiency is improved by accessing the transposition file 14 in response to a data read request from the original file. And Next, data read processing based on the file management method according to the present embodiment will be described with reference to the flowchart shown in FIG.

【0027】ファイル管理システムは、要求されたフィ
ールドデータを転置ファイル14から読み出す。この
際、内部処理では、要求されたデータを含むブロックを
入出力バッファへ読み出すことになるが、フィールド長
が可変の場合その読出し先となる入出力バッファをどの
ような大きさにするかが問題となる。そこで、本実施の
形態では、最大ブロックサイズ(全ブロック12の最大
長)を予め求めておき、その最大ブロックサイズに等し
い(あるいは整数倍)の大きさの入出力バッファを用意
する。
The file management system reads the requested field data from the transposition file 14. At this time, in the internal processing, the block containing the requested data is read out to the input / output buffer. However, if the field length is variable, the size of the input / output buffer to be read out is a problem. Becomes Therefore, in the present embodiment, the maximum block size (the maximum length of all the blocks 12) is obtained in advance, and an input / output buffer having a size equal to (or an integral multiple of) the maximum block size is prepared.

【0028】ファイル管理システムは、入出力バッファ
を確保すると(ステップ201)、管理ファイル15に
設定されている各ブロック12のオフセットを参照する
ことによって要求されたフィールドデータを格納するブ
ロック位置及びそのブロック12における格納位置を特
定して当該フィールドデータを順次読み出す。すなわ
ち、ファイル管理システムは、管理ファイル15の読出
し位置を先頭グループに位置づけて(ステップ20
2)、当該グループに含まれる各ブロックのオフセット
を得る(ステップ203)。管理ファイル15に基づき
各ブロック12のオフセット位置が求まると、ブロック
12内に含まれる内部フィールドの構造及びフィールド
長は既知なので、読出し対象となるフィールドデータの
格納位置を容易に特定できる(ステップ204)。この
後は転置ファイル14の特定したグループ13において
特定したブロック12から読出し対象とされたフィール
ドデータを順次読み出せばよい(ステップ205〜20
9)。本実施の形態では、転置ファイル14からの読出
し処理を非同期に行っている。そして、先頭のグループ
に対する処理が終了すると、次のグループに処理を移行
し、最終的には転置ファイル14に含まれる全グループ
に対して前述した読出し処理を施す(ステップ210,
211)。以上のようにして、各グループ13へのデー
タ読出し処理が終了すると、この時点で入出力バッファ
を解放する(ステップ212)。
When the file management system secures the input / output buffer (step 201), the block position for storing the requested field data by referring to the offset of each block 12 set in the management file 15 and the corresponding block are stored. Then, the storage position is specified, and the field data is sequentially read. That is, the file management system positions the read position of the management file 15 in the first group (step 20).
2) An offset of each block included in the group is obtained (step 203). When the offset position of each block 12 is determined based on the management file 15, since the structure and the field length of the internal field included in the block 12 are known, the storage position of the field data to be read can be easily specified (step 204). . Thereafter, the field data to be read may be sequentially read from the blocks 12 specified in the specified group 13 of the transposed file 14 (steps 205 to 20).
9). In the present embodiment, the reading process from the transposed file 14 is performed asynchronously. When the processing for the first group is completed, the processing shifts to the next group, and finally, the above-described read processing is performed on all the groups included in the transposed file 14 (step 210,
211). As described above, when the data reading process for each group 13 is completed, the input / output buffer is released at this point (step 212).

【0029】例えば、社員データベースの中から「住
所」という論理フィールドField1に格納されているフィ
ールドデータのみを全て取り出したいという要求が送ら
れてきた場合、本実施の形態においては、論理フィール
ドField1に対応した転置ファイル14内の内部フィール
ドField#1からデータが取り出されることになる。この
とき、内部フィールドField#1はブロック単位にまとめ
られて格納されているので、ファイル管理システムは、
転置ファイル14における各グループ13から内部フィ
ールドField#1を含むブロックのみを各グループ13か
ら読み出せばよい。この際、各グループ13に含まれて
いる内部フィールドField#1のブロック12の転置ファ
イル14における格納位置は、管理ファイル15を参照
することによって特定することができる。もし、元ファ
イルに対して内部フィールドField#1を読出しにいくの
であれば、結果として元ファイル全体をアクセスしなけ
ればならないが、転置ファイル14では、内部フィール
ドField#1をまとめてブロック化してあるので、不要な
データを読み出すことなく「住所」を効率的に読み出す
ことができる。
For example, when a request to retrieve only all the field data stored in the logical field "Field 1" of "address" from the employee database is sent, in the present embodiment, the request corresponds to the logical field "Field 1". The data is extracted from the internal field Field # 1 in the transposed file 14 obtained. At this time, since the internal field Field # 1 is stored in block units, the file management system
Only blocks including the internal field Field # 1 from each group 13 in the transposed file 14 need be read from each group 13. At this time, the storage position of the block 12 of the internal field Field # 1 included in each group 13 in the transposition file 14 can be specified by referring to the management file 15. If the internal field Field # 1 is to be read from the original file, the entire original file must be accessed as a result. However, in the transposed file 14, the internal field Field # 1 is collectively blocked. Therefore, the "address" can be read efficiently without reading unnecessary data.

【0030】本実施の形態によれば、ブロック管理情報
を保持管理するだけで、各ブロック長が可変であっても
フィールドデータの読出しを容易に行うことができる。
なお、本実施の形態では、管理ファイル15を別個な構
成として設けたが、転置ファイル14の内部に組み込ん
でもよいし、障害対策としてレコード数等の情報を管理
ファイル15と転置ファイル14の双方に持たせて二重
化するようにしてもよい。
According to this embodiment, field data can be easily read even if each block length is variable only by holding and managing the block management information.
In the present embodiment, the management file 15 is provided as a separate configuration. However, the management file 15 may be incorporated in the transposition file 14, or information such as the number of records may be stored in both the management file 15 and the transposition file 14 as a measure against a failure. You may make it have and make it duplex.

【0031】なお、上記説明では、管理ファイル15に
最大ブロックサイズを設けることで読出し処理の開始前
に必要なバッファサイズを確実に確保することができる
ようにした。もし、可変長データの最大長が制限されて
いるような場合には、管理ファイル15に最大ブロック
サイズを設けずにその最大長に基づき計算により最大ブ
ロックサイズを求めるようにしてもよい。これにより、
管理ファイル15の実装を簡素化できる。あるいは、ブ
ロック12からフィ−ルドデータを読み出す度に必要な
入出力バッファの獲得と解放を繰り返し行うようにして
もよい。これにより、必要最小限のサイズのバッファで
メモリを確保することができるので、メモリを効率的に
使用することができる。必要なときにバッファの獲得と
解放を繰り返し行うように処理することは、特にブロッ
クサイズに極端なばらつきがある場合には効果的であ
る。
In the above description, by providing the maximum block size in the management file 15, the necessary buffer size can be ensured before the start of the reading process. If the maximum length of the variable-length data is limited, the maximum block size may be calculated based on the maximum length without providing the maximum block size in the management file 15. This allows
The implementation of the management file 15 can be simplified. Alternatively, the necessary input / output buffer may be repeatedly acquired and released each time field data is read from the block 12. As a result, the memory can be secured with a buffer having a minimum necessary size, and the memory can be used efficiently. Processing to repeatedly acquire and release a buffer when necessary is effective especially when there is an extreme variation in the block size.

【0032】また、上記実施の形態では、ブロック管理
情報として各ブロック12のオフセット位置を保持管理
するようにしたが、直前のブロックサイズとの差異を保
持するようにしてもよい。これにより、管理ファイル1
5の大きさを縮小することができる。
In the above embodiment, the offset position of each block 12 is held and managed as the block management information. However, the difference from the immediately preceding block size may be held. As a result, the management file 1
5 can be reduced.

【0033】また、本実施の形態では、転置ファイル1
4からの読出し処理を非同期に行うようにしたが、同時
に発行できる非同期読出し要求の数に制限がある場合を
想定してこの制限数を考慮した非同期発行制御を行う必
要がある。あるいは、同期処理として実行してもよい。
In this embodiment, the transposed file 1
Although the reading process from No. 4 is performed asynchronously, it is necessary to perform asynchronous issuance control in consideration of the limited number, assuming that the number of asynchronous read requests that can be issued simultaneously is limited. Or you may perform as a synchronous process.

【0034】実施の形態2.上記実施の形態1では、可
変長データをそのままブロック12に組み入れたためブ
ロック自体も可変長となり、ブロックサイズを管理する
ための管理ファイル15が必要となった。そこで、本実
施の形態では、フィールド長がレコードによって異なっ
てくる可変長である場合、可変長データをブロック12
に組み入れず別途可変長データファイルに格納するとと
もにブロック12には可変長データファイルへのポイン
タ情報を設定するようにした。
Embodiment 2 In the first embodiment, since the variable length data is directly incorporated into the block 12, the block itself has a variable length, and the management file 15 for managing the block size is required. Therefore, in the present embodiment, if the field length is variable length that varies depending on the record, the variable length data is stored in the block 12.
And is stored separately in a variable length data file, and pointer information to the variable length data file is set in the block 12.

【0035】図6は、本発明に係るファイル管理方法の
実施の形態2に用いられる転置ファイルの生成方法を示
すための模式図である。本実施の形態においては、実施
の形態1に示した管理ファイル15を設けずに、可変長
データを転置ファイル14と別個に格納する可変長デー
タ記憶手段として可変長データファイル17を設けてお
り、また、フィールドデータが通常格納される内部フィ
ールドには、扱うデータが可変長である場合には可変長
データファイル17に格納されている該当する可変長デ
ータの格納位置を特定するためにオフセット情報及び可
変長データのサイズ情報が格納される。このように、可
変長となるデータを別ファイルに格納し、可変長データ
が格納されるべき内部フィールドには固定長で表現でき
るオフセット及びサイズのデータを格納するようにした
ので、転置ファイル14を固定長のデータ、すなわち実
際の固定長データとオフセット及びサイズで生成するこ
とができる。図6には、オフセットとサイズとを別の内
部フィールドに設定し、別のブロック12として生成し
ているが、オフセットとサイズの各内部フィールドをま
とめて1つの可変長データ用ブロック18として生成す
るようにしてもよいし、大きいサイズの同一の内部フィ
ールドに設けるようにしてもよい。なお、本実施の形態
においても上記実施の形態1と同様に、必要に応じてブ
ロック12にパディングを施して転置ファイル14に格
納することができる。
FIG. 6 is a schematic diagram showing a method of generating an inverted file used in the file management method according to the second embodiment of the present invention. In the present embodiment, a variable length data file 17 is provided as variable length data storage means for storing variable length data separately from the transposition file 14 without providing the management file 15 shown in the first embodiment. When the data to be handled is of variable length, the internal field where field data is normally stored includes offset information and offset information for specifying the storage position of the corresponding variable length data stored in the variable length data file 17. The size information of the variable length data is stored. As described above, the variable length data is stored in a separate file, and the offset and size data that can be represented by the fixed length are stored in the internal field where the variable length data is to be stored. It can be generated with fixed-length data, that is, actual fixed-length data, offset, and size. In FIG. 6, the offset and the size are set in different internal fields and are generated as another block 12, but the internal fields of the offset and the size are collectively generated as one variable length data block 18. It may be provided in the same internal field having a large size. In this embodiment, similarly to the first embodiment, the blocks 12 can be padded as necessary and stored in the transposition file 14 as in the first embodiment.

【0036】本実施の形態における転置ファイル生成処
理は、基本的には実施の形態1とほぼ同様である。異な
る処理のみを説明すると、ステップ101において論理
フィールドから内部フィールドへ変換する際、扱うデー
タが可変長であるときには、その可変長データを内部フ
ィールドに設定するのではなく可変長データファイル1
7に追加登録する。その際、可変長データファイル17
における可変長データの格納位置情報として、可変長デ
ータファイル17の先頭からのオフセット情報を取得し
てサイズ情報(可変長データ長)とともに内部フィール
ドに設定する。その後の処理は、内部フィールドに含ま
れるデータが可変長データそのものであるかオフセット
及びサイズであるかの相違しかなく実施の形態1と同じ
である。この結果、転置ファイル14には、固定長デー
タを含むブロック12とオフセット情報及びサイズ情報
を含む可変長データ用ブロック18とが含まれることに
なる。
The transposed file generation processing in the present embodiment is basically substantially the same as in the first embodiment. Explaining only the different processing, when the data to be handled is of variable length when converting from a logical field to an internal field in step 101, the variable length data file 1
7 is additionally registered. At that time, the variable length data file 17
, The offset information from the beginning of the variable-length data file 17 is acquired as the storage position information of the variable-length data, and set in an internal field together with the size information (variable-length data length). Subsequent processing is the same as that of the first embodiment except that the data included in the internal field is the variable length data itself or the offset and the size. As a result, the transposed file 14 includes the block 12 including the fixed length data and the variable length data block 18 including the offset information and the size information.

【0037】次に、本実施の形態におけるファイル管理
方法に基づくデータの読出し処理について図7に示した
フローチャートを用いて説明する。ここでは、転置ファ
イル14から固定長データを読み出す処理については実
施の形態1と同様なので、可変長データを読み出す際の
処理についてのみ説明する。なお、内部フィールドに含
まれているのが固定長データであるかオフセット情報又
はサイズ情報であるかは、内部フィールド内に識別フラ
グを持たせるなどして識別することができる。
Next, data reading processing based on the file management method according to the present embodiment will be described with reference to the flowchart shown in FIG. Here, the process of reading fixed-length data from the transposed file 14 is the same as in the first embodiment, and thus only the process of reading variable-length data will be described. Whether the internal field contains fixed-length data or offset information or size information can be identified by providing an identification flag in the internal field.

【0038】ファイル管理システムは、データの読出し
要求を受け取ると、転置ファイル14の先頭グループ1
3にポインタ(読出し位置)を位置づけ(ステップ22
1)、読出し対象とされた可変長データに関するオフセ
ット情報及びサイズ情報を含む可変長データ用ブロック
18を図示しない転置ファイル用ブロックバッファに読
み出す(ステップ222)。そして、転置ファイル用ブ
ロックバッファの先頭レコードにポインタ(処理位置)
を位置づけ(ステップ223)、読出し対象とされた可
変長データに関するオフセット情報及びサイズ情報を読
み出す(ステップ224)。続いて、読み出したオフセ
ット情報及びサイズ情報に基づきそのオフセット情報に
より特定される格納位置からサイズ情報で示された大き
さのデータを可変長データファイル17から図示しない
可変長データバッファに読み出す(ステップ225)。
When the file management system receives the data read request, the first group 1 of the transposed file 14
Position the pointer (reading position) at 3 (step 22)
1) The variable-length data block 18 including offset information and size information relating to the variable-length data to be read is read out to a non-illustrated inverted file block buffer (step 222). Then, a pointer (processing position) to the first record of the transposed file block buffer
(Step 223), and reads offset information and size information relating to the variable-length data to be read (step 224). Then, based on the read offset information and the size information, data of the size indicated by the size information is read from the storage position specified by the offset information from the variable length data file 17 to a variable length data buffer (not shown) (step 225). ).

【0039】この後は転置ファイル用ブロックバッファ
においてポインタを次に移し、次のオフセット情報及び
そのオフセット情報に対応したサイズ情報を取得して、
可変長データファイル17から可変長データを読み出す
処理を繰り返し行う(ステップ226,227,22
4,225)。
Thereafter, the pointer is moved to the next in the transposed file block buffer, and the next offset information and the size information corresponding to the offset information are obtained.
The process of reading variable-length data from the variable-length data file 17 is repeatedly performed (steps 226, 227, and 22).
4,225).

【0040】転置ファイル用ブロックバッファに読み出
した可変長データ用ブロック18に対して上記処理(ス
テップ224〜227)を繰り返し行い、全てのオフセ
ット情報及びサイズ情報に基づく処理が終了すると、転
置ファイル14に未処理のグループ13がなくなるまで
上記処理(ステップ222〜227)を繰り返し行う
(ステップ228,229)。
The above processing (steps 224 to 227) is repeated for the variable length data block 18 read out to the transposed file block buffer, and when the processing based on all the offset information and size information is completed, the transposed file 14 The above processing (steps 222 to 227) is repeated until there are no unprocessed groups 13 (steps 228, 229).

【0041】本実施の形態によれば、以上のようにして
可変長データを扱うことができる。特に、本実施の形態
においては、可変長データを転置ファイル14とは別個
に設けた記憶手段に格納し、転置ファイル14を構成す
るブロックには固定長で表現できる可変長データのオフ
セット情報及びサイズ情報を格納するようにしたので、
転置ファイルを固定長ブロックに基づき生成することが
できる。
According to the present embodiment, variable-length data can be handled as described above. In particular, in the present embodiment, the variable length data is stored in a storage means provided separately from the transposition file 14, and the blocks constituting the transposition file 14 have offset information and size of the variable length data which can be represented by a fixed length. Since the information is stored,
An inverted file can be generated based on fixed length blocks.

【0042】[0042]

【発明の効果】本発明によれば、内部処理において各レ
コードにおける同一フィールドに対して異なる長さを持
つ可変長フィールドを割り当てることができるようにし
たので、可変長データを可変長のまま取り扱うことがで
きる。
According to the present invention, variable length fields having different lengths can be assigned to the same field in each record in internal processing, so that variable length data is handled with variable length. Can be.

【0043】また、実際の可変長データを別個に設けた
可変長データ記憶手段で保持するようにし、転置ファイ
ルに固定長で表現可能なオフセット情報やサイズ情報な
どの格納位置情報を格納したので、転置ファイルを固定
長ブロックに基づき生成することができる。
Also, since the actual variable length data is held by the separately provided variable length data storage means, and the transposition file stores the storage position information such as offset information and size information that can be expressed in a fixed length. An inverted file can be generated based on fixed length blocks.

【0044】また、空き領域を内部フィールドに付加す
ることによって各内部フィールドの区切りを物理的な処
理単位となる境界に合致させることができるので、効率
的な読出し処理を実現することができる。
Further, by adding a free area to an internal field, the delimiter of each internal field can be matched with a boundary serving as a physical processing unit, so that efficient read processing can be realized.

【0045】また、内部フィールドをまとめてブロック
を生成した結果、そのブロックサイズが物理的な最小入
出力単位の整数倍にならなかったときにはパディングを
施してその最小入出力単位の整数倍となるように調整す
るようにしたので、入出力処理を効率的に行うことがで
きる。
If the block size does not become an integral multiple of the physical minimum input / output unit as a result of generating the block by grouping the internal fields, padding is performed so that the block size becomes an integral multiple of the minimum input / output unit. The input / output process can be performed efficiently.

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

【図1】 本発明に係るファイル管理方法の実施の形態
1に用いられる転置ファイルの生成方法を示すための模
式図である。
FIG. 1 is a schematic diagram showing a method of generating an inverted file used in a file management method according to a first embodiment of the present invention.

【図2】 実施の形態1において元ファイルの論理フィ
ールドと内部フィールドとの対応関係を示したレコード
構造図である。
FIG. 2 is a record structure diagram showing a correspondence relationship between a logical field and an internal field of an original file according to the first embodiment.

【図3】 実施の形態1における転置ファイル生成処理
の流れを示したフローチャートである。
FIG. 3 is a flowchart showing a flow of a transposed file generation process according to the first embodiment.

【図4】 実施の形態1における可変長ブロックのデー
タ構造例を示した図である。
FIG. 4 is a diagram showing an example of a data structure of a variable-length block according to the first embodiment.

【図5】 実施の形態1におけるデータ読出し処理を示
したフローチャートである。
FIG. 5 is a flowchart showing a data read process according to the first embodiment.

【図6】 本発明に係るファイル管理方法の実施の形態
2に用いられる転置ファイルの生成方法を示すための模
式図である。
FIG. 6 is a schematic diagram showing a method of generating an inverted file used in a file management method according to a second embodiment of the present invention.

【図7】 実施の形態2におけるデータ読出し処理を示
したフローチャートである。
FIG. 7 is a flowchart showing a data read process according to the second embodiment.

【図8】 従来のファイル管理方法において転置ファイ
ルの生成方法を示すための模式図である。
FIG. 8 is a schematic diagram showing a method of generating an inverted file in a conventional file management method.

【図9】 従来において元ファイルの論理フィールドと
内部フィールドとの対応関係を示したレコード構造図で
ある。
FIG. 9 is a record structure diagram showing a correspondence relationship between a logical field and an internal field of an original file in the related art.

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

11 レコードグループ、12 ブロック、13 グル
ープ、14 転置ファイル、15 管理ファイル、16
空き領域、17 可変長データファイル、18 可変
長データ用ブロック。
11 record groups, 12 blocks, 13 groups, 14 transposed files, 15 management files, 16
Free space, 17 variable length data files, 18 variable length data blocks.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 少なくとも1つの可変長のフィールドを
含むレコードを複数格納した元ファイルの管理を行うフ
ァイル管理方法において、 元ファイルに格納されたレコードを構成する各フィール
ドを内部フィールドに1対1に変換する際、可変長デー
タを含む可変長フィールドを可変長内部フィールドに変
換することによって各レコードにおける同一内部フィー
ルドの長さを可変とするフィールド変換ステップと、 変換された内部フィールドにより構成される全レコード
を、複数の群に分割することによってレコードグループ
を生成するレコードグループ生成ステップと、 各レコードグループにおいて、各レコードにおける同一
フィールドが同じグループに含まれるように分割するこ
とでブロックを生成するブロック生成ステップと、 各レコ−ドグループにおいて生成されたブロックを全て
連結することで新たなグループを編成するとともにその
編成したグループを連結することによって転置ファイル
を生成し、更に可変長データを含むブロックの転置ファ
イルにおける格納位置を特定できるブロック管理情報を
生成する転置ファイル生成ステップと、 を含み、元ファイルからの可変長データ読出し要求に対
して当該格納位置情報を参照することによって転置ファ
イルから該当する可変長データを特定して読み出すこと
を特徴とするファイル管理方法。
1. A file management method for managing an original file storing a plurality of records including at least one variable-length field, wherein each field constituting a record stored in the original file is assigned to an internal field on a one-to-one basis. At the time of conversion, a variable length field including variable length data is converted into a variable length internal field so that the length of the same internal field in each record is variable. A record group generation step of generating a record group by dividing records into a plurality of groups; and a block generation of generating a block by dividing each record group so that the same field in each record is included in the same group. Steps and each A new group is formed by connecting all the blocks generated in the data group, and an inverted file is generated by connecting the formed groups, and the storage position of the block including the variable length data in the inverted file is determined. Generating an identifiable block management information, including the steps of: A file management method characterized by reading.
【請求項2】 少なくとも1つの可変長のフィールドを
含むレコードを複数格納した元ファイルの管理を行うフ
ァイル管理方法において、 元ファイルに格納されたレコードを構成する各フィール
ドを内部フィールドに1対1に変換する際、可変長デー
タを含む可変長フィールドに対して当該可変長データを
可変長データ記憶手段に登録するとともに、可変長デー
タ記憶手段における当該可変長データ格納位置情報を内
部フィールドに設定するフィールド変換ステップと、 変換された内部フィールドにより構成される全レコード
を、複数の群に分割することによってレコードグループ
を生成するレコードグループ生成ステップと、 各レコードグループにおいて、各レコードにおける同一
フィールドが同じグループに含まれるように分割するこ
とでブロックを生成するブロック生成ステップと、 各レコ−ドグループにおいて生成されたブロックを全て
連結することで新たなグループを編成するとともにその
編成したグループを連結することによって転置ファイル
を生成する転置ファイル生成ステップと、 を含み、元ファイルからの可変長データ読出し要求に対
して転置ファイルに格納された当該可変長データの格納
位置情報を参照することによって可変長データ記憶手段
に格納された当該可変長データを特定して読み出すこと
を特徴とするファイル管理方法。
2. A file management method for managing an original file storing a plurality of records including at least one variable-length field, wherein each field constituting a record stored in the original file is assigned to an internal field on a one-to-one basis. At the time of conversion, the variable length data including the variable length data is registered in the variable length data storage means, and the variable length data storage position information in the variable length data storage means is set as an internal field. A conversion step, a record group generation step of generating a record group by dividing all records composed of the converted internal fields into a plurality of groups, and in each record group, the same field in each record is in the same group. Split to be included Generating a block by generating a transposed file by linking all the blocks generated in each record group to form a new group and connecting the formed groups. And the variable length data stored in the variable length data storage means by referring to the storage position information of the variable length data stored in the transposed file in response to the variable length data read request from the original file. A file management method characterized by identifying and reading a file.
【請求項3】 前記フィールド変換ステップは、内部フ
ィールドに空き領域を付加することによって各内部フィ
ールドの区切りを物理的な処理単位となる境界に合致さ
せることを特徴とする請求項1又は2記載のファイル管
理方法。
3. The field conversion step according to claim 1, wherein in the field conversion step, a delimiter of each internal field is matched with a boundary serving as a physical processing unit by adding a free area to the internal field. File management method.
【請求項4】 前記ブロック生成ステップは、生成した
ブロックサイズが物理的な最小入出力単位の整数倍と一
致しないときには、最小入出力単位の整数倍になるよう
に当該ブロックに空き領域を付加することを特徴とする
請求項1又は2記載のファイル管理方法。
4. The block generating step includes, when the generated block size does not match an integral multiple of a physical minimum input / output unit, adding an empty area to the block so as to be an integral multiple of the minimum input / output unit. 3. The file management method according to claim 1, wherein:
JP19458999A 1999-07-08 1999-07-08 File management method Expired - Lifetime JP4251725B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19458999A JP4251725B2 (en) 1999-07-08 1999-07-08 File management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19458999A JP4251725B2 (en) 1999-07-08 1999-07-08 File management method

Publications (2)

Publication Number Publication Date
JP2001022622A true JP2001022622A (en) 2001-01-26
JP4251725B2 JP4251725B2 (en) 2009-04-08

Family

ID=16327067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19458999A Expired - Lifetime JP4251725B2 (en) 1999-07-08 1999-07-08 File management method

Country Status (1)

Country Link
JP (1) JP4251725B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001043237A (en) * 1999-07-30 2001-02-16 Mitsubishi Electric Corp Data file and data retrieving method
JP2011504273A (en) * 2007-11-21 2011-02-03 ヒューレット−パッカード デベロップメント カンパニー エル.ピー. How to reorder columns automatically to reduce alignment traps

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102126018B1 (en) 2013-11-06 2020-06-23 삼성전자주식회사 Operating method of transmission node and receiver node processing packet including location information of field and the packet including the location information of the field

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001043237A (en) * 1999-07-30 2001-02-16 Mitsubishi Electric Corp Data file and data retrieving method
JP2011504273A (en) * 2007-11-21 2011-02-03 ヒューレット−パッカード デベロップメント カンパニー エル.ピー. How to reorder columns automatically to reduce alignment traps

Also Published As

Publication number Publication date
JP4251725B2 (en) 2009-04-08

Similar Documents

Publication Publication Date Title
JP4251726B2 (en) File management method
US5586292A (en) Data processing method using record division storing scheme and apparatus therefor
US6725225B1 (en) Data management apparatus and method for efficiently generating a blocked transposed file and converting that file using a stored compression method
JP2003186624A (en) Disk array apparatus and data update method in the apparatus
EP0921527A2 (en) File managing method
JPH1185526A (en) Program loading method
JP4251725B2 (en) File management method
US5706512A (en) Computer program product for queuing and retrieving data objects to and from a shared storage medium
JPH1063436A (en) Method and device for storing data
JP4251727B2 (en) File management method
GB2328531A (en) Storing a long record in a set of shorter keyed records
JPS5851348A (en) High-speed access system for variable-length record
JP2618029B2 (en) How to divide an indexed file
JP2615046B2 (en) Record addition processing method
JP2817911B2 (en) Access control method for keyed files
JPH05265825A (en) File managing system
JPH0581101A (en) Method for assigning storage of key
JPH05257780A (en) File access system
JPS63291145A (en) Method for managing file
JPH0776935B2 (en) Record storage method
JPH0652019A (en) File controller
JPH10198525A (en) Method for outputting data of external storage device
JPH06348572A (en) Multi-mechanism disk system
JPH05119924A (en) File access system
JPH02118714A (en) Idle area control system for draw type recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060117

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081028

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081218

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090120

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090120

R150 Certificate of patent or registration of utility model

Ref document number: 4251725

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120130

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130130

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130130

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term