JPH0855050A - Dynamic index preparing device - Google Patents

Dynamic index preparing device

Info

Publication number
JPH0855050A
JPH0855050A JP6187460A JP18746094A JPH0855050A JP H0855050 A JPH0855050 A JP H0855050A JP 6187460 A JP6187460 A JP 6187460A JP 18746094 A JP18746094 A JP 18746094A JP H0855050 A JPH0855050 A JP H0855050A
Authority
JP
Japan
Prior art keywords
index
file
data
record
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6187460A
Other languages
Japanese (ja)
Inventor
Tomoko Sakai
智子 酒井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP6187460A priority Critical patent/JPH0855050A/en
Publication of JPH0855050A publication Critical patent/JPH0855050A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To automatically decide the optimum number of hierarchies so as to enable more efficient retrieval processing by flexibly changing the preparation of a hierarchical index file for data retrieval corresponding to the number of data records. CONSTITUTION:This device is composed of an optimum index dimension deciding means 1 for judging the number of hierarchies as no index or one-dimension to n-dimension according to a power root calculating system corresponding to the increase/decrease of the number of data records, index file preparing means 2 for preparing an index file 5 equipped with the hierarchical structure for the decided dimension, and managing information file preparing means 3 for preparing a managing information file 6 storing a data file name, index file name and index dimension in order to relate a data file 4 and an index file 5.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データ検索システムに
おいて効率的なデータ検索を行うためのインデックスの
作成に関し、特にデータ量に差がある複数のデータファ
イルの検索や同一ファイルでもデータ量の増減が生じる
ようなデータファイルの検索をする場合のデータ検索シ
ステムのインデックス作成に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to the creation of an index for performing efficient data search in a data search system, and particularly to the search of a plurality of data files having different data amounts and the increase or decrease of the data amount even in the same file. The present invention relates to indexing of a data search system when searching for a data file that causes a problem.

【0002】[0002]

【従来の技術】従来、インデックスによってデータ検索
を行う場合、特にデータが大量である場合は、インデッ
クスを階層化することによって検索処理の高速化を図ら
れていた。このインデックスの階層構造は、固定的なも
のであり、データの増減には対応していなかった。
2. Description of the Related Art Conventionally, when a data search is performed using an index, particularly when there is a large amount of data, the search processing has been speeded up by hierarchizing the index. The hierarchical structure of this index was fixed and did not support the increase or decrease of data.

【0003】[0003]

【発明が解決しようとする課題】通常、データが小量の
場合はインデックスはない方が効率的に高速検索可能で
あるが、逆にデータが大量になると、インデックスを階
層化することが有効になる。しかし、従来技術では、イ
ンデックスが固定的であったため、データ量の増減にお
いては、必ずしも有効なインデックス構成がとれないと
いう問題点があった。これを解決するためには、毎回デ
ータ量見合いでツール等を用いてインデックスを変更す
る必要があり、多大な工数がかかっていた。
Generally, when there is a small amount of data, it is more efficient to search without an index, but when there is a large amount of data, it is effective to hierarchize the index. Become. However, in the conventional technique, since the index is fixed, there is a problem that an effective index configuration cannot be always taken when increasing or decreasing the data amount. In order to solve this, it is necessary to change the index each time using a tool or the like in proportion to the amount of data, which requires a lot of man-hours.

【0004】[0004]

【課題を解決するための手段】検索対象となるデータフ
ァイルの増減に応じて階層型インデックスファイルのイ
ンデックスのインデックス次数を累乗根算出方式により
判断する最適インデックス次数決定手段と、前記最適イ
ンデックス次数決定手段により決定された次数分の階層
を持つ前記インデックスファイルを逐次格納方式により
作成するインデックスファイル作成手段と、データが格
納されているデータファイルと前記インデックスファイ
ルとを関連付けるためにデータファイル名とインデック
スファイル名、インデックス次数とを格納した順編成フ
ァイルである管理情報ファイルを作成する管理情報ファ
イル作成手段とを備えている。
Optimum index order determining means for determining the index order of an index of a hierarchical index file by a power root calculation method according to increase or decrease of data files to be searched, and the optimum index order determining means. And an index file name for associating the index file with means for sequentially creating the index file having a hierarchy of the degree determined by the method, and a data file storing data and the index file. , And a management information file creating means for creating a management information file which is a sequentially organized file storing index orders.

【0005】[0005]

【実施例】本発明について図面を参照して説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described with reference to the drawings.

【0006】図1は、本発明のブロック構成図である。FIG. 1 is a block diagram of the present invention.

【0007】本発明は、検索対象となるデータファイル
4の増減に応じて階層型インデックスファイル5のイン
デックスのインデックス次数を累乗根算出方式により判
断する最適インデックス次数決定手段1と、この最適イ
ンデックス次数決定手段1により決定された次数分の階
層を持つインデックスファイル5を逐次格納方式により
作成するインデックスファイル作成手段2と、データが
格納されているデータファイル4とインデックスファイ
ル5とを関連付けるためにデータファイル名とインデッ
クスファイル名、インデックス次数とを格納した順編成
ファイルである管理情報ファイル6を作成する管理情報
ファイル作成手段3とから構成されている。
According to the present invention, the optimum index order determining means 1 for determining the index order of the index of the hierarchical index file 5 by the power root calculation method according to the increase or decrease of the data file 4 to be searched, and the optimum index order determination. An index file creating means 2 for creating an index file 5 having a hierarchy for the degree determined by the means 1 by a sequential storage method, and a data file name for associating the data file 4 storing the data with the index file 5 And a management information file creating means 3 for creating a management information file 6 which is a sequential organization file storing the index file name and the index order.

【0008】図6のフローチャートを用いて動的インデ
ックス作成の全体の処理の流れを説明する。
The flow of the entire process of creating a dynamic index will be described with reference to the flowchart of FIG.

【0009】データ検索システムの端末等からデータフ
ァイル名とインデックスファイル名をパラメータとして
与えると(ステップ6−1)、最適インデックス次数決
定手段1が起動され(ステップ6−2)、データファイ
ル4のレコード件数が入力されて後述する累乗根算出方
式によりインデックス次数が決定されてその結果をイン
デックスファイル作成手段2へ通知する(ステップ6−
3、6−4)。
When the data file name and the index file name are given as parameters from the terminal of the data retrieval system (step 6-1), the optimum index order determining means 1 is started (step 6-2), and the record of the data file 4 is recorded. The number of cases is input, the index order is determined by the power root calculation method described later, and the result is notified to the index file creating means 2 (step 6-
3, 6-4).

【0010】尚、データファイル4は、ファイル識別子
等から全データを読み込まなくてもレコード件数を取得
できる事、検索キーでソート済みである事が前提となっ
ている。
The data file 4 is premised on the fact that the number of records can be acquired without reading all the data from the file identifier and the like, and that it has already been sorted by the search key.

【0011】次に、インデックスファイル作成手段2が
後述する逐次格納方式により通知されたインデックス次
数に応じた階層構造を持つインデックスファイル5を作
成する(ステップ6−5)。
Next, the index file creating means 2 creates the index file 5 having a hierarchical structure according to the index order notified by the sequential storage method described later (step 6-5).

【0012】最後に管理情報ファイル作成手段3が起動
されて(ステップ6−6)、データファイル名61、イ
ンデックス次数62及びインデックスファイル名63を
格納した順編成ファイルである管理情報ファイル6を作
成して(ステップ6−7)処理を終了する。
Finally, the management information file creating means 3 is activated (step 6-6) to create the management information file 6 which is a sequential file in which the data file name 61, the index degree 62 and the index file name 63 are stored. (Step 6-7) and the process ends.

【0013】累乗根算出方式について説明する前に、本
実施例で作成するインデックスファイル5の構造につい
て図2及び図3を用いて説明する。
Before describing the power root calculation method, the structure of the index file 5 created in this embodiment will be described with reference to FIGS. 2 and 3.

【0014】図3に示すようにインデックスファイル5
には、インデックスブロックがn次の階層構造になって
格納されている。すなわち1次のインデックスブロック
51−1の下には複数の(図3ではl個)の2次のイン
デックスブロック52−1〜52−lがあり、その下に
3次のインデックスブロックがm個存在する。以下同様
にn次のインデックスブロックは、5n−1〜5n−o
のo個存在することを示している。
Index file 5 as shown in FIG.
In, the index blocks are stored in an n-order hierarchical structure. That is, there are a plurality of (l in FIG. 3) secondary index blocks 52-1 to 52-l below the primary index block 51-1 and m tertiary index blocks exist below it. To do. Similarly, the n-th index block is 5n-1 to 5n-o.
It is shown that there are o pieces of.

【0015】インデックスファイル5の基本単位はイン
デックスブロック5n−pである。ここでnは階層構造
の次数、oはその次数内のインデックスブロックの番号
である。
The basic unit of the index file 5 is the index block 5n-p. Here, n is the order of the hierarchical structure, and o is the index block number in the order.

【0016】図2は、1次インデックスブロック51−
1を例に示している。インデックスブロック5n−o内
にはインデックスレコード5n−o−pが複数個格納さ
れており(pは、1インデックスブロック内のインデッ
クスレコードの番号)、1レコード内には、検索対象で
あるデータファイル4の検索キー5n−o−p−1と次
階層のインデックスブロック5n−o−p−2すなわち
レコードポインタがセットされている。
FIG. 2 shows the primary index block 51-.
1 is shown as an example. A plurality of index records 5n-o-p are stored in the index block 5n-o (p is the number of the index record in one index block), and one record contains the data file 4 to be searched. Search key 5n-op-1 and the index block 5n-op-2 of the next layer, that is, the record pointer are set.

【0017】次にインデックスファイル5の階層につい
て図3を用いて説明する。
Next, the hierarchy of the index file 5 will be described with reference to FIG.

【0018】図3は、n次までの階層を持つ場合のイン
デックスファイル5の理論構造を示している。
FIG. 3 shows the theoretical structure of the index file 5 in the case of having a hierarchy up to the nth order.

【0019】1次インデックスブロック51−1は1ブ
ロックのみ作成され、各レコードのオフセット51−1
−p−2は、各2次インデックスブロック52−1先頭
を指している。
Only one primary index block 51-1 is created, and the offset 51-1 of each record is created.
-P-2 indicates the beginning of each secondary index block 52-1.

【0020】また2次インデックスブロック52−1以
降は、複数個のレコードが作成されて、その各レコード
のオフセット5n−o−p−2は次階層のインデックス
ブロック5n−oの先頭を指している。
A plurality of records are created after the secondary index block 52-1 and the offset 5n-op-2 of each record points to the head of the index block 5n-o of the next layer. .

【0021】以下同様にしてインデックスを段階的に検
索していき最終階層のn次インデックスブロック5n−
oに到達した時、その各レコードのオフセット5n−o
−p−2が該当キーを持つデータレコードの先頭を指し
ており、ここで初めて検索したいデータを取得できる。
In the same manner, the indexes are searched step by step in the same manner, and the n-th order index block 5n- of the final hierarchy is searched.
When it reaches o, the offset of each record is 5n-o
-P-2 indicates the head of the data record having the corresponding key, and the data to be searched can be acquired for the first time here.

【0022】インデックスファイル5の物理構造につい
ては、図4に一例を示したように、先頭に1次インデッ
クスブロック51−1が格納され、次に2次インデック
スブロック52−1〜52−l、最後にn次インデック
スブロック5n−oの順に格納されている。
As for the physical structure of the index file 5, a primary index block 51-1 is stored at the head, then secondary index blocks 52-1 to 52-l, and a final index block, as shown in FIG. Are stored in the order of the nth index block 5n-o.

【0023】累乗根算出方式について説明する。The power root calculation method will be described.

【0024】累乗根算出方式はデータファイル4のレコ
ード件数を入力値として下記の算術式により最適インデ
ックス次数を決定する方法である。すなわち、 R≦a・・・(1)の時、インデックス次数を0次とす
る。(1)以外の時、R≦bのn乗・・・(2) とな
る最小の自然数nを求めてインデックス次数をn次とす
る。
The power root calculation method is a method of determining the optimum index order by the following arithmetic expression using the number of records in the data file 4 as an input value. That is, when R ≦ a ... (1), the index order is the 0th order. In cases other than (1), the smallest natural number n such that R ≦ b raised to the nth power (2) is obtained and the index order is set to the nth order.

【0025】但しここで、R:データファイル4のレコ
ード件数 a:インデックスファイル5の作成を行わない場合のデ
ータファイル4のレコード件数の上限値 b:磁気ディスクやCD−ROM等の記憶媒体へのアク
セス効率を考慮して決定されたブロック長cのインデッ
クスブロック5n−o内に格納できるインデックスレコ
ード5n−o−p数。検索キー長d及びオフセット長e
から下式で得られる。
Here, R: the number of records in the data file 4 a: the upper limit of the number of records in the data file 4 when the index file 5 is not created b: to a storage medium such as a magnetic disk or a CD-ROM The number of index records 5n-op that can be stored in the index block 5n-o having the block length c determined in consideration of access efficiency. Search key length d and offset length e
Is obtained from

【0026】b=c÷(d+e)・・・(3) 例えば、ある記憶媒体において1ブロックが2048バ
イトとすると、アクセス効率が上がるものと仮定する。
この時データレコード4iのレコード長が512バイト
であった場合、1回のアクセスで4レコードの読み込み
が可能であるから、データファイル4のレコード件数が
4以下ならインデックスファイル5の作成は不要とな
る。つまりa=4となる(例1)。
B = c ÷ (d + e) (3) For example, if one block has 2048 bytes in a storage medium, it is assumed that the access efficiency is improved.
At this time, if the record length of the data record 4i is 512 bytes, 4 records can be read by one access, so that the index file 5 need not be created if the number of records in the data file 4 is 4 or less. . That is, a = 4 (example 1).

【0027】またデータレコード件数が十分に多くてイ
ンデックスファイル5の作成を行う時、検索キー5n−
o−p−1が16バイト、オフセット5n−o−p−2
が16バイトであれば、1次インデックスレコード5n
−o−pのレコード長は32バイトとなり、1次インデ
クスブロック5n−o−p中に64レコード格納できる
ことになる。つまりb=64となる(例2)。
When the index file 5 is created when the number of data records is sufficiently large, the search key 5n-
16 bytes for op-1 and offset 5n-op-2
Is 16 bytes, primary index record 5n
The record length of -op is 32 bytes, and 64 records can be stored in the primary index block 5n-op. That is, b = 64 (example 2).

【0028】また例2においてデータファイル4のレコ
ード件数が262,000件であった場合、262,0
00<64の3乗 なので、インデックス次数は3と決
定される(例3)。
If the number of records in the data file 4 in Example 2 is 262,000, then 262,0
Since 00 <64 is the third power, the index order is determined to be 3 (Example 3).

【0029】次に逐次格納方式について具体例をあげて
図5を用いて説明する。
Next, the sequential storage method will be described with reference to FIG. 5 with a specific example.

【0030】仮に、b=10、データレコード件数が9
9件である場合、(1)、(2)式からインデックス次
数は2になり、インデックスファイル作成手段2は次の
ような手順でインデックスファイル5を作成する。
Assuming that b = 10 and the number of data records is 9
In the case of 9 cases, the index order becomes 2 from the expressions (1) and (2), and the index file creating means 2 creates the index file 5 by the following procedure.

【0031】図5に示すように、まずデータファイル4
の先頭レコード41を読み込み、最終層の2次インデッ
クスレコードバッファ72−1−1へキー1(72−1
−1−1)及びデータレコード41の先頭を指すオフセ
ット1(72−1−1−2)をセットする(ステップ8
1)。同様にしてデータレコード410まで順に読み込
んでいき、キー10(72−1−10−1)及びオフセ
ット10(72−1−10−2)をセットした段階でイ
ンデックスブロックバッファ72−1は一杯になるた
め、キー10(72−1−10−1)と2次インデック
スブロックバッファ72−1の先頭を指すオフセット1
0−1(71−1−1−2)を1次インデックスブロッ
クバッファ71−1にセットする(ステップ82)。再
びデータレコード411から順に読み込んでいき(ステ
ップ83)、インデックスブロックバッファ72−yが
一杯になったら1次インデックスレコードバッファ71
−1−zのセットを行う。以下同様の処理を繰り返し、
最後のデータレコード499を読み込んだ時、2次イン
デックスレコードバッファ72−10−9にキー99
(72−10−9−1)とデータレコードのオフセット
99(72−10−9−2)をセットした後(ステップ
84)、インデックスブロックバッファの余った部分の
NULL詰めを行う。次に、1次インデックスレコード
バッファ71−1−10にキー99(71−1−1−
1)と2次インデックスブロックバッファ72−10の
先頭を指すオフセット99−1(71−1−1−2)を
セットする(ステップ85)。最後に1次インデックス
ブロックバッファ71−1(ステップ86)、2次イン
デックスブロックバッファ72−1(ステップ87)、
・・・・・・、2次インデックスブロックバッファ72
−10(ステップ88)の順にインデックスファイル5
への書き込みを行い、インデックスファイル5の作成処
理を終了する。
As shown in FIG. 5, first, the data file 4
Of the first record 41 of the key 1 (72-1) to the secondary index record buffer 72-1-1 of the last layer.
-1-1) and offset 1 (72-1-1-2) indicating the beginning of the data record 41 are set (step 8).
1). Similarly, the data block 410 is sequentially read, and the index block buffer 72-1 becomes full when the key 10 (72-1-10-1) and the offset 10 (72-1-10-2) are set. Therefore, key 10 (72-1-10-1) and offset 1 that points to the beginning of the secondary index block buffer 72-1
0-1 (71-1-1-2) is set in the primary index block buffer 71-1 (step 82). The data records 411 are sequentially read again (step 83), and when the index block buffer 72-y is full, the primary index record buffer 71 is read.
Set -1-z. Repeat the same process below,
When the last data record 499 is read, the key 99 is stored in the secondary index record buffer 72-10-9.
After setting (72-10-9-1) and the offset 99 (72-10-9-2) of the data record (step 84), null padding of the remaining portion of the index block buffer is performed. Next, the key 99 (71-1-1-) is stored in the primary index record buffer 71-1-10.
1) and offset 99-1 (71-1-1-2) pointing to the beginning of the secondary index block buffer 72-10 are set (step 85). Finally, the primary index block buffer 71-1 (step 86), the secondary index block buffer 72-1 (step 87),
.... Secondary index block buffer 72
Index file 5 in the order of -10 (step 88)
To the index file 5, and the process of creating the index file 5 ends.

【0032】本発明でデータ検索をする場合の処理につ
いて説明する。
A process for searching data according to the present invention will be described.

【0033】図5においてデータファイル4中のキー9
8を検索する場合、検索プログラムは、管理情報ファイ
ル6(図3参照)を参照して、インデックスファイル名
63とインデックス次数62を取得して、インデックス
ファイル5の先頭にある1次インデックスブロック71
−1−zをアクセスする。ここで、(前インデックスレ
コードのキー)<(検索したいキー)≦(インデックス
のレコードのキー) となるような現インデックスレコ
ードを探す。この場合は、インデックスレコード71−
1−10がこれに該当する。次にオフセット71−1−
10−2が2次インデックスブロック72−10の先頭
を指しているのでこれをアクセスし、検索したいキー9
8と2次インデックスレコード72−10−z内のキー
72−10−z−2を比較する。この時、インデックス
次数62の値が2であるので、2次インデックスが最終
階層であると判断され、 (現インデックスレコードのキー)=(検索したいキ
ー) となる2次インデックスレコード72−10−zを探
す。この場合は、2次インデックスレコード72−10
−8が該当するのでオフセット72−10−8−2がデ
ータファイル4中の検索対象キー98を持つデータレコ
ードの先頭を指しており、これを元にしてデータファイ
ル4をアクセスして検索処理が終了する。
Key 9 in data file 4 in FIG.
When searching 8, the search program refers to the management information file 6 (see FIG. 3) to obtain the index file name 63 and the index degree 62, and the primary index block 71 at the top of the index file 5 is acquired.
Access -1-z. Here, the current index record such that (key of previous index record) <(key to be searched) ≦ (key of index record) is searched. In this case, the index record 71-
1-10 corresponds to this. Next, offset 71-1-
Since 10-2 points to the beginning of the secondary index block 72-10, it is accessed and the key 9 to be searched is searched.
8 and the key 72-10-z-2 in the secondary index record 72-10-z. At this time, since the value of the index order 62 is 2, it is determined that the secondary index is the last layer, and the (current index record key) = (key to be searched) secondary index record 72-10-z Look for. In this case, the secondary index record 72-10
Since -8 corresponds, the offset 72-10-8-2 points to the beginning of the data record having the search target key 98 in the data file 4, and the data file 4 is accessed based on this to perform the search process. finish.

【0034】仮に、毎月データ更新が発生してレコード
件数の増減が激しいデータファイル4があり、インデッ
クスファイル5を作成するものとする。
It is assumed that there is a data file 4 in which data update occurs every month and the number of records increases / decreases, and an index file 5 is created.

【0035】例えば、5月にはデータ量が比較的少な
く、インデックス次数が1と判断された場合、1階層の
みのインデックスファイル5が作成され、管理情報ファ
イル6内のインデックス次数62には1と格納される。
しかし、次月の6月に大幅にデータ量が増え、インデッ
クス次数62が3と判断された場合、3階層のインデッ
クスファイル5が作成され、管理情報ファイル6のイン
デックス次数62には3が格納される。尚、データ検索
プログラムでは、管理情報ファイル6内のインデックス
次数62を参照する事により、インデックスブロック5
n−oを何回アクセスすれば検索したいデータレコード
4iのオフセット5n−o−p−2が取得できるかが把
握でき、インデックスファイル5の階層構造の変化に容
易に対応させることができる。
For example, when the data amount is relatively small in May and the index order is judged to be 1, the index file 5 of only one layer is created, and the index order 62 in the management information file 6 is set to 1. Is stored.
However, when the amount of data increases significantly in June of the next month and the index degree 62 is determined to be 3, the index file 5 of three layers is created and 3 is stored in the index degree 62 of the management information file 6. It The data search program refers to the index order 62 in the management information file 6 to determine the index block 5
It is possible to grasp how many times the noo is accessed to obtain the offset 5n-op-2 of the data record 4i to be searched, and it is possible to easily deal with the change in the hierarchical structure of the index file 5.

【0036】[0036]

【発明の効果】以上説明したように本発明は、データ量
に差がある複数のデータファイルを検索する場合や、同
一ファイルについてもデータ量の増減が頻繁に起きるよ
うなデータファイルを検索する場合に、次のような効果
がある。 1.データ量が多い場合にはインデックスを階層化し、
データ量が小量の場合には1階層のみのインデックスを
作成することにより、上位インデックスのキャッシュ化
やインデックスのメモリ常駐化が容易となる。またデー
タ量が特に少ない場合にはインデックス自体の作成を行
わないようにする。このような処置によりデータ検索処
理の高速化を図れる。 2.インデックス作成処理側で管理情報ファイルを作成
してインデックス次数などのファイル構成を管理するこ
とにより動的インデックスの変化に対してデータ検索処
理側での対応が容易に行われるようになる。
As described above, according to the present invention, when a plurality of data files having different data amounts are searched, or when the same file is searched for a data file whose data amount frequently increases and decreases. Has the following effects. 1. If there is a large amount of data, create a hierarchical index,
When the amount of data is small, by creating an index of only one layer, it is easy to cache the upper index and make the index resident in memory. Also, when the data amount is particularly small, the index itself is not created. By such a measure, the speed of the data search process can be increased. 2. By creating a management information file on the index creation processing side and managing the file structure such as the index order, the data search processing side can easily handle changes in the dynamic index.

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

【図1】本発明のブロック構成図である。FIG. 1 is a block configuration diagram of the present invention.

【図2】本発明の一実施例のインデックスブロックの構
成図である。
FIG. 2 is a configuration diagram of an index block according to an embodiment of the present invention.

【図3】本発明の一実施例のインデックスファイルの論
理構成図である。
FIG. 3 is a logical configuration diagram of an index file according to an embodiment of the present invention.

【図4】本発明の一実施例のインデックスファイルの物
理構成図である。
FIG. 4 is a physical configuration diagram of an index file according to an embodiment of the present invention.

【図5】本発明の一実施例の逐次格納方式によるインデ
ックスファイルの作成手順を示すブロック構成図であ
る。
FIG. 5 is a block diagram showing a procedure for creating an index file according to the sequential storage method of the embodiment of the present invention.

【図6】本発明の処理の流れを示すフローチャートであ
る。
FIG. 6 is a flowchart showing the flow of processing of the present invention.

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

1 最適インデックス次数決定手段 2 インデックスファイル作成手段 3 管理情報ファイル作成手段 4 データファイル 5 インデックスファイル 6 管理情報ファイル 4i データレコード 5n−o n次インデックスブロック 5n−o−p n次インデックスレコード 5n−o−p−1 検索キー 5n−o−p−2 オフセット 61 データファイル名 62 インデックス次数 63 インデックスファイル名 7x−y x次インデックスブロックバッファ 7x−y−z x次インデックスレコードバッファ 7x−y−z−1 検索キーバッファ 7x−y−z−2 オフセットバッファ 1 Optimal Index Order Determining Means 2 Index File Creating Means 3 Management Information File Creating Means 4 Data File 5 Index File 6 Management Information File 4i Data Record 5n-o nth Index Block 5n-o-p nth Index Record 5n-o- p-1 search key 5n-op-2 offset 61 data file name 62 index order 63 index file name 7x-y x-order index block buffer 7x-y-z x-order index record buffer 7x-y-z-1 search Key buffer 7x-yz-2 offset buffer

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 コンピュータによるデータ検索システム
において検索対象となるデータファイルの増減に応じて
階層型インデックスファイルのインデックスのインデッ
クス次数を累乗根算出方式により判断する最適インデッ
クス次数決定手段と、 前記最適インデックス次数決定手段により決定された次
数分の階層を持つ前記インデックスファイルを逐次格納
方式により作成するインデックスファイル作成手段と、 データが格納されているデータファイルと前記インデッ
クスファイルとを関連付けるためにデータファイル名と
インデックスファイル名、インデックス次数とを格納し
た順編成ファイルである管理情報ファイルを作成する管
理情報ファイル作成手段とを備えたことを特徴とする動
的インデックス作成装置。
1. An optimum index order determining means for determining an index order of an index of a hierarchical index file by a power root calculation method according to increase or decrease of a data file to be searched in a data search system using a computer, and the optimum index order. Index file creating means for creating the index file having a hierarchy for the degree determined by the determining means by a sequential storage method, and a data file name and an index for associating the data file storing the data with the index file A dynamic index creating device, comprising: a management information file creating means for creating a management information file that is a sequentially organized file that stores a file name and an index order.
【請求項2】 前記インデックスファイルが、複数のイ
ンデックスブロックから成り、このインデックスブロッ
ク内にはインデックスレコードが複数個格納されてお
り、このインデックスレコード内には検索対象である前
記データファイルの検索キーと、次階層のインデックス
ブロックすなわちレコードポインタがセットされてお
り、 1次インデックスブロックは1ブロックのみ作成され、
各インデックスレコードのオフセットは、各2次インデ
ックスブロック先頭を指しており、前記2次インデック
スブロック以降は、複数個の前記インデックスレコード
が作成されて前記各インデックスレコードのオフセット
は次階層の前記インデックスブロックの先頭を指してお
り、 最終階層のn次インデックスブロックに前記各レコード
のオフセットに該当検索キーのデータレコードの先頭の
情報が格納されていることを特徴とする動的インデック
ス作成装置。
2. The index file is composed of a plurality of index blocks, and a plurality of index records are stored in the index block, and a search key of the data file to be searched is stored in the index record. , The index block of the next layer, that is, the record pointer is set, and only one primary index block is created,
The offset of each index record points to the beginning of each secondary index block. After the secondary index block, a plurality of index records are created, and the offset of each index record is the index block of the next hierarchy. A dynamic index creation device, which points to the beginning and stores the information of the beginning of the data record of the corresponding search key at the offset of each record in the n-th index block of the final hierarchy.
JP6187460A 1994-08-09 1994-08-09 Dynamic index preparing device Pending JPH0855050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6187460A JPH0855050A (en) 1994-08-09 1994-08-09 Dynamic index preparing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6187460A JPH0855050A (en) 1994-08-09 1994-08-09 Dynamic index preparing device

Publications (1)

Publication Number Publication Date
JPH0855050A true JPH0855050A (en) 1996-02-27

Family

ID=16206470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6187460A Pending JPH0855050A (en) 1994-08-09 1994-08-09 Dynamic index preparing device

Country Status (1)

Country Link
JP (1) JPH0855050A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015530666A (en) * 2012-09-24 2015-10-15 華為技術有限公司Huawei Technologies Co.,Ltd. Data indexing method and apparatus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0362239A (en) * 1989-07-31 1991-03-18 Mitsubishi Electric Corp File input/output device
JPH05334153A (en) * 1992-06-01 1993-12-17 Nippon Telegr & Teleph Corp <Ntt> Index management system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0362239A (en) * 1989-07-31 1991-03-18 Mitsubishi Electric Corp File input/output device
JPH05334153A (en) * 1992-06-01 1993-12-17 Nippon Telegr & Teleph Corp <Ntt> Index management system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015530666A (en) * 2012-09-24 2015-10-15 華為技術有限公司Huawei Technologies Co.,Ltd. Data indexing method and apparatus

Similar Documents

Publication Publication Date Title
JP4313323B2 (en) Searchable archive
US5813000A (en) B tree structure and method
AU698148B2 (en) Parallel processing system for traversing a data base
CN102016789A (en) Data processing apparatus and method of processing data
TW392113B (en) File management method
US7269589B2 (en) Database managing method and system having data backup function and associated programs
JPH0855050A (en) Dynamic index preparing device
US20070033162A1 (en) Methods and media for efficiently processing data selected for recording to optical media
JP2004192657A (en) Information retrieval system, and recording medium recording information retrieval method and program for information retrieval
JP3183252B2 (en) Database search system
JP4056622B2 (en) Database management device
JPS62287350A (en) Index integrally updating system
JP4306281B2 (en) Hierarchical data mapping program, apparatus and method in relational database
JPH0456344B2 (en)
JP2687887B2 (en) Relational database management method
KR20030065860A (en) Video Searching Apparatus and its Method using XML Hierarchy Structure
JP2980610B2 (en) Transaction management device
JP3439364B2 (en) Storage and retrieval methods for undefined length data
JPS61160133A (en) Data input control method
JP4623644B2 (en) Full-text search processing system for large-capacity long-term storage data
JPS61103242A (en) High-speed retrieval system
CN115982156A (en) Data processing method, data processing apparatus, computer device, storage medium, and program product
CN117573634A (en) Key value storage method based on multi-log structure merging tree
JP3111498B2 (en) Record search method and data processing device
JPH05274196A (en) Secondary storage managing method by multiple file

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19970715