JPH0342773A - Data base retrieving system - Google Patents
Data base retrieving systemInfo
- Publication number
- JPH0342773A JPH0342773A JP1178733A JP17873389A JPH0342773A JP H0342773 A JPH0342773 A JP H0342773A JP 1178733 A JP1178733 A JP 1178733A JP 17873389 A JP17873389 A JP 17873389A JP H0342773 A JPH0342773 A JP H0342773A
- Authority
- JP
- Japan
- Prior art keywords
- search
- conditions
- database
- column
- records
- 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
Links
- 238000011156 evaluation Methods 0.000 claims abstract description 14
- 238000000034 method Methods 0.000 claims description 8
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明はデータが表形式に管理されているデータベース
管理システムにかけるデータベース検索システムに関し
、特に検索要求に対して検索条件を満たすレコードを出
力するデータベース検索方式に関する。[Detailed Description of the Invention] (Industrial Application Field) The present invention relates to a database search system for a database management system in which data is managed in a tabular format, and in particular outputs records that meet search conditions in response to a search request. Concerning database search methods.
(従来の技術)
単一カラムへの単純条件の論理積で検索条件を表わすこ
とができる場合、検索条件を満たすレコードを決定する
方式としては以下のものがある。(Prior Art) When a search condition can be expressed by a logical product of simple conditions in a single column, the following methods are available for determining records that satisfy the search condition.
ここで、単一カラムへの単純条件とは、「カラムAが値
aより大きい」、または「等しい」というように、ある
一定値との比較で表わすことができるものをいう。また
、特に「等しい」場合には、その条件を一致条件と呼ぶ
ことにする。Here, the simple condition for a single column refers to one that can be expressed by comparison with a certain constant value, such as "column A is greater than value a" or "equal". In addition, especially in the case of "equal", that condition will be referred to as a matching condition.
単純条件の論理積で検索条件を表わすことができる表金
、あるレコードがその検索条件を満たすか否かを調べる
には、ある順序にもとづいて単純条件を評価する。そこ
で当該条件を満たさなければ、当該レコードは要求され
た検索条件を満たさないとして評価を打切る。最後の単
純条件まで評価して当該単純条件を満たせば、そのノコ
ードは要求された検索条件を満たしたことになる0評価
の順序を変えることによって、全体の評価の回数を少な
くすることができる。gAJえば、一致条件は他の単純
条件に比べ、それを満たすレコードが確率的に少ないと
推測できるので、一致条件を比較条件より先に評価すれ
ば評価回数を減らすことができる。A search condition can be expressed by the logical product of simple conditions.To check whether a certain record satisfies the search condition, the simple conditions are evaluated based on a certain order. If the condition is not met, the record is deemed not to satisfy the requested search condition and the evaluation is discontinued. If the simple condition is evaluated up to the last simple condition and the simple condition is satisfied, the code satisfies the requested search condition.By changing the order of 0 evaluations, the total number of evaluations can be reduced. For example, since it can be inferred that there are fewer records satisfying the match condition than other simple conditions, the number of evaluations can be reduced by evaluating the match condition before the comparison condition.
(発明が解決しようとする課題)
上述した従来のデータベース検索方式では、致条件を他
の比較条件よシ先に評価することによって比較の回数を
少なくしているが、一致条件の評価の順序は任意である
ため、比較の回数があ1り少なくならないという欠点が
ある。(Problem to be Solved by the Invention) In the conventional database search method described above, the number of comparisons is reduced by evaluating matching conditions before other comparison conditions, but the order in which matching conditions are evaluated is Since it is arbitrary, it has the disadvantage that the number of comparisons cannot be reduced by one.
飼えば、レコードが1000件あり、一致条件Aのカラ
ムaの真値件数が10であり、一致条件Bのカラムbの
真値件数が100であるとする。Assume that there are 1000 records, the number of true values of column a of match condition A is 10, and the number of true values of column b of match condition B is 100.
このとき、評価の順序をAr3とすると、比較の回数は
1000+1000÷10=1100
となる。!た、評価の順序をB−+Aとすると、比較の
回数は
1000+1000÷100=1010となシ、比較順
序を変えることによって比較の回数を減らすことができ
るが、あまり減少率は大きくない。At this time, if the evaluation order is Ar3, the number of comparisons is 1000+1000÷10=1100. ! Furthermore, if the evaluation order is B-+A, the number of comparisons is 1000+1000÷100=1010.The number of comparisons can be reduced by changing the comparison order, but the reduction rate is not very large.
本発明の目的は、カラム中の真値件数を考慮にいれて真
値件数から全条件の判定に必要な評価の回数を少なくす
る条件比較順序を決定し、決定された順序により検索条
件を満足するレコードを決定し、出力することにより上
記欠点を除去し、全体として評価の回数を少なくするよ
うに比較の順序を決定することができるように構成した
データベース検索方式を提供することにある。The purpose of the present invention is to determine a condition comparison order that reduces the number of evaluations necessary for determining all conditions based on the number of true values, taking into account the number of true values in a column, and to satisfy the search conditions with the determined order. To provide a database search system configured to eliminate the above-mentioned drawbacks by determining and outputting records to be processed, and determining the order of comparison so as to reduce the number of evaluations as a whole.
(課題を解決するための手段)
本発明によるデータベース検索システムは、データベー
ス内のレコードが複数のデータ属性を持ち、それぞれの
データ属性のデータがカラムと呼ばれる領域に格納され
、全体として表形式になっているデータ構造を持つデー
タベース管理システムで利用者からの検索要求に対して
検索条件を満たすレコードを出力するものであって、異
値件数格納領域と、比較順序決定手段と、データベース
検索手段と、出力手段とを具備して構成したものである
0
異値件数格納領域は、各カラムごとにすべてのレコード
の当該カラムの値の異なる値の件数を格納するためのも
のである。(Means for Solving the Problems) In the database search system according to the present invention, records in a database have a plurality of data attributes, data of each data attribute is stored in an area called a column, and the entire record is in a table format. A database management system having a data structure that outputs records that satisfy search conditions in response to a search request from a user, comprising: an area for storing the number of unusual values, a comparison order determining means, a database search means, The 0 different value count storage area is configured to include an output means and is for storing, for each column, the number of different values in the column of all records.
比較順序決定手段は、複数のカラムへの検索条件を単一
カラムへの単純条件の論理積で表わした変更検索条件に
対し、真値件数から全条件の判定に必要な評価の回数を
少なくする条件比較順序を決定するためのものである。The comparison order determining means reduces the number of evaluations necessary to determine all conditions based on the number of true values for a changed search condition in which search conditions for multiple columns are expressed as a logical product of simple conditions for a single column. This is used to determine the condition comparison order.
データベース検索手段は、レコード格納領域から検索条
件を満たすためのものである。The database search means is for satisfying search conditions from the record storage area.
出力手段は、データベース検索手段によるデータベース
の検索結果を出力するためのものである。The output means is for outputting the search results of the database by the database search means.
(実施例)
次に、本発明Cてついて図面を参照しながら詳細に説明
する。(Example) Next, the present invention C will be described in detail with reference to the drawings.
第1図は、本発明によるデータベース検索方式を適用し
たー実*pt+の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of -act*pt+ to which the database search method according to the present invention is applied.
第1図を参照すると、本発明のデータベース検索方式を
適用した一実施例は、利用者がデータベースに格納され
ているレコードから必要なものを限定するための検索条
件101と、検索条件101を単一カラムごとの論理積
に分解して構成するための変更検索条件102と、各カ
ラムの属性、長さ等の情報を格納するための表定義情報
格納領域103と、表定義中の全カラムに対して、デー
タベースに格納されているすべてのレコードの当該カラ
ムの異なる値の件数を格納するための異値件数格納領域
104と、異値件数格納領域104に格納されている真
値件数から条件の評価の回数を少なくする検索順序を決
定するための比較順序決定手段105と、レコードを格
納するためのレコード格納領域106と、比較順序決定
手段105で決定された比較順序に従って、レコード格
納領域に格納されているレコードのなかから検索条件1
01を満足するレコードの検索を行うためのデータベー
ス検索手段107と、データベース検索手段108によ
って検索されたレコードを出力するための出力手段11
1とから構成される。ここで、変更検索条件102と、
データベース検索手段107と、出力手段108とは、
従来のデータベース検索システムでも見られる既知の技
術によって実現されるものと同一である。しかし、デー
タベース検索手段107は要求された検索順序で検索が
行えるものである。Referring to FIG. 1, in an embodiment to which the database search method of the present invention is applied, a user can use search conditions 101 to limit necessary records from records stored in a database, and search conditions 101 that can be used simply. Change search conditions 102 for disassembling and configuring into logical products for each column, table definition information storage area 103 for storing information such as attributes and lengths of each column, and all columns in the table definition. On the other hand, the condition is determined from the number of abnormal value storage area 104 for storing the number of different values in the column of all records stored in the database and the true value number stored in the number of abnormal value storage area 104. A comparison order determining means 105 for determining a search order that reduces the number of evaluations, a record storage area 106 for storing records, and storage in the record storage area according to the comparison order determined by the comparison order determining means 105. Search condition 1 from among the records
A database search means 107 for searching for records satisfying 01, and an output means 11 for outputting records searched by the database search means 108.
1. Here, the changed search conditions 102 and
The database search means 107 and the output means 108 are:
It is the same as that implemented by known techniques also found in conventional database search systems. However, the database search means 107 can perform searches in the requested search order.
第2図は、比較順序決定手段106の処理の流れを示す
フローチャートである。FIG. 2 is a flowchart showing the processing flow of the comparison order determining means 106.
第2図を参照すると、比較順序決定手段105は、1ず
最初にステップ201に従って従来の方式により1変更
検索条件102のなかの単純条件を一致条件とその他の
比較条件とに分ける。Referring to FIG. 2, the comparison order determining means 105 first divides the simple conditions in the one-change search conditions 102 into match conditions and other comparison conditions according to step 201 in a conventional manner.
次に、ステップ20!により一致条件を真値件数が多い
順に並べる。Next, step 20! The matching conditions are arranged in descending order of the number of true values.
ステップ202で得られた順序に一致条件以外の比較条
件を付けたものが目的とする順序で、比較回数を従来の
方式ようも少なくする順序である。The order obtained in step 202 with a comparison condition other than the match condition is the desired order, and is an order that reduces the number of comparisons compared to the conventional method.
(発明の効果)
以上説明したように本発明は、カラム中の真値件数を考
慮に入れて真値件数から全条件の判定に必要な評価の回
数を少なくする条件比較順序を決定し、決定された順序
により検索条件を満足するレコードを決定し、出力する
ことによう、従来の方式より短い時間で検索条件を満足
するレコードを得ることができるという効果がある。(Effects of the Invention) As explained above, the present invention takes into account the number of true values in a column and determines a condition comparison order that reduces the number of evaluations necessary for determining all conditions from the number of true values. Since the records that satisfy the search conditions are determined and output based on the order in which the search conditions are searched, records that satisfy the search conditions can be obtained in a shorter time than in the conventional method.
第1図は、本発明によるデータベース検索方式を適用し
た一実施例の構成を示すブロック図である。
第2図は、第1図の比較順序決定手段の処理の流れを示
すフローチャートである。
101・・・検索条件
102・・・変更検索条件
103・・・表定義情報格納領域
104・・・異値件数格納領域
105・・・比較順序決定手段
106・・・レコード格納領域
107・・・データベース検索手段
108・・・出力手段FIG. 1 is a block diagram showing the configuration of an embodiment to which a database search method according to the present invention is applied. FIG. 2 is a flowchart showing the processing flow of the comparison order determining means of FIG. 101...Search condition 102...Change search condition 103...Table definition information storage area 104...Number of unusual values storage area 105...Comparison order determining means 106...Record storage area 107... Database search means 108...output means
Claims (1)
それぞれのデータ属性のデータがカラムと呼ばれる領域
に格納され、全体として表形式になつているデータ構造
を持つデータベース管理システムで利用者からの検索要
求に対して検索条件を満たすレコードを出力することが
できるように構成したデータベース検索システムにおい
て、各カラムごとにすべてのレコードの該カラムの値の
異なる値の件数を格納するための異値件数格納領域と、
複数のカラムへの検索条件を単一カラムへの単純条件の
論理積で表わした変更検索条件に対し、異値件数から全
条件の判定に必要な評価の回数を少なくする条件比較順
序を決定するための比較順序決定手段と、前記決定され
た比較順序に従い、前記レコード格納領域から前記検索
条件を満たすレコードを決定するためのデータベース検
索手段と、前記データベース検索手段によるデータベー
スの検索結果を出力するための出力手段とを具備して構
成したことを特徴とするデータベース検索方式。A record in the database has multiple data attributes,
A database management system that has a data structure in which data for each data attribute is stored in areas called columns, and the overall data is in a tabular format.It is possible to output records that meet search conditions in response to search requests from users. In a database retrieval system configured to be able to perform a search, a storage area for storing the number of different values for storing the number of different values of the column of all records for each column;
Changing search conditions for multiple columns expressed by logical product of simple conditions for a single column For search conditions, determine a condition comparison order that reduces the number of evaluations required to judge all conditions based on the number of different values. a comparison order determining means for determining a comparison order, a database search means for determining a record satisfying the search condition from the record storage area according to the determined comparison order, and a database search means for outputting a database search result by the database search means. A database search method characterized by comprising: an output means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1178733A JPH0342773A (en) | 1989-07-11 | 1989-07-11 | Data base retrieving system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1178733A JPH0342773A (en) | 1989-07-11 | 1989-07-11 | Data base retrieving system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0342773A true JPH0342773A (en) | 1991-02-22 |
Family
ID=16053634
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1178733A Pending JPH0342773A (en) | 1989-07-11 | 1989-07-11 | Data base retrieving system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0342773A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07219825A (en) * | 1993-01-07 | 1995-08-18 | Internatl Business Mach Corp <Ibm> | Method for selection of coupling selectivity in enquiry optimizer and relational-database management system |
-
1989
- 1989-07-11 JP JP1178733A patent/JPH0342773A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07219825A (en) * | 1993-01-07 | 1995-08-18 | Internatl Business Mach Corp <Ibm> | Method for selection of coupling selectivity in enquiry optimizer and relational-database management system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8266147B2 (en) | Methods and systems for database organization | |
| US5924088A (en) | Index selection for an index access path | |
| EP1360616B1 (en) | Database system and query optimiser | |
| US20160196277A1 (en) | Data record compression with progressive and/or selective decompression | |
| EP0351388A2 (en) | Access path optimization using degrees of clustering | |
| JPH06243009A (en) | Method for compressing all text indexes | |
| JPH06103497B2 (en) | Record search method and database system | |
| EP3217296A1 (en) | Data query method and apparatus | |
| EP1341098A2 (en) | Getpage - Workload based Index Optimizer | |
| US7188334B1 (en) | Value-ordered primary index and row hash match scan | |
| CN117056450B (en) | Approximate query method, device, electronic equipment and computer readable storage medium | |
| US7028023B2 (en) | Linked list | |
| JPH0342773A (en) | Data base retrieving system | |
| US6260037B1 (en) | Method and computer program product for implementing skip key processing for database grouping queries involving aggregate operations by using one or more indices | |
| US20060101045A1 (en) | Methods and apparatus for interval query indexing | |
| US6694324B1 (en) | Determination of records with a specified number of largest or smallest values in a parallel database system | |
| JP2001052024A (en) | Similar feature retrieval method and apparatus, and storage medium storing similar feature retrieval program | |
| JP2001125901A (en) | Automatic question-answer system | |
| JPH11306183A (en) | Data base retrieval system | |
| JP2706021B2 (en) | High-speed search method for structured databases | |
| JP2002092008A (en) | Data division processing apparatus and method | |
| US12511271B2 (en) | Computer-implemented methods and computing systems for reorganizing data | |
| JPH0554082A (en) | Data base system | |
| JPH03127268A (en) | Data base retrieving device | |
| JPH04337867A (en) | Data base retrieval system |