JPH0243677A - Index control system - Google Patents

Index control system

Info

Publication number
JPH0243677A
JPH0243677A JP63195579A JP19557988A JPH0243677A JP H0243677 A JPH0243677 A JP H0243677A JP 63195579 A JP63195579 A JP 63195579A JP 19557988 A JP19557988 A JP 19557988A JP H0243677 A JPH0243677 A JP H0243677A
Authority
JP
Japan
Prior art keywords
index
item
key
key value
processing
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
JP63195579A
Other languages
Japanese (ja)
Inventor
Isao Kamoi
鴨井 功
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 JP63195579A priority Critical patent/JPH0243677A/en
Publication of JPH0243677A publication Critical patent/JPH0243677A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To shorten a retrieving time and to improve processing efficiency by providing an index updating means to execute the updating processing of the retrieve corresponding to a key value extracted with a key value extracting means and a retrieve processing means to execute retrieve-processing with the use of the partial key of a corresponding item. CONSTITUTION:A key extracting means 10 is accessed at every index item at the time of the addition, alteration and deletion of a record, a value consisting of the all digits of the index item and a value starting from the arbitrary position of the index item are extracted as a key value list 1, and delivered to an index updating means 20. The index updating means 20 executes the updating processing of the index corresponding to the key value extracted by the key value extracting means 10, when a retrieve processing means 30 receives a retrieve element using an index file 2 having a character position from the top of the value, the number of the digits and item of the retrieving key in an index entry, it decides the type of the retrieving request, and executes a distribution retrieving processing for the partial key retrieving processing. Thus, the retrieving time can be shortened, and the processing efficiency can be improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は指定された項目の任意の位置に出現する検索キ
ー値を使って検索を行う索引管理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an index management system that performs a search using a search key value that appears at any position in a specified item.

〔概要〕〔overview〕

本発明は検索対象項目の全桁を使って作成された索引の
索引管理方式において、 検索対象キー値を含む専用の索引を作成し、これを実運
用に必要な部分に抽出あるいは更新することにより、 小さい蓄積容量でも索引を使った高速アクセスを行い、
実行手順を減らして検索時間を短縮して処理効率を向上
させるようにしたものである。
In an index management method for an index created using all digits of the search target item, the present invention creates a dedicated index that includes the search target key value, and extracts or updates the part necessary for actual operation. , high-speed access using indexes even with small storage capacity,
This reduces the number of execution steps, shortens search time, and improves processing efficiency.

〔従来の技術〕[Conventional technology]

指定された項目の任意の位置から始まるキー値を使った
検索処理を高速に行うために、従来方式の一つ(従来方
式1)では通常の索引が使われている。項目内の任意の
位置から始まるキー値の表現は該当項目の前方一致、中
間一致、後方−致の各指定に分類され、前方一致条件の
評価では該当項目の索引を使うことによって、最小のア
クセスで目的のレコードを位置付けることができる。し
かし、中間または後方一致条件の検索要求では、該当項
目の索引全体を探索し、目的のレコードか否かの判定を
行わなければならない。
One of the conventional methods (conventional method 1) uses a normal index in order to perform high-speed search processing using a key value starting from an arbitrary position in a specified item. The expression of a key value starting from an arbitrary position within an item is categorized into a prefix match, a middle match, and a suffix match for the corresponding item, and when evaluating the prefix match condition, the index of the corresponding item is used to minimize access. You can position the desired record using . However, in the case of a search request with middle or suffix matching conditions, the entire index for the corresponding item must be searched to determine whether or not it is the target record.

また、他の従来方式(従来方式2)では中間−致や後方
一致の条件指定においても索引を使った高速アクセスが
実行できることを意図し、て、項目単位の索引に加えて
項目の分割単位でも索引を作成する方式が一般的に採用
されている。
In addition, the other conventional method (conventional method 2) is intended to enable high-speed access using indexes even when specifying conditions such as middle match and suffix match, and in addition to indexing by item, it is also possible to perform indexing by division of items. A method of creating an index is generally adopted.

第6図(a)は従来方式lでの中間一致条件または後方
一致条件の評価で発生する索引のアクセス経路を示した
ものである。これは、索引を持つ項目に中間一致条件ま
たは後方一致条件が指定された検索要求を処理するため
に、該当索引の最上位のノードからアクセスが始まり、
最下位ノードまで順次アクセスし、最下位ノードに格納
されているキー値と指定された部分条件値を比較し、指
定された部分一致条件を満足するレコードの判定を行い
ながら、最下位ノードに格納されている最後のキー値に
到達するまで判定を繰り返している。
FIG. 6(a) shows an index access path that occurs in the evaluation of the middle matching condition or the trailing matching condition in the conventional method 1. In order to process a search request in which a middle match condition or a backward match condition is specified for an item with an index, access starts from the topmost node of the corresponding index.
Accesses sequentially up to the lowest node, compares the key value stored in the lowest node with the specified partial condition value, and stores the records in the lowest node while determining which records satisfy the specified partial matching condition. The determination is repeated until the last key value is reached.

第6図(b)は従来方式2での対処を示したものである
。これは、項目f1、f2、f3に対して、各項目の全
体キーを表す索引である■1、■2、■3の他に、部分
キー索引としてflの5〜8桁を使ったIll、flの
9〜11桁を使った112、f2の7〜13桁を使った
I21、f3の3〜6桁を使ったI31がそれぞれ定義
されている。
FIG. 6(b) shows the solution in conventional method 2. For items f1, f2, and f3, in addition to ■1, ■2, and ■3, which are indexes representing the entire key of each item, Ill, which uses 5 to 8 digits of fl as a partial key index, 112 using the 9th to 11th digits of fl, I21 using the 7th to 13th digits of f2, and I31 using the 3rd to 6th digits of f3 are defined.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来方式1では、特定項目の中間または後方の部分にの
み条件を与えた検索を行う場合、該当項目のために作成
されている索引の最下位ノードを全てアクセスしないと
条件判定が完了しないために、目的レコードの件数が多
い場合は検索時間がかかり過ぎる問題がある。
In conventional method 1, when performing a search with conditions applied only to the middle or rear part of a specific item, the condition determination cannot be completed unless all the lowest nodes of the index created for the item are accessed. , there is a problem that the search takes too much time when there are many target records.

また、従来方式2では予想される部分キー検索要求パタ
ーンの数だけ、索引を生成する必要があり、索引を格納
するための二次記憶スペースが大きくなり、またレコー
ド内容の更新と同期をとるための索引の更新処理が増加
して処理効率の低下を引き起こす問題を有している。
In addition, in conventional method 2, it is necessary to generate indexes for the number of expected partial key search request patterns, which increases the secondary storage space for storing the indexes, and also to synchronize with updates of record contents. The problem is that the number of index update processes increases, resulting in a decrease in processing efficiency.

本発明はこのような問題を解決するもので、検索時間を
短縮して処理効率を向上させることができる方式を提供
することを目的とする。
The present invention solves these problems, and aims to provide a method that can shorten search time and improve processing efficiency.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、検索対象項目の全桁を使って索引を作成する
手段およびその項目内の任意の位置から始まる検索キー
値のための索引を作成する手段を含む索引管理方式にお
いて、索引エントリの中に上記検索キーの値、桁数およ
び項目の先頭からの文字位置を持つ索引ファイルを設け
、レコードの追加、変更、削除時に呼び出され、索引項
目の全桁からなる値とこの索引項目の任意の位置から始
まる値とをキー値リストとして抜き出すキー値抽出手段
と、このキー値抽出手段によって抜き出されたキー値に
対応する索引の更新処理を行う索引更新手段と、該当項
目の部分キーを使った検索処理を行う検索処理手段とを
備えたことを特徴とする。
The present invention provides an index management system that includes means for creating an index using all digits of a search target item and means for creating an index for a search key value starting from an arbitrary position within the item. An index file containing the value of the above search key, the number of digits, and the character position from the beginning of the item is set up, and it is called when adding, changing, or deleting a record, and it is a key value extracting means for extracting a value starting from a position as a key value list; an index updating means for updating an index corresponding to the key value extracted by the key value extracting means; The present invention is characterized by comprising a search processing means for performing search processing.

〔作用〕[Effect]

キー抽出手段がレコードの追加、変更、削除時に各索引
項目ごとに呼び出され、索引項目の全桁からなる値とこ
の索引項目の任意の位置から始まる値とをキー値リスト
として抜き出し、索引更新手段に渡す。索引更新手段は
、キー値抽出手段によって抜き出されたキー値に対応す
る索引の更新処理を行い、検索処理手段が索引エントリ
の中に検索キーの値、桁数および項目の先頭からの文字
位置を持つ索引ファイルを使った検索要求を受けると、
検索要求のタイプを判定して部分キー検索処理に振り分
は検索処理を行う。
The key extraction means is called for each index item when a record is added, changed, or deleted, and extracts the value consisting of all digits of the index item and the value starting from any position of this index item as a key value list, and the index update means give it to The index update means updates the index corresponding to the key value extracted by the key value extraction means, and the search processing means includes the value of the search key, the number of digits, and the character position from the beginning of the item in the index entry. When a search request is received using an index file with
The type of search request is determined, and the search process is performed for partial key search processing.

これにより、部分キー値での検索要求においても、索引
を使った高速なアクセスを実現するとともに、実運用上
で必要な部分だけからなる索引を構成することができ、
索引の蓄積コストを削減することかできる。
As a result, it is possible to achieve high-speed access using the index even in search requests using partial key values, and to construct an index consisting only of the parts necessary for actual operation.
It is possible to reduce the cost of storing indexes.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を用いて説明する。 Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明実施例索引管理方式の構成を示すブロッ
ク図である。
FIG. 1 is a block diagram showing the configuration of an index management system according to an embodiment of the present invention.

本発明実施例は、キー値リスト1と、索引エントリの中
に検索キーの値、桁数および検索対象項目の先頭からの
文字位置をもつ索引ファイル2と、レコードの追加、変
更、削除時に呼び出され、索引項目の全桁からなる値と
検索対象項目の任意の位置から始まる値とをキー値リス
ト1として抜き出し、索引の更新処理に渡すキー値抽出
手段10と、このキー値抽出手段10によって抜き出さ
れたキー値に対応する索引の更新処理を行う索引更新手
段20と、該当項目の部分キーを使った検索処理を行う
検索処理手段30とを備える。
The embodiment of the present invention includes a key value list 1, an index file 2 which has the search key value, number of digits, and character position from the beginning of the search target item in the index entry, and is called when adding, changing, or deleting a record. The key value extraction means 10 extracts the value consisting of all digits of the index item and the value starting from an arbitrary position of the search target item as a key value list 1 and passes it to the index update process. It includes an index update means 20 that performs an index update process corresponding to the extracted key value, and a search processing means 30 that performs a search process using a partial key of the corresponding item.

このように構成された本発明実施例の動作について説明
する。
The operation of the embodiment of the present invention configured as described above will be explained.

第2図はキー値抽出手段10の処理の流れを示すフロー
チャートである。キー値抽出手段10は索引を持つと定
義されたレコードの追加、変更、削除処理から各索引項
目ごとに呼び出され、索引ファイル2に反映するキー値
を抽出する。
FIG. 2 is a flowchart showing the process flow of the key value extraction means 10. The key value extracting means 10 is called for each index item in the process of adding, changing, or deleting a record defined as having an index, and extracts a key value to be reflected in the index file 2.

このキー値抽出手段10は対象レコードの登録、変更、
削除処理時に更新対象キー値をパラメータとして呼び出
される。現在入力された更新対象キー値から索引ファイ
ルに反映するキー値として、人力されたキー値の全桁、
2桁目から最終桁まで、3桁目から最終桁まで、 、最
終桁のみ、の値に分解してキー値リスト1に出力する(
ステップ301〜304)。このとき、抽出されたキー
値にはその開始桁位置、有効桁数とレコードアドレスと
が付加される。
This key value extraction means 10 registers, changes, and
Called with the update target key value as a parameter during deletion processing. As the key value to be reflected in the index file from the currently input update target key value, all digits of the manually entered key value,
Decomposes into values from the second digit to the last digit, from the third digit to the last digit, and outputs only the last digit to key value list 1 (
Steps 301-304). At this time, the starting digit position, number of effective digits, and record address are added to the extracted key value.

第5図に示すキー値分解の例では、キー値抽出手段10
によってキー値”ABCDE”が”ABCDE″、BC
DE″″′CDE″、DE”および”E″に分解され、
各々の有効桁数として5.4.3.2.1、開始位置情
報としてO,l、2.3.4とレコードアドレス10が
付加されてキー値リスト1に出力される。
In the example of key value decomposition shown in FIG.
The key value “ABCDE” is “ABCDE”, BC
Decomposed into DE″″′CDE″, DE” and “E”,
5.4.3.2.1 as the number of effective digits, O, 1, 2.3.4 as the start position information, and record address 10 are added to each key value list 1 and output to the key value list 1.

第3図は索引更新手段20の処理内容を示す流れ図であ
る。索引更新手段20はキー値リスト1に出力されたキ
ー値を昇順に分類しくステップ401)、各キー値単位
に付加されている追加、削除指示に従って索引ファイル
2の更新処理を行う(ステップ402)。
FIG. 3 is a flowchart showing the processing contents of the index updating means 20. The index update means 20 sorts the key values output to the key value list 1 in ascending order (step 401), and updates the index file 2 according to the addition and deletion instructions attached to each key value unit (step 402). .

第4図は検索処理手段30の処理の流れを示すフローチ
ャートである。検索処理手段30は索引ファイル2を使
った検索要求を受は取ると、その検索要求のタイプを判
定して(ステップ501)、前方−致、中間一致、後方
一致の三種類の部分キー検索処理に振り分ける。以下に
各々の検索要求タイプごとの動作を説明する。
FIG. 4 is a flowchart showing the processing flow of the search processing means 30. When the search processing means 30 receives a search request using the index file 2, it determines the type of the search request (step 501) and performs three types of partial key search processing: forward match, middle match, and backward match. Allocate to. The operation for each search request type will be explained below.

(1)前方一致 検索対象のキー値と、前方一致要求であることを表す項
目内の開始位置=0とを条件として設定して(ステップ
502)検索処理ステップを呼び出す。
(1) The key value of the prefix match search target and the start position = 0 in the item indicating a prefix match request are set as conditions (step 502), and the search processing step is called.

(2)中間一致 指定された項目の指定された部分をキーにした検索が、
開始位置が固定の検索要求か、開始位置が任意の検索要
求かを判定しくステップ503)、開始位置が固定の検
索では、項目内の開始位置と検索対象キー値を与えて(
ステップ505)、目的のレコードの検索処理を呼び出
す。
(2) A search using a specified part of an item specified as a middle match is executed as a key.
It is determined whether the search request has a fixed starting position or an arbitrary starting position (step 503). For a search with a fixed starting position, the starting position within the item and the search target key value are given (step 503).
Step 505), calls a search process for the target record.

また、指定された項目の任意の部分に出現するキー値の
検索では、項目内の開始位置を限定条件から外して、指
定されたキー値だけで目的レコードを検索することを指
示下る(ステップ506)。
In addition, when searching for a key value that appears in any part of a specified item, an instruction is given to remove the starting position within the item from the limiting conditions and to search for the target record using only the specified key value (step 506). ).

(3)後方一致 後方一致要求に対しては、検索対象キーとその桁数を与
えることで、目的のレコードの検索要求をあられす(ス
テップ504)。
(3) Suffix match For the suffix match request, a search request for the target record is issued by giving the search target key and its number of digits (step 504).

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

以上説明したように本発明によれば、検索対象キー値を
含む専用の索引を作成することによって、部分キー値で
の検索要求においても、索引を使った高速なアクセスを
実現するとともに、実運用で必要な部分だけからなる索
引を構成できるために索引の蓄積コストを削減すること
ができる効果がある。
As explained above, according to the present invention, by creating a dedicated index that includes search target key values, it is possible to achieve high-speed access using the index even in search requests using partial key values, and Since an index can be constructed from only the necessary parts, it is possible to reduce the cost of storing the index.

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

第1図は本発明実施例の構成を示すブロック図。 第2図は本発明実施例のキー値抽出手段の処理の流れを
示す流れ図。 第3図は本発明実施例の索引更新手段の処理の流れを示
す流れ図。 第4図は本発明実施例の検索処理手段の動作を説明する
図。 第5図は本発明実施例のキー値抽出手段でのキー値分解
の例を示す図。 第6図は従来方式1と2の例を示す図。 1・・・キー値リスト、2・・・索引ファイル、10・
・・キー値抽出手段、20・・・索引更新手段、30・
・・検索処理手段。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a flowchart showing the processing flow of the key value extracting means according to the embodiment of the present invention. FIG. 3 is a flowchart showing the processing flow of the index updating means according to the embodiment of the present invention. FIG. 4 is a diagram explaining the operation of the search processing means according to the embodiment of the present invention. FIG. 5 is a diagram showing an example of key value decomposition by the key value extracting means according to the embodiment of the present invention. FIG. 6 is a diagram showing examples of conventional methods 1 and 2. 1... Key value list, 2... Index file, 10.
. . . Key value extraction means, 20 . . . Index updating means, 30.
...Search processing means.

Claims (1)

【特許請求の範囲】 1、検索対象項目の全桁を使って索引を作成する手段お
よびその項目内の任意の位置から始まる検索キー値のた
めの索引を作成する手段を含む索引管理方式において、 索引エントリの中に上記検索キーの値、桁数および項目
の先頭からの文字位置を持つ索引ファイル(2)を設け
、 レコードの追加、変更、削除時に呼び出され、索引項目
の全桁からなる値とこの索引項目の任意の位置から始ま
る値とをキー値リスト(1)として抜き出すキー値抽出
手段(10)と、 このキー値抽出手段によって抜き出されたキー値に対応
する索引の更新処理を行う索引更新手段(20)と、 該当項目の部分キーを使った検索処理を行う検索処理手
段(30)と を備えたことを特徴とする索引管理方式。
[Claims] 1. An index management method including means for creating an index using all digits of a search target item and means for creating an index for a search key value starting from an arbitrary position within the item, An index file (2) is created in the index entry that contains the value of the above search key, the number of digits, and the character position from the beginning of the item, and is called when adding, changing, or deleting a record, and the value consisting of all digits of the index item is created. and a key value extraction means (10) for extracting a value starting from an arbitrary position of this index item as a key value list (1), and an index update process corresponding to the key value extracted by this key value extraction means. An index management method characterized by comprising: an index updating means (20) for performing the following: and a search processing means (30) for performing a search processing using a partial key of a corresponding item.
JP63195579A 1988-08-04 1988-08-04 Index control system Pending JPH0243677A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63195579A JPH0243677A (en) 1988-08-04 1988-08-04 Index control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63195579A JPH0243677A (en) 1988-08-04 1988-08-04 Index control system

Publications (1)

Publication Number Publication Date
JPH0243677A true JPH0243677A (en) 1990-02-14

Family

ID=16343483

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63195579A Pending JPH0243677A (en) 1988-08-04 1988-08-04 Index control system

Country Status (1)

Country Link
JP (1) JPH0243677A (en)

Similar Documents

Publication Publication Date Title
JP3205406B2 (en) Reference target variable determination processing method and translation processing system
JPH0243677A (en) Index control system
JPH07319742A (en) Physical deleting system for logically deleted data
JPS59146339A (en) Information retrieving system
JPH0581102A (en) System for controlling table
JPH04188239A (en) File control system
JPS62131349A (en) Data base processing system
JP2001155028A (en) Aggregate calculation processing method and device for relational database, and computer readable recording medium recorded with aggregate arithmetic processing program
JPH0352068A (en) Logical operation system
JPH11242627A (en) Data access method and medium recording program
JP2722684B2 (en) File system search device
JP2785966B2 (en) Foreign key dynamic resolution processing method
JPH1173353A (en) Transaction retrieval processor based on specified time
JPH01248233A (en) Data base retrieving device
CN117493874A (en) Method for determining label calculation task, processor and storage medium
JP3398672B2 (en) Intermediate data storage device
JPS63106041A (en) Knowledge inference system
JP2000067077A (en) Data base system and record medium recorded with program for processing chart division designation
JPH06214849A (en) Data base system
JPH02204835A (en) Rule type program executing method
JPH0833899B2 (en) Index update method
JPH04242841A (en) Data base update system
JPS63158627A (en) Index retrieval system
JPH04241624A (en) Design information managing system
JPH05108438A (en) Quick access system in input/output of data