JPH0652231A - Relational data base operation mechanism - Google Patents

Relational data base operation mechanism

Info

Publication number
JPH0652231A
JPH0652231A JP4218733A JP21873392A JPH0652231A JP H0652231 A JPH0652231 A JP H0652231A JP 4218733 A JP4218733 A JP 4218733A JP 21873392 A JP21873392 A JP 21873392A JP H0652231 A JPH0652231 A JP H0652231A
Authority
JP
Japan
Prior art keywords
matrix
index
range
search
database
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
JP4218733A
Other languages
Japanese (ja)
Inventor
Seiya Miyazaki
靖也 宮崎
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 JP4218733A priority Critical patent/JPH0652231A/en
Publication of JPH0652231A publication Critical patent/JPH0652231A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To constitute the operation mechanism so that in the case there are plural items in which a range of a value is narrow in a relational data base, a matrix index obtained by integrating them is generated, and retrieval at the time when a condition is designated to these items is executed at a high speed. CONSTITUTION:At the time of defining a table, a value which can be taken by at item in which a range of the value is narrow is registered in a data base definition file 6. At the time of adding and updating data, a matrix index 72 consisting of a matrix table and a data record address list is generated in a data base file 7 by a matrix index generating and updating means 12. At the time of retrieval, in the case a condition is designated to plural items in which the range of the value is narrow, retrieval is executed at a high speed by using the matrix index 72 by a matrix index retrieving means 15.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、計算機システム上にお
ける、リレーショナルデータベースに対するデータの追
加・更新や、条件によるデータ検索などの、リレーショ
ナルデータベース運用方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a relational database operating system for adding / updating data to / from a relational database and retrieving data according to conditions on a computer system.

【0002】[0002]

【従来の技術】従来のリレーショナルデータベースの検
索システムにおける検索においては、値の範囲の狭い項
目に複数条件を指定して検索する場合には以下の方式が
一般的である。
2. Description of the Related Art In a conventional relational database search system, the following method is generally used when a plurality of conditions are specified for an item having a narrow value range.

【0003】すなわち、複数の条件の内の1個の条件に
対してインデックスを検索して対応レコードの集合を求
め、これを全ての条件に対して行った後、それらの集合
を論理演算して求めるレコードの集合を求める。
That is, an index is searched for one of a plurality of conditions to obtain a set of corresponding records, this is performed for all the conditions, and then the set is logically operated. Get the set of records you want.

【0004】または、予め、複数の項目を結合させた仮
想的な項目を作り、その項目に対してインデックスを作
成しておくことにより、基の複数の項目に全て条件が指
定された時にはその結合された仮想的な項目のインデッ
クスを検索することにより、求めるレコードの集合を求
める。
Alternatively, a virtual item in which a plurality of items are combined is created in advance, and an index is created for that item, so that when all the conditions of a plurality of basic items are specified, the combination is performed. A set of desired records is obtained by searching the index of the created virtual item.

【0005】[0005]

【発明が解決しようとする課題】従来の方式で、それぞ
れの項目ごとの条件で検索してレコードの集合を作成し
てそれを論理演算する方式では、インデックスの検索時
間・レコードの集合の作成時間・集合の論理演算の時間
などオーバヘッドが大きく、処理時間が大きくかかって
しまう。
In the conventional method, in which the set of records is created by searching under the condition of each item and the logical operation is performed, the search time of the index and the creation time of the set of records are -Overhead such as the time for logical operation of the set is large and the processing time is long.

【0006】また、項目を結合した仮想的な項目のイン
デックスを作成する方式では、対応する全ての項目に条
件が指定された時は検索速度が非常に速くなるが、この
インデックスは、個々の項目のインデックスとは別に作
成しなければならないために、作成の手間が余分にかか
ると共にデータベース内でその分の容量を使ってしま
う。また、レコードの追加・更新時に、このインデック
スも更新しなければならないためにオーバヘッドが大き
くなる。また、検索する場合に使用する条件の組み合わ
せが多数ある場合にはそれに合わせて何種類ものインデ
ックスを作る必要が出てくる。そうせずにそれらを包含
したようなインデックスを作った場合には、検索の条件
によっては値が部分的に不定の条件での検索になるため
に余分なインデックスサーチが必要となり処理速度が遅
くなる。
Further, in the method of creating a virtual item index in which items are combined, the search speed becomes very high when conditions are specified for all corresponding items, but this index is used for individual items. Since it has to be created separately from the index, it takes extra time to create it and consumes that much space in the database. In addition, this index also has to be updated when a record is added or updated, resulting in a large overhead. Also, if there are many combinations of conditions to be used for searching, it will be necessary to create several types of indexes according to the combinations. If you create an index that includes them without doing so, the value will be partially undefined depending on the search conditions, and an extra index search will be required, resulting in slower processing speed. .

【0007】本発明の目的は、以上述べてきたような従
来技術での問題点を解決して検索速度を高速化するリレ
ーショナルデータベース運用機構を提供することにあ
る。
It is an object of the present invention to provide a relational database operating mechanism which solves the problems in the prior art as described above and speeds up the search speed.

【0008】[0008]

【課題を解決するための手段】本発明のリレーショナル
データベース運用機構は、リレーショナルデータベース
に対して検索・更新などを行うデータベース処理システ
ムにおいて、レコード形式の等しいレコードの集合を、
1辺を各レコードの項目、もう1辺をレコードの並びと
いう、表の形式で表している場合に、検索・更新の対象
となる表に値のとりうる範囲が狭い項目が複数ある場合
に、各々の項目のとりうる値の種類の個数を1辺の個数
とするn次元のマトリクスの表をデータベース上に作成
し、そのマトリクス表の各要素から対応するデータレコ
ードをポイントするアドレスリストをポイントするよう
にしたマトリクス表形式のインデックスを作成して、値
の範囲の狭い条件を複数指定してデータを検索する場合
の検索速度を高速化することを可能とするマトリクスイ
ンデックス作成更新手段を有する。
A relational database operation mechanism of the present invention is a database processing system for searching / updating a relational database.
In the case of a table format in which one side is an item of each record and the other side is an array of records, when there are a plurality of items in which the range of values that can be retrieved / updated is narrow, An n-dimensional matrix table in which the number of types of possible values of each item is the number of sides is created in the database, and the address list that points to the corresponding data record is pointed to from each element of the matrix table. The matrix index forming / updating means is provided which can speed up the search speed when the index is created in the matrix table format and a plurality of conditions having a narrow range of values are specified to search the data.

【0009】また、上記の構成で項目の範囲が狭くなく
ても、出現に偏りがあって、いくつかの値とその他の値
で分類できるような場合、範囲のある値もマトリクス表
の1要素とし、範囲の無い要素は1の手段と同様にし、
範囲のある要素はその要素からその要素の範囲分の値を
検索するためのツリー状のインデックスをポイントする
ようにして、マトリクス表形式のインデックスを作成し
て、値の範囲が広い条件でも複数指定してデータを検索
する場合の検索速度を高速化することを可能とするマト
リクスインデックス作成更新手段を有する。
In addition, even if the range of items is not narrow in the above configuration, if there is a bias in appearance and it is possible to classify by some values and other values, a value with a range is also one element of the matrix table. And the element without the range is the same as 1 means,
For elements with a range, point to a tree-like index to search for values for that range from that element, create a matrix table format index, and specify multiple values even if the value range is wide. It has a matrix index creating / updating unit that can speed up the search speed when searching for data.

【0010】また、上記の構成により作成されたマトリ
クス表形式インデックスをもつシステムにおいて、デー
タベース利用者から検索要求が投入された場合に、作成
されたマトリクス表形式インデックスのマトリクスの各
辺の値と条件を比較してマトリクス上のどのポインタ列
を読み込めば良いか判断し、ポインタ列を複数読まなけ
ればならない場合は、それを並列に読み込むことにより
検索時のデータベースアクセスを最少にすることを可能
とするマトリクスインデックス検索手段を有する。
Further, in the system having the matrix table format index created by the above configuration, when a search request is input from a database user, the values and conditions of each side of the matrix of the matrix table format index created. To determine which pointer row on the matrix should be read, and if multiple pointer rows must be read, read them in parallel to minimize database access during search. It has a matrix index search means.

【0011】[0011]

【作用】上記構成によれば、マトリクスインデックス作
成更新手段は検索・更新の対象となる表に値のとり得る
範囲が狭い項目が複数ある場合、各々の項目のとり得る
値の種類の個数を1辺の個数とするn次元のマトリクス
の表をデータベース上に作成し、そのマトリクス表の各
要素から対応するデータレコードをポイントするアドレ
スリストを、ポイントするマトリクス表形式のインデッ
クスを作成する。
According to the above construction, the matrix index creating / updating means sets the number of types of possible values of each item to 1 when the table to be searched / updated has a plurality of items having a narrow possible range of values. An n-dimensional matrix table having the number of sides is created on a database, and an address list pointing to a corresponding data record is created from each element of the matrix table, and an index in a matrix table format is created.

【0012】あるいは、項目の値の範囲が狭くなくても
出現に偏りがあっていくつかの値とその他の値で分類で
きる場合、範囲のある値もマトリクス表の一要素とし
て、その要素から要素の範囲分の値を検索するためのツ
リー状のインデックスをポイントするようなマトリクス
表形式のインデックスを作成する。さらに、検索要求が
投入された場合は、マトリクスインデックス検索手段
が、マトリクス表形式インデックスのマトリクスの各辺
の値と条件を比較してマトリクス上のどのポインタ列を
読み込めば良いかを判断し、ポインタ列を複数読む場
合、並列に同時に読み込むように処理するので、値の範
囲の狭い条件を複数指定する場合、あるいは、値の範囲
が広い条件でも複数指定してデータを検索する場合等の
検索速度を高速化することが可能となる。
Alternatively, even if the range of the value of the item is not narrow, if the appearance is biased and can be classified by some value and other value, the value with range is also one element of the matrix table, Create a matrix tabular index that points to a tree-like index to search for values in the range. Further, when a search request is input, the matrix index search means compares the value of each side of the matrix of the matrix table format index with the condition to determine which pointer column on the matrix should be read, and When reading multiple columns, processing is performed so that they are read in parallel at the same time, so the search speed when specifying multiple conditions with a narrow range of values, or when searching for data by specifying multiple conditions even with a wide range of values. Can be speeded up.

【0013】[0013]

【実施例】本発明の実施例について図面を参照して説明
する。
Embodiments of the present invention will be described with reference to the drawings.

【0014】図1は本発明の一実施例によるリレーショ
ナルデータベース運用機構の構成図である。
FIG. 1 is a block diagram of a relational database operating mechanism according to an embodiment of the present invention.

【0015】図1を参照すると、実施例は、ホスト計算
機1、ワークステーション2、アプリケーションプログ
ラム3、データベース定義データファイル4、データベ
ース運用機構5、データベース定義ファイル6、データ
ベースファイル7、検索ワークファイル8、表定義手段
9、ユーザインタフェース手段10、データベース更新
手段11、マトリクスインデックス作成更新手段12、
通常インデックス作成更新手段13、データベース検索
手段14、マトリクスインデックス検索手段15、通常
インデックス検索手段16から構成され、データベース
定義ファイル6は定義レコード61から構成され、デー
タベースファイル7はデータレコード71、マトリクス
インデックス72、通常インデックス73から構成さ
れ、検索ワークファイル8はレコード集合81から構成
される。
Referring to FIG. 1, in the embodiment, a host computer 1, a workstation 2, an application program 3, a database definition data file 4, a database operation mechanism 5, a database definition file 6, a database file 7, a search work file 8, Table definition means 9, user interface means 10, database update means 11, matrix index creation and update means 12,
It comprises normal index creation / update means 13, database search means 14, matrix index search means 15, and normal index search means 16, the database definition file 6 comprises definition records 61, the database file 7 comprises data records 71, matrix index 72. The search work file 8 is composed of a record set 81.

【0016】図2は、図1に示すマトリクスインデック
スの構成を示す図であり、図2を参照すると、マトリク
スインデックス72は、マトリクス表721、データレ
コードアドレスリスト722、ツリー状インデックス7
23から構成され、マトリクス表721は列αm721
1、列βn7212、要素αmβn7213から構成さ
れ、データレコートアドレスリスト722はデータレコ
ードポインタ7221から構成され、ツリー状インデッ
クス723は、キー値7231、データレコードポイン
タ7232から構成される。
FIG. 2 is a diagram showing the structure of the matrix index shown in FIG. 1. Referring to FIG. 2, the matrix index 72 includes a matrix table 721, a data record address list 722, and a tree-like index 7.
23, and the matrix table 721 has a column αm721.
1, the column βn7212, the element αmβn7213, the data record address list 722 is composed of the data record pointer 7221, and the tree-like index 723 is composed of the key value 7231 and the data record pointer 7232.

【0017】図3は、実施例で説明されるマトリクスイ
ンデックスを備えた表の例を表している。当該表は4つ
の項目から構成され、項目Aは値の取り得る範囲が(a
1,a2,a3,a4)だけであるのでマトリクスイン
デックス72を作成する。項目Bは範囲が広いが出現に
偏りがあって、ほぼ(b1,b2,b3)が大部分を占
めるので、(b1,b2,b3,else)という形で
マトリクスインデックス72を作成する。項目Cは重複
のない項目で値の範囲が広すぎるため通常のインデック
ス73を作成する。項目Dは検索の条件として使用しな
いのでインデックスを付けない。ここで、マトリクスイ
ンデックスの数や項目の数は説明の簡便さのために上記
の値になっているのであって特に制限が有るわけでな
く、マトリクスインデックスはn次元のものを作ること
が可能である。
FIG. 3 shows an example of a table having matrix indexes described in the embodiment. The table is composed of four items, and item A has a range of possible values (a
1, a2, a3, a4), the matrix index 72 is created. The item B has a wide range, but the appearances are biased, and almost all (b1, b2, b3) occupy most of them, so the matrix index 72 is created in the form of (b1, b2, b3, else). Since the item C is a non-overlapping item and its value range is too wide, a normal index 73 is created. Item D is not used as a search condition, and thus is not indexed. Here, since the number of matrix indexes and the number of items are set to the above values for the sake of simplicity of explanation, there is no particular limitation, and it is possible to create an n-dimensional matrix index. is there.

【0018】つぎに動作について説明する。Next, the operation will be described.

【0019】本発明を備えた計算機システムにおいて
は、まず利用者は、ワークステーション2やデータベー
ス定義データファイル4から表の定義情報をデータベー
ス運用機構5に登録要求する。要求を受けたデータベー
ス運用機構5は、表定義手段9においてワークステーシ
ョン2から定義情報を受け取ったりデータベース定義デ
ータファイル4内の定義データを入力して、定義レコー
ド61を作成し、データベース定義ファイル6に登録す
る。定義レコード61は表の各項目の項目長や属性など
の情報で構成されるが、マトリクスインデックス72を
作成する項目に関しては、マトリクスインデックス72
を作成する印と、項目のとり得る値が設定される。つま
り項目Aに関してみれば、とりうる値(a1,a2,a
3,a4)が設定される訳である。
In the computer system equipped with the present invention, the user first requests the database operation mechanism 5 to register the table definition information from the workstation 2 or the database definition data file 4. Upon receipt of the request, the database operation mechanism 5 receives the definition information from the workstation 2 in the table defining means 9 or inputs the definition data in the database definition data file 4 to create a definition record 61, which is stored in the database definition file 6. register. The definition record 61 is composed of information such as the item length and attributes of each item in the table, but regarding the item for which the matrix index 72 is created, the matrix index 72
A mark for creating the item and a possible value of the item are set. That is, regarding item A, possible values (a1, a2, a
3, a4) is set.

【0020】次に、定義の終了した表に対して利用者が
ワークステーション2を通してデータの追加更新要求を
行ったり、アプリケーションプログラム3から追加更新
要求が発せられると、データベース運用機構5はユーザ
インタフェース手段10でこの要求と追加更新データを
受け取り、データベース更新手段11に渡す。データベ
ース更新手段11は予めデータベース定義ファイル6の
対応する定義レコード61を読み込んでおき、ユーザイ
ンタフェース手段10から追加更新レコードを受け取る
と、まずデータベースファイル7にデータレコードを追
加したり対応するデータレコード71を更新したりす
る。そして、追加更新レコードの通常インデックス73
を作成すべき項目の値を通常インデックス作成更新13
に渡し、マトリクスインデックス72を作成すべき項目
の値をマトリクスインデックス作成更新手段12に渡
す。実施例においては、通常インデックス作成更新手段
13に渡すのは項目Cの値であり、マトリクスインデッ
クス作成更新手段12に渡すのは項目A,Bの値であ
る。
Next, when the user makes an additional update request for data through the workstation 2 or an additional update request is issued from the application program 3 to the table for which the definition has been completed, the database operation mechanism 5 causes the user interface means. At 10 the request and the additional update data are received and passed to the database updating means 11. The database updating means 11 reads the corresponding definition record 61 of the database definition file 6 in advance, and upon receiving the additional update record from the user interface means 10, first adds a data record to the database file 7 or creates a corresponding data record 71. To update. Then, the normal index 73 of the additional update record
The value of the item that should be created is normally updated by index creation 13
And the value of the item for which the matrix index 72 is to be created is passed to the matrix index creation / update means 12. In the embodiment, the value of the item C is normally passed to the index creating / updating means 13, and the value of the items A and B is passed to the matrix index creating / updating means 12.

【0021】通常インデックス作成更新手段13におい
ては、項目の値を受け取ると、データベース定義ファイ
ル6の定義レコード61に従い、データベースファイル
7の通常インデックス73を追加更新する。
Upon receiving the value of the item, the normal index creation / update means 13 additionally updates the normal index 73 of the database file 7 according to the definition record 61 of the database definition file 6.

【0022】マトリクスインデックス作成更新手段12
においては、項目の値を受け取ると、データベース定義
ファイル6の定義レコード61に従い、データベースフ
ァイル7のマトリクスインデックス72を以下のように
追加更新する。
Matrix index creating / updating means 12
In (1), when the value of the item is received, the matrix index 72 of the database file 7 is additionally updated according to the definition record 61 of the database definition file 6 as follows.

【0023】要求が最初のレコード追加であった場合に
は、まずデータベースファイル7にマトリクス表721
を作成する。このとき、マトリクス表721の片方の列
αm7211は項目Aの値に対応する。すなわち項目A
の値(a1,a2,a3,a4)が列(α1,α2,α
3,α4)に対応する。同じくもう一方の列βn721
2は項目Bの値に対応する。すなわち項目Bの値(b
1,b2,b3,else)が列(β1,β2,β3,
β4)に対応する。そして、マトリクス表721の各要
素αmβn7213には空値が設定される。次に、デー
タレコードアドレスリスト722を作成し、対応するデ
ータレコード71へのポインタをデータレコードアドレ
スリスト722のデータレコードポインタ7221に設
定し、項目A,Bの値に対応する要素αmβn7213
にデータレコードアドレスリスト722へのポインタを
セットする。すなわち、例えば項目A,Bの値がA=a
2,B=b3であった場合には要素α2β3にポインタ
をセットする。
When the request is the first record addition, the matrix table 721 is first stored in the database file 7.
To create. At this time, one column αm7211 of the matrix table 721 corresponds to the value of item A. Ie item A
The values (a1, a2, a3, a4) of are the columns (α1, α2, α
3, α4). Similarly, the other row βn721
2 corresponds to the value of item B. That is, the value of item B (b
1, b2, b3, else) are columns (β1, β2, β3,
Corresponds to β4). Then, a null value is set in each element αmβn7213 of the matrix table 721. Next, the data record address list 722 is created, the pointer to the corresponding data record 71 is set in the data record pointer 7221 of the data record address list 722, and the element αmβn7213 corresponding to the values of the items A and B is set.
A pointer to the data record address list 722 is set to. That is, for example, the values of the items A and B are A = a
If 2, B = b3, the pointer is set to the element α2β3.

【0024】2回目以降の追加であれば、項目A,Bの
値に対応するマトリクス表721の要素αmβn721
3を調べて、空値であればデータレコードアドレスリス
ト722を作成してデータレコードポインタ7221を
セットして、マトリクス表721の要素αmβn721
3にデータレコードアドレスリスト722へのポインタ
をセットする。空値でなければ、その値が指し示すデー
タレコードアドレスリスト722にデータレコードポイ
ンタ7221を昇順に追加する。
For the second and subsequent additions, the element αmβn721 of the matrix table 721 corresponding to the values of the items A and B is added.
3, the data record address list 722 is created and the data record pointer 7221 is set, and the element αmβn721 of the matrix table 721 is checked.
A pointer to the data record address list 722 is set to 3. If it is not a null value, the data record pointer 7221 is added to the data record address list 722 pointed to by the value in ascending order.

【0025】また、マトリクス表721の要素αmβn
7213が幅のある値に対応する場合、実施例において
は項目Bがb1,b2,b3以外の値に対応する列β4
に対応する要素αmβ4の場合、項目Aの値が固定で、
項目Bの値がb1,b2,b3以外であるツリー状イン
デックス723を作成して要素αmβ4からそのツリー
状インデックス723をポイントする。ツリー状インデ
ックス723では項目Bの値のキー値7231とデータ
レコード71へのデータレコードポインタ7232でデ
ータレコード71がポイントできるようにする。要素α
mβn7213が複数の幅のある項目の値に対応してい
る場合には、対応する数のツリー状インデックス723
を要素αmβn7213からポイントさせる。
Further, the element αmβn of the matrix table 721
If 7213 corresponds to a wide value, the column β4 in which the item B corresponds to a value other than b1, b2, and b3 in the embodiment.
In the case of the element αmβ4 corresponding to, the value of item A is fixed,
A tree-shaped index 723 in which the value of the item B is other than b1, b2, b3 is created, and the tree-shaped index 723 is pointed to from the element αmβ4. In the tree-like index 723, the data record 71 can be pointed by the key value 7231 of the value of the item B and the data record pointer 7232 to the data record 71. Element α
If mβn7213 corresponds to the values of multiple wide items, the corresponding number of tree-like indices 723
From the element αmβn7213.

【0026】データの更新時においては、項目A,Bの
値が変化しなければ何もせず、変化すれば、更新前にデ
ータレコード71を指していたデータレコードアドレス
リスト722のデータレコードポインタ7221を削除
し、新しいポインタをデータ追加時と同様の方法で追加
する。
When updating the data, nothing is done unless the values of the items A and B change. If they change, the data record pointer 7221 of the data record address list 722 pointing to the data record 71 before the update is set. Delete and add a new pointer in the same way as when adding data.

【0027】次に、本方式を備えたデータベース運用機
構5に対して、利用者がワークステーション2を通して
検索要求を発行してきたり、アプリケーションプログラ
ム3が検索要求を発行してきた場合には、データベース
運用機構5はまずユーザインタフェース手段10で要求
を受け付けて検索条件をデータベース検索手段14に渡
す。
Next, when the user issues a search request through the workstation 2 or the application program 3 issues a search request to the database operation mechanism 5 equipped with this method, the database operation mechanism 5 is executed. 5, the user interface means 10 first accepts the request and passes the search condition to the database search means 14.

【0028】検索条件を受け取ったデータベース検索手
段14は、条件をマトリクスインデックスを持つ項目に
対するものと通常のインデックスを持つ項目に対するも
のに分け、それぞれマトリクスインデックス検索手段1
5と通常インデックス検索手段16に通知する。
The database search means 14 that has received the search conditions divides the conditions into those for the items having the matrix index and those for the items having the normal index, and the matrix index searching means 1 respectively.
5 and the normal index search means 16 are notified.

【0029】通常インデックス検索手段16は条件を受
け取るとデータベースファイル7の通常インデックス7
3を検索して該当するレコードの集合を求め検索ワーク
ファイル8のレコード集合81に出力する。
When the normal index search means 16 receives the condition, the normal index 7 of the database file 7 is searched.
3 is searched to obtain a set of corresponding records, and the set is output to the record set 81 of the search work file 8.

【0030】マトリクスインデックス検索手段15は条
件を受け取ると、以下のようにしてデータベースファイ
ル7のマトリクスインデックス72を検索して該当する
レコードの集合を求め検索ワークファイル8のレコード
集合81に出力する。
Upon receiving the condition, the matrix index search means 15 searches the matrix index 72 of the database file 7 in the following manner to obtain a set of corresponding records and outputs it to the record set 81 of the search work file 8.

【0031】マトリクスに対応する項目が全て指定され
ていて範囲指定でない場合は、項目の値に対応するデー
タベースファイル7のマトリクスインデックス72の要
素αmβn7213からデータレコードアドレスリスト
722を見つけだし、データレコードアドレスリスト7
22のデータレコードポインタ7221を順次読んで検
索ワークファイル8にレコード集合81を作成すれば良
い。
When all the items corresponding to the matrix are specified and the range is not specified, the data record address list 722 is found from the element αmβn7213 of the matrix index 72 of the database file 7 corresponding to the value of the item, and the data record address list 7 is found.
The record set 81 may be created in the search work file 8 by sequentially reading the 22 data record pointers 7221.

【0032】マトリクスに対応する項目が全て指定され
ていなかったり範囲指定がある場合は、複数の要素を読
み込まねばならないが、まず条件を検証してどの要素を
読み込めば良いか決定する。そして、マトリクスインデ
ックス72のマトリクス表721の複数の要素αmβn
7213に対応するデータレコードアドレスリスト72
2を読んで行くが、この場合、データレコードアドレス
リスト722は昇順に並んでいるので、複数のデータレ
コードアドレスリスト722を同時に交互に読んで行
き、検索ワークファイル8のレコード集合81が一度で
作成できるようにする。
When all the items corresponding to the matrix are not specified or the range is specified, a plurality of elements must be read. First, the condition is verified to determine which element should be read. Then, a plurality of elements αmβn of the matrix table 721 of the matrix index 72
Data record address list 72 corresponding to 7213
2, the data record address list 722 is arranged in ascending order, so a plurality of data record address lists 722 are alternately read at the same time, and the record set 81 of the search work file 8 is created at one time. It can be so.

【0033】マトリクスインデックス72のマトリクス
表721の要素αmβn7213が幅のある値に対応す
る場合、要素αmβn7213からポイントされるツリ
ー状インデックス723を検索して検索ワークファイル
8にレコード集合81を作成する。この場合は通常のイ
ンデックスの検索と同様になるが、検索するインデック
スに対応するレコードの数は他の項目で絞られている分
少なくなる。
When the element αmβn7213 in the matrix table 721 of the matrix index 72 corresponds to a wide value, the tree-like index 723 pointed to by the element αmβn7213 is searched to create the record set 81 in the search work file 8. In this case, it becomes the same as a normal index search, but the number of records corresponding to the index to be searched is reduced because other items are narrowed down.

【0034】マトリクスインデックス検索手段15と通
常インデックス検索手段16で検索ワークファイル8に
レコード集合81が作成されると、データベース検索手
段14はそのレコード集合81を論理演算して結果のレ
コード集合81を作成し、ユーザインタフェース手段1
0を通してワークステーション2上の利用者やアプリケ
ーションプログラム3に結果を通知する。もちろん、通
常のインデックスの項目に対する条件がなければ、マト
リクスインデックス検索手段15が出力したレコード集
合81をそのまま通知する。
When a record set 81 is created in the search work file 8 by the matrix index search means 15 and the normal index search means 16, the database search means 14 logically operates the record set 81 to create a resulting record set 81. User interface means 1
The result is notified to the user on the workstation 2 and the application program 3 through 0. Of course, if there is no condition for a normal index item, the record set 81 output by the matrix index search means 15 is notified as it is.

【0035】以上の様にして、マトリクスインデックス
72を備えたデータベース運用機構において、データの
追加更新・検索を実施することができる。上記に示すよ
うに、追加更新においては、余分なインデックスを作る
わけではないので、余分なスペースが少なく追加更新時
のオーバヘッドも少ない。また、検索時においては、検
索するインデックスの量を最少化することができ、検索
速度を高速化することができる。
As described above, additional updating / searching of data can be performed in the database operation mechanism provided with the matrix index 72. As described above, since an extra index is not created in the additional update, the extra space is small and the overhead at the time of the additional update is also small. Further, at the time of searching, the amount of indexes to be searched can be minimized, and the search speed can be increased.

【0036】[0036]

【発明の効果】以上説明したように、本発明によれば、
値の範囲の少ない項目に対して複数の条件を指定してデ
ータベース検索を行う場合の検索速度の高速化が可能と
なり、値の範囲が広くても出現に偏りがあって、いくつ
かの値とその他という様に表せる場合は、上記と同様に
して、データベース検索を行う場合の検索速度の高速化
が可能となる。さらに、補助的なインデックスを別に作
るわけではないので、データベース中に余分なエリアを
使用することがなく、補助的なインデックスを別に作る
わけではないので、データの追加更新時のオーバヘッド
を少なくする等の効果がある。
As described above, according to the present invention,
It is possible to speed up the search speed when performing a database search by specifying multiple conditions for items with a small range of values, and even if the range of values is wide, there is a bias in appearance, If it can be expressed as "other", the search speed can be increased in the database search in the same manner as described above. In addition, since the auxiliary index is not created separately, no extra area is used in the database and the auxiliary index is not created separately, so the overhead when adding and updating data is reduced, etc. Has the effect of.

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

【図1】本発明の実施例の全体構成を示す図である。FIG. 1 is a diagram showing an overall configuration of an embodiment of the present invention.

【図2】図1中のマトリクスインデックスの構成を示す
図である。
FIG. 2 is a diagram showing a structure of a matrix index in FIG.

【図3】実施例のマトリクスインデックスを備えた表の
例を示す図である。
FIG. 3 is a diagram showing an example of a table including matrix indexes according to an embodiment.

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

1 ホスト計算機 2 ワークステーション 3 アプリケーションプログラム 4 データベース定義データファイル 5 データベース運用機構 6 データベース定義ファイル 7 データベースファイル 8 検索ワークファイル 9 表定義手段 10 ユーザインターフェース手段 11 データベース更新手段 12 マトリクスインデックス作成更新手段 13 通常インデックス作成更新手段 14 データベース検索手段 15 マトリクスインデックス検索手段 16 通常インデックス検索手段 1 host computer 2 workstation 3 application program 4 database definition data file 5 database operation mechanism 6 database definition file 7 database file 8 search work file 9 table definition means 10 user interface means 11 database update means 12 matrix index creation update means 13 normal index Creation / update means 14 Database search means 15 Matrix index search means 16 Normal index search means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 リレーショナルデータベースに対して検
索・更新などを行うデータベース処理システムにおい
て、レコード形式の等しいレコードの集合を、1辺を各
レコードの項目、もう1辺をレコードの並びという、表
の形式で表している場合に、検索・更新の対象となる表
に値のとりうる範囲が狭い項目が複数ある場合に、各々
の項目のとりうる値の種類の個数を1辺の個数とするn
次元のマトリクスの表をデータベース上に作成し、該マ
トリクス表の各要素から対応するデータレコードをポイ
ントするアドレスリストをポイントするようにしたマト
リクス表形式のインデックスを作成して、値の範囲の狭
い条件を複数指定してデータを検索する場合の検索速度
を高速化することを可能とするマトリクスインデックス
作成更新手段を有することを特徴とするリレーショナル
データベース運用機構。
1. A database processing system for searching / updating a relational database, wherein a set of records having the same record format has a table format in which one side is an item of each record and the other side is a row of records. When there are a plurality of items whose range of values is narrow in the table to be searched / updated, the number of types of possible values of each item is defined as the number of sides.
A matrix table format index is created by creating a matrix table of dimensions on a database, and pointing to an address list that points to the corresponding data record from each element of the matrix table. A relational database operation mechanism having a matrix index creating / updating unit capable of increasing the search speed in the case of searching data by designating a plurality of items.
【請求項2】 請求項1に記載のリレーショナルデータ
ベース運用機構において、前記項目の値の範囲が狭くな
くても出現に偏りがあって、いくつかの値とその他の値
で分類できるような場合、範囲のある値もマトリクス表
の1要素とし範囲の無い要素は請求項1に記載の処理と
同様にし、範囲のある要素は該要素から該要素の範囲分
の値を検索するためのツリー状のインデックスをポイン
トするようにして、マトリクス表形式のインデックスを
作成し、値の範囲が広い条件でも複数指定してデータを
検索する場合の検索速度を高速化することを可能とする
マトリクスインデックス作成更新手段を有することを特
徴とするリレーショナルデータベース運用機構。
2. The relational database operation mechanism according to claim 1, wherein the appearance is biased even if the value range of the item is not narrow, and it is possible to classify by some values and other values, A value with a range is also one element of the matrix table, and an element without a range is similar to the processing according to claim 1, and an element with a range has a tree-like shape for searching a value corresponding to the range of the element from the element. A matrix index creation / update means that creates an index in matrix table format by pointing to the index, and makes it possible to speed up the search speed when searching for data by specifying multiple even in the condition of a wide range of values. A relational database operation mechanism characterized by having.
【請求項3】 請求項1および請求項2で作成されたマ
トリクス表形式インデックスをもつシステムにおいて、
データベース利用者から検索要求が投入された場合に、
請求項1および請求項2で作成されたマトリクス表形式
インデックスのマトリクスの各辺の値と条件を比較して
該マトリクス上のどのポインタ列を読み込めば良いか判
断し、前記ポインタ列を複数読まなければならない場合
は、それを並列に読み込むことにより検索時のデータベ
ースアクセスを最少にすることを可能とするマトリクス
インデックス検索手段を有することを特徴とするリレー
ショナルデータベース運用機構。
3. In a system with matrix tabular index created in claim 1 and claim 2,
When a search request is submitted by a database user,
It is necessary to read a plurality of pointer columns by comparing the values of each side of the matrix of the matrix table format index created in claim 1 and claim 2 and conditions to determine which pointer column on the matrix should be read. A relational database operation mechanism characterized by having a matrix index search means capable of minimizing database access at the time of search by reading it in parallel when it is not necessary.
JP4218733A 1992-07-27 1992-07-27 Relational data base operation mechanism Pending JPH0652231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4218733A JPH0652231A (en) 1992-07-27 1992-07-27 Relational data base operation mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4218733A JPH0652231A (en) 1992-07-27 1992-07-27 Relational data base operation mechanism

Publications (1)

Publication Number Publication Date
JPH0652231A true JPH0652231A (en) 1994-02-25

Family

ID=16724585

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4218733A Pending JPH0652231A (en) 1992-07-27 1992-07-27 Relational data base operation mechanism

Country Status (1)

Country Link
JP (1) JPH0652231A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019028933A (en) * 2017-08-03 2019-02-21 株式会社日立製作所 Multi-dimensional data management system and multi-dimensional data management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019028933A (en) * 2017-08-03 2019-02-21 株式会社日立製作所 Multi-dimensional data management system and multi-dimensional data management method

Similar Documents

Publication Publication Date Title
US6678687B2 (en) Method for creating an index and method for searching an index
US20100106713A1 (en) Method for performing efficient similarity search
EP1234258B1 (en) System for managing rdbm fragmentations
JP3318834B2 (en) Data file system and data retrieval method
JP2001043290A (en) Methods for presenting, inserting, deleting and updating table form data, transaction processing method utilizing the methods, parallel processing method and storage medium storing program for providing the methods
JP2001331509A (en) Relational database processor, relational database processing method, and computer-readable recording medium recorded with relational database processing program
JPH04124774A (en) Data storage method for hierarchical construction in related data base
WO2005043409A1 (en) Table-formatted data connection method, connection device, and program
JP2003150633A (en) Data joining/presenting method and data joining/ presenting program
JP2000035965A (en) Method and device for retrieving similar feature quantity and storage medium storing retrieval program of similar feature quantity
JP2007048318A (en) Relational database processing method and relational database processor
JPH0652231A (en) Relational data base operation mechanism
JP3859044B2 (en) Index creation method and search method
JPH09305622A (en) Method and system for managing data base having document retrieval function
JP2990000B2 (en) Search system
JP3980326B2 (en) Data management method and computer-readable recording medium
JPS6143338A (en) Searching of thin data base using association technology
KR100333682B1 (en) A Query Processing Method For Grouping And Aggregation Operations In Object-Relational Database Systems Using Reverse Pointers
JPH11306183A (en) Data base retrieval system
JPH04156624A (en) High speed accessing systme in knowledge base systme
Morishima et al. Optimal tree node ordering for child/descendant navigations
JPH04337867A (en) Data base retrieval system
JPH113260A (en) Database management method
JPH04250568A (en) Record retrieval device
JPH0512739B2 (en)