JP5354606B2 - Data storage device and method and program, and data search device and method and program - Google Patents

Data storage device and method and program, and data search device and method and program Download PDF

Info

Publication number
JP5354606B2
JP5354606B2 JP2010028077A JP2010028077A JP5354606B2 JP 5354606 B2 JP5354606 B2 JP 5354606B2 JP 2010028077 A JP2010028077 A JP 2010028077A JP 2010028077 A JP2010028077 A JP 2010028077A JP 5354606 B2 JP5354606 B2 JP 5354606B2
Authority
JP
Japan
Prior art keywords
logical block
key value
record
data
offset
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.)
Expired - Fee Related
Application number
JP2010028077A
Other languages
Japanese (ja)
Other versions
JP2011165000A (en
Inventor
敬広 山崎
武 井上
浩史 佐藤
紀之 高橋
博之 森川
正輝 南
化 司
敏樹 林
潤一郎 高木
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.)
Nippon Telegraph and Telephone Corp
University of Tokyo NUC
Original Assignee
Nippon Telegraph and Telephone Corp
University of Tokyo NUC
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 Nippon Telegraph and Telephone Corp, University of Tokyo NUC filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2010028077A priority Critical patent/JP5354606B2/en
Publication of JP2011165000A publication Critical patent/JP2011165000A/en
Application granted granted Critical
Publication of JP5354606B2 publication Critical patent/JP5354606B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To store data by data structure corresponding to even the reversal of an input data order while maintaining the writing performance of a sparse index, and to retrieve the stored data by a search key. <P>SOLUTION: When the data are stored, offset data which correspond one to one to the respective logic blocks of a data file and show, when a key value within a range of a logic block is in the other logic block, an offset to the other block by unit of logic blocks is stored in addition to data of structure based on the sparse index. In addition, when the data are retrieved, when a record having a desired key value is not found even if an object logic block is retrieved based on an index file, a logic block after the object logic block for the offset shown by the offset data is read, and search is performed for the logic block. <P>COPYRIGHT: (C)2011,JPO&amp;INPIT

Description

本発明は、データ蓄積装置及び方法及びプログラム及びデータ検索装置及び方法及びプログラムに係り、特に、二次記憶装置にデータを蓄積、及び、二次記憶装置のデータを検索するためのデータ蓄積装置及び方法及びプログラム及びデータ検索装置及び方法及びプログラムに関する。   The present invention relates to a data storage device and method, a program, and a data search device, method and program, and more particularly, a data storage device for storing data in a secondary storage device and searching for data in a secondary storage device, and The present invention relates to a method, a program, a data search apparatus, a method, and a program.

詳しくは、コンピュータ上で二次記憶装置に論理ブロック単位で逐次データ蓄積を行うデータ蓄積装置及び方法及びプログラム、及び蓄積されたデータを検索条件に基づいて検索するデータ検索装置及び方法及びプログラムに関する。   More specifically, the present invention relates to a data storage device, method, and program for sequentially storing data in units of logical blocks on a secondary storage device on a computer, and a data search device, method, and program for searching stored data based on search conditions.

従来の二次記憶装置へのデータ蓄積方法では、レコードといういくつかの情報を1つに纏めたデータをデータ格納する際の最小単位として扱っている。また、二次記憶装置への最小アクセス単位として物理ブロックがあり、これをシステム上で仮想的に扱えるようにしたものを論理ブロックと呼ぶ。ファイルは複数の論理ブロックから成り立ち、論理ブロックは複数のレコードを含むことが多い。   In a conventional method for storing data in a secondary storage device, data in which several pieces of information called records are combined into one is handled as a minimum unit when data is stored. Further, there is a physical block as a minimum access unit to the secondary storage device, and a block that can be virtually handled on the system is called a logical block. A file is composed of a plurality of logical blocks, and the logical block often includes a plurality of records.

また、特定のレコードを効率的に検索するために、索引が用いられている。索引はレコードが持つ任意の属性の値について作成することができる。このときこの索引を作成する任意の属性の値のことを「キー値」と呼ぶ。この索引付けの方法のうち、範囲検索を行える方法として、dense indexとsparse indexがある(例えば、非特許文献1参照)。Dense indexはデータの入力順に左右されず、入力された全てのレコードについて索引を作成する。これに対し、sparse indexでは、データの入力順を利用して、入力されたレコードのうち一部のレコードについてのみ索引を作成する。索引が作成されないレコードに関しては、入力順がキー値についてソートされているという前提の元で探索を行う。このため、sparse indexはデータの入力順がキー値についてソートされているときに限り使うことのできる方法である。   An index is used to efficiently search for a specific record. An index can be created for any attribute value a record has. At this time, the value of an arbitrary attribute that creates this index is called a “key value”. Among the indexing methods, there are a dense index and a sparse index as methods for performing a range search (see, for example, Non-Patent Document 1). Dense index does not depend on the order of data input, but creates an index for all input records. In contrast, in the sparse index, an index is created only for some of the input records using the data input order. For records for which no index is created, a search is performed on the assumption that the input order is sorted by key value. For this reason, sparse index is a method that can be used only when the input order of data is sorted with respect to key values.

Abraham Silberschatz, Henry F. Korth, S. Sudarshan, "Database System concepts fifth Edition", pp. 483-485, McGraw-Hill (2006).Abraham Silberschatz, Henry F. Korth, S. Sudarshan, "Database System concepts fifth Edition", pp. 483-485, McGraw-Hill (2006).

センサネットワークを通じて集められる大量の時系列センサデータなどを時刻をキー値として範囲検索可能な形でリアルタイムに二次記憶装置へ蓄積しようとする場合、データ書き込みの高速性が求められる。しかしながら、従来の索引付け方法のうち、dense indexを用いる場合、入力される各レコード毎に索引を作成する必要があるため、データ書き込み時のコストがsparse indexに比べて高く、データの書き込み速度がデータの発生に追いつかない。一方で、sparse indexを用いるためには、入力されるデータがキー値(この場合、時刻)についてソートされた状態で入力される必要がある。しかし、センサネットワークを通じて集められる大量の時系列データはネットワークの遅延などによって入力されるデータの時刻データが逆転することが考えられる。このため、時刻をキー値とすると、キー値によってソートされていないデータとなるため、sparse indexを用いることができない。   When a large amount of time-series sensor data collected through a sensor network is to be stored in a secondary storage device in real time in a form in which a range search is possible using time as a key value, high speed data writing is required. However, among the conventional indexing methods, when using a dense index, it is necessary to create an index for each input record, so the cost of writing data is higher than the sparse index, and the data writing speed is high. Can't keep up with data. On the other hand, in order to use the sparse index, it is necessary to input the input data in a state in which the key values (in this case, time) are sorted. However, a large amount of time-series data collected through the sensor network can be considered to reverse the time data of the input data due to network delay or the like. For this reason, if the time is a key value, the data is not sorted by the key value, so the sparse index cannot be used.

本発明は、上記の点に鑑みなされたもので、sparse indexの書き込み性能を維持したまま、入力データ順序の逆転にも対応したデータ構造によりデータを蓄積するデータ蓄積装置及び方法及びプログラム、及び、蓄積されたデータを検索するためのデータ検索装置及び方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above points, a data storage device, method, and program for storing data with a data structure that also supports reversal of the input data order while maintaining the write performance of the sparse index, and An object of the present invention is to provide a data search apparatus, method and program for searching stored data.

図1は、本発明の原理構成図である。   FIG. 1 is a principle configuration diagram of the present invention.

本発明(請求項1)は、コンピュータ上で二次記憶装置130に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積装置であって、
インタフェース110を介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリ120と、
バッファメモリ120に蓄積されたレコードを読み出し、該レコードを二次記憶装置130に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置130の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置130に書き込むシステム制御手段100を有し、
二次記憶装置130は、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引を格納した索引ファイルと、
を有し、
データファイルの各論理ブロックは、
実データを格納するレコード部と、特定の論理ブロックへのオフセットを論理ブロック単位で表す固定長のビット列からなるヘッダ部から構成され、
論理ブロックは扱うキー値の範囲を持ち、
システム制御手段100は、
論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックのヘッダ部のビット列のオフセットと等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すようにデータファイルに書き込む手段を含む。
In the present invention (Claim 1), when data is sequentially stored in the secondary storage device 130 on the computer in units of logical blocks, high-speed writing, complete match search, and range search are performed even if the data order is reversed. A data storage device for performing,
A buffer memory 120 for accumulating records input via the interface 110 by logical blocks;
When the record stored in the buffer memory 120 is read out and stored in the secondary storage device 130, the data of the record has a structure based on the sparse index, and one logical block in the secondary storage device 130 When there is a one-to-one correspondence and the key value within the range of the logical block is in another logical block, offset data indicating the offset to the other logical block in units of logical blocks is written to the secondary storage device 130 We have a system control means 100,
The secondary storage device 130
A data file that stores input records for each logical block;
An index file that stores an index for the key value of the record in each logical block of the data file;
Have
Each logical block in the data file
It consists of a record part that stores actual data and a header part that consists of a fixed-length bit string that represents the offset to a specific logical block in logical block units.
A logical block has a range of key values to handle,
The system control means 100
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and the block having the key value range including the key value is obtained in units of logical blocks. The bit whose bit value is equal to the bit string offset in the header part of the logical block having the key value in the range is set to “1”, so that the key value in the range handled by the logical block is “1” in the bit string. Means for writing to the data file so as to indicate that it is also stored in the logical block separated by the number of offsets indicated by the bit number.

また、本発明(請求項)は、請求項のデータ蓄積装置において、
システム制御手段100は、
バッファメモリ120のレコードをキー値に基づいて昇順にソートするソート手段と、
バッファメモリ120のレコードをデータファイルのレコード部に書き込み、データファイルのオフセットデータの初期値として、全ビットを「0」にしたビット列をヘッダ部に書き込む初期化手段と、
索引ファイルを参照して、索引内の最大のキー値を探索し、その値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、索引ファイルに書き込む索引ファイル生成手段と、
バッファメモリ120の先頭のレコードのキー値が下限値Lであれば、索引ファイルにおいて参照中のレコードのキー値以上で最も値が小さいキー値を探索し、該キー値が指すレコードを含む論理ブロックをデータファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成手段と、
読み込んだ論理ブロックのヘッダ部分のオフセットを表すビット列bを読み込み、ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成手段と、
ビット列cを、読み込んだ論理ブロックのヘッダ部にオフセットデータとしてデータファイルに上書きする書き込み手段と、
バッファメモリ120から次のレコードを読み出して、該レコードのキー値が下限値L以下である場合は、第1のビット列生成手段、第2のビット列生成手段、書き込み手段を、該バッファメモリに次のレコードがなくなるまで繰り返す手段と、を有する。
According to the present invention (Claim 2 ), in the data storage device of Claim 1 ,
The system control means 100
Sorting means for sorting the records in the buffer memory 120 in ascending order based on the key values;
Initialization means for writing a record of the buffer memory 120 to a record portion of the data file, and writing a bit string with all bits set to “0” as an initial value of the offset data of the data file to the header portion;
Referring to the index file, search for the maximum key value in the index, set that value as the lower limit L of the key value handled by the written logical block, and the last record with the maximum key value in the written logical block Index file generation means for creating an index for and writing to the index file;
If the key value of the first record in the buffer memory 120 is the lower limit L, a logical block including the record indicated by the key value is searched for the key value that is equal to or greater than the key value of the record being referenced in the index file. Is generated from the data file, and a first bit string generation means for generating a bit string a having a digit number h in which the distance between the address of the read logical block and the written logical block is set as an offset X, and only the Xth bit is “1” When,
A second bit string generation means for reading a bit string b representing an offset of the header part of the read logical block and generating a bit string c combined with the bit string a and an OR condition of the bit string b;
A writing means for overwriting the data file as offset data in the header portion of the read logical block with bit string c;
When the next record is read from the buffer memory 120 and the key value of the record is less than or equal to the lower limit value L, the first bit string generating means, the second bit string generating means, and the writing means are connected to the buffer memory. And means for repeating until there are no more records.

発明(請求項)は、コンピュータ上で二次記憶装置130に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積装置であって、
インタフェース110を介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリ120と、
バッファメモリ120に蓄積されたレコードを読み出し、該レコードを二次記憶装置130に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置130の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置130に書き込むシステム制御手段100を有し、
二次記憶装置130は、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックを格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引を格納する索引ファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列はデータファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、
を有し、
各論理ブロックは扱うキー値の範囲を持ち、
システム制御手段100は、
論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックに対応したオフセットファイルのビット列のオフセット数と等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すようにオフセットファイルに書き込む手段を含む。
According to the present invention (Claim 3 ), when data is sequentially stored in the secondary storage device 130 in the logical storage unit on the computer, high-speed writing, complete match search and range search are performed even if the data order is reversed. A data storage device for performing,
A buffer memory 120 for accumulating records input via the interface 110 by logical blocks;
When the record stored in the buffer memory 120 is read out and stored in the secondary storage device 130, the data of the record has a structure based on the sparse index, and one logical block in the secondary storage device 130 When there is a one-to-one correspondence and the key value within the range of the logical block is in another logical block, offset data indicating the offset to the other logical block in units of logical blocks is written to the secondary storage device 130 System control means 100,
The secondary storage device 130
A data file for storing a logical block having a record portion for storing a key value and actual data for each input record;
An index file that stores an index for the key value of the record in each logical block of the data file;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset to a specific logical block of the data file in logical block units;
Have
Each logical block has a range of key values to handle,
The system control means 100
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and the block having the key value range including the key value is obtained in units of logical blocks. By setting the bit having the bit number equal to the offset number of the bit string of the offset file corresponding to the logical block having the key value as a range to “1”, the key value in the range handled by the logical block is set to “1” of the bit string. Means for writing to the offset file so as to indicate that it is also stored in the logical block separated by the offset number indicated by the bit number of the changed bit.

また、本発明(請求項)は、請求項のデータ蓄積装置において、
システム制御手段100は、
バッファメモリ120のレコードをキー値に基づいて昇順にソートするソート手段と、
バッファメモリ120のレコードをデータファイルのレコード部に書き込む手段と、
索引ファイルを参照して索引内の最大のキー値を探索し、該キー値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、索引ファイルに書き込む索引ファイル生成手段と、
書き込んだ論理ブロック内で最大のキー値をキー値とし、初期値として全ビットを「0」にしたビット列をオフセットデータとしてオフセットファイルに書き込む手段と、
バッファメモリ120の先頭のレコードのキー値が下限値Lであれば、索引ファイルのキー値が指すレコードを含む論理ブロックをデータファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成手段と、
索引ファイルのキー値に基づいて読み込んだデータファイルの論理ブロックに対応したオフセットデータをオフセットファイルから探索し、探索したオフセットデータのビット列bを読み込み、ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成手段と、
ビット列cを、オフセットファイルの読み込んだオフセットデータに上書きする書き込み手段と、
バッファメモリ120から次のレコードを読み出して、該レコードのキー値が下限値L以下である場合は、第1のビット列生成手段、第2のビット列生成手段、書き込み手段を、該バッファメモリ120に次のレコードがなくなるまで繰り返す手段と、を有する。
According to the present invention (Claim 4 ), in the data storage device according to Claim 3 ,
The system control means 100
Sorting means for sorting the records in the buffer memory 120 in ascending order based on the key values;
Means for writing a record of the buffer memory 120 into a record portion of the data file;
Referring to the index file, search for the maximum key value in the index, set the key value as the lower limit L of the key value handled in the written logical block, and the last record having the maximum key value in the written logical block Index file generation means for creating an index for and writing to the index file;
Means for writing a bit string having all bits set to “0” as an initial value to an offset file as offset data in the written logical block as a key value;
If the key value of the first record in the buffer memory 120 is the lower limit L, the logical block including the record indicated by the key value of the index file is read from the data file, and the distance between the address of the read logical block and the written logical block is determined. A first bit string generating means for generating a bit string a having a digit number h with an offset X and only the X-th bit being “1”;
A bit string obtained by searching the offset file for offset data corresponding to the logical block of the data file read based on the key value of the index file, reading the bit string b of the searched offset data, and combining the bit string a with the OR condition of the bit string b second bit string generation means for generating c;
A writing means for overwriting the bit string c on the offset data read in the offset file;
When the next record is read from the buffer memory 120 and the key value of the record is less than or equal to the lower limit L, the first bit string generating means, the second bit string generating means, and the writing means are transferred to the buffer memory 120. Means for repeating until there are no more records.

図2は、本発明の原理を説明するための図である。   FIG. 2 is a diagram for explaining the principle of the present invention.

本発明(請求項)は、コンピュータ上で二次記憶装置に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積方法であって、
二次記憶装置と、
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、
を有する装置において、
バッファメモリに蓄積されたレコードを読み出し(ステップ1)、該レコードを二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、二次記憶装置の各論理ブロックに1対1で対応し(ステップ2)、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に(ステップ3)、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む(ステップ4)制御ステップを行い、
二次記憶装置は、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルを有し、
データファイルの各論理ブロックは、
実データを格納するレコード部と、特定の論理ブロックへのオフセットを論理ブロック単位で表す固定長のビット列からなるヘッダ部から構成され、
論理ブロックは扱うキー値の範囲を持ち、
制御ステップにおいて、
論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックのヘッダ部のビット列のオフセットと等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すようにデータファイルに書き込む。
The present invention (Claim 5 ) performs high-speed writing, complete match search, and range search even when the data order is reversed when data is sequentially stored in a secondary storage unit on a computer in a logical block unit. A data storage method for
A secondary storage device;
A buffer memory that accumulates records entered via the interface for logical blocks;
In a device having
When the record stored in the buffer memory is read (step 1) and the record is stored in the secondary storage device, the data of the record has a structure based on the sparse index, and 1 is added to each logical block of the secondary storage device. If there is a one-to-one correspondence (step 2) and the key value within the range of the logical block is in another logical block (step 3), offset data indicating the offset to the other logical block in logical block units writing to the secondary storage device (step 4) have the row control step,
Secondary storage is
A data file that stores input records for each logical block;
Have an index file for the key value of the record in each logical block of the data file;
Each logical block in the data file
It consists of a record part that stores actual data and a header part that consists of a fixed-length bit string that represents the offset to a specific logical block in logical block units.
A logical block has a range of key values to handle,
In the control step,
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and the block having the key value range including the key value is obtained in units of logical blocks. The bit whose bit value is equal to the bit string offset in the header part of the logical block having the key value in the range is set to “1”, so that the key value in the range handled by the logical block is “1” in the bit string. Is written in the data file so as to indicate that it is also stored in the logical block separated by the offset number indicated by the bit number.

また、本発明(請求項)は、請求項のデータ蓄積方法において、
制御ステップにおいて、
バッファメモリのレコードをキー値に基づいて昇順にソートするソートステップと、
バッファメモリのレコードをデータファイルのレコード部に書き込み、データファイルのオフセットデータの初期値として全ビットを「0」にしたビット列をヘッダ部に書き込む初期化ステップと、
索引ファイルを参照して、索引内の最大のキー値を探索し、その値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、索引ファイルに書き込む索引ファイル生成ステップと、
バッファメモリの先頭のレコードのキー値が下限値Lであれば、索引ファイルにおいて参照中のレコードのキー値以上で最も値が小さいキー値を探索し、該キー値が指すレコードを含む論理ブロックをデータファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成ステップと、
読み込んだ論理ブロックのヘッダ部分のオフセットを表すビット列bを読み込み、ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成ステップと、
ビット列cを、読み込んだ論理ブロックのヘッダ部にオフセットデータとしてデータファイルに上書きする書き込みステップと、
バッファメモリから次のレコードを読み出して、該レコードのキー値が下限値L以下である場合は、第1のビット列生成ステップ、第2のビット列生成ステップ、書き込みステップを、該バッファメモリに次のレコードがなくなるまで繰り返す。
The present invention (Claim 6 ) provides a data storage method according to Claim 5 ,
In the control step,
A sorting step for sorting records in the buffer memory in ascending order based on the key value;
An initialization step of writing a record of the buffer memory to the record portion of the data file, and writing a bit string with all bits set to “0” as an initial value of the offset data of the data file to the header portion;
Referring to the index file, search for the maximum key value in the index, set that value as the lower limit L of the key value handled by the written logical block, and the last record with the maximum key value in the written logical block An index file generation step that creates an index for and writes to the index file;
If the key value of the first record in the buffer memory is the lower limit value L, a search is made for a key value having the smallest value not less than the key value of the record being referred to in the index file, and a logical block including the record indicated by the key value is searched. A first bit string generation step for generating a bit string a having a digit number h in which the distance between the address of the read logical block and the written logical block is set as an offset X, and only the Xth bit is “1”; ,
A second bit string generation step of reading a bit string b representing an offset of the header portion of the read logical block and generating a bit string c coupled by the OR condition of the bit string a and the bit string b;
A writing step of overwriting the data file as offset data in the header portion of the read logical block with the bit string c;
When the next record is read from the buffer memory and the key value of the record is less than or equal to the lower limit value L, the first bit string generation step, the second bit string generation step, and the write step are performed in the buffer memory. Repeat until there is no more.

発明(請求項)は、コンピュータ上で二次記憶装置に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積方法であって、
二次記憶装置と、
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、
を有する装置において、
バッファメモリに蓄積されたレコードを読み出し、該レコードを二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行い、
二次記憶装置は、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックを格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引を格納する索引ファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列はデータファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、
を有し、
各論理ブロックは扱うキー値の範囲を持ち、
制御ステップにおいて、
論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックに対応したオフセットファイルのビット列のオフセット数と等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すようにオフセットファイルに書き込む。
The present invention (Claim 7 ) performs high-speed writing, complete match search, and range search even when the data order is reversed, when data is sequentially stored in a secondary storage device on a computer in a logical block unit. A data storage method for
A secondary storage device;
A buffer memory that accumulates records entered via the interface for logical blocks;
In a device having
When the record stored in the buffer memory is read and stored in the secondary storage device, the data of the record is based on the sparse index and corresponds to each logical block of the secondary storage device on a one-to-one basis When the key value within the range of the logical block is in another logical block, a control step is performed to write offset data indicating an offset to the other logical block in units of logical blocks to the secondary storage device,
Secondary storage is
A data file for storing a logical block having a record portion for storing a key value and actual data for each input record;
An index file that stores an index for the key value of the record in each logical block of the data file;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset to a specific logical block of the data file in logical block units;
Have
Each logical block has a range of key values to handle,
In the control step,
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and the block having the key value range including the key value is obtained in units of logical blocks. By setting the bit having the bit number equal to the offset number of the bit string of the offset file corresponding to the logical block having the key value as a range to “1”, the key value in the range handled by the logical block is set to “1” of the bit string. The data is written into the offset file so as to indicate that it is also stored in the logical block separated by the offset number indicated by the bit number of the changed bit.

また、本発明(請求項)は、請求項のデータ蓄積方法において、
制御ステップにおいて、
バッファメモリのレコードをキー値に基づいて昇順にソートするソートステップと、
バッファメモリのレコードをデータファイルのレコード部に書き込むステップと、
索引ファイルを参照して索引内の最大のキー値を探索し、該キー値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、索引ファイルに書き込む索引ファイル生成ステップと、
書き込んだ論理ブロック内で最大のキー値をキー値とし、初期値として全ビットを「0」にしたビット列をオフセットデータとしてレコードをオフセットファイルに書き込むステップと、
バッファメモリの先頭のレコードのキー値が下限値Lであれば、索引ファイルのキー値指すレコードを含む論理ブロックをデータファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成ステップと、
索引ファイルのキー値に基づいて読み込んだデータファイルの論理ブロックに対応したオフセットデータをオフセットファイルから探索し、探索したオフセットデータのビット列bを読み込み、ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成ステップと、
ビット列cを、オフセットファイルの読み込んだオフセットデータに上書きする書き込みステップと、
バッファメモリから次のレコードを読み出して、該レコードのキー値が下限値L以下である場合は、第1のビット列生成ステップ、第2のビット列生成ステップ、書き込みステップを、該バッファメモリに次のレコードがなくなるまで繰り返す。
The present invention (Claim 8 ) provides a data storage method according to Claim 7 ,
In the control step,
A sorting step for sorting records in the buffer memory in ascending order based on the key value;
Writing a buffer memory record to the record portion of the data file;
Referring to the index file, search for the maximum key value in the index, set the key value as the lower limit L of the key value handled in the written logical block, and the last record having the maximum key value in the written logical block An index file generation step that creates an index for and writes to the index file;
Writing the record to the offset file with the maximum key value in the written logical block as the key value and the bit string with all bits set to “0” as the offset value as offset data;
If the first record of the key value lower limit L of the buffer memory, reads the logical block including a record key value of the index file points to the data file, the offset distance of the addresses of the logical blocks written and read logic block A first bit string generation step for generating a bit string a having a digit number h, where X is X and only the Xth bit is “1”;
A bit string obtained by searching the offset file for offset data corresponding to the logical block of the data file read based on the key value of the index file, reading the bit string b of the searched offset data, and combining the bit string a with the OR condition of the bit string b a second bit string generation step of generating c;
A writing step of overwriting the bit string c on the offset data read from the offset file;
When the next record is read from the buffer memory and the key value of the record is less than or equal to the lower limit value L, the first bit string generation step, the second bit string generation step, and the write step are performed in the buffer memory. Repeat until there is no more.

本発明(請求項)は、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行う検索手段を有し、
検索条件として、探索キーが入力されると、索引ファイルから探索キー値以上で最も値の小さいキー値を探索し、該キー値が指し示すレコードを含むデータファイルの論理ブロックを読み込む手段と、
読み込んだ論理ブロック内のレコード部から二分探索を用いて探索キーを持つレコードを検索し、探索キーを持つレコードが見つかった場合は、該レコードを出力する手段と、
見つからなかった場合は、論理ブロックのヘッダにあるオフセットデータのビット列を参照し、まだチェックしていないビットの内ビットが1となっているビット番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、読み込んだ論理ブロックから二分探索を用いて探索キーを持つレコードを探索する手段と、を有する。
According to the present invention (claim 9 ), a buffer memory for storing records inputted through an interface for a logical block, a record stored in the buffer memory are read, and the records are stored in a secondary storage device on a computer. In this case, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is in another logical block. Data stored in the data file of the secondary storage device by a data storage device having system control means for writing offset data indicating the offset to the other logical block in logical block units to the secondary storage device. A data search device for searching
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value and a record having the desired key value is not found based on the obtained index, the offset data of the logical block corresponding to the index is referred to. reads the resultant logical blocks behind than offset by the logic block as an object to read logical blocks, have a search means for searching by key value,
When a search key is input as a search condition, a search is made for a key value having the smallest value greater than or equal to the search key value from the index file, and means for reading a logical block of a data file including a record indicated by the key value;
A record having a search key is searched using a binary search from the record part in the read logical block, and when a record having a search key is found, means for outputting the record,
If not found, refer to the bit string of the offset data in the header of the logical block, set the bit number X whose bit is 1 among the bits not yet checked as the offset X, and select the logical block after the X block Means for searching for a record having a search key using a binary search from the read logical block.

本発明(請求項10)は、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により、二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行う検索手段を有し、
下限キー値以上、上限キー値未満という検索条件が与えられると、索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックをデータファイルから読み込む手段と、
読み込んだ論理ブロックのヘッダ部のオフセットを示すビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的にアドレス集合U記憶手段に格納する手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値未満である場合に、次のレコードを参照する手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードまでのすべてのレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、さらに次の論理ブロックが存在する場合には次の論理ブロックを読み込む手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値未満である場合に、その参照しているレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照する手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値以上である場合に、アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部のすべてのレコードのキー値について、下限キー値以上、上限キー値未満であるかを判定し、該キー値が下限キー値以上、上限キー値未満であれば、該キー値を持つレコードを、検索条件を満たすレコード集合R記憶手段に格納する手段と、
レコード集合R記憶手段に格納されているレコードを検索結果として出力する手段と、を有する。
According to the present invention (claim 10 ), a buffer memory for storing records inputted through an interface for a logical block, a record stored in the buffer memory are read, and the record is stored in a secondary storage device on a computer. In this case, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is in another logical block. Data stored in the data file of the secondary storage device by a data storage device having system control means for writing offset data indicating the offset to the other logical block in logical block units to the secondary storage device. A data search device for searching
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value and a record having the desired key value is not found based on the obtained index, the offset data of the logical block corresponding to the index is referred to. A search means for reading a logical block subsequent to the logical block by the obtained offset, and performing a search by a key value for the read logical block,
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and the logical block including the record indicated by the key value is read from the data file. Means,
Means for temporarily storing the address of the logical block pointed to by the bit set indicating the offset of the header part of the read logical block and, if there is a bit of “1”, in the address set U storage means; ,
Means for referring to the next record when the key value of the record referred to in the record part of the read logical block is less than the lower limit key value;
Reference is made when the key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value and the key value of the last record of the logical block is less than the upper limit key value. Means for additionally storing all records from the record to the last record of the logical block in the record set R storage means satisfying the search condition, and further reading the next logical block if there is a next logical block;
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced When the key value is less than the upper limit key value, the reference record is additionally stored in the record set R storage means satisfying the search condition, and means for referring to the next record;
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced When the key value is equal to or higher than the upper limit key value, each address of the address set U storage means is referred to, the logical block indicated by each address is read, and the key values of all records in the record portion of the logical block are It is determined whether the key value is greater than or equal to the lower limit key value and less than the upper limit key value, and if the key value is greater than or equal to the lower limit key value and less than the upper limit key value, the record set R storage means that satisfies the search condition Means for storing in,
And a means for outputting a record stored in the record set R storage means as a search result.

本発明(請求項11)は、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により、二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行う検索手段を有し、
二次記憶装置において、
索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列はデータファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
入力された検索条件のキー値以上で最も値の小さいキー値を索引ファイルから検索し、その値が指すレコードをデータファイルの論理ブロックから読み込む手段と、
読み込んだ論理ブロック内のレコード部から二分探索を用いて、検索条件のキー値を持つレコードを検索する二分探索手段と、
二分探索手段において、レコードが見つかった場合は当該レコードを出力し、見つからない場合は、該索引ファイルから検索されたキー値を用いてオフセットファイルから論理ブロックに対応したオフセットデータを検索し、該オフセットデータのビット列でまだチェックしていない「1」となっているビットの番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、二分探索手段を行う処理をビット列が持つビットが「1」となっている全ての桁について行う手段と、を有する。
According to the present invention (claim 11 ) , a buffer memory for storing a record input through an interface for a logical block, a record stored in the buffer memory are read, and the record is stored in a secondary storage device on a computer. In this case, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is in another logical block. Data stored in the data file of the secondary storage device by a data storage device having system control means for writing offset data indicating the offset to the other logical block in logical block units to the secondary storage device. A data search device for searching
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value and a record having the desired key value is not found based on the obtained index, the offset data of the logical block corresponding to the index is referred to. A search means for reading a logical block subsequent to the logical block by the obtained offset, and performing a search by a key value for the read logical block,
In secondary storage,
An index file,
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset to a specific logical block of the data file in logical block units, Have
Means for searching the index file for the smallest key value that is greater than or equal to the key value of the input search condition and reading the record pointed to by the value from the logical block of the data file;
A binary search means for searching for a record having a key value of a search condition using a binary search from the record portion in the read logical block;
In the binary search means, if a record is found, the record is output, and if not found, the offset data corresponding to the logical block is searched from the offset file using the key value searched from the index file, and the offset The bit number X of “1” that has not been checked yet in the bit string of data is set as the offset X, the logical block after the X block is read, and the bit string having the process of performing the binary search means is “1”. Means for performing all the digits.

本発明(請求項12)は、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により、二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行う検索手段を有し、
二次記憶装置において、
索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列はデータファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
下限キー値以上、上限キー値未満という検索条件が与えられると、索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックをデータファイルから読み込む手段と、
読み込んだ論理ブロックの末尾のレコードを参照し、該レコードのキー値を元に、該論理ブロックに対応するオフセットデータをオフセットファイルから検索する手段と、
検索したオフセットデータのビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的に記憶手段のアドレス集合U記憶手段に格納する手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値未満である場合に、次のレコードを参照する手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードまでの全てのレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、さらに次の論理ブロックが存在する場合には次の論理ブロックを読み込む手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値未満である場合に、その参照しているレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照する手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値以上である場合に、アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部の全てのレコードのキー値について、下限キー値以上、上限キー値未満であるかを判定し、該キー値が下限キー値以上、上限キー値未満であれば、該キー値を持つレコードを、検索条件を満たすレコード集合R記憶手段に格納する手段と、
レコード集合R記憶手段に格納されているレコードを検索結果として出力する手段と、を有する。
According to the present invention (claim 12 ), a buffer memory for storing records inputted via an interface for a logical block, a record stored in the buffer memory are read, and the records are stored in a secondary storage device on a computer. In this case, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is in another logical block. Data stored in the data file of the secondary storage device by a data storage device having system control means for writing offset data indicating the offset to the other logical block in logical block units to the secondary storage device. A data search device for searching
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value and a record having the desired key value is not found based on the obtained index, the offset data of the logical block corresponding to the index is referred to. A search means for reading a logical block subsequent to the logical block by the obtained offset, and performing a search by a key value for the read logical block,
In secondary storage,
An index file,
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset to a specific logical block of the data file in logical block units, Have
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and the logical block including the record indicated by the key value is read from the data file. Means,
Means for referring to a record at the end of the read logical block and searching offset data corresponding to the logical block from the offset file based on the key value of the record;
Means for temporarily storing the address of the logical block pointed to by the bit set of the storage means in the address set U storage means if there is a bit which is “1” with reference to the bit string of the offset data searched;
Means for referring to the next record when the key value of the record referred to in the record part of the read logical block is less than the lower limit key value;
Reference is made when the key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value and the key value of the last record of the logical block is less than the upper limit key value. Means for additionally storing all records from the record to the last record of the logical block in the record set R storage means satisfying the search condition, and further reading the next logical block if there is a next logical block;
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced When the key value is less than the upper limit key value, the reference record is additionally stored in the record set R storage means satisfying the search condition, and means for referring to the next record;
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced When the key value is equal to or higher than the upper limit key value, each address of the address set U storage means is referred to, the logical block indicated by each address is read, and the key values of all the records in the record portion of the logical block are It is determined whether the key value is greater than or equal to the lower limit key value and less than the upper limit key value, and if the key value is greater than or equal to the lower limit key value and less than the upper limit key value, the record set R storage means that satisfies the search condition Means for storing in,
And a means for outputting a record stored in the record set R storage means as a search result.

本発明(請求項13)は、コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、バッファメモリに蓄積されたレコードを読み出し、該レコードを二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行い、
検索条件として、探索キーが入力されると、索引ファイルから探索キー値以上で最も値の小さいキー値を探索し、該キー値が指し示すレコードを含むデータファイルの論理ブロックを読み込むステップと、
読み込んだ論理ブロック内のレコード部から二分探索を用いて探索キーを持つレコードを検索し、探索キーを持つレコードが見つかった場合は、該レコードを出力するステップと、
見つからなかった場合は、論理ブロックのヘッダにあるオフセットデータのビット列を参照し、まだチェックしていないビットの内ビットが1となっているビット番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、読み込んだ論理ブロックから二分探索を用いて探索キーを持つレコードを探索するステップと、
を行う。
The present invention (Claim 13 ) reads a record stored in a buffer memory in a device having a secondary storage device on a computer and a buffer memory for storing a record inputted through an interface for a logical block. When the record is stored in the secondary storage device, the data of the record has a structure based on the sparse index, and corresponds to each logical block of the secondary storage device in a one-to-one relationship, When the key value is in another logical block, the data storage method performs the control step of writing offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device. A data search method for searching data stored in a data file,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and the record having the desired key value is not found based on the obtained index, the offset data corresponding to the logical block corresponding to the index is obtained. reference, reads the resultant logical blocks behind than offset by the logic block as an object to read logical blocks, we have row a search by key value,
As a search condition, when a search key is input, searching the index file for a key value having the smallest value greater than or equal to the search key value, and reading a logical block of a data file including a record indicated by the key value;
A record having a search key is searched using a binary search from the record part in the read logical block, and when a record having a search key is found, outputting the record;
If not found, refer to the bit string of the offset data in the header of the logical block, set the bit number X whose bit is 1 among the bits not yet checked as the offset X, and select the logical block after the X block Searching for a record having a search key using a binary search from a read logical block;
I do.

本発明(請求項14)は、コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、バッファメモリに蓄積されたレコードを読み出し、該レコードを二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行い、
下限キー値以上、上限キー値未満という検索条件が与えられると、索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックをデータファイルから読み込むステップと、
読み込んだ論理ブロックのヘッダ部のオフセットを示すビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的にアドレス集合U記憶手段に格納するステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値未満である場合に、次のレコードを参照するステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードまでのすべてのレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、さらに次の論理ブロックが存在する場合には次の論理ブロックを読み込むステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値未満である場合に、その参照しているレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照するステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値以上である場合に、アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部のすべてのレコードのキー値について、下限キー値以上、上限キー値未満であるかを判定し、該キー値が下限キー値以上、上限キー値未満であれば、該キー値を持つレコードを、検索条件を満たすレコード集合R記憶手段に格納するステップと、
レコード集合R記憶手段に格納されているレコードを検索結果として出力するステップと、を行う。
The present invention (Claim 14 ) reads a record stored in a buffer memory in a device having a secondary storage device on a computer and a buffer memory for storing a record input through an interface for a logical block. When the record is stored in the secondary storage device, the data of the record has a structure based on the sparse index, and corresponds to each logical block of the secondary storage device in a one-to-one relationship, When the key value is in another logical block, the data storage method performs the control step of writing offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device. A data search method for searching data stored in a data file,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and the record having the desired key value is not found based on the obtained index, the offset data corresponding to the logical block corresponding to the index is obtained. Refer to and read the logical block after the logical block by the obtained offset, and search for the read logical block by the key value,
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and the logical block including the record indicated by the key value is read from the data file. Steps,
A step of referring to a bit string indicating the offset of the header portion of the read logical block and temporarily storing the address of the logical block indicated by the bit in the address set U storage means if there is a bit of “1”; ,
A step of referring to the next record when the key value of the record referred to in the record part of the read logical block is less than the lower limit key value;
Reference is made when the key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value and the key value of the last record of the logical block is less than the upper limit key value. A step of additionally storing all records from the record to the last record of the logical block in the record set R storage means satisfying the search condition, and further reading the next logical block if there is a next logical block;
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced When the key value of is less than the upper limit key value, the record being referred to is additionally stored in the record set R storage means satisfying the search condition, and the next record is referred to;
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced When the key value is equal to or higher than the upper limit key value, each address of the address set U storage means is referred to, the logical block indicated by each address is read, and the key values of all records in the record portion of the logical block are It is determined whether the key value is greater than or equal to the lower limit key value and less than the upper limit key value, and if the key value is greater than or equal to the lower limit key value and less than the upper limit key value, the record set R storage means that satisfies the search condition Storing in the step,
And outputting a record stored in the record set R storage means as a search result.

発明(請求項15)は、コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、バッファメモリに蓄積されたレコードを読み出し、該レコードを二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行い、
二次記憶装置において、
索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列はデータファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
入力された検索条件のキー値以上で最も値の小さいキー値を索引ファイルから検索し、その値が指すレコードをデータファイルの論理ブロックから読み込むステップと、
読み込んだ論理ブロック内のレコード部から二分探索を用いて、検索条件のキー値を持つレコードを検索する二分探索ステップと、
二分探索手段において、レコードが見つかった場合は当該レコードを出力し、見つからない場合は、該索引ファイルから検索されたキー値を用いてオフセットファイルから論理ブロックに対応したオフセットデータを検索し、該オフセットデータのビット列でまだチェックしていない「1」となっているビットの番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、二分探索ステップを行う処理をビット列が持つビットが「1」となっている全ての桁について行うステップと、を行う。
The present invention (Claim 15 ) reads a record stored in a buffer memory in a device having a secondary storage device on a computer and a buffer memory for storing a record input through an interface for a logical block. When the record is stored in the secondary storage device, the data of the record has a structure based on the sparse index, and corresponds to each logical block of the secondary storage device in a one-to-one relationship, When the key value is in another logical block, the data storage method performs the control step of writing offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device. A data search method for searching data stored in a data file,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and the record having the desired key value is not found based on the obtained index, the offset data corresponding to the logical block corresponding to the index is obtained. Refer to and read the logical block after the logical block by the obtained offset, and search for the read logical block by the key value,
In secondary storage ,
An index file,
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset to a specific logical block of the data file in logical block units, Have
Searching the index file for the smallest key value that is greater than or equal to the key value of the entered search criteria and reading the record pointed to by the value from the logical block of the data file;
A binary search step for searching for a record having a key value of a search condition using a binary search from the record portion in the read logical block;
In the binary search means, if a record is found, the record is output, and if not found, the offset data corresponding to the logical block is searched from the offset file using the key value searched from the index file, and the offset The bit number X of “1” that has not been checked yet in the bit string of data is set as the offset X, the logical block after the X block is read, and the binary search step is performed with the bit string having the bit “1”. And a step for performing all the digits.

発明(請求項16)は、コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、バッファメモリに蓄積されたレコードを読み出し、該レコードを二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
キー値から二次記憶装置の索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、キー値による検索を行い、
二次記憶装置において、
索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列はデータファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
下限キー値以上、上限キー値未満という検索条件が与えられると、索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックをデータファイルから読み込むステップと、
読み込んだ論理ブロックの末尾のレコードを参照し、該レコードのキー値を元に、該論理ブロックに対応するオフセットデータをオフセットファイルから検索するステップと、
検索したオフセットデータのビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的にアドレス集合U記憶手段に格納するステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値未満である場合に、次のレコードを参照するステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードのまでの全てのレコードを、検索条件を満たすレコード集合R記憶手段に格納し、さらに、次の論理ブロックが存在する場合には次の論理ブロックを読み込むステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値未満である場合に、その参照しているレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照するステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値以上であり、かつ、参照しているレコードのキー値が上限キー値以上である場合に、アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部の全てのレコードのキー値について、下限キー値以上、上限キー値未満であるかを判定し、該キー値が下限キー値以上、上限キー値未満であれば、該キー値を持つレコードを、検索条件を満たすレコード集合R記憶手段に格納するステップと、
レコード集合R記憶手段に格納されているレコードを検索結果として出力するステップと、を行う。
The present invention (Claim 16 ) reads a record stored in a buffer memory in a device having a secondary storage device on a computer and a buffer memory for storing a record input through an interface for a logical block. When the record is stored in the secondary storage device, the data of the record has a structure based on the sparse index, and corresponds to each logical block of the secondary storage device in a one-to-one relationship, When the key value is in another logical block, the data storage method performs the control step of writing offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device. A data search method for searching data stored in a data file,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record in each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and the record having the desired key value is not found based on the obtained index, the offset data corresponding to the logical block corresponding to the index is obtained. Refer to and read the logical block after the logical block by the obtained offset, and search for the read logical block by the key value,
In secondary storage ,
An index file,
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset to a specific logical block of the data file in logical block units, Have
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and the logical block including the record indicated by the key value is read from the data file. Steps,
Referring to the record at the end of the read logical block and searching offset data corresponding to the logical block from the offset file based on the key value of the record;
Referring to the bit string of the searched offset data, and if there is a bit which is “1”, temporarily storing the address of the logical block pointed to by the bit in the address set U storage means;
A step of referring to the next record when the key value of the record referred to in the record part of the read logical block is less than the lower limit key value;
Reference is made when the key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value and the key value of the last record of the logical block is less than the upper limit key value. Storing all records from the record to the last record of the logical block in the record set R storage means satisfying the search condition; and, if a next logical block exists, reading the next logical block; ,
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced When the key value of is less than the upper limit key value, the record being referred to is additionally stored in the record set R storage means satisfying the search condition, and the next record is referred to;
The key value of the record referenced in the record part of the read logical block is greater than or equal to the lower limit key value, and the key value of the record at the end of the logical block is greater than or equal to the upper limit key value, and the record being referenced Logical block that each address points to by referring to each address of the address set U storage means when the key value of the address is greater than or equal to the upper limit key value and the key value of the record being referenced is greater than or equal to the upper limit key value And determine whether the key value of all records in the record part of the logical block is greater than or equal to the lower limit key value and less than the upper limit key value, and if the key value is greater than or equal to the lower limit key value and less than the upper limit key value Storing the record having the key value in the record set R storage means satisfying the search condition;
And outputting a record stored in the record set R storage means as a search result.

本発明(請求項17)は、請求項1乃至のいずれかに記載のデータ蓄積装置を構成する各手段としてコンピュータを機能させるためのデータ蓄積プログラムである。 The present invention (Claim 17 ) is a data storage program for causing a computer to function as each means constituting the data storage device according to any one of Claims 1 to 4 .

本発明(請求項18)は、請求項乃至12のいずれかに記載のデータ検索装置を構成する各手段としてコンピュータを機能させるためのデータ検索プログラムである。 The present invention (Claim 18 ) is a data search program for causing a computer to function as each means constituting the data search apparatus according to any one of Claims 9 to 12 .

上記のように本発明によれば、以下のような効果がある。   As described above, the present invention has the following effects.

何らかの原因で順序が逆転したデータに関しても、オフセットデータを参照することで検索可能となるため、完全にソートされていないデータに対しても、sparse indexと同様の速度での高速なデータ書き込みと、完全一致検索及び範囲検索を行うことが可能となる。   Even for data whose order has been reversed for some reason, it becomes possible to search by referring to offset data, so even for data that is not completely sorted, high-speed data writing at the same speed as sparse index, It becomes possible to perform exact match search and range search.

本発明の原理構成図である。It is a principle block diagram of this invention. 本発明の原理を説明するための図である。It is a figure for demonstrating the principle of this invention. 本発明の第1の実施の形態におけるデータ蓄積装置の構成図である。1 is a configuration diagram of a data storage device according to a first embodiment of the present invention. 本発明の第1の実施の形態におけるデータファイルのデータ構造を示す図である。It is a figure which shows the data structure of the data file in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ追加処理を示すフローチャート(その1)である。It is a flowchart (the 1) which shows the data addition process in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ追加処理を示すフローチャート(その2)である。It is a flowchart (the 2) which shows the data addition process in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるキー値による完全一致検索処理のフローチャートである。It is a flowchart of the exact matching search process by the key value in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるキー値による範囲検索処理のフローチャート(その1)である。It is a flowchart (the 1) of the range search process by the key value in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるキー値による範囲検索処理のフローチャート(その2)である。It is a flowchart (the 2) of the range search process by the key value in the 1st Embodiment of this invention. 本発明の第2の実施の形態におけるデータ蓄積装置の構成図である。It is a block diagram of the data storage apparatus in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるデータ構造を示す図である。It is a figure which shows the data structure in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるデータ追加処理のフローチャート(その1)である。It is a flowchart (the 1) of the data addition process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるデータ追加処理のフローチャート(その2)である。It is a flowchart (the 2) of the data addition process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるキー値による完全一致検索処理のフローチャートである。It is a flowchart of the exact matching search process by the key value in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるキー値による範囲検索処理のフローチャート(その1)である。It is a flowchart (the 1) of the range search process by the key value in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるキー値による範囲検索処理のフローチャート(その2)である。It is a flowchart (the 2) of the range search process by the key value in the 2nd Embodiment of this invention.

以下、図面と共に本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

本発明のデータ構造では、sparse indexと同様の形態を採りながら、新たな「オフセットデータ」というデータを付け加えるものとする。   In the data structure of the present invention, new “offset data” data is added while taking the same form as the sparse index.

[第1の実施の形態]
本実施の形態は、オフセットデータをビット列長hのビット列とし、二次記憶装置内のデータファイルの各論理ブロックのヘッダ部に書き込む方法である。また、このとき、オフセットデータのビット列によるオフセット数の表現方法は、ビット列のビット番号を用いて行う。このため、ビット列長hは表現できるオフセット数に影響する。ビット列長hの場合、表現できるオフセット数の最大値はhとなる。このため、順序逆転によってあるレコードがhよりも大きい論理ブロック数分遅れて入力された場合、このレコードを指し示すことはできない。よって、入力するデータの順序逆転が起こり得る範囲に併せてビット列長hを適宜設定する必要がある。
[First Embodiment]
In the present embodiment, offset data is converted into a bit string having a bit string length h and written to the header portion of each logical block of the data file in the secondary storage device. At this time, the method of expressing the offset number by the bit string of the offset data is performed using the bit number of the bit string. For this reason, the bit string length h affects the number of offsets that can be expressed. In the case of the bit string length h, the maximum value of the number of offsets that can be expressed is h. For this reason, when a record is input delayed by the number of logical blocks larger than h due to order reversal, this record cannot be indicated. Therefore, it is necessary to appropriately set the bit string length h in accordance with a range in which the order of input data can be reversed.

図3は、本発明の第1の実施の形態におけるデータ蓄積装置の構成を示す。   FIG. 3 shows the configuration of the data storage device according to the first embodiment of the present invention.

同図に示すデータ蓄積装置は、システム制御部100、インタフェース110、バッファメモリ120、二次記憶装置130から構成される。なお、同図では、データ蓄積装置として記載しているが、システム制御部100は後述するように、データ検索時には検索機能を有する。   The data storage device shown in FIG. 1 includes a system control unit 100, an interface 110, a buffer memory 120, and a secondary storage device 130. In the figure, although described as a data storage device, the system control unit 100 has a search function when searching for data, as will be described later.

インタフェース110はバッファメモリ120と、バッファメモリ120はインタフェース110と二次記憶装置130との間でそれぞれデータのやり取りを行う。二次記憶装置130内には、索引ファイル131とデータファイル132の2つのファイルが存在する。このときデータファイル132はオフセットデータを含む。   The interface 110 exchanges data between the buffer memory 120 and the buffer memory 120 between the interface 110 and the secondary storage device 130. There are two files in the secondary storage device 130, an index file 131 and a data file 132. At this time, the data file 132 includes offset data.

システム制御部100は、インタフェース110に対して入力データが書き込み要求なのか読み出し要求なのかを解析する入力データ解析部101と、バッファメモリ120に対して入出力されるデータをバッファするためのメモリの管理を行うメモリ管理部102と、二次記憶装置130に対する入力データのファイルへの書き込みなどのファイル操作を行うファイル操作部103を有する。   The system control unit 100 includes an input data analysis unit 101 that analyzes whether input data is a write request or a read request to the interface 110, and a memory that buffers data input and output to the buffer memory 120. A memory management unit 102 that performs management and a file operation unit 103 that performs file operations such as writing input data to the secondary storage device 130 to a file are provided.

図4は、本発明の第1の実施の形態におけるデータファイルのデータ構造を示す。   FIG. 4 shows the data structure of the data file in the first embodiment of the present invention.

データファイル132の各論理ブロックはレコード部とヘッダ部から構成され、レコード部は入力されたレコード、ヘッダ部にはオフセットデータを持つ。同図のデータファイル132の最初の論理ブロックではヘッダ部のオフセットデータのビット列の1桁目が「1」となっているため、1つ後ろの論理ブロックに最初の論理ブロックが扱う範囲のキー値のレコードがあることがわかる。なお、ヘッダ部のオフセットデータのビット列が「0」の場合は論理ブロックが扱う範囲のキー値のレコードがないことを示す。   Each logical block of the data file 132 includes a record part and a header part. The record part has an input record and the header part has offset data. In the first logical block of the data file 132 shown in the figure, since the first digit of the bit string of the offset data in the header portion is “1”, the key value in the range handled by the first logical block in the next logical block You can see that there are records. When the bit string of the offset data in the header part is “0”, it indicates that there is no key value record in the range handled by the logical block.

<データ追加処理>
図5、図6は、本発明の第1の実施の形態におけるデータ追加処理を示すフローチャートである。
<Data addition processing>
5 and 6 are flowcharts showing data addition processing in the first embodiment of the present invention.

データ追加(蓄積)処理では、システム制御部100の入力データ解析部101が書き込み要求であると判定すると、入力されたデータ(入力レコード)をメモリ管理部102を介してバッファメモリ120上に蓄積する(ステップ101)。このとき、メモリ管理部102は、入力レコードが論理ブロックサイズ分だけ蓄積されるまで入力レコードをバッファメモリ120に蓄積し続ける。   In the data addition (accumulation) process, when the input data analysis unit 101 of the system control unit 100 determines that it is a write request, the input data (input record) is accumulated on the buffer memory 120 via the memory management unit 102. (Step 101). At this time, the memory management unit 102 continues to accumulate the input records in the buffer memory 120 until the input records are accumulated for the logical block size.

入力レコードがバッファメモリ120内に論理ブロックサイズ分だけ蓄積されたならば(ステップ102、Yes)、メモリ管理部102は、バッファメモリ120内のレコードをキー値について昇順にソートする(ステップ103)。   If the input records are accumulated in the buffer memory 120 by the logical block size (Yes in step 102), the memory management unit 102 sorts the records in the buffer memory 120 in ascending order with respect to the key values (step 103).

その後、ファイル操作部103は、バッファメモリ120内のレコードを読み出し、当該レコードと、オフセットデータの初期値として全ビットを「0」にしたビット列とを、それぞれ論理ブロックのレコード部、ヘッダ部として二次記憶装置130のデータファイル132に書き込む(ステップ104)。このとき、書き込んだ論理ブロックのアドレスをメモリ(図示せず)に格納しておくものとする。   Thereafter, the file operation unit 103 reads the record in the buffer memory 120, and uses the record and a bit string with all bits set to “0” as the initial value of the offset data as the record unit and header unit of the logical block, respectively. The data is written in the data file 132 of the next storage device 130 (step 104). At this time, the address of the written logical block is stored in a memory (not shown).

次に、ファイル操作部103は、索引ファイル131を参照して索引ファイル131内の最大のキー値を探し、その値をステップ104で書き込んだ論理ブロックで扱うキー値の下限値Lとして一時的にメモリ(図示せず)に記憶する(ステップ105)。   Next, the file operation unit 103 refers to the index file 131 to find the maximum key value in the index file 131 and temporarily sets the value as the lower limit value L of the key value handled by the logical block written in step 104. Store in a memory (not shown) (step 105).

その後、ファイル操作部103は、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、索引ファイル131を更新する(ステップ106)。   Thereafter, the file operation unit 103 creates an index for the last record having the maximum key value in the written logical block, and updates the index file 131 (step 106).

さらに、ファイル操作部103は、バッファメモリ120内のレコードを参照し、先頭のレコードから順にレコードのキー値が、メモリ(図示せず)内の下限値L以下となるレコードを探す(ステップ107)。参照したレコードが下限値Lよりも大きい場合(ステップ108、No)は、そこで探索を終了し、書き込み処理を終了する。また、参照したレコードが下限値L以下の場合(ステップ108、Yes)、索引ファイル131を調べ、そのキー値以上で最も値が小さいキー値を探す(ステップ109)。   Further, the file operation unit 103 refers to the record in the buffer memory 120 and searches for a record in which the key value of the record is less than or equal to the lower limit value L in the memory (not shown) in order from the first record (step 107). . If the referenced record is larger than the lower limit L (step 108, No), the search ends there and the writing process ends. If the referenced record is less than or equal to the lower limit value L (step 108, Yes), the index file 131 is examined to find a key value having the smallest value not less than that key value (step 109).

ここで、探索したキー値が指し示す論理ブロックが、バッファメモリ120内の他のレコードが参照された際に読み込まれており、オフセットデータの更新が行われていたのであれば(ステップ110、Yes)、その論理ブロックの更新処理は取りやめ、バッファメモリ120上で次のレコードがあれば(ステップ118、Yes)、次のレコードを参照し、同様の処理を行う(ステップ119)。次のレコードがなければ(ステップ118、No)、そこで探索終了とし、書き込み処理を終了する。   Here, if the logical block indicated by the searched key value is read when another record in the buffer memory 120 is referred to and the offset data has been updated (step 110, Yes). Then, the update process of the logical block is canceled, and if there is a next record on the buffer memory 120 (step 118, Yes), the next record is referred to and the same process is performed (step 119). If there is no next record (step 118, No), the search ends there, and the writing process ends.

一方、探索したキー値が指す論理ブロックが、バッファメモリ120内の他のレコードが参照された際に、まだ読み込まれておらず、データファイル132のオフセットデータの更新がまだ行われていないのであれば(ステップ110,No)、探索した索引のキー値を更新済みとして一時的にメモリ(図示せず)に格納し(ステップ111)、当該索引のキー値が指し示す論理ブロックを読み込み、その論理ブロックのアドレスをメモリ(図示せず)に格納する(ステップ112)。   On the other hand, the logical block pointed to by the searched key value is not yet read when another record in the buffer memory 120 is referenced, and the offset data of the data file 132 has not yet been updated. (Step 110, No), the key value of the searched index is temporarily stored in a memory (not shown) as updated (Step 111), the logical block indicated by the key value of the index is read, and the logical block Are stored in a memory (not shown) (step 112).

次に、ファイル操作部103は、メモリ(図示せず)に格納されているステップ112で読み込んだ論理ブロックと、ステップ104で書き込んだ論理ブロックとのアドレスを比較し、ブロック数がいくつ離れているかを算出し、これをオフセットXとする(ステップ113)。このオフセットXを用いてX番目のビットのみを「1」としたビット列長hのビット列aを生成する(ステップ114)。次に、読み込んだ論理ブロックのヘッダ部分のオフセットを表すビット列bを読み込み(ステップ115)、ビット列aとbの論理和をとったビット列cを生成する(ステップ116)。ビット列cを読み込んだページの新しいオフセットデータとしてヘッダ部分に上書き書き込みし、データファイル132に反映させる。(ステップ117)。   Next, the file operation unit 103 compares the addresses of the logical block read in step 112 and the logical block written in step 104 stored in a memory (not shown), and how many blocks are separated. Is calculated and set as an offset X (step 113). Using this offset X, a bit string a having a bit string length h in which only the Xth bit is “1” is generated (step 114). Next, the bit string b representing the offset of the header portion of the read logical block is read (step 115), and a bit string c obtained by ORing the bit strings a and b is generated (step 116). The bit string c is overwritten in the header portion as new offset data of the read page, and reflected in the data file 132. (Step 117).

バッファメモリ120上の次のレコードがあれば(ステップ118、Yes)、それを参照し、同様の処理を行う。次のレコードがなければ(ステップ118、No)、データ追加処理を終了する。   If there is a next record on the buffer memory 120 (step 118, Yes), it is referred to and the same processing is performed. If there is no next record (step 118, No), the data addition process is terminated.

<データ完全一致検索処理>
図7は、本発明の第1の実施の形態におけるキー値による完全一致検索処理のフローチャートである。
<Data exact search processing>
FIG. 7 is a flowchart of an exact match search process using a key value according to the first embodiment of this invention.

まず、探索したいキー値がインタフェース110を介して入力される(ステップ201)。ファイル操作部103は、二次記憶装置130の索引ファイル131から探索キー値以上で最も値が小さいキー値を探し、その値が指すレコードを含む論理ブロックを読み込む(ステップ202)。次に、読み込んだ論理ブロック内のレコード部から二分探索を用いて探索キー値を持つレコードを探す(ステップ203)。   First, a key value to be searched is input via the interface 110 (step 201). The file operation unit 103 searches the index file 131 in the secondary storage device 130 for a key value having the smallest value that is greater than or equal to the search key value, and reads a logical block including a record indicated by the value (step 202). Next, a record having a search key value is searched using a binary search from the record portion in the read logical block (step 203).

このとき、探索キー値を持つレコードが見つかったのであれば(ステップ204、Yes)、探索キー値を持つレコードを出力して終了する(ステップ211)。探索キー値が見つからなかった場合は(ステップ204、No)、別の論理ブロックにあるレコードを調べるため、読み込んだ論理ブロックのヘッダ部にあるオフセットデータのビット列を参照する(ステップ205)。その後、ビット列からビットが「1」となっている全てのビットについて、そのビット番号XをオフセットXとし、この論理ブロックからXブロック後ろの論理ブロックを読み込む(ステップ206)。読み込んだ論理ブロック内のレコード部から二分探索を用いて探索キーの値を持つレコードを探し(ステップ207)、レコードが見つかれば(ステップ208、Yes)それを出力して終了する。ビット列が持つ「1」となっているビットが指す全ての論理ブロックを参照し(ステップ209、Yes)、レコードが見つからなければ(ステップ208、No)、「探索キー値を持つレコードは無し」と出力し(ステップ210)、終了する。   At this time, if a record having the search key value is found (step 204, Yes), the record having the search key value is output and the process ends (step 211). If no search key value is found (step 204, No), a bit string of offset data in the header portion of the read logical block is referred to in order to examine a record in another logical block (step 205). Thereafter, with respect to all the bits having the bit “1” from the bit string, the bit number X is set as the offset X, and the logical block subsequent to the X block is read from this logical block (step 206). A record having a search key value is searched using a binary search from the record portion in the read logical block (step 207). If a record is found (step 208, Yes), it is output and the process is terminated. All logical blocks pointed to by the bit string “1” in the bit string are referenced (step 209, Yes), and if no record is found (step 208, No), “no record with search key value” Output (step 210), the process ends.

<データの範囲検索処理>
図8、図9は、本発明の第1の実施の形態におけるキー値によるデータの範囲検索処理のフローチャートである。
<Data range search processing>
8 and 9 are flowcharts of the data range search process using the key value according to the first embodiment of this invention.

まず、入力として下限キー値以上、上限キー値未満という検索条件が与えられると(ステップ301)、これらの下限キー値、上限キー値をメモリ(図示せず)に格納する。ファイル操作部103は、索引ファイル131から下限キー値以上で最も値が小さいキー値を探して、その値が指すレコードを含む論理ブロックをデータファイル132から読み込む(ステップ302)。このとき、読み込んだ論理ブロックのヘッダ部のオフセットを示すビット列を参照し、「1」となっているビットがあればそれが指す論理ブロックのアドレスを一時的にメモリ(図示せず)のアドレスの集合Uに記憶する(ステップ303)。   First, when a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given as an input (step 301), these lower limit key value and upper limit key value are stored in a memory (not shown). The file operation unit 103 searches the index file 131 for a key value that is not less than the lower limit key value and has the smallest value, and reads a logical block including a record indicated by the value from the data file 132 (step 302). At this time, referring to the bit string indicating the offset of the header portion of the read logical block, if there is a bit of “1”, the address of the logical block pointed to by the bit is temporarily stored in the address of the memory (not shown). Store in set U (step 303).

次に、ファイル操作部103は、論理ブロックのレコード部の先頭のレコードから順番にレコードのキー値が下限キー値以上かどうか調べていく(ステップ304)。下限キー値以上のレコードが見つかったら(ステップ305、Yes)、まず論理ブロック内で最大のキー値を持つ末尾のレコードを参照し、そのキー値が上限キー値以上かどうかを調べる(ステップ307)。このとき、上限キー値以上でなければ(ステップ307、No)、この論理ブロックの現在参照しているレコードから末尾のレコードまでの全てのレコードは検索条件を満たすとして、メモリ(図示せず)上の検索条件を満たすレコード集合R記憶手段に追加する(ステップ308)。   Next, the file operation unit 103 checks whether the key value of the record is greater than or equal to the lower limit key value in order from the first record in the record part of the logical block (step 304). When a record that is equal to or higher than the lower limit key value is found (step 305, Yes), first, the last record having the maximum key value in the logical block is referred to and it is checked whether the key value is equal to or higher than the upper limit key value (step 307). . At this time, if it is not equal to or greater than the upper limit key value (No in Step 307), all records from the currently referenced record to the last record of this logical block are assumed to satisfy the search condition and are stored in a memory (not shown). Are added to the record set R storage means satisfying the search condition (step 308).

その後、ファイル操作部103は、データファイル132内に次の論理ブロックがあれば(ステップ309,Yes)、それを読み込み、同様の処理を行う(ステップ310)。   Thereafter, if there is a next logical block in the data file 132 (Yes in Step 309), the file operation unit 103 reads it and performs the same processing (Step 310).

一方、論理ブロックがなければ(ステップ309、No)、データファイル132上の末尾の論理ブロックまで読み込んだこととなる。このとき、各論理ブロックのオフセットデータはその論理ブロックよりも後ろのブロックを指し示すものであるので、末尾の論理ブロックまで読み込んだ時点でアドレス集合Uが指し示す全ての論理ブロックについても、末尾の論理ブロックまで順に論理ブロックを読み込んでいく過程で探索が行われていることになる。よって、そこで、検索終了となり、メモリ(図示せず)に格納されているレコード集合Rを出力して終了する(ステップ323)。   On the other hand, if there is no logical block (No in step 309), the last logical block on the data file 132 has been read. At this time, since the offset data of each logical block indicates a block after the logical block, all logical blocks indicated by the address set U at the time of reading up to the final logical block are also included in the final logical block. The search is performed in the process of reading the logical blocks in order. Therefore, the search is terminated, and the record set R stored in the memory (not shown) is output and terminated (step 323).

末尾のレコードのキー値が上限キー値以上だった場合は(ステップ307、Yes)、参照しているレコードから末尾のレコードまで順番にキー値が上限値未満かどうかの比較を行っていく。もし、参照しているレコードのキー値が上限キー未満であれば(ステップ311、Yes)、そのレコードをメモリ(図示せず)上の検索条件を満たすレコード集合R記憶手段に追加する(ステップ312)。条件キー値未満でないレコードを見つけたら(ステップ311、No)、次はオフセットデータが指している論理ブロックのレコードについて検索を行う。   If the key value of the last record is greater than or equal to the upper limit key value (step 307, Yes), a comparison is made in order from the record being referred to the last record to determine whether the key value is less than the upper limit value. If the key value of the record being referred to is less than the upper limit key (step 311, Yes), the record is added to the record set R storage means that satisfies the search condition on the memory (not shown) (step 312). ). If a record that is not less than the condition key value is found (No at step 311), the next search is performed for the record of the logical block pointed to by the offset data.

メモリ(図示せず)に格納されたアドレス集合Uが持つ全てのアドレスが参照されていないのならば(ステップ314、No)、まだ参照していないアドレスを参照し(ステップ315)、該アドレスが指す論理ブロックが探索済みであれば(ステップ316、Yes)、Uが持つ他のアドレスの論理ブロックを参照するため、ステップ314に移行する。   If all the addresses of the address set U stored in the memory (not shown) are not referenced (step 314, No), the addresses that have not been referred to are referred to (step 315). If the logical block to be pointed out has been searched (step 316, Yes), the process proceeds to step 314 in order to refer to the logical block of another address that U has.

一方、該アドレスが指す論理ブロックがまだ探索済みでなければ(ステップ316、No)、該論理ブロックのレコード先頭のレコードを参照する(ステップ317)。参照しているレコードのキー値が下限キー値未満である場合は(ステップ318、No)、次のレコードを参照し(ステップ319)、ステップ318に移行する。参照しているレコードのキー値が下限キー値以上の場合は(ステップ318、Yes)、参照しているレコードのキー値が上限キー値未満かどうか判定し、上限キー値未満でなければ(ステップ320、No)、該論理ブロックの探索は終了したとして、他の論理ブロックのアドレスを参照するために、ステップ314に移行する。上限キー値未満であれば(ステップ320、Yes)、参照しているレコードを検索条件を満たすレコードとしてレコード集合Rに追加し(ステップ321)、次のレコードを参照し(ステップ322)、ステップ320に移行する。   On the other hand, if the logical block pointed to by the address has not been searched yet (step 316, No), the first record of the logical block is referred to (step 317). If the key value of the record being referred to is less than the lower limit key value (step 318, No), the next record is referenced (step 319), and the process proceeds to step 318. If the key value of the referenced record is greater than or equal to the lower limit key value (step 318, Yes), it is determined whether the key value of the referenced record is less than the upper limit key value. 320, No), assuming that the search for the logical block is completed, the process proceeds to step 314 to refer to the address of another logical block. If it is less than the upper limit key value (step 320, Yes), the referenced record is added to the record set R as a record that satisfies the search condition (step 321), the next record is referenced (step 322), and step 320 Migrate to

アドレス集合Uが持つすべてのアドレスが指す論理ブロックの探索が終わったら(ステップ314、Yes)、検索終了となり、メモリ(図示せず)に格納されているレコード集合Rを出力して終了する(ステップ323)。   When the search for the logical block pointed to by all the addresses in the address set U is completed (step 314, Yes), the search is terminated, and the record set R stored in the memory (not shown) is output and terminated (step). 323).

上記の図5〜図9に示したように、sparse indexを用いた索引付け方法であっても、オフセットデータを用いたデータ構造を利用してデータ書き込みを行うことで、順序逆転が起こるようなデータに対する完全一致検索及び範囲検索処理を可能としている。   As shown in FIGS. 5 to 9 above, even in the indexing method using the sparse index, the order is reversed by writing the data using the data structure using the offset data. It is possible to perform exact match search and range search processing for data.

[第2の実施の形態]
前述の第1の実施の形態では、オフセットデータをデータファイルに格納する場合を示したが、本実施の形態では、オフセットデータをデータファイルとは別のファイルであるオフセットファイルに格納する場合について説明する。
[Second Embodiment]
In the first embodiment described above, the case where the offset data is stored in the data file has been described. In the present embodiment, the case where the offset data is stored in the offset file which is a file different from the data file will be described. To do.

図10は、本発明の第2の実施の形態におけるデータ蓄積装置の構成を示す。   FIG. 10 shows the configuration of the data storage device according to the second embodiment of the present invention.

同図に示すデータ蓄積装置は、図3に示す装置構成とは二次記憶装置内のファイル構成が異なり、本実施の形態では、索引ファイル231、データファイル232、及びオフセットデータを含むオフセットファイル233から構成される。他の構成については、図3の構成と同様である。なお、同図では、データ蓄積装置として説明するが、システム制御部200は後述するように、データ検索時には検索機能を有する。   The data storage device shown in the figure is different from the device configuration shown in FIG. 3 in the file configuration in the secondary storage device. In this embodiment, the index file 231, the data file 232, and the offset file 233 including offset data are used. Consists of Other configurations are the same as those in FIG. In the figure, although described as a data storage device, the system control unit 200 has a search function when searching for data, as will be described later.

図11は、本発明の第2の実施の形態におけるデータ構成を示す。   FIG. 11 shows a data structure in the second embodiment of the present invention.

データファイル232の各論理ブロックは入力されたレコードのみから構成される。   Each logical block of the data file 232 is composed of input records only.

オフセットファイル233の各レコードは、データファイル232の各論理ブロックに対応しており、キー値とビット列長hのオフセットデータから構成される。オフセットファイルのキー値はデータファイル232の論理ブロックとオフセットファイル233のオフセットデータとを1対1で対応付けるために用いる。オフセットデータのビット列によるオフセット数の表示方法は、第1の実施の形態と同様にビット列のビット番号を用いて行う。   Each record of the offset file 233 corresponds to each logical block of the data file 232, and includes a key value and offset data having a bit string length h. The key value of the offset file is used to associate the logical block of the data file 232 with the offset data of the offset file 233 on a one-to-one basis. The method of displaying the number of offsets by the bit string of the offset data is performed using the bit number of the bit string as in the first embodiment.

<データ追加処理>
図12、13は、本発明の第2の実施の形態におけるデータ追加処理のフローチャートである。
<Data addition processing>
12 and 13 are flowcharts of the data addition processing in the second embodiment of the present invention.

データ追加処理では、システム制御部200の入力データ解析部201が書き込み要求であると判定すると、メモリ管理部202を介してバッファメモリ120上に蓄積する(ステップ401)。このとき、入力レコードが論理ブロックサイズ分だけ蓄積されるまで入力レコードをバッファメモリ120に蓄積し続ける。   In the data addition process, if the input data analysis unit 201 of the system control unit 200 determines that the request is a write request, the data is accumulated on the buffer memory 120 via the memory management unit 202 (step 401). At this time, the input record is continuously stored in the buffer memory 120 until the input record is stored for the logical block size.

入力レコードがバッファメモリ120内に論理ブロックサイズ分だけ蓄積されたならば(ステップ402、Yes)、メモリ管理部202は、バッファメモリ120内のレコードをキー値について昇順にソートする(ステップ403)。その後、ファイル操作部203は、バッファメモリ120内のレコードを読み出し、当該レコードを二次記憶装置230のデータファイル232に書き込み、当該論理ブロックのアドレスをメモリ(図示せず)に格納する(ステップ404)。   If the input records are accumulated by the logical block size in the buffer memory 120 (step 402, Yes), the memory management unit 202 sorts the records in the buffer memory 120 in ascending order of the key values (step 403). Thereafter, the file operation unit 203 reads the record in the buffer memory 120, writes the record in the data file 232 of the secondary storage device 230, and stores the address of the logical block in the memory (not shown) (step 404). ).

次に、ファイル操作部203は、索引ファイル231を参照して当該索引ファイル231内の最大のキー値を探し、その値をステップ404で書き込んだ論理ブロックで扱うキー値の下限値Lとして一時的にメモリ(図示せず)に記憶する(ステップ405)。その後、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、索引ファイル231を更新する(ステップ406)。   Next, the file operation unit 203 refers to the index file 231 to find the maximum key value in the index file 231 and temporarily sets that value as the lower limit value L of the key value handled by the logical block written in step 404. Is stored in a memory (not shown) (step 405). Thereafter, an index is created for the last record having the largest key value in the written logical block, and the index file 231 is updated (step 406).

さらに、ファイル操作部203は、データファイル232に書き込んだ論理ブロック内で最大のキー値をキー値、初期値として全ビットを「0」にしたビット列をオフセットデータとしてそのレコードをオフセットファイル233に書き込む(ステップ407)。   Further, the file operation unit 203 writes the record to the offset file 233 using the maximum key value in the logical block written to the data file 232 as the key value and the bit string with all bits “0” as the initial value as the offset data. (Step 407).

ファイル操作部203は、バッファメモリ120内の先頭のレコードを参照し(ステップ408)、参照中のレコードのキー値が、ステップ405でメモリ(図示せず)に格納されている下限値L以下であるかを判定し、Lより大きければ(ステップ409、No)、処理を終了し、L以下であれば(ステップ409、Yes)、索引ファイル231において参照中のレコードのキー値以上で最も値が小さいキー値を探す(ステップ410)。   The file operation unit 203 refers to the first record in the buffer memory 120 (step 408), and the key value of the record being referenced is less than or equal to the lower limit L stored in the memory (not shown) in step 405. If it is greater than L (step 409, No), the process is terminated. If it is less than L (step 409, Yes), the index file 231 has the largest value not less than the key value of the record being referred to. A small key value is searched (step 410).

ファイル操作部203は、探索したキー値が更新済みであるかを判定し、更新済みであれば(ステップ411、Yes)、バッファメモリ120上に次のレコードが存在するかを判定し、存在する場合は(ステップ420、Yes)、バッファメモリ120上の次のレコードを参照し(ステップ421)、ステップ409の処理に移行する。一方、更新済みでない場合は(ステップ411、No)、探索した索引キー値を更新済みとして一時的にメモリ(図示せず)に記憶する(ステップ412)。索引のキー値が指すレコードを含む論理ブロックをデータファイル232から読み込み、当該論理ブロックのアドレスをメモリ(図示せず)に格納する(ステップ413)。   The file operation unit 203 determines whether the searched key value has been updated. If the key value has been updated (step 411, Yes), the file operation unit 203 determines whether the next record exists in the buffer memory 120 and exists. In such a case (step 420, Yes), the next record on the buffer memory 120 is referred to (step 421), and the process proceeds to step 409. On the other hand, if it has not been updated (No at Step 411), the searched index key value is temporarily stored in a memory (not shown) as updated (Step 412). The logical block including the record indicated by the index key value is read from the data file 232, and the address of the logical block is stored in a memory (not shown) (step 413).

次に、メモリ(図示せず)から、読み込んだ論理ブロックのアドレスと書き込んだ論理ブロックのアドレスを取得し、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスを比較し、ブロック数がいくつ離れているかを算出し、その値をオフセットXとし(ステップ414)、X番目のビットのみ「1」とした桁数hのビット列aを生成する(ステップ415)。   Next, the address of the read logical block and the address of the written logical block are obtained from a memory (not shown), and the address of the read logical block and the written logical block is compared. And the value X is set as the offset X (step 414), and the bit string a having the number of digits h with only the Xth bit being “1” is generated (step 415).

ファイル操作部203は、索引のキー値に基づいてデータファイル232から読み込んだ論理ブロックに対応したオフセットデータをオフセットファイル233から探索して取得し(ステップ416)、探索したオフセットデータのビット列bを読み込む(ステップ417)。ステップ415で生成されたビット列aとステップ417で読み込まれたビット列bのORをとったビット列cを生成する(ステップ418)。当該ビット列cを、読み込んだオフセットデータファイル233のオフセットデータ上に上書きする(ステップ419)。   The file operation unit 203 searches the offset file 233 for offset data corresponding to the logical block read from the data file 232 based on the key value of the index (step 416), and reads the bit string b of the searched offset data. (Step 417). A bit string c obtained by ORing the bit string a generated in step 415 and the bit string b read in step 417 is generated (step 418). The bit string c is overwritten on the offset data of the read offset data file 233 (step 419).

バッファメモリ120上に次のレコードが存在する場合は(ステップ420、Yes)、バッファメモリ120上の次のレコードを参照し、ステップ408に移行する(ステップ421)。次のレコードが存在しない場合は(ステップ420、No)、処理を終了する。   When the next record exists in the buffer memory 120 (step 420, Yes), the next record on the buffer memory 120 is referred to, and the process proceeds to step 408 (step 421). If the next record does not exist (step 420, No), the process is terminated.

本実施の形態のデータ追加処理において、第1の実施の形態における図5のデータ追加処理との違いは、オフセットファイル233にキー値、オフセットデータというレコードの形でデータを書き込むこと(ステップ404)と、データファイル232の論理ブロックに対応したオフセットデータを参照するために、データファイル232の論理ブロックのキー値を元にオフセットファイル233からオフセットデータを探索する必要があることである(ステップ416)。   The data addition process of the present embodiment is different from the data addition process of FIG. 5 in the first embodiment in that data is written in the offset file 233 in the form of a record of key values and offset data (step 404). In order to refer to the offset data corresponding to the logical block of the data file 232, it is necessary to search the offset data from the offset file 233 based on the key value of the logical block of the data file 232 (step 416). .

<データ完全一致検索処理>
図14は、本発明の第2の実施の形態におけるキー値による完全一致検索処理のフローチャートである。
<Data exact search processing>
FIG. 14 is a flowchart of an exact match search process using a key value according to the second embodiment of this invention.

まず、探索したい探索キーのキー値がインタフェース110を介して入力される(ステップ501)。ファイル操作部203は、二次記憶装置230の索引ファイル231から探索キー値以上で最も値が小さいキー値を探し、その値をメモリ(図示せず)に一時的に格納し、その値が指すレコードを含む論理ブロックをデータファイル232から読み込む(ステップ502)。次に、二分探索を用いて読み込んだ論理ブロック内のレコード部から探索キー値を持つレコードを探す(ステップ503)。   First, a key value of a search key to be searched is input via the interface 110 (step 501). The file operation unit 203 searches the index file 231 of the secondary storage device 230 for a key value having the smallest value that is greater than or equal to the search key value, temporarily stores the value in a memory (not shown), and the value indicates A logical block including a record is read from the data file 232 (step 502). Next, a record having a search key value is searched from the record portion in the logical block read using the binary search (step 503).

このとき、探索キー値を持つレコードが見つかったのであれば(ステップ504、Yes)、探索キー値を持つレコードを出力して終了する(ステップ512)。探索キー値が見つからなかった場合は(ステップ504、No)、ステップ502でメモリ(図示せず)に格納されている索引ファイル231のキー値に基づいてオフセットファイル233から読み込んだ論理ブロックに対応したオフセットデータを探索し(ステップ505)、探索したオフセットデータのビット列を参照する(ステップ506)。このとき、ビット列においてまだチェックしていない「1」となっているビットの番号XをオフセットXとし、Xブロック後ろの論理ブロックをデータファイル232から読み込む(ステップ507)。   At this time, if a record having the search key value is found (step 504, Yes), the record having the search key value is output and the process ends (step 512). When the search key value is not found (step 504, No), it corresponds to the logical block read from the offset file 233 based on the key value of the index file 231 stored in the memory (not shown) in step 502. The offset data is searched (step 505), and the bit string of the searched offset data is referenced (step 506). At this time, the bit number X of “1” not checked yet in the bit string is set as the offset X, and the logical block after the X block is read from the data file 232 (step 507).

データファイル232から読み込んだ論理ブロック内のレコード部から二分探索を用いて探索キー値を持つレコードを探し(ステップ508)、探索キー値を持つレコードが見つかった場合は(ステップ509、Yes)、探索キー値を持つレコードを出力する(ステップ512)。一方、レコードが見つからない場合は(ステップ509、No)、ビット列が持つビットが「1」となっている全ての桁を参照したかを判定し、全ての桁を参照していれば(ステップ510、Yes)、探索キーを持つレコードが無いことを出力して終了する(ステップ511)。すべての桁を参照していない場合は(ステップ510、No)、ステップ507に移行する。   A record having a search key value is searched using a binary search from the record portion in the logical block read from the data file 232 (step 508). If a record having the search key value is found (step 509, Yes), the search is performed. A record having a key value is output (step 512). On the other hand, if no record is found (step 509, No), it is determined whether all the digits having the bit string bit “1” have been referenced, and if all the digits have been referenced (step 510). , Yes), the fact that there is no record having a search key is output and the process ends (step 511). If all the digits are not referred to (step 510, No), the process proceeds to step 507.

本実施の形態のデータの完全一致検索処理において、第1の実施の形態における図7のキー値によるデータの完全一致検索処理との違いは、図5と図12との違いと同様に、オフセットデータを参照する際にキー値を用いてオフセットファイル233からオフセットデータを探索する(ステップ505)必要があることである。   In the exact match search processing of the data according to the present embodiment, the difference from the complete match search processing by the key value of FIG. 7 in the first embodiment is similar to the difference between FIG. 5 and FIG. When referring to the data, it is necessary to search the offset data from the offset file 233 using the key value (step 505).

<範囲検索処理>
図15、16は、本発明の第2の実施の形態におけるキー値による範囲検索処理のフローチャートである。
<Range search process>
15 and 16 are flowcharts of a range search process using key values in the second embodiment of the present invention.

まず、入力として下限キー値以上、上限キー値未満という検索条件が与えられると、下限キー値、上限キー値をメモリ(図示せず)に格納し(ステップ601)、ファイル操作部203は、索引ファイル231から下限キー値以上で最も値が小さいキー値を探して、その値が指すレコードを含む論理ブロックをデータファイル232から読み込む(ステップ602)。このとき、読み込んだ論理ブロックの末尾のレコードを参照し、そのレコードのキー値を元に論理ブロックに対応したオフセットデータをオフセットファイル233から探索する(ステップ603)。   First, when a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given as input, the lower limit key value and the upper limit key value are stored in a memory (not shown) (step 601), and the file operation unit 203 performs indexing. The key value having the smallest value not less than the lower limit key value is searched from the file 231 and the logical block including the record indicated by the value is read from the data file 232 (step 602). At this time, the record at the end of the read logical block is referred to, and offset data corresponding to the logical block is searched from the offset file 233 based on the key value of the record (step 603).

探索したオフセットデータのビット列を参照し、「1」となっているビットがあれば、それが指す論理ブロックのアドレスを一時的にメモリ(図示せず)のアドレスの集合Uに記憶する(ステップ604)。   With reference to the bit string of the searched offset data, if there is a bit that is “1”, the address of the logical block pointed to by it is temporarily stored in a set U of addresses in a memory (not shown) (step 604). ).

次に、ファイル操作部203は、データファイル232から読み込んだ論理ブロックのレコード部の先頭のレコードを参照し(ステップ605)、当該参照しているレコードのキー値が下限キー値未満である場合は(ステップ606、No)、次のレコードを参照し(ステップ607)、同様の処理を行う(ステップ606)。一方、当該参照しているレコードのキー値が下限キー値以上であり(ステップ606、Yes)、論理ブロック末尾のレコードのキー値が上限キー値未満の場合は(ステップ608、No)、参照しているレコードから末尾までのレコードを、メモリ(図示せず)上の検索条件を満たすレコード集合Rに追加する(ステップ609)。次の論理ブロックが存在する場合は(ステップ610、Yes)、次の論理ブロックをデータファイル232から読み込んでステップ603に移行する(ステップ611)。   Next, the file operation unit 203 refers to the first record in the record portion of the logical block read from the data file 232 (step 605), and when the key value of the referenced record is less than the lower limit key value (Step 606, No), the next record is referred to (Step 607), and the same processing is performed (Step 606). On the other hand, if the key value of the record being referred to is greater than or equal to the lower limit key value (step 606, Yes) and the key value of the record at the end of the logical block is less than the upper limit key value (step 608, No), refer to it. The records from the current record to the end are added to the record set R satisfying the search condition on the memory (not shown) (step 609). If the next logical block exists (step 610, Yes), the next logical block is read from the data file 232 and the process proceeds to step 603 (step 611).

一方、ステップ608において、論理ブロックの末尾のレコードのキー値が上限値以上である場合は(ステップ608、Yes)、参照しているレコードのキー値が上限キー値未満であるかを判定し、そうである場合は(ステップ612、Yes)、参照しているレコードをメモリ(図示せず)上の検索条件を満たすレコード集合Rに追加し(ステップ613)、次のレコードを参照し(ステップ614)、ステップ612に移行する。   On the other hand, if the key value of the record at the end of the logical block is greater than or equal to the upper limit value in step 608 (step 608, Yes), it is determined whether the key value of the referenced record is less than the upper limit key value, If so (step 612, Yes), the referenced record is added to the record set R satisfying the search condition on the memory (not shown) (step 613), and the next record is referenced (step 614). ), The process proceeds to step 612.

ステップ612において参照しているレコードのキー値が上限値以上である場合は(ステップ612、No)、アドレスの集合Uが持つすべてのアドレスを参照したかを判定し、参照した場合は(ステップ615、Yes)、レコード集合Rの内容を出力して終了する(ステップ624)。アドレスの集合Uにまだ参照していないアドレスがある場合は(ステップ615、No)、まだ、参照していないUが持つ論理ブロックのアドレスを参照し(ステップ616)、参照したアドレスの論理ブロックが既に探索済みであるかを判定する。   If the key value of the record referred to in step 612 is equal to or higher than the upper limit value (step 612, No), it is determined whether all addresses included in the address set U have been referenced. , Yes), the contents of the record set R are output and the process ends (step 624). If there is an address that has not been referred to in the address set U (step 615, No), the address of the logical block possessed by the U that has not yet been referenced is referred to (step 616). It is determined whether it has already been searched.

参照したアドレスの論理ブロックがすでに探索済みの場合は(ステップ617、Yes)、Uが持つ他のアドレスの論理ブロックを参照するため、ステップ615に移行する。   If the logical block of the referenced address has already been searched (step 617, Yes), the process proceeds to step 615 to refer to the logical block of another address that U has.

一方、参照したアドレスの論理ブロックがまだ探索されていない場合は(ステップ617、No)、論理ブロックをデータファイル232から読み込みレコード部の先頭のレコードを参照する(ステップ618)。参照しているレコードのキー値が下限キー値未満である場合は(ステップ619、No)、次のレコードを参照し(ステップ620)、ステップ619に移行する。参照しているレコードのキー値が下限キー値以上の場合は(ステップ619、Yes)、参照しているレコードのキー値が上限キー値未満かどうか判定し、上限キー値未満で無ければ(ステップ621、No)、該論理ブロックの探索は終了したとして、他の論理ブロックのアドレスを参照するために、ステップ615に移行する。上限キー値未満であれば(ステップ621、Yes)、参照しているレコードを検索条件を満たすレコードとしてレコード集合Rに追加し(ステップ622)、次のレコードを参照し(ステップ623)、ステップ621に移行する。   On the other hand, if the logical block of the referenced address has not been searched yet (step 617, No), the logical block is read from the data file 232 and the first record in the record part is referenced (step 618). If the key value of the record being referred to is less than the lower limit key value (No in step 619), the next record is referenced (step 620), and the process proceeds to step 619. If the key value of the referenced record is equal to or higher than the lower limit key value (step 619, Yes), it is determined whether the key value of the referenced record is less than the upper limit key value. 621, No), assuming that the search for the logical block is completed, the process proceeds to step 615 to refer to the address of another logical block. If it is less than the upper limit key value (step 621, Yes), the referenced record is added to the record set R as a record satisfying the search condition (step 622), the next record is referenced (step 623), and step 621 Migrate to

本実施の形態の範囲検索処理において、第1の実施の形態における図8、図9との違いは、図8と図14の違いと同様に、オフセットデータを参照する際にキー値を用いてオフセットファイル233からオフセットデータを探索する必要があることである。   In the range search process of the present embodiment, the difference between FIG. 8 and FIG. 9 in the first embodiment is that the key value is used when referring to the offset data, similar to the difference between FIG. 8 and FIG. It is necessary to search for offset data from the offset file 233.

第2の実施の形態の第1の実施の形態に対するメリットは、データファイル232の論理ブロックのレコード部を参照する際に、ヘッダ部を読み飛ばす必要がないことと、オフセットファイル233にはオフセットデータが纏めて格納されているため、オフセットデータをまとめてメモリ上に置いておくことができ、これによりオフセットデータの更新による二次記憶装置230へのアクセス回数を減らすことができることである。   The advantage of the second embodiment over the first embodiment is that it is not necessary to skip the header portion when referring to the record portion of the logical block of the data file 232, and the offset file 233 includes offset data. Are stored together, the offset data can be collectively stored in the memory, thereby reducing the number of accesses to the secondary storage device 230 by updating the offset data.

なお、第2の実施の形態においては、データ追加処理時に、「論理ブロック内での最大のキー値をキー値、初期値として全ビットを「0」にしたビット列をオフセットデータとしてレコードをオフセットファイル233に書き込む」処理を省略することも可能である。   In the second embodiment, at the time of data addition processing, “a maximum key value in a logical block is a key value, a bit string with all bits set to“ 0 ”as an initial value is used as offset data, and a record is stored in an offset file. It is also possible to omit the “write to 233” process.

この場合、後から入力されたレコードに順序逆転があり、オフセットとしてビットを1にする必要が生じた場合にのみオフセットファイルを更新すればよいため、二次記憶装置230へのアクセス回数をより減らすことができる。また、オフセットファイルのサイズも小さくなるため、オフセットデータの探索効率の向上も見込める。   In this case, the record that is input later has an order reversal, and the offset file only needs to be updated when the bit needs to be set to 1. Therefore, the number of accesses to the secondary storage device 230 is further reduced. be able to. In addition, since the size of the offset file is reduced, the search efficiency of the offset data can be improved.

なお、上記のデータ蓄積装置(データ検索装置)の各構成要素をプログラムとして構築し、データ蓄積装置(データ検索装置)として利用されるコンピュータにインストールして実行させる、または、ネットワークを介して流通させることが可能である。   Each component of the data storage device (data search device) is constructed as a program and installed in a computer used as the data storage device (data search device) for execution, or distributed via a network. It is possible.

また、構築されたプログラムをハードディスクや、フレキシブルディスク・CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールする、または、配布することが可能である。   Further, the constructed program can be stored in a portable storage medium such as a hard disk, a flexible disk, or a CD-ROM, and can be installed or distributed in a computer.

なお、本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内において種々変更・応用が可能である。   The present invention is not limited to the above-described embodiment, and various modifications and applications can be made within the scope of the claims.

100 システム制御手段、システム制御部
101 入力データ解析部
102 メモリ管理部
103 ファイル操作部
110 インタフェース
120 バッファメモリ
130 二次記憶装置
131 索引ファイル
132 データファイル(オフセットデータを含む)
200 システム制御部
201 入力データ解析部
202 メモリ管理部
203 ファイル操作部
230 二次記憶装置
231 索引ファイル
232 データファイル
233 オフセットファイル
DESCRIPTION OF SYMBOLS 100 System control means, System control part 101 Input data analysis part 102 Memory management part 103 File operation part 110 Interface 120 Buffer memory 130 Secondary storage device 131 Index file 132 Data file (including offset data)
200 System Control Unit 201 Input Data Analysis Unit 202 Memory Management Unit 203 File Operation Unit 230 Secondary Storage Device 231 Index File 232 Data File 233 Offset File

Claims (18)

コンピュータ上で二次記憶装置に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積装置であって、
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、
前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段を有し、
前記二次記憶装置は、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引を格納した索引ファイルと、
を有し、
前記データファイルの各論理ブロックは、
実データを格納するレコード部と、特定の論理ブロックへのオフセットを論理ブロック単位で表す固定長のビット列からなるヘッダ部から構成され、
前記論理ブロックは扱うキー値の範囲を持ち、
前記システム制御手段は、
前記論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックのヘッダ部のビット列のオフセットと等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すように前記データファイルに書き込む手段を含む
ことを特徴とするデータ蓄積装置。
A data storage device for performing high-speed writing and complete match search and range search even if the data order is reversed when performing sequential data storage in a logical storage unit in a secondary storage device on a computer,
A buffer memory that accumulates records entered via the interface for logical blocks;
When the record stored in the buffer memory is read and the record is stored in the secondary storage device, the data of the record has a structure based on the sparse index, and one pair is assigned to each logical block of the secondary storage device. System control that writes offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device when the key value within the range of the logical block is in another logical block. have a means,
The secondary storage device
A data file that stores input records for each logical block;
An index file storing an index for a key value of a record of each logical block of the data file;
Have
Each logical block of the data file is
It consists of a record part that stores actual data and a header part that consists of a fixed-length bit string that represents the offset to a specific logical block in logical block units.
The logical block has a range of key values to handle,
The system control means includes
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and a block having a key value range including the key value is obtained in units of logical blocks. By setting the bit having the bit number equal to the offset of the bit string in the header part of the logical block having the key value in the range to “1”, the key value in the range handled by the logical block becomes “1” in the bit string. A data storage device comprising means for writing to the data file so as to indicate that it is also stored in a logical block separated by the number of offsets indicated by the bit number of the bit .
前記システム制御手段は、
前記バッファメモリのレコードをキー値に基づいて昇順にソートするソート手段と、
前記バッファメモリのレコードを前記データファイルの前記レコード部に書き込み、前記データファイルのオフセットデータの初期値として、全ビットを「0」にしたビット列を前記ヘッダ部に書き込む初期化手段と、
前記索引ファイルを参照して、索引内の最大のキー値を探索し、その値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、前記索引ファイルに書き込む索引ファイル生成手段と、
前記バッファメモリの先頭のレコードのキー値が前記下限値Lであれば、前記索引ファイルにおいて参照中のレコードのキー値以上で最も値が小さいキー値を探索し、該キー値が指すレコードを含む論理ブロックを前記データファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成手段と、
前記読み込んだ論理ブロックのヘッダ部分のオフセットを表すビット列bを読み込み、前記ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成手段と、
前記ビット列cを、読み込んだ論理ブロックのヘッダ部にオフセットデータとして前記データファイルに上書きする書き込み手段と、
前記バッファメモリから次のレコードを読み出して、該レコードのキー値が前記下限値L以下である場合は、前記第1のビット列生成手段、前記第2のビット列生成手段、前記書き込み手段を、該バッファメモリに次のレコードがなくなるまで繰り返す手段と、
を有することを特徴とする請求項記載のデータ蓄積装置。
The system control means includes
Sorting means for sorting the records in the buffer memory in ascending order based on key values;
An initialization means for writing a record of the buffer memory to the record portion of the data file, and writing a bit string with all bits set to “0” as an initial value of the offset data of the data file to the header portion;
Referring to the index file, the maximum key value in the index is searched, and the value is set as the lower limit value L of the key value handled in the written logical block. An index file generating means for creating an index for the record and writing to the index file;
If the key value of the first record in the buffer memory is the lower limit L, the index file is searched for a key value that is the smallest value that is greater than or equal to the key value of the record being referred to, and includes the record indicated by the key value A logical block is read from the data file, and a first bit string a having a number of digits h is generated with the distance between the address of the read logical block and the written logical block as an offset X and only the Xth bit being “1”. A bit string generation means;
A second bit string generation means for reading a bit string b representing an offset of a header portion of the read logical block and generating a bit string c coupled by an OR condition of the bit string a and the bit string b;
Write means for overwriting the data file as offset data in the header portion of the read logical block with the bit string c;
When the next record is read from the buffer memory and the key value of the record is less than or equal to the lower limit value L, the first bit string generating means, the second bit string generating means, and the writing means are Means to repeat until there is no next record in memory,
The data storage device according to claim 1, further comprising:
コンピュータ上で二次記憶装置に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積装置であって、
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、
前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段を有し、
前記二次記憶装置は、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックを格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引を格納する索引ファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列は前記データファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、
を有し、
前記各論理ブロックは扱うキー値の範囲を持ち、
前記システム制御手段は、
前記論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックに対応したオフセットファイルのビット列の前記オフセット数と等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すように前記オフセットファイルに書き込む手段を含む
ことを特徴とするデータ蓄積装置。
A data storage device for performing high-speed writing and complete match search and range search even if the data order is reversed when performing sequential data storage in a logical storage unit in a secondary storage device on a computer,
A buffer memory that accumulates records entered via the interface for logical blocks;
When the record stored in the buffer memory is read and the record is stored in the secondary storage device, the data of the record has a structure based on the sparse index, and one pair is assigned to each logical block of the secondary storage device. System control that writes offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device when the key value within the range of the logical block is in another logical block. Having means,
The secondary storage device
A data file for storing a logical block having a record portion for storing a key value and actual data for each input record;
An index file that stores an index for the key value of the record of each logical block of the data file;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset of the data file to a specific logical block in logical block units;
Have
Each logical block has a range of key values to handle,
The system control means includes
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and a block having a key value range including the key value is obtained in units of logical blocks. By setting the bit having the bit number equal to the number of offsets in the bit string of the offset file corresponding to the logical block having the key value in the range to “1”, the key value in the range handled by the logical block is “1” of the bit string. Means for writing to the offset file to indicate that it is also stored in a logical block separated by the number of offsets indicated by the bit number of the bit
A data storage device characterized by that .
前記システム制御手段は、
前記バッファメモリのレコードをキー値に基づいて昇順にソートするソート手段と、
前記バッファメモリのレコードを前記データファイルの前記レコード部に書き込む手段と、
前記索引ファイルを参照して索引内の最大のキー値を探索し、該キー値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、前記索引ファイルに書き込む索引ファイル生成手段と、
前記書き込んだ論理ブロック内で最大のキー値をキー値とし、初期値として全ビットを「0」にしたビット列をオフセットデータとしてオフセットファイルに書き込む手段と、
前記バッファメモリの先頭のレコードのキー値が前記下限値Lであれば、前記索引ファイルのキー値が指すレコードを含む論理ブロックを前記データファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成手段と、
前記索引ファイルのキー値に基づいて読み込んだ前記データファイルの論理ブロックに対応したオフセットデータを前記オフセットファイルから探索し、探索したオフセットデータのビット列bを読み込み、前記ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成手段と、
前記ビット列cを、前記オフセットファイルの読み込んだオフセットデータに上書きする書き込み手段と、
前記バッファメモリから次のレコードを読み出して、該レコードのキー値が前記下限値L以下である場合は、前記第1のビット列生成手段、前記第2のビット列生成手段、前記書き込み手段を、該バッファメモリに次のレコードがなくなるまで繰り返す手段と、
を有することを特徴とする請求項記載のデータ蓄積装置。
The system control means includes
Sorting means for sorting the records in the buffer memory in ascending order based on key values;
Means for writing a record of the buffer memory to the record portion of the data file;
The index file is searched for the maximum key value in the index, and the key value is set as the lower limit value L of the key value handled in the written logical block. An index file generating means for creating an index for the record and writing to the index file;
Means for writing the maximum key value in the written logical block as a key value and writing a bit string with all bits set to “0” as an initial value to an offset file as offset data;
If the key value of the first record in the buffer memory is the lower limit L, the logical block including the record pointed to by the key value of the index file is read from the data file, and the read logical block and the address of the written logical block A first bit string generation means for generating a bit string a having a digit number h in which the distance X is an offset X and only the X-th bit is “1”;
The offset file corresponding to the logical block of the data file read based on the key value of the index file is searched from the offset file, the bit string b of the searched offset data is read, and the OR condition of the bit string a and the bit string b Second bit string generation means for generating the bit string c combined at
Writing means for overwriting the bit string c on the offset data read in the offset file;
When the next record is read from the buffer memory and the key value of the record is less than or equal to the lower limit value L, the first bit string generating means, the second bit string generating means, and the writing means are Means to repeat until there is no next record in memory,
The data storage device according to claim 3, further comprising:
コンピュータ上で二次記憶装置に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積方法であって、
前記二次記憶装置と、
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、
を有する装置において、
前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、前記二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行い、
前記二次記憶装置は、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルを有し、
前記データファイルの各論理ブロックは、
実データを格納するレコード部と、特定の論理ブロックへのオフセットを論理ブロック単位で表す固定長のビット列からなるヘッダ部から構成され、
前記論理ブロックは扱うキー値の範囲を持ち、
前記制御ステップにおいて、
前記論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックのヘッダ部のビット列のオフセットと等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すように前記データファイルに書き込む
ことを特徴とするデータ蓄積方法。
A data storage method for performing high-speed writing and complete match search and range search even if the data order is reversed when sequentially storing data in units of logical blocks in a secondary storage device on a computer,
The secondary storage device;
A buffer memory that accumulates records entered via the interface for logical blocks;
In a device having
When the record stored in the buffer memory is read and the record is stored in the secondary storage device, the data of the record has a structure based on a sparse index, and one pair is assigned to each logical block of the secondary storage device. Control step of writing offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device when the key value within the range of the logical block is in another logical block the stomach line,
The secondary storage device
A data file that stores input records for each logical block;
Having an index file for the key value of the record of each logical block of the data file;
Each logical block of the data file is
It consists of a record part that stores actual data and a header part that consists of a fixed-length bit string that represents the offset to a specific logical block in logical block units.
The logical block has a range of key values to handle,
In the control step,
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and a block having a key value range including the key value is obtained in units of logical blocks. By setting the bit having the bit number equal to the offset of the bit string in the header part of the logical block having the key value in the range to “1”, the key value in the range handled by the logical block becomes “1” in the bit string. A data storage method , wherein the data file is written so as to indicate that it is also stored in a logical block separated by an offset number indicated by a bit number of the bit .
前記制御ステップにおいて、
前記バッファメモリのレコードをキー値に基づいて昇順にソートするソートステップと、
前記バッファメモリのレコードを前記データファイルの前記レコード部に書き込み、前記データファイルのオフセットデータの初期値として全ビットを「0」にしたビット列を前記ヘッダ部に書き込む初期化ステップと、
前記索引ファイルを参照して、索引内の最大のキー値を探索し、その値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、前記索引ファイルに書き込む索引ファイル生成ステップと、
前記バッファメモリの先頭のレコードのキー値が前記下限値Lであれば、前記索引ファイルにおいて参照中のレコードのキー値以上で最も値が小さいキー値を探索し、該キー値が指すレコードを含む論理ブロックを前記データファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成ステップと、
前記読み込んだ論理ブロックのヘッダ部分のオフセットを表すビット列bを読み込み、前記ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成ステップと、
前記ビット列cを、読み込んだ論理ブロックのヘッダ部にオフセットデータとして前記データファイルに上書きする書き込みステップと、
前記バッファメモリから次のレコードを読み出して、該レコードのキー値が前記下限値L以下である場合は、前記第1のビット列生成ステップ、前記第2のビット列生成ステップ、前記書き込みステップを、該バッファメモリに次のレコードがなくなるまで繰り返す、
ことを特徴とする請求項記載のデータ蓄積方法。
In the control step,
A sorting step for sorting the records in the buffer memory in ascending order based on key values;
An initialization step of writing a record of the buffer memory to the record portion of the data file, and writing a bit string having all bits set to “0” as an initial value of offset data of the data file to the header portion;
By referring to the index file, the maximum key value in the index is searched, and the value is set as the lower limit value L of the key value handled in the written logical block. Creating an index file for the record and writing to the index file;
If the key value of the first record in the buffer memory is the lower limit L, the index file is searched for a key value that is the smallest value that is greater than or equal to the key value of the record being referred to, and includes the record indicated by the key value A logical block is read from the data file, and a first bit string a having a number of digits h is generated with the distance between the address of the read logical block and the written logical block as an offset X and only the Xth bit being “1”. A bit string generation step;
A second bit string generation step of reading a bit string b representing an offset of a header portion of the read logical block and generating a bit string c coupled by the OR condition of the bit string a and the bit string b;
A writing step of overwriting the data string as offset data in the header portion of the read logical block with the bit string c;
When the next record is read from the buffer memory and the key value of the record is less than or equal to the lower limit value L, the first bit string generation step, the second bit string generation step, and the write step are included in the buffer Repeat until there is no more record in memory,
6. A data storage method according to claim 5, wherein:
コンピュータ上で二次記憶装置に論理ブロック単位で逐次データ蓄積を行う場合に、データの順序の逆転が起こっても高速な書き込みと完全一致検索及び範囲検索を行うためのデータ蓄積方法であって、
前記二次記憶装置と、
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、
を有する装置において、
前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、前記二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行い、
前記二次記憶装置は、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックを格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引を格納する索引ファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列は前記データファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、
を有し、
前記各論理ブロックは扱うキー値の範囲を持ち、
前記制御ステップにおいて、
前記論理ブロックが扱うキー値が他の論理ブロックに格納された場合、該キー値が格納された論理ブロックと該キー値を含むキー値の範囲を持つブロックとのオフセット数を論理ブロック単位で求め、該キー値を範囲に持つ論理ブロックに対応したオフセットファイルのビット列の前記オフセット数と等しいビット番号のビットを「1」にすることで、該論理ブロックが扱う範囲のキー値がビット列の「1」となったビットのビット番号が示すオフセット数だけ離れた論理ブロックにも格納されていることを示すように前記オフセットファイルに書き込む
ことを特徴とするデータ蓄積方法。
A data storage method for performing high-speed writing and complete match search and range search even if the data order is reversed when sequentially storing data in units of logical blocks in a secondary storage device on a computer,
The secondary storage device;
A buffer memory that accumulates records entered via the interface for logical blocks;
In a device having
When the record stored in the buffer memory is read and the record is stored in the secondary storage device, the data of the record has a structure based on a sparse index, and one pair is assigned to each logical block of the secondary storage device. Control step of writing offset data indicating the offset to the other logical block in units of logical blocks to the secondary storage device when the key value within the range of the logical block is in another logical block And
The secondary storage device
A data file for storing a logical block having a record portion for storing a key value and actual data for each input record;
An index file that stores an index for the key value of the record of each logical block of the data file;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset of the data file to a specific logical block in logical block units;
Have
Each logical block has a range of key values to handle,
In the control step,
When the key value handled by the logical block is stored in another logical block, the number of offsets between the logical block storing the key value and a block having a key value range including the key value is obtained in units of logical blocks. By setting the bit having the bit number equal to the number of offsets in the bit string of the offset file corresponding to the logical block having the key value in the range to “1”, the key value in the range handled by the logical block is “1” of the bit string. ”Is written in the offset file so as to indicate that it is also stored in the logical block separated by the offset number indicated by the bit number of
A data storage method characterized by the above .
前記制御ステップにおいて、
前記バッファメモリのレコードをキー値に基づいて昇順にソートするソートステップと、
前記バッファメモリのレコードを前記データファイルの前記レコード部に書き込むステップと、
前記索引ファイルを参照して索引内の最大のキー値を探索し、該キー値を書き込んだ論理ブロックで扱うキー値の下限値Lとし、書き込んだ論理ブロック内で最大のキー値を持つ末尾のレコードに対して索引を作成し、前記索引ファイルに書き込む索引ファイル生成ステップと、
前記書き込んだ論理ブロック内で最大のキー値をキー値とし、初期値として全ビットを「0」にしたビット列をオフセットデータとしてレコードをオフセットファイルに書き込むステップと、
前記バッファメモリの先頭のレコードのキー値が前記下限値Lであれば、前記索引ファイルのキー値指すレコードを含む論理ブロックを前記データファイルから読み込み、読み込んだ論理ブロックと書き込んだ論理ブロックのアドレスの距離をオフセットXとし、X番目のビットのみを「1」とした桁数hのビット列aを生成する第1のビット列生成ステップと、
前記索引ファイルのキー値に基づいて読み込んだ前記データファイルの論理ブロックに対応したオフセットデータを前記オフセットファイルから探索し、探索したオフセットデータのビット列bを読み込み、前記ビット列aと該ビット列bのOR条件で結合したビット列cを生成する第2のビット列生成ステップと、
前記ビット列cを、前記オフセットファイルの読み込んだオフセットデータに上書きする書き込みステップと、
前記バッファメモリから次のレコードを読み出して、該レコードのキー値が前記下限値L以下である場合は、前記第1のビット列生成ステップ、前記第2のビット列生成ステップ、前記書き込みステップを、該バッファメモリに次のレコードがなくなるまで繰り返す、
ことを特徴とする請求項記載のデータ蓄積方法。
In the control step,
A sorting step for sorting the records in the buffer memory in ascending order based on key values;
Writing a record in the buffer memory to the record portion of the data file;
The index file is searched for the maximum key value in the index, and the key value is set as the lower limit value L of the key value handled in the written logical block. Creating an index file for the record and writing to the index file;
Writing the record to the offset file using the maximum key value in the written logical block as a key value and a bit string having all bits set to “0” as an initial value as offset data;
If at the beginning of the record key value is the lower limit value L of the buffer memory, the address of the read key values of the index file logical blocks containing records pointed to from the data file, the logical blocks written and read logic block A first bit string generation step for generating a bit string a having a digit number h in which the distance X is an offset X and only the Xth bit is “1”;
The offset file corresponding to the logical block of the data file read based on the key value of the index file is searched from the offset file, the bit string b of the searched offset data is read, and the OR condition of the bit string a and the bit string b A second bit string generation step for generating the bit string c combined in step b.
A writing step of overwriting the bit string c on the offset data read from the offset file;
When the next record is read from the buffer memory and the key value of the record is less than or equal to the lower limit value L, the first bit string generation step, the second bit string generation step, and the write step are included in the buffer Repeat until there is no more record in memory,
8. The data storage method according to claim 7, wherein:
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、前記バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行う検索手段を有し、
前記検索条件として、探索キーが入力されると、前記索引ファイルから探索キー値以上で最も値の小さいキー値を探索し、該キー値が指し示すレコードを含むデータファイルの論理ブロックを読み込む手段と、
読み込んだ前記論理ブロック内のレコード部から二分探索を用いて探索キーを持つレコードを検索し、前記探索キーを持つレコードが見つかった場合は、該レコードを出力する手段と、
見つからなかった場合は、前記論理ブロックのヘッダにあるオフセットデータのビット列を参照し、まだチェックしていないビットの内ビットが1となっているビット番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、読み込んだ論理ブロックから二分探索を用いて探索キーを持つレコードを探索する手段と、
を有する
ことを特徴とするデータ検索装置。
A buffer memory that accumulates records input via the interface for logical blocks, and records stored in the buffer memory when the records are read and stored in a secondary storage device on a computer. Is a structure based on a sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and a key value within the range of the logical block is in another logical block, the other logical block data retrieval by the offset data data storage device and a system control means for writing to the secondary storage device, for retrieving data stored in data files of the secondary storage device indicating an offset in terms of logical blocks to A device,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and a record having a desired key value is searched based on the obtained index, the offset data of the logical block corresponding to the index is not found It refers to the loads the resulting logical blocks behind than offset by the logic block as an object to read logical blocks, have a search means for searching by the key value,
When a search key is input as the search condition, a search is made for a key value having the smallest value greater than or equal to a search key value from the index file, and means for reading a logical block of a data file including a record indicated by the key value;
A record having a search key is searched using a binary search from the record portion in the read logical block, and when a record having the search key is found, means for outputting the record;
If not found, refer to the bit string of the offset data in the header of the logical block, set the bit number X whose bit is 1 among the unchecked bits as the offset X, and the logical block after the X block Means for searching for a record having a search key using a binary search from the read logical block;
Data retrieval apparatus characterized by having a.
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、前記バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行う検索手段を有し、
下限キー値以上、上限キー値未満という検索条件が与えられると、前記索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックを前記データファイルから読み込む手段と、
読み込んだ前記論理ブロックのヘッダ部のオフセットを示すビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的にアドレス集合U記憶手段に格納する手段と、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値未満である場合に、次のレコードを参照する手段と、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードまでのすべてのレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、さらに次の論理ブロックが存在する場合には次の論理ブロックを読み込む手段と、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードを、前記検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照する手段と、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値以上である場合に、前記アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部のすべてのレコードのキー値について、前記下限キー値以上、前記上限キー値未満であるかを判定し、該キー値が前記下限キー値以上、前記上限キー値未満であれば、該キー値を持つレコードを、前記検索条件を満たすレコード集合R記憶手段に格納する手段と、
前記レコード集合R記憶手段に格納されているレコードを検索結果として出力する手段と、
を有することを特徴とするデータ検索装置。
A buffer memory that accumulates records input via the interface for logical blocks, and records stored in the buffer memory when the records are read and stored in a secondary storage device on a computer. Is a structure based on a sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and a key value within the range of the logical block is in another logical block, the other logical block Data search for searching data stored in a data file of the secondary storage device by a data storage device having system control means for writing offset data indicating the offset to the logical block unit in the secondary storage device A device,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and a record having a desired key value is searched based on the obtained index, the offset data of the logical block corresponding to the index is not found And a search means for reading the logical block after the logical block by the obtained offset, and performing a search by the key value for the read logical block,
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and a logical block including a record indicated by the key value is stored in the data file Means to read from,
Means for temporarily storing the address of the logical block pointed to by the bit set indicating the offset of the header portion of the logical block that has been read, if there is a bit of “1” When,
Means for referring to the next record when the key value of the record referred to in the record part of the read logical block is less than the lower limit key value;
When the key value of the record referred to in the record part of the read logical block is not less than the lower limit key value and the key value of the record at the end of the logical block is less than the upper limit key value, the reference is made All records from the current record to the last record of the logical block are additionally stored in the record set R storage means satisfying the search condition, and when the next logical block exists, the next logical block is read. Means,
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. Means for additionally storing the record being referred to in the record set R storage means satisfying the search condition when the key value of the record being less than the upper limit key value, and referring to the next record;
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. If the key value of the record being recorded is equal to or greater than the upper limit key value, each address of the address set U storage means is referenced, the logical block indicated by each address is read, and all records in the record portion of the logical block are read Whether the key value is greater than or equal to the lower limit key value and less than the upper limit key value.If the key value is greater than or equal to the lower limit key value and less than the upper limit key value, a record having the key value is Means for storing the record set R storage means satisfying the search condition;
Means for outputting a record stored in the record set R storage means as a search result;
A data search apparatus characterized by comprising:
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、前記バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行う検索手段を有し、
前記二次記憶装置において、
前記索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列は前記データファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
入力された検索条件のキー値以上で最も値の小さいキー値を前記索引ファイルから検索し、その値が指すレコードを前記データファイルの論理ブロックから読み込む手段と、
読み込んだ論理ブロック内のレコード部から二分探索を用いて、検索条件のキー値を持つレコードを検索する二分探索手段と、
前記二分探索手段において、レコードが見つかった場合は当該レコードを出力し、見つからない場合は、該索引ファイルから検索されたキー値を用いて前記オフセットファイルから論理ブロックに対応したオフセットデータを検索し、該オフセットデータのビット列でまだチェックしていない「1」となっているビットの番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、前記二分探索手段を行う処理をビット列が持つビットが「1」となっている全ての桁について行う手段と、
を有することを特徴とするデータ検索装置。
A buffer memory that accumulates records input via the interface for logical blocks, and records stored in the buffer memory when the records are read and stored in a secondary storage device on a computer. Is a structure based on a sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and a key value within the range of the logical block is in another logical block, the other logical block Data search for searching data stored in a data file of the secondary storage device by a data storage device having system control means for writing offset data indicating the offset to the logical block unit in the secondary storage device A device,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and a record having a desired key value is searched based on the obtained index, the offset data of the logical block corresponding to the index is not found And a search means for reading the logical block after the logical block by the obtained offset, and performing a search by the key value for the read logical block,
In the secondary storage device,
The index file;
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset of the data file to a specific logical block in logical block units; Have
Means for searching the index file for the smallest key value that is equal to or greater than the key value of the input search condition, and reading the record indicated by the value from the logical block of the data file;
A binary search means for searching for a record having a key value of a search condition using a binary search from the record portion in the read logical block;
In the binary search means, if a record is found, the record is output.If not found, the offset data corresponding to the logical block is searched from the offset file using the key value searched from the index file, The bit number X that is “1” that has not been checked yet in the bit string of the offset data is set as the offset X, the logical block after the X block is read, and the bit having the bit string that performs the binary search means is “ Means for all digits that are "1";
A data search apparatus characterized by comprising:
インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリと、前記バッファメモリに蓄積されたレコードを読み出し、該レコードをコンピュータ上の二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、該二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込むシステム制御手段とを有するデータ蓄積装置により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索装置であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックのオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行う検索手段を有し、
前記二次記憶装置において、
前記索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列は前記データファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
下限キー値以上、上限キー値未満という検索条件が与えられると、前記索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックを前記データファイルから読み込む手段と、
読み込んだ前記論理ブロックの末尾のレコードを参照し、該レコードのキー値を元に、該論理ブロックに対応するオフセットデータを前記オフセットファイルから検索する手段と、
検索したオフセットデータのビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的に記憶手段のアドレス集合U記憶手段に格納する手段と、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値未満である場合に、次のレコードを参照する手段と、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードまでの全てのレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、さらに次の論理ブロックが存在する場合には次の論理ブロックを読み込む手段と、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照する手段と、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値以上である場合に、前記アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部の全てのレコードのキー値について、前記下限キー値以上、前記上限キー値未満であるかを判定し、該キー値が前記下限キー値以上、前記上限キー値未満であれば、該キー値を持つレコードを、前記検索条件を満たすレコード集合R記憶手段に格納する手段と、
前記レコード集合R記憶手段に格納されているレコードを検索結果として出力する手段と、
を有することを特徴とするデータ検索装置。
A buffer memory that accumulates records input via the interface for logical blocks, and records stored in the buffer memory when the records are read and stored in a secondary storage device on a computer. Is a structure based on a sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and a key value within the range of the logical block is in another logical block, the other logical block Data search for searching data stored in a data file of the secondary storage device by a data storage device having system control means for writing offset data indicating the offset to the logical block unit in the secondary storage device A device,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
When the index file of the secondary storage device is searched from the key value, and a record having a desired key value is searched based on the obtained index, the offset data of the logical block corresponding to the index is not found And a search means for reading the logical block after the logical block by the obtained offset, and performing a search by the key value for the read logical block,
In the secondary storage device,
The index file;
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset of the data file to a specific logical block in logical block units; Have
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and a logical block including a record indicated by the key value is stored in the data file Means to read from,
Means for referring to a record at the end of the read logical block and searching the offset file for offset data corresponding to the logical block based on the key value of the record;
Means for temporarily storing the address of the logical block pointed to by the bit set of the storage means in the address set U storage means if there is a bit which is “1” with reference to the bit string of the offset data searched;
Means for referring to the next record when the key value of the record referred to in the record part of the read logical block is less than the lower limit key value;
When the key value of the record referred to in the record part of the read logical block is not less than the lower limit key value and the key value of the record at the end of the logical block is less than the upper limit key value, the reference is made All records from the current record to the last record of the logical block are additionally stored in the record set R storage means satisfying the search condition, and if the next logical block exists, the next logical block is read. Means,
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. Means for additionally storing the referenced record in the record set R storage means satisfying the search condition when the key value of the record being less than the upper limit key value, and referring to the next record;
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. When the key value of a record being equal to or greater than the upper limit key value is referred, each address of the address set U storage means is referenced, the logical block indicated by each address is read, and all records in the record portion of the logical block are read Whether the key value is greater than or equal to the lower limit key value and less than the upper limit key value.If the key value is greater than or equal to the lower limit key value and less than the upper limit key value, a record having the key value is Means for storing the record set R storage means satisfying the search condition;
Means for outputting a record stored in the record set R storage means as a search result;
A data search apparatus characterized by comprising:
コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、前記二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行い、
前記検索条件として、探索キーが入力されると、前記索引ファイルから探索キー値以上で最も値の小さいキー値を探索し、該キー値が指し示すレコードを含むデータファイルの論理ブロックを読み込むステップと、
読み込んだ前記論理ブロック内のレコード部から二分探索を用いて探索キーを持つレコードを検索し、前記探索キーを持つレコードが見つかった場合は、該レコードを出力するステップと、
見つからなかった場合は、前記論理ブロックのヘッダにあるオフセットデータのビット列を参照し、まだチェックしていないビットの内ビットが1となっているビット番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、読み込んだ論理ブロックから二分探索を用いて探索キーを持つレコードを探索するステップと、
を行う
ことを特徴とするデータ検索方法。
In a device having a secondary storage device on a computer and a buffer memory for storing a record input through an interface for a logical block, the record stored in the buffer memory is read, and the record is stored in the secondary storage When the data is stored in the device, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is different from the logical block. when in the block, the data storage method for controlling writing the offset data indicating the offset of the logical block of said another in logical block units in the secondary storage device, stored in the data file of the secondary storage device A data search method for searching stored data,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
If the index file of the secondary storage device is searched from the key value and a record having a desired key value is not found even if it is searched based on the obtained index, it corresponds to the logical block corresponding to the index Referring to offset data, reads the resultant logical blocks behind than offset by the logic block as an object to read logical blocks, have row a search by the key value,
When a search key is input as the search condition, searching the index file for a key value having the smallest value greater than or equal to the search key value, and reading a logical block of a data file including a record indicated by the key value;
A record having a search key is searched using a binary search from the record portion in the read logical block, and if a record having the search key is found, outputting the record;
If not found, refer to the bit string of the offset data in the header of the logical block, set the bit number X whose bit is 1 among the unchecked bits as the offset X, and the logical block after the X block Searching for a record having a search key using a binary search from the read logical block;
Data retrieval method and performing.
コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、前記二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行い、
下限キー値以上、上限キー値未満という検索条件が与えられると、前記索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックを前記データファイルから読み込むステップと、
読み込んだ前記論理ブロックのヘッダ部のオフセットを示すビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的にアドレス集合U記憶手段に格納するステップと、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値未満である場合に、次のレコードを参照するステップと、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードまでのすべてのレコードを、検索条件を満たすレコード集合R記憶手段に追加格納し、さらに次の論理ブロックが存在する場合には次の論理ブロックを読み込むステップと、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードを、前記検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照するステップと、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値以上である場合に、前記アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部のすべてのレコードのキー値について、前記下限キー値以上、前記上限キー値未満であるかを判定し、該キー値が前記下限キー値以上、前記上限キー値未満であれば、該キー値を持つレコードを、前記検索条件を満たすレコード集合R記憶手段に格納するステップと、
前記レコード集合R記憶手段に格納されているレコードを検索結果として出力するステップと、
を行うことを特徴とするデータ検索方法。
In a device having a secondary storage device on a computer and a buffer memory for storing a record input through an interface for a logical block, the record stored in the buffer memory is read, and the record is stored in the secondary storage When the data is stored in the device, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is different from the logical block. When in a block, the data is stored in the data file of the secondary storage device by a data storage method for performing a control step of writing offset data indicating the offset to the other logical block in logical block units to the secondary storage device. A data search method for searching stored data,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
If the index file of the secondary storage device is searched from the key value and a record having a desired key value is not found even if it is searched based on the obtained index, it corresponds to the logical block corresponding to the index Refer to the offset data, read the logical block after the logical block by the obtained offset, perform the search by the key value for the read logical block,
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and a logical block including a record indicated by the key value is stored in the data file Steps to read from,
A step of referring to the bit string indicating the offset of the header portion of the read logical block and temporarily storing the address of the logical block pointed to by the bit set in the address set U storage means if there is a bit “1” When,
A step of referring to the next record when the key value of the record referred to in the record portion of the read logical block is less than the lower limit key value;
When the key value of the record referred to in the record part of the read logical block is not less than the lower limit key value and the key value of the record at the end of the logical block is less than the upper limit key value, the reference is made All records from the current record to the last record of the logical block are additionally stored in the record set R storage means satisfying the search condition, and when the next logical block exists, the next logical block is read. Steps,
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. A key value of a record being less than the upper limit key value, additionally storing the referenced record in the record set R storage means that satisfies the search condition, and referring to the next record;
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. If the key value of the record being recorded is equal to or greater than the upper limit key value, each address of the address set U storage means is referenced, the logical block indicated by each address is read, and all records in the record portion of the logical block are read Whether the key value is greater than or equal to the lower limit key value and less than the upper limit key value.If the key value is greater than or equal to the lower limit key value and less than the upper limit key value, a record having the key value is Storing in the record set R storage means satisfying the search condition;
Outputting a record stored in the record set R storage means as a search result;
A data search method characterized by :
コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、前記二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行い、
前記二次記憶装置において、
前記索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列は前記データファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
入力された検索条件のキー値以上で最も値の小さいキー値を前記索引ファイルから検索し、その値が指すレコードを前記データファイルの論理ブロックから読み込むステップと、
読み込んだ論理ブロック内のレコード部から二分探索を用いて、検索条件のキー値を持つレコードを検索する二分探索ステップと、
前記二分探索手段において、レコードが見つかった場合は当該レコードを出力し、見つからない場合は、該索引ファイルから検索されたキー値を用いて前記オフセットファイルから論理ブロックに対応したオフセットデータを検索し、該オフセットデータのビット列でまだチェックしていない「1」となっているビットの番号XをオフセットXとし、Xブロック後ろの論理ブロックを読み込み、前記二分探索ステップを行う処理をビット列が持つビットが「1」となっている全ての桁について行うステップと、
を行うことを特徴とするデータ検索方法。
In a device having a secondary storage device on a computer and a buffer memory for storing a record input through an interface for a logical block, the record stored in the buffer memory is read, and the record is stored in the secondary storage When the data is stored in the device, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is different from the logical block. When in a block, the data is stored in the data file of the secondary storage device by a data storage method for performing a control step of writing offset data indicating the offset to the other logical block in logical block units to the secondary storage device. A data search method for searching stored data,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
If the index file of the secondary storage device is searched from the key value and a record having a desired key value is not found even if it is searched based on the obtained index, it corresponds to the logical block corresponding to the index Refer to the offset data, read the logical block after the logical block by the obtained offset, perform the search by the key value for the read logical block,
In the secondary storage device,
The index file;
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset of the data file to a specific logical block in logical block units; Have
Searching the index file for the smallest key value that is greater than or equal to the key value of the input search condition, and reading the record pointed to by the value from the logical block of the data file;
A binary search step for searching for a record having a key value of a search condition using a binary search from the record portion in the read logical block;
In the binary search means, if a record is found, the record is output.If not found, the offset data corresponding to the logical block is searched from the offset file using the key value searched from the index file, The bit number X of “1” that has not been checked yet in the bit string of the offset data is set as the offset X, the logical block after the X block is read, and the bit having the bit search process for performing the binary search step is “ Steps for all digits that are “1”,
A data search method characterized by :
コンピュータ上の二次記憶装置と、インタフェースを介して入力されたレコードを論理ブロック分だけ蓄積するバッファメモリとを有する装置において、前記バッファメモリに蓄積されたレコードを読み出し、該レコードを前記二次記憶装置に蓄積する際に、該レコードのデータがsparse indexに基づく構造であり、前記二次記憶装置の各論理ブロックに1対1で対応し、該論理ブロックの範囲内のキー値が別の論理ブロックにある場合に、該別の論理ブロックへのオフセットを論理ブロック単位で示すオフセットデータを該二次記憶装置に書き込む制御ステップを行うデータ蓄積方法により、前記二次記憶装置のデータファイルに蓄積されたデータを検索するためのデータ検索方法であって、
前記二次記憶装置は、少なくとも、
入力されるレコードを論理ブロック毎に格納するデータファイルと、
前記データファイルの各論理ブロックのレコードのキー値に対する索引ファイルと、
を有し、
完全一致検索または範囲検索を行うための検索条件としてキー値が入力されると、
前記キー値から前記二次記憶装置の前記索引ファイルを検索し、得られた索引に基づいて所望のキー値を持つレコードを検索しても見つからない場合に、索引に対応する論理ブロックに対応するオフセットデータを参照し、得られたオフセット分だけ該論理ブロックより後ろの論理ブロックを読み込み、読み込まれた論理ブロックを対象として、前記キー値による検索を行い、
前記二次記憶装置において、
前記索引ファイルと、
入力されたレコード毎にキー値と実データを格納するレコード部を有する論理ブロックのみを格納するデータファイルと、
複数の固定長のビット列からなり、各ビット列はそれぞれある論理ブロックに1対1で対応し、かつ、各ビット列は前記データファイルの特定の論理ブロックへのオフセットを論理ブロック単位で表すオフセットファイルと、を有し、
下限キー値以上、上限キー値未満という検索条件が与えられると、前記索引ファイルから該下限キー値以上で最も値が小さいキー値を探し、該キー値が指し示すレコードを含む論理ブロックを前記データファイルから読み込むステップと、
読み込んだ前記論理ブロックの末尾のレコードを参照し、該レコードのキー値を元に、該論理ブロックに対応するオフセットデータを前記オフセットファイルから検索するステップと、
検索したオフセットデータのビット列を参照し、「1」となっているビットがあれば、該ビットが指す論理ブロックのアドレスを一時的にアドレス集合U記憶手段に格納するステップと、
読み込んだ論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値未満である場合に、次のレコードを参照するステップと、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードから該論理ブロックの末尾のレコードのまでの全てのレコードを、検索条件を満たすレコード集合R記憶手段に格納し、さらに、次の論理ブロックが存在する場合には次の論理ブロックを読み込むステップと、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値未満である場合に、その参照しているレコードを、前記検索条件を満たすレコード集合R記憶手段に追加格納し、次のレコードを参照するステップと、
読み込んだ前記論理ブロックのレコード部の参照しているレコードのキー値が前記下限キー値以上で、かつ、該論理ブロックの末尾のレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値以上であり、かつ、参照しているレコードのキー値が前記上限キー値以上である場合に、前記アドレス集合U記憶手段が持つ各アドレスを参照し、各アドレスが指し示す論理ブロックを読み込み、該論理ブロックのレコード部の全てのレコードのキー値について、前記下限キー値以上、前記上限キー値未満であるかを判定し、該キー値が前記下限キー値以上、前記上限キー値未満であれば、該キー値を持つレコードを、前記検索条件を満たすレコード集合R記憶手段に格納するステップと、
前記レコード集合R記憶手段に格納されているレコードを検索結果として出力するステップと、
を行うことを特徴とするデータ検索方法。
In a device having a secondary storage device on a computer and a buffer memory for storing a record input through an interface for a logical block, the record stored in the buffer memory is read, and the record is stored in the secondary storage When the data is stored in the device, the data of the record has a structure based on the sparse index, corresponds to each logical block of the secondary storage device on a one-to-one basis, and the key value within the range of the logical block is different from the logical block. When in a block, the data is stored in the data file of the secondary storage device by a data storage method for performing a control step of writing offset data indicating the offset to the other logical block in logical block units to the secondary storage device. A data search method for searching stored data,
The secondary storage device is at least
A data file that stores input records for each logical block;
An index file for the key value of the record of each logical block of the data file;
Have
When a key value is entered as a search condition for an exact match or range search,
If the index file of the secondary storage device is searched from the key value and a record having a desired key value is not found even if it is searched based on the obtained index, it corresponds to the logical block corresponding to the index Refer to the offset data, read the logical block after the logical block by the obtained offset, perform the search by the key value for the read logical block,
In the secondary storage device,
The index file;
A data file that stores only a logical block having a record portion that stores a key value and actual data for each input record;
An offset file consisting of a plurality of fixed-length bit strings, each bit string corresponding to a certain logical block on a one-to-one basis, and each bit string representing an offset of the data file to a specific logical block in logical block units; Have
When a search condition that is greater than or equal to the lower limit key value and less than the upper limit key value is given, the index file is searched for the smallest key value that is greater than or equal to the lower limit key value, and a logical block including a record indicated by the key value is stored in the data file Steps to read from,
Referring to a record at the end of the read logical block, and searching offset data corresponding to the logical block from the offset file based on the key value of the record;
Referring to the bit string of the searched offset data, and if there is a bit which is “1”, temporarily storing the address of the logical block pointed to by the bit in the address set U storage means;
A step of referring to the next record when the key value of the record referred to in the record portion of the read logical block is less than the lower limit key value;
When the key value of the record referred to in the record part of the read logical block is not less than the lower limit key value and the key value of the record at the end of the logical block is less than the upper limit key value, the reference is made All records from the current record to the last record of the logical block are stored in the record set R storage means satisfying the search condition, and if the next logical block exists, the next logical block is A step to read,
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. A key value of a record being less than the upper limit key value, additionally storing the referenced record in the record set R storage means that satisfies the search condition, and referring to the next record;
The key value of the record referred to in the record portion of the read logical block is equal to or greater than the lower limit key value, and the key value of the record at the end of the logical block is equal to or greater than the upper limit key value. A key value of a record being equal to or higher than the upper limit key value and a key value of a record being referred to is equal to or higher than the upper limit key value, refer to each address of the address set U storage means; Read the logical block indicated by each address, determine whether the key value of all records in the record portion of the logical block is greater than or equal to the lower limit key value and less than the upper limit key value, and the key value is the lower limit key value As described above, if it is less than the upper limit key value, storing the record having the key value in the record set R storage means satisfying the search condition;
Outputting a record stored in the record set R storage means as a search result;
A data search method characterized by :
請求項1乃至のいずれかに記載のデータ蓄積装置を構成する各手段としてコンピュータを機能させるためのデータ蓄積プログラム。 Data storage program for causing a computer to function as each means constituting the data storage apparatus according to any one of claims 1 to 4. 請求項乃至12のいずれかに記載のデータ検索装置を構成する各手段としてコンピュータを機能させるためのデータ検索プログラム。 Data search program that causes a computer to function as each means constituting the data retrieval apparatus according to any one of claims 9 to 12.
JP2010028077A 2010-02-10 2010-02-10 Data storage device and method and program, and data search device and method and program Expired - Fee Related JP5354606B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010028077A JP5354606B2 (en) 2010-02-10 2010-02-10 Data storage device and method and program, and data search device and method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010028077A JP5354606B2 (en) 2010-02-10 2010-02-10 Data storage device and method and program, and data search device and method and program

Publications (2)

Publication Number Publication Date
JP2011165000A JP2011165000A (en) 2011-08-25
JP5354606B2 true JP5354606B2 (en) 2013-11-27

Family

ID=44595599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010028077A Expired - Fee Related JP5354606B2 (en) 2010-02-10 2010-02-10 Data storage device and method and program, and data search device and method and program

Country Status (1)

Country Link
JP (1) JP5354606B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111241108B (en) * 2020-01-16 2023-12-26 北京百度网讯科技有限公司 Key value based indexing method and device for KV system, electronic equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08185273A (en) * 1994-12-29 1996-07-16 Sharp Corp Isam file information processor
JPH10260876A (en) * 1997-03-19 1998-09-29 Hitachi Ltd Data structure of database, and data processing method for database
US7333993B2 (en) * 2003-11-25 2008-02-19 Network Appliance, Inc. Adaptive file readahead technique for multiple read streams
JP5198929B2 (en) * 2008-04-25 2013-05-15 株式会社日立製作所 Stream data processing method and computer system

Also Published As

Publication number Publication date
JP2011165000A (en) 2011-08-25

Similar Documents

Publication Publication Date Title
TWI719281B (en) A system, machine readable medium, and machine-implemented method for stream selection
JP6362316B2 (en) Method, system and computer program product for hybrid table implementation using buffer pool as resident in-memory storage for memory resident data
JP5524144B2 (en) Memory system having a key-value store system
CN100458779C (en) Index and its extending and searching method
US8255398B2 (en) Compression of sorted value indexes using common prefixes
CN103902623B (en) Method and system for the accessing file in storage system
KR102310246B1 (en) Method for generating secondary index and apparatus for storing secondary index
CN103488709A (en) Method and system for building indexes and method and system for retrieving indexes
CN105912687A (en) Mass distributed database memory cell
JP2023543004A (en) Merge update method, device, and medium for R-tree index based on Hilbert curve
US8515976B2 (en) Bit string data sorting apparatus, sorting method, and program
JP3251138B2 (en) Hash method
KR20140038441A (en) Compression match enumeration
JP5646775B2 (en) Memory system having a key-value store system
EP3940572A1 (en) Data generalization device, data generalization method, and program
JP3515810B2 (en) Sort processing method and apparatus
CN110515897B (en) Method and system for optimizing reading performance of LSM storage system
JP5354606B2 (en) Data storage device and method and program, and data search device and method and program
JP6006740B2 (en) Index management device
JP5833212B2 (en) Memory system having a key-value store system
WO2012081165A1 (en) Database management device and database management method
CN116382588A (en) LSM-Tree storage engine read amplification problem optimization method based on learning index
CN109241058A (en) A kind of method and apparatus from key-value pair to B+ tree batch that being inserted into
CN114461635A (en) MySQL database data storage method and device and electronic equipment
JP5626561B2 (en) Information processing system and data management method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20120221

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20121029

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20121029

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130509

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130521

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130722

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: 20130813

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130821

R150 Certificate of patent or registration of utility model

Ref document number: 5354606

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

LAPS Cancellation because of no payment of annual fees