JPH08278975A - Retrieval device for data base system - Google Patents

Retrieval device for data base system

Info

Publication number
JPH08278975A
JPH08278975A JP7080005A JP8000595A JPH08278975A JP H08278975 A JPH08278975 A JP H08278975A JP 7080005 A JP7080005 A JP 7080005A JP 8000595 A JP8000595 A JP 8000595A JP H08278975 A JPH08278975 A JP H08278975A
Authority
JP
Japan
Prior art keywords
search
operator
condition
processing
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
JP7080005A
Other languages
Japanese (ja)
Inventor
Yasuyuki Hoshi
靖之 星
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP7080005A priority Critical patent/JPH08278975A/en
Publication of JPH08278975A publication Critical patent/JPH08278975A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To flexibly combine plural conditions when the conditions are set and to prevent a conditional expression from being misset by performing processing in the decreasing order of process priority levels and specifying the order of retrieval differently between AND retrieval and OR retrieval. CONSTITUTION: An operator decision means 1 decides whether or not an operator of a retrieval condition is defined and a process priority means 2 checks whether or not a priority level is sets when there is a connection operator. When the priority level is set, the processing is performed according to the priority level. A kind decision means 3 decides whether the operator is OR or AND. In case of AND, the left-side condition of an operational expression is retrieved from a data base 6 and then the right-side conditional expression is retrieved according to the retrieval result. In case of OR, the left side is similarly retrieved and then the right-side conditional expression is retrieved from all the elements.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はデータベースシステムに
おける検索装置に係り、特に検索機能において複数の条
件を設定したとき、その条件の組み合せが柔軟にできる
検索装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a search device in a database system, and more particularly to a search device capable of flexibly combining a plurality of conditions when a plurality of conditions are set in a search function.

【0002】[0002]

【従来の技術】一般的なデータベースシステムで検索を
行う場合、操作者は管理項目となっている各属性項目毎
に条件を指定し、それらの条件を満足するデータがデー
タベースの中から抽出される。ここで属性項目とは、例
えばドキュメントデータベースシステムならばドキュメ
ントの分類,タイトル,作成者,登録日,請求内容の概
要を示すコメントなどである。
2. Description of the Related Art When performing a search in a general database system, an operator specifies conditions for each attribute item that is a management item, and data satisfying those conditions is extracted from the database. . Here, the attribute items include, for example, in the case of a document database system, document classifications, titles, creators, registration dates, comments indicating an outline of billing contents, and the like.

【0003】図4は属性項目をもとに、条件を複数設定
したときの検索処理の流れを示したものである。同図は
検索の条件式をA AND B OR Cの例を示した
もので、A,B,Cは各条件を示す。システムは検索条
件式が与えられると、その条件式がAND(論理積),
OR(論理和)どちらの接続演算子で結ばれているか順
次チェックする。
FIG. 4 shows a flow of search processing when a plurality of conditions are set based on attribute items. This figure shows an example of the search condition expression of A AND B OR C, where A, B, and C indicate each condition. When the system is given a search condition expression, the condition expression is AND (logical product),
OR (logical sum) It is sequentially checked which connection operator is used for connection.

【0004】論理計画ではANDがORより優先処理さ
れる。システムも例外でなく、ステップS1においてA
AND B OR Cの条件式が与えられると、S2
ではAND演算子で結合されているA AND Bが最
初に実施される。次いでS3において検索被対象からC
の条件に合致するものが選ばれ、S4において先程の検
索1,検索2のORをとり、検索結果としてユーザに何
等かの形で表示(S5)する。
In the logical plan, AND is given priority over OR. The system is no exception, and A in step S1
Given the AND B OR C conditional expression, S2
Then, A AND B connected by the AND operator is executed first. Next, in S3, the search target is C
Those which meet the condition of are selected, and the OR of the previous search 1 and search 2 is taken in S4 and displayed as a search result to the user in some form (S5).

【0005】[0005]

【発明が解決しようとする課題】図4で示す検索方法の
最大の問題はAND処理を優先的に行ってすることであ
る。
The biggest problem of the retrieval method shown in FIG. 4 is that the AND process is preferentially performed.

【0006】例えばユーザが次に示す条件式を設定した
とする。
For example, assume that the user sets the following conditional expression.

【0007】条件式:A AND B OR C システムは前述した通り、A AND Bを優先的に処
理する。しかしユーザが意図したことは 条件式:A AND(B OR C) であったとすると結果は全く異なってしまう。
Conditional Expression: A AND B OR C The system preferentially processes A AND B as described above. However, if the user intended the conditional expression: A AND (B OR C), the result would be completely different.

【0008】現状ではこの条件式を実現するためには、 条件式:A AND B OR A AND C と2式に分割して行う必要がある。このような簡単な例
では全然問題ないが、条件式が複雑になければなる程こ
のように式を分割して行くのは容易でない。また、この
ときに起因して条件式設定ミスを起してしまい結局のと
ころ役に立たない検索結果をまねくおそれがある。
At present, in order to realize this conditional expression, it is necessary to divide the conditional expression into two expressions: A AND B OR A AND C. Although there is no problem in such a simple example, it is not easy to divide the expression in this way as the conditional expression becomes more complicated. Further, at this time, a conditional expression setting error may occur, which may eventually lead to useless search results.

【0009】[0009]

【課題を解決するための手段】本発明はデータベースよ
りデータを検索するものにおいて、検索条件の接続演算
子が定義されているか否かを判断し、定義されていない
ときには単一条件検索を実行する演算子判定手段と、こ
の判定手段で演算子有時に処理優先レベルの設定有無を
判断し、設定有時に優先レベルの高い順に処理する優先
処理手段と、前記演算子の論理積和の種別判断を実行す
る種別判別手段と、この判別手段で論理和との判断時に
演算式左辺条件をデータベースより検索し、左辺条件検
索済時には演算式右辺条件をデータベースより検索する
論理和検索手段と、前記種別判別手段で論理積と判断時
に演算式左辺条件をデータベースより検索し、左辺検索
済時には右辺条件を前回検索結果より検索実行する論理
積検索手段と、全演算条件が終了したか否かを判断し、
未終了時には処理優先手段より再度処理実行し、終了時
には検索結果を表示する実行判断手段とを備えたもので
ある。
According to the present invention, in a case of searching data from a database, it is judged whether or not a connection operator of a search condition is defined, and when it is not defined, a single condition search is executed. The operator determination means determines whether or not the processing priority level is set when the operator is present, and the priority processing means which processes the higher priority level when the operator is present, and the type determination of the logical product sum of the operators. A type discriminating means to be executed, a logical sum retrieving means for retrieving the left side condition of the arithmetic expression from the database when it is judged to be a logical sum by the discriminating means, and a right side condition of the arithmetic expression for retrieving the left side condition from the database; The logical product search means searches the database for the left-side condition of the arithmetic expression when it is judged as the logical product, and when the left-side search has been completed, the right-side condition is searched from the previous search result Calculation conditions, it is determined whether or not it is completed,
When the processing is not completed, the processing priority means executes the processing again, and when the processing is completed, the execution determination means for displaying the search result is provided.

【0010】[0010]

【作用】演算子判定手段において、先ず接続演算子が条
件式に定義されているかをチェックし、定義されていな
いときには単一条件式による検索とみなしてそれを実行
する。
In the operator judging means, it is first checked whether or not the connection operator is defined in the conditional expression, and if it is not defined, it is regarded as a search by a single conditional expression and executed.

【0011】次に、処理優先レベルが設定してあるか否
かを見る。未定義の場合には従来のAND演算優先処理
を行ない、定義されている時にはその優先レベルの高い
順に処理をし、何の演算子が定義されているかをチェッ
クする。ANDのときには左辺の条件式を実行し、その
後に検索結果から右辺の条件式に該当するものを検索す
る。ORのときは、同様に左辺を検索し、その後は全体
要素から右辺の条件式に該当するものの検索を行う。
Next, it is checked whether or not the processing priority level is set. If it is not defined, the conventional AND operation priority processing is performed, and if it is defined, it is processed in the order of higher priority level, and it is checked what operator is defined. In the case of AND, the conditional expression on the left side is executed, and then the one corresponding to the conditional expression on the right side is searched from the search result. In the case of OR, the left side is searched in the same manner, and then the whole elements are searched for those that correspond to the conditional expression on the right side.

【0012】すべての検索終了時にその結果をユーザに
提示する。
The results are presented to the user at the end of all searches.

【0013】[0013]

【実施例】図1は本発明の機能構成図の一実施例を示し
たものである。同図において1は演算子判別手段で、検
索条件の演算子が定義されているか否かを判別する。2
は処理優先手段で、接続演算子があったとき、優先レベ
ルが設定されているかをチェックし、設定されていた場
合にはその優先レベルの高い順に処理する。3は演算子
がORかANDかの種別をする種別判別手段、4は演算
子がORのときにOR条件の検索をする論理和検索手
段、5は論理積検索手段で、AND条件時の検索をす
る。6はデータベース、7は全条件式を検索したかをチ
ェックする実行判断手段、8は表示部である。
FIG. 1 shows an embodiment of the functional block diagram of the present invention. In the figure, 1 is an operator discriminating means, which discriminates whether or not an operator of the search condition is defined. Two
Is a processing priority means, and when there is a connection operator, it is checked whether or not the priority level is set, and if it is set, the processing is performed in the order of higher priority level. 3 is a type discriminating means for discriminating whether the operator is OR or AND, 4 is a logical sum retrieving means for retrieving the OR condition when the operator is OR, and 5 is a logical product retrieving means for the retrieval under the AND condition. do. Reference numeral 6 is a database, 7 is execution determining means for checking whether all conditional expressions have been searched, and 8 is a display unit.

【0014】以下図2,3を参照してその作用を説明す
る。図2は条件式の作成のためのフローを示したもので
処理優先順位の概念をもたせている。条件式を設定する
場合には、その条件が3つ(接続演算子が2つ)以上の
とき、ステップS16で処理優先順序が設定される。そ
れ以外のときには特に優先順位を設定する必要が発生し
ないため設定は特に行なわない。
The operation will be described below with reference to FIGS. FIG. 2 shows a flow for creating a conditional expression, which has the concept of processing priority. When setting a conditional expression, if the number of conditions is three (two connection operators) or more, the processing priority order is set in step S16. In other cases, there is no need to set the priority order, so no setting is made.

【0015】図3は検索実行フローを示したものであ
る。検索は、最初に接続演算子が条件式に定義されてい
るか否かをチェックする(S20)。定義されていなけ
れば、S21において単一条件式による検索とみなされ
て単一条件検索処理が実行される。接続演算子ありの場
合には、S22において処理優先レベル設定ありか否か
がチェックされる。これは条件式を設定する際に定義
(図2のS16にて)するものであるが、未定義の場合
にはS23で従来の検索処理と同様AND演算処理を行
う。S22において優先処理が定義されているときは、
S24において優先レベルの高い順に処理する。
FIG. 3 shows a search execution flow. The search first checks whether or not the connection operator is defined in the conditional expression (S20). If not defined, it is regarded as a search by a single conditional expression in S21, and the single conditional search processing is executed. If there is a connection operator, it is checked in S22 whether there is a processing priority level setting. This is defined (at S16 in FIG. 2) when setting the conditional expression, but if not defined, at S23, an AND operation process is performed as in the conventional search process. When priority processing is defined in S22,
In step S24, the processes are processed in descending order of priority level.

【0016】次に、S25において、演算子はANDか
またはORの定義であるかをチェックする。これは、A
ND演算子はその左右辺にある条件式が真でなければな
らず、また、OR演算子ではそのどちらかが真であれば
よいという性質の差からきている。ここでAND演算子
と判断されたときには、S26,S27において演算式
左辺条件をデータベースより検索する。また、左辺検索
済と判断(S26)されたときには、S28で条件式右
辺条件を前回検索結果より検索実行する。
Next, in S25, it is checked whether the operator is the definition of AND or OR. This is A
This is because the conditional expressions on the left and right sides of the ND operator must be true, and the OR operator only needs to be true for either of them. If it is determined to be the AND operator, the left side condition of the arithmetic expression is searched from the database in S26 and S27. When it is determined that the left side search has been completed (S26), the right side condition of the conditional expression is searched and executed from the previous search result in S28.

【0017】一方、演算子がORの場合には、演算式左
辺条件をデータベースより検索し、左辺検索済の場合に
は演算式右辺条件をデータベースより検索する(S29
〜S31)。S32では全条件式が実行済か否かを判断
し、まだ、終了してない場合にはS24より再度実行
し、実行済の場合にはS33で検索結果を表示部におい
て表示する。
On the other hand, when the operator is OR, the left side condition of the arithmetic expression is searched from the database, and when the left side has been searched, the right side condition of the arithmetic expression is searched from the database (S29).
~ S31). In S32, it is determined whether or not all the conditional expressions have been executed. If not completed, the processing is executed again from S24. If they have been executed, the search result is displayed on the display unit in S33.

【0018】[0018]

【発明の効果】以上本発明によれば次のような効果が生
ずる。
As described above, according to the present invention, the following effects occur.

【0019】(1)従来方法による検索条件設定では分
割設定しなければならない設定条件を、本発明では一式
で行うことができユーザのイメージ通りの条件式で設定
できる。したがって条件設定ミスが防止できて検索作業
効率が向上する。
(1) In the present invention, the setting conditions that must be set separately in the search condition setting by the conventional method can be set by one set and can be set by the conditional formula as the user imagines. Therefore, a condition setting error can be prevented and the search work efficiency is improved.

【0020】(2)AND演算子優先処理を完全に削除
したものではなく、処理優先順位の機能との選択になっ
ているので、その場に応じた検索機能を選択,実行する
ことができる。
(2) Since the AND operator priority process is not completely deleted but is selected as the process priority function, the search function can be selected and executed according to the situation.

【0021】(3)処理レベルの設定機能を導入してい
るため、AND優先処理,OR優先処理,またはその場
合処理と多彩な検索が実現できる。
(3) Since the processing level setting function is introduced, AND priority processing, OR priority processing, or processing in that case, and various searches can be realized.

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

【図1】本発明の一実施例を示す機能構成図。FIG. 1 is a functional configuration diagram showing an embodiment of the present invention.

【図2】本発明に用いられる条件式作成フロー。FIG. 2 is a flow chart for creating a conditional expression used in the present invention.

【図3】本発明の検索実行フロー。FIG. 3 is a search execution flow of the present invention.

【図4】従来の検索処理フロー。FIG. 4 is a conventional search processing flow.

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

1…演算子判定手段 2…処理優先手段 3…演算子の種別判別手段 4…論理和検索手段 5…論理積検索手段 6…データベース 7…実行判別手段 8…表示部 DESCRIPTION OF SYMBOLS 1 ... Operator determination means 2 ... Processing priority means 3 ... Operator type determination means 4 ... Logical OR search means 5 ... Logical product search means 6 ... Database 7 ... Execution determination means 8 ... Display unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 データベース中に格納されたデータを検
索指令である論理演算を実行しながら所望データを検索
する検索装置において、 検索条件の接続演算子が定義されているか否かを判断
し、定義されていないときには単一条件検索を実行する
演算子判定手段と、この判定手段で演算子有時に処理優
先レベルの設定有無を判断し、設定有時に優先レベルの
高い順に処理する処理優先手段と、前記演算子の論理積
和の種別判断を実行する種別判別手段と、この判別手段
で論理和との判断時に演算式左辺条件を前記データベー
スより検索し、左辺条件検索済時には演算式右辺条件を
データベースより検索する論理和検索手段と、前記種別
判別手段で論理積と判断時に演算式左辺条件をデータベ
ースより検索し、左辺条件検索済時には右辺条件を前回
検索結果より検索実行する論理積検索手段と、全演算条
件が終了したか否かを判断し、未終了時には前記処理優
先手段より処理実行し、終了時には検索結果を表示する
実行判断手段とを備えたことを特徴とするデータベース
システムにおける検索装置。
1. A search device for searching for desired data while executing a logical operation, which is a search command, for data stored in a database, judges whether or not a connection operator of a search condition is defined, and defines it. If not, an operator determining means for executing a single condition search, a processing priority means for determining whether or not a processing priority level is set when the operator is present, and processing is performed in descending order of priority level when the operator is set, A type discriminating means for executing the type judgment of the logical product sum of the operators, and the arithmetic expression left side condition is searched from the database when the logical sum is judged by the discriminating means, and when the left side condition is retrieved, the arithmetic expression right side condition is stored in the database. And the type discriminating means searches the database for the left side condition of the arithmetic expression, and when the left side condition has been searched, the right side condition is searched. An AND search means for performing a search from the result of the times search, and an execution determining means for determining whether or not all the operation conditions are completed, executing the processing by the processing priority means when not completed, and displaying the search result at the end. A search device in a database system characterized by being provided.
JP7080005A 1995-04-05 1995-04-05 Retrieval device for data base system Pending JPH08278975A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7080005A JPH08278975A (en) 1995-04-05 1995-04-05 Retrieval device for data base system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7080005A JPH08278975A (en) 1995-04-05 1995-04-05 Retrieval device for data base system

Publications (1)

Publication Number Publication Date
JPH08278975A true JPH08278975A (en) 1996-10-22

Family

ID=13706221

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7080005A Pending JPH08278975A (en) 1995-04-05 1995-04-05 Retrieval device for data base system

Country Status (1)

Country Link
JP (1) JPH08278975A (en)

Similar Documents

Publication Publication Date Title
JPH09218881A (en) Additional retrieval word candidate presenting method, document retrieving method and devices therefor
JPH08278975A (en) Retrieval device for data base system
JPS62241026A (en) Character string retrieving system
JPH11213004A (en) Data processor, its method and storage medium storing data processing program
JPH0773187A (en) Retrieving system
JP2939841B2 (en) Database search device
JPH05233716A (en) Automatic attribute judgement system
JP2005190212A (en) Database system, data processing method and program
JPH07219989A (en) Retrieving device for similar design case
JPH033074A (en) Dispersed type data base system
JP2842413B2 (en) Database search method and apparatus
JPH04275673A (en) Method and device for judging possibility to provide information at information providing system
JP3202997B2 (en) Interactive programming system
JPH035886A (en) Relational data base computing system
JPH08221437A (en) Similar design case retrieving device
JPH0981418A (en) Program error analysis supporting system
JPH04245335A (en) Knowledge expressing system
JPH08328879A (en) Task management system
JPS6226537A (en) Composite retrieving method for source data
JPH0216643A (en) System for controlling output of debugging information
JPH04252341A (en) Control system for inquiring data base
JPH0612458A (en) Condition input item display method for electronic filing device
JPH03147070A (en) Supporting device for design procedure
JPH06274332A (en) Registration/retrieval method for program parts
JPH0926967A (en) Data base retrieval system