JP3016799B2 - Database query processing unit - Google Patents

Database query processing unit

Info

Publication number
JP3016799B2
JP3016799B2 JP1289919A JP28991989A JP3016799B2 JP 3016799 B2 JP3016799 B2 JP 3016799B2 JP 1289919 A JP1289919 A JP 1289919A JP 28991989 A JP28991989 A JP 28991989A JP 3016799 B2 JP3016799 B2 JP 3016799B2
Authority
JP
Japan
Prior art keywords
query
database
command
executable
inquiry
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.)
Expired - Fee Related
Application number
JP1289919A
Other languages
Japanese (ja)
Other versions
JPH03152640A (en
Inventor
智 清水
敏典 三上
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1289919A priority Critical patent/JP3016799B2/en
Priority to KR1019900018036A priority patent/KR940001879B1/en
Publication of JPH03152640A publication Critical patent/JPH03152640A/en
Application granted granted Critical
Publication of JP3016799B2 publication Critical patent/JP3016799B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、データベースへの問い合わせを受付け、そ
の問い合わせの解釈,実行,結果の応答を一連の処理と
して実行するデータベース問い合わせ処理装置に関す
る。
Description: TECHNICAL FIELD The present invention relates to a database query processing device that receives a query to a database, and interprets, executes, and responds to the query as a series of processes.

(従来の技術) 情報処理装置において、オペレータが端末装置から問
い合わせコマンドを入力することにより、又はあるプロ
グラムが磁気ディスク上に格納されている問い合わせコ
マンドを入力することにより、あるデータベース中の特
定データを、直接検索し読出したり更新したりする場合
がある。
(Prior Art) In an information processing apparatus, when an operator inputs an inquiry command from a terminal device, or when a certain program inputs an inquiry command stored on a magnetic disk, specific data in a certain database is In some cases, a direct search is performed and read or updated.

このように、データベース問い合わせコマンドを入力
し、直接問い合わせを実行し、問い合わせの結果を直ち
に応答する装置を、「データベース問い合わせ処理装
置」と称する。
A device that inputs a database query command, directly executes a query, and immediately responds to the result of the query is referred to as a “database query processing device”.

第2図は従来のデータベース問い合わせ処理装置の一
構成例を示すブロック図である。
FIG. 2 is a block diagram showing a configuration example of a conventional database query processing device.

同図において、データベース問い合わせ処理装置120
は、端末装置などの入力装置110からデータベース問い
合わせコマンドが入力された場合、そのデータベース問
い合わせコマンドを受付け、データベース160をアクセ
スする装置である。このデータベース問い合わせ処理装
置120は、問い合わせ解釈手段131とオブジェクト生成手
段132とからなる問い合わせ解析手段130と、オブジェク
ト変換手段140と、データベースアクセス手段150とによ
り構成されている。
In the figure, a database query processing device 120
Is a device that, when a database inquiry command is input from an input device 110 such as a terminal device, receives the database inquiry command and accesses the database 160. The database query processing device 120 is composed of a query analysis unit 130 including a query interpretation unit 131 and an object generation unit 132, an object conversion unit 140, and a database access unit 150.

ここで、問い合わせ解釈手段131は、入力装置110から
のデータベース問い合わせコマンドに対して問い合わせ
を解釈し、シンタックスチェックを行なう。オブジェク
ト生成手段132は、問い合わせ解釈手段131にて解釈した
問い合わせからオブジェクトを生成する。オブジェクト
生成手段140は、データベース定義情報やデータ構造情
報等を参照しつつ、オブジェクト生成手段132にて生成
したオブジェクトを、実行可能なオブジェクトに変換す
る。データアクセス手段150は、オブジェクト変換手段1
40からの実行可能なオブジェクトに従って、データベー
ス160をアクセスする。
Here, the query interpreting means 131 interprets the query in response to the database query command from the input device 110 and performs a syntax check. The object generator 132 generates an object from the query interpreted by the query interpreter 131. The object generation unit 140 converts the object generated by the object generation unit 132 into an executable object while referring to database definition information, data structure information, and the like. The data access means 150 is the object conversion means 1
Access the database 160 according to the executable objects from 40.

入力されるデータベース問い合わせコマンドと、それ
から生成されるオブジェクトの構成を、リレーショナル
データベースを例にとって説明する。ここで、リレーシ
ョナルデータベースとは、複数の表形式のデータを各種
のキーを用いて検索・更新することができるデータベー
スであり、表名や列名によってアクセス対象となるデー
タ集合を識別することができるものである。このリレー
ショナルデータベースの一例として、第3図に従業員管
理表という表データを表す。この表は、従業員の氏名,
従業員番号,年令,所属という列と、それぞれの列に対
応した各従業員のデータから構成されている。
The input database query command and the configuration of objects generated from the command will be described using a relational database as an example. Here, the relational database is a database that can search and update a plurality of tabular data using various keys, and can identify a data set to be accessed by a table name or a column name. Things. As an example of this relational database, FIG. 3 shows table data called an employee management table. This table shows employee names,
It is composed of columns of employee number, age, and affiliation, and data of each employee corresponding to each column.

このような形式のリレーショナルデータベースを検索
する場合、例えば次のような問い合わせコマンドを入力
する。
When searching a relational database of such a format, for example, the following inquiry command is input.

SELECT 氏名 FROM 従業員管理表 WHERE 年令<30 以上の問い合わせコマンドをデータベース問い合わせ
処理装置120へ入力し、このデータベース問い合わせ処
理装置120にて問い合わせコマンドを実行することによ
って、年令が30歳未満の従業員の氏名データが取出され
る。
SELECT Name FROM Employee Management Table WHERE By inputting a query command with an age of <30 or more to the database query processing device 120 and executing the query command in the database query processing device 120, the employee whose age is less than 30 years old can be obtained. The member's name data is extracted.

次に第4図にリレーショナルデータベースアクセス用
のオブジェクトの構成を示す。
Next, FIG. 4 shows a configuration of an object for relational database access.

オブジェクト70は、それが実行可能か否かを識別する
ためのオブジェクト種別71と、検索・更新の対象となる
アクセス対象列情報72と、問い合わせ中で参照される表
及び列を識別するための表識別情報73と、列識別情報74
と、問い合わせ条件75と、データ変換を実行するために
参照されるデータ変換情報76と、表のアクセス順序を決
定するために用いられるアクセス経路情報77とから構成
される。
The object 70 includes an object type 71 for identifying whether or not it is executable, access target column information 72 to be searched / updated, and a table for identifying tables and columns referred to in the inquiry. Identification information 73 and column identification information 74
, An inquiry condition 75, data conversion information 76 referred to for executing data conversion, and access path information 77 used for determining an access order of the table.

(発明が解決しようとする課題) 従来のデータベース問い合わせ処理装置120では、以
前に実行した問い合わせに関係なく、問い合わせを受付
ける度に、問い合わせ解析手段130により問い合わせを
解析し、オブジェクト変換手段140によりオブジェクト
変換処理を実行し、データベースをアクセスしている。
(Problem to be Solved by the Invention) In the conventional database query processing device 120, every time a query is received, the query is analyzed by the query analysis unit 130, and the object is converted by the object conversion unit 140, regardless of the query executed previously. Executing processing and accessing the database.

しかしながら、このようなデータベース問い合わせ処
理では、実際には直前の問い合わせの一部を変更して次
の問い合わせを実行する場合が多い。
However, in such a database inquiry process, in many cases, a part of the immediately preceding inquiry is actually changed to execute the next inquiry.

例えば、先に説明した従業員管理表に対して、以下に
示すようなデータベース問い合わせコマンドを順次実行
する場合を考える。
For example, consider a case where the following database inquiry commands are sequentially executed on the employee management table described above.

データベース問い合わせコマンド1 SELECT COUNT(*) FROM 従業員管理表 WHERE 年令<30 データベース問い合わせコマンド2 SELECT 氏名 FROM 従業員管理表 WHERE 年令<30 データベース問い合わせコマンド1は、年令が30歳未
満の従業員が何人いるかを知るための問い合わせであ
り、データベース問い合わせコマンド2は、年令が30歳
未満の従業員の氏名を知るための問い合わせである。オ
ペレータが、データベース問い合わせコマンド1を用い
ていくつのデータが検索されてくるかを調べ、それに対
応したデータの表示形態や出力先を決定した後でデータ
ベース問い合わせコマンド2を実行し、実際のデータを
取出すとする。この時、データベース問い合わせコマン
ド2では、“FROM 表名、WHERE 年令<30"の部分は、
データベース問い合わせコマンド1のそれと全く同一の
内容であるにも関わらず、問い合わせ解析手段130によ
る問い合わせ解析処理、及びオブジェクト変換手段140
によるオブジェクト変換処理が実行される。
Database query command 1 SELECT COUNT (*) FROM Employee management table WHERE Age <30 Database query command 2 SELECT Name FROM Employee management table WHERE Age <30 Database query command 1 is for employees under 30 years of age The database inquiry command 2 is an inquiry for knowing the names of employees whose ages are less than 30 years. The operator checks the number of data to be retrieved using the database inquiry command 1, determines the display mode and output destination of the corresponding data, executes the database inquiry command 2, and extracts actual data. And At this time, in the database query command 2, “FROM table name, WHERE age <30”
Although the contents are exactly the same as those of the database query command 1, the query analysis processing by the query analysis means 130 and the object conversion means 140
Performs the object conversion process.

このように類似したデータベース問い合わせの処理に
おいて、全く同一内容の部分でも最初から繰返して処理
が行なわれるので、その問い合わせ処理に時間がかか
り、高度な応答性が要求されるデータベース問い合わせ
処理の応答性能を低下させている。
In such a similar database query processing, even the same contents are repeatedly processed from the beginning, so that the query processing takes a long time and the response performance of the database query processing which requires a high responsiveness is improved. Is lowering.

そこで、本発明の目的は、高速なデータベース問い合
わせ処理能力を備えたデータベース問い合わせ処理装置
を提供することにある。
Therefore, an object of the present invention is to provide a database query processing device having a high-speed database query processing capability.

(課題を解決するための手段) 本発明は、入力装置からデータベース問い合わせコマ
ンドを入力し、その問い合わせコマンドを解析し実行可
能オブジェクトを生成し、その実行可能オブジェクトを
用いてデータベースをアクセスするデータベース問い合
わせ処理装置において、前記データベース問い合わせコ
マンドを入力し、これを以前に実行された問い合わせコ
マンドと比較する問い合わせ比較手段と、この問い合わ
せ比較手段による比較の結果、前記データベース問い合
わせコマンド全体が前記以前に実行された問い合わせコ
マンドと同一の場合には、既に生成済の実行可能オブジ
ェクトを後記蓄積手段より選択し、前記データベース問
い合わせコマンドと前記以前に実行された問い合わせコ
マンドの一部が同一の場合には、その同一の部分に対応
するオブジェクトを後記蓄積手段より選択するオブジェ
クト選択手段と、前記問い合わせ比較手段による比較の
結果、一致しなかった前記データベース問い合わせコマ
ンドの全体又は一部の問い合わせを解釈し文法上の誤り
などをチェックする問い合わせ解釈手段と、この問い合
わせ解釈手段にてチェック済の問い合わせからオブジェ
クトを生成し、あるいは該このオブジェクトに前記オブ
ジェクト選択手段によって選択されたオブジェクトを合
成して新たなオブジェクトを生成するオブジェクト生成
手段と、このオブジェクト生成手段にて生成したオブジ
ェクトを実行可能なオブジェクトに変換するオブジェク
ト変換手段と、データベース問い合わせコマンドと前記
オブジェクト生成手段にて生成したオブジェクト及び前
記オブジェクト変換手段にて生成した実行可能なオブジ
ェクトを関連付けて記憶する蓄積手段と、前記オブジェ
クト選択手段にて選択された実行可能オブジェクト、あ
るいは前記オブジェクト変換手段にて生成された実行可
能オブジェクトを用いてデータベースをアクセスするデ
ータベースアクセス手段とを備えてなるものである。
(Means for Solving the Problems) The present invention provides a database query process in which a database query command is input from an input device, the query command is analyzed to generate an executable object, and the database is accessed using the executable object. In the apparatus, a query comparing means for inputting the database query command and comparing it with a previously executed query command, and as a result of the comparison by the query comparing means, the entire database query command is the previously executed query. If it is the same as the command, the already generated executable object is selected from the storage means described later. If the database query command and a part of the previously executed query command are the same, the same As a result of the comparison by the object comparison means and the query comparison means, which selects the object corresponding to the part from the storage means described later, all or part of the database query command that did not match is interpreted and grammatical errors and the like are interpreted. Query interpreting means for checking, and object generating means for generating an object from the query checked by the query interpreting means, or combining the object with the object selected by the object selecting means to generate a new object Object conversion means for converting an object generated by the object generation means into an executable object; a database query command; an object generated by the object generation means; A storage unit that associates and stores the executable object generated by the object conversion unit, and a database using the executable object selected by the object selection unit or the executable object generated by the object conversion unit. And a database access means for accessing.

(作用) 入力装置からデータベース問い合わせコマンドが問い
合わせ比較手段に入力される。問い合わせ比較手段にお
いて、以前に実行されたデータベース問い合わせコマン
ドと今回実行すべきデータベース問い合わせコマンドと
が比較される。そして、その比較の結果、類似あるいは
同一の問い合わせの場合(類似の問い合わせの場合と
は、データベース問い合わせコマンドの構成部分(問い
合わせ部分)が一致する場合をいう。)には、本発明で
は既に生成されたオブジェクトや実行可能オブジェクト
を利用でき、これらの既に生成されたオブジェクトや実
行可能オブジェクトに対しては、問い合わせ解釈手段に
よる問い合わせ解釈及びオブジェクト生成手段によるオ
ブジェクト生成処理を省略することができる。特に問い
合わせ比較手段による比較の結果、前記同一の問い合わ
せの場合には、オブジェクト選択手段において蓄積手段
より実行可能オブジェクトを取出すことができるので、
問い合わせ解釈手段,オブジェクト生成手段,オブジェ
クト変換手段による処理を省略することができる。そし
て、データベースアクセス手段にて必要とする実行可能
なオブジェクトを生成する(構成する)に当たり、以前
に生成されたオブジェクト(実行可能なオブジェクト)
を利用することができるので、問い合わせを受付けてか
らデータベースに対する問い合わせを実行するまでの処
理の簡略化を図ることができる。よって高速なデータベ
ース問い合わせ処理ができ、もってデータベース問い合
わせ処理において高度な処理応答性能を実現できる。
(Operation) A database inquiry command is input to the inquiry comparison means from the input device. In the query comparison means, the previously executed database query command is compared with the database query command to be executed this time. As a result of the comparison, in the case of a similar or identical query (the case of a similar query refers to the case where the constituent parts (query parts) of the database query command match), the present invention has already generated the query. An object or an executable object can be used, and the query interpretation by the query interpretation unit and the object generation processing by the object generation unit can be omitted for these already generated objects and executable objects. In particular, as a result of the comparison by the inquiry comparison means, in the case of the same inquiry, the executable object can be extracted from the storage means in the object selection means,
The processing by the query interpreter, the object generator, and the object converter can be omitted. When generating (composing) an executable object required by the database access unit, an object (executable object) generated before is generated.
Can be used, so that the processing from receiving the inquiry to executing the inquiry to the database can be simplified. Therefore, high-speed database query processing can be performed, and thereby high processing response performance can be realized in database query processing.

(実施例) 次に本発明の実施例について図面を用いて説明する。(Example) Next, an example of the present invention will be described with reference to the drawings.

第1図は本発明によるデータベース問い合わせ処理装
置の一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a database query processing device according to the present invention.

同図において、データベース問い合わせ処理装置20
は、以前に実行された問い合わせを考慮したオブジェク
トを生成する機能を有する問い合わせ解析手段30と、こ
の問い合わせ解析手段30にて生成したオブジェクトを実
行可能なオブジェクトに変換する機能を有するオブジェ
クト変換手段40と、入力されたデータベース問い合わせ
コマンド11と問い合わせ解析手段30で生成されたオブジ
ェクトとオブジェクト変換手段40で生成された実行可能
オブジェクトとを関連付けて管理する蓄積手段70と、実
行可能オブジェクトを用いてデータベース60のアクセス
を実行する機能を有するデータベースアクセス手段50と
から構成されている。
In the figure, a database query processing device 20
A query analysis means 30 having a function of generating an object in consideration of a previously executed query, and an object conversion means 40 having a function of converting the object generated by the query analysis means 30 into an executable object. A storage unit 70 that manages the input database query command 11 and the object generated by the query analysis unit 30 in association with the executable object generated by the object conversion unit 40; and a storage unit 70 that manages the database 60 using the executable object. And a database access means 50 having a function of executing access.

ここに、問い合わせ解析手段30は、以前に実行された
データベース問い合わせコマンドと今回のデータベース
問い合わせコマンドとを比較する問い合わせ比較手段31
と、この問い合わせ比較手段31にてデータベース問い合
わせの比較をした結果を基に既に生成されているオブジ
ェクトを選択するオブジェクト選択手段32と、問い合わ
せを解釈しシンタックスチェックを行なう問い合わせ解
釈手段33と、この問い合わせ解釈手段33にて解釈した問
い合わせからオブジェクトを生成するオブジェクト生成
手段34とから構成されている。
Here, the query analysis means 30 is a query comparison means 31 for comparing the previously executed database query command with the current database query command.
An object selecting unit 32 for selecting an object that has already been generated based on the result of the comparison of the database query by the query comparing unit 31; a query interpreting unit 33 for interpreting the query and performing a syntax check; It comprises an object generating means 34 for generating an object from the query interpreted by the query interpreting means 33.

問い合わせ比較手段31は、入力装置10より受付けたデ
ータベース問い合わせコマンド11を、蓄積手段70の問い
合わせ蓄積手段71より取出した、以前に実行されたデー
タベース問い合わせコマンドと、第4図に示したオブジ
ェクトに対応して比較する。この場合、問い合わせ比較
手段31は、上記比較を、第4図に示したオブジェクトを
構成する該当部分毎に行なう。例えば下記のコマンド例
では、第4図のオブジェクトに対応して例えば何をアク
セスするか(下記のコマンド例のSELECT 氏名)を示す
「アクセス対象列情報部」、どの表に対してアクセスす
るのか(FROM 従業員管理表)を示す「表識別情報
部」、どのような条件でアクセスするか(WHERE 年令
<30)を示す「問い合わせ条件部」に分けて比較する。
The query comparison means 31 corresponds to the previously executed database query command extracted from the query storage means 71 of the storage means 70 and the database query command 11 received from the input device 10 and the object shown in FIG. To compare. In this case, the inquiry comparison means 31 performs the above-described comparison for each corresponding part constituting the object shown in FIG. For example, in the following command example, corresponding to the object in FIG. 4, for example, "access column information section" indicating what to access (SELECT name in the following command example), and which table to access ( FROM Employee management table), and the “Query condition section”, which indicates under what conditions (WHERE age <30) the access condition section.

SELECT 氏名 …アクセス対象列情報部 FROM 従業員管理表…表識別情報部 WHERE 年令<30 …問い合わせ条件部 オブジェクト選択手段32は、問い合わせ比較手段31に
よる比較の結果、データベース問い合わせコマンド全体
が以前に実行された問い合わせコマンドと同一の場合に
は、既に生成済の実行可能オブジェクトを蓄積手段70の
実行可能オブジェクト蓄積手段73より選択し、これをデ
ータベースアクセス手段60に供給し、また、データベー
ス問い合わせコマンドと以前に実行された問い合わせコ
マンドの一部が同一の場合にはその同一の部分に対応す
るオブジェクトを蓄積手段70のオブジェクト蓄積手段72
より選択し、オブジェクト生成手段34に供給するもので
ある。
SELECT Name… Accessed column information section FROM Employee management table… Table identification information section WHERE Age <30… Query condition section The object selection means 32 is the result of the comparison by the query comparison means 31, and the entire database query command was previously executed. If it is the same as the query command, the executable object that has already been generated is selected from the executable object storage unit 73 of the storage unit 70, and this is supplied to the database access unit 60. If a part of the query command executed in the storage unit 70 is the same, the object corresponding to the same
This is to be selected and supplied to the object generating means 34.

また、問い合わせ解釈手段33は、問い合わせ比較手段
31にて問い合わせ比較の結果、等しくなかった問い合わ
せ全体あるいは問い合わせの一部に関するシンタックス
チェックを実行する。
The query interpreting means 33 is a query comparing means.
At 31, a syntax check is performed on all or part of the queries that are not equal as a result of the query comparison.

オブジェクト生成手段34は、前記オブジェクト選択手
段32にてオブジェクト蓄積手段72に蓄積された、以前の
問い合わせから選択されたオブジェクトと新たに生成さ
れたオブジェクトを結合し、今回の問い合わせに対応す
るオブジェクトを生成する。
The object generating means 34 combines the object selected from the previous inquiry and the newly generated object stored in the object storing means 72 by the object selecting means 32 to generate an object corresponding to the current inquiry. I do.

また、蓄積手段70は、問い合わせ蓄積手段71とオブジ
ェクト蓄積手段72と実行可能オブジェクト蓄積手段73と
から構成され、オブジェクト蓄積手段72に蓄積されたオ
ブジェクトや実行可能オブジェクト蓄積手段73に蓄積さ
れた実行可能オブジェクトは前記問い合わせ蓄積手段71
に蓄積された対応する問い合わせと関連付けて記憶され
ている。ここに、問い合わせ蓄積手段71には、問い合わ
せ解釈手段33において、シンタックスチェック済の問い
合わせが記憶され、以降の問い合わせにおいて問い合わ
せ比較手段31で利用可能な状態にする。また、オブジェ
クト蓄積手段72には、オブジェクト生成手段34にて生成
されたオブジェクトが対応する問い合わせと関連付けて
記憶され、オブジェクト選択手段32での利用を可能にす
る。また、実行可能オブジェクト蓄積手段73には、実行
可能オブジェクト生成手段41で生成された実行可能オブ
ジェクトが対応する問い合わせと関連付けて記憶され、
オブジェクト選択手段32での利用を可能にする。
The storage unit 70 includes an inquiry storage unit 71, an object storage unit 72, and an executable object storage unit 73, and stores the objects stored in the object storage unit 72 and the executable objects stored in the executable object storage unit 73. The object is the inquiry storage means 71
Is stored in association with the corresponding inquiry stored in the. Here, the query storage means 71 stores the syntax-checked query in the query interpretation means 33, and makes the query comparison means 31 usable in subsequent queries. In addition, the object generated by the object generating means 34 is stored in the object storage means 72 in association with the corresponding inquiry, and can be used by the object selecting means 32. The executable object storage means 73 stores the executable object generated by the executable object generation means 41 in association with a corresponding inquiry,
The use by the object selecting means 32 is enabled.

なお、オブジェクト選択手段32は、問い合わせ比較手
段31において問い合わせの全ての部分が等しいと解釈さ
れた場合、実行可能オブジェクト蓄積手段73より以前の
問い合わせ処理時に生成,蓄積された問い合わせに対応
する実行可能オブジェクトを選択し、これをデータベー
スアクセス手段50に供給しデータベース60をアクセスす
る。
If the query comparing unit 31 interprets that all parts of the query are equal, the object selecting unit 32 executes the executable object corresponding to the query generated and stored by the executable object storage unit 73 during the previous query processing. Is supplied to the database access means 50 to access the database 60.

また、オブジェクト変換手段40は、問い合わせ解析手
段30から受取ったオブジェクトを実行可能な形式に変換
し実行可能オブジェクトを生成する。このオブジェクト
変換手段40にて生成した実行可能オブジェクトは、実行
可能オブジェクト蓄積手段73に問い合わせと対応付けて
記憶される。オブジェクト変換手段40は、生成された実
行可能オブジェクトをデータベースアクセス手段50に供
給し、データベースアクセス手段50にてデータベース60
をアクセスする。
Further, the object conversion unit 40 converts the object received from the query analysis unit 30 into an executable format and generates an executable object. The executable object generated by the object conversion means 40 is stored in the executable object storage means 73 in association with the inquiry. The object conversion means 40 supplies the generated executable object to the database access means 50, and the database access means 50
To access.

次に、第5図のフローチャートを参照して第1図の動
作について説明する。なお、第5図は、第1図のデータ
ベース問い合わせ処理装置の問い合わせ処理のフローチ
ャートである。また、データベースとしてリレーショナ
ルデータベースを例にとり、例えば前例の如きデータベ
ース問い合わせコマンド(SELECT 氏名、FROM 従業員
管理表、WHERE 年令<30の如きコマンド)が入力装置1
0よりデータベース問い合わせ装置20に供給された場合
について説明する。
Next, the operation of FIG. 1 will be described with reference to the flowchart of FIG. FIG. 5 is a flowchart of an inquiry process of the database inquiry processing device of FIG. Further, taking a relational database as an example of the database, for example, a database query command (a command such as SELECT name, FROM employee management table, WHERE age <30) as in the previous example is input device 1.
The case where the data is supplied to the database inquiry device 20 from 0 will be described.

先ず、データベース問い合わせコマンドが入力装置10
よりデータベース問い合わせ処理装置20の問い合わせ解
析手段30に入力されると、問い合わせ比較手段31におい
て、データベース問い合わせコマンドを構成する各部分
を問い合わせ蓄積手段71に記憶されている以前に実行さ
れた問い合わせデータと比較する(ステップS1)。この
比較の結果、問い合わせ全体(データベース問い合わせ
コマンド全体)が以前に実行された問い合わせ(以前に
実行された問い合わせコマンド)と等しい場合、オブジ
ェクト選択手段32は、蓄積手段70の実行可能オブジェク
ト蓄積手段73より対応する実行可能オブジェクトを取出
し、データベースアクセス手段50に供給し、データベー
スアクセス手段50にてデータベース60のアクセスが行な
われる(ステップS2,S14,S15)。また、問い合わせ比較
手段31による問い合わせ比較の結果、データベース問い
合わせ全体(データベース問い合わせコマンド全体)が
以前に実行された問い合わせ(以前に実行された問い合
わせコマンド)と等しくない場合には、その比較結果が
オブジェクト選択手段32に引渡され、オブジェクト選択
手段32において、前記比較結果に基づき、アクセス対象
列情報部,表識別情報部,問い合わせ条件部の夫々につ
き、問い合わせ部分が一致しているものについて、対応
するオブジェクトがオブジェクト蓄積手段72より取出さ
れる(ステップS2〜S8)。ここでは、前例の如きコマン
ドを用いた場合を例にとったので、第4図のオブジェク
ト構成のうち、アクセス対象列情報部と表識別情報部と
問い合わせ条件部とについて夫々比較を行なえばよい。
この後、問い合わせ解釈手段33において、問い合わせ比
較の結果、等しくなかった、問い合わせ部分や問い合わ
せ全体のシンタックスチェックが実行され(ステップS
9)、文法上の誤りなどが無いことが確認されると、該
当の問い合わせを新たに問い合わせ蓄積手段71に記憶す
る問い合わせ蓄積が実行される(ステップS10)。この
後、オブジェクト生成手段34において、ステップS4,S6,
S8において取出されたオブジェクトとここで生成された
新規な問い合わせ部分(問い合わせ比較手段31にて一致
しなかった問い合わせ部分)に対するオブジェクトを結
合して今回の問い合わせに対するオブジェクトを生成し
(合成し)(データベース問い合わせコマンドを構成す
る部分が以前に実行されたデータベース問い合わせコマ
ンドの構成部分と一致する場合)、又は今回の問い合わ
せに対する新たなオブジェクトを生成する(データベー
ス問い合わせコマンドの構成部分が以前に実行されたデ
ータベース問い合わせコマンドの構成部分と全く一致し
ない場合)(ステップS11)。更に、ステップS11にて生
成されたオブジェクトを問い合わせに対応付けて蓄積手
段70のオブジェクト蓄積手段72に記憶する(ステップS1
2)。次に、オブジェクト変換手段40では、オブジェク
ト生成手段34にて生成したオブジェクトを実行可能に変
換する(実行可能なオブジェクトを生成する)(ステッ
プS13)。次に、データベースアクセス手段50は、オブ
ジェクト変換手段34にて生成された実行可能オブジェク
トを用いて、データベース60のアクセスを実行する(ス
テップS15)。
First, the database inquiry command is input to the input device 10.
When input to the query analysis means 30 of the database query processing device 20, the query comparison means 31 compares each part constituting the database query command with previously executed query data stored in the query storage means 71. (Step S1). As a result of the comparison, if the entire query (the entire database query command) is equal to the previously executed query (the previously executed query command), the object selecting unit 32 returns the executable object storing unit 73 of the storing unit 70 The corresponding executable object is taken out and supplied to the database access means 50, and the database access means 50 accesses the database 60 (steps S2, S14, S15). If the result of the query comparison by the query comparing means 31 indicates that the entire database query (the entire database query command) is not equal to the previously executed query (the previously executed query command), the comparison result indicates that the object selection has not been performed. The object is passed to the means 32. In the object selecting means 32, based on the result of the comparison, for each of the access target column information section, the table identification information section, and the query condition section, if the corresponding object has a corresponding query, the corresponding object is determined. It is extracted from the object storage means 72 (steps S2 to S8). Here, the case where the command as in the previous example is used is taken as an example, so that the access target column information section, the table identification information section, and the query condition section in the object configuration in FIG. 4 may be compared respectively.
Thereafter, the query interpreting means 33 executes a syntax check of the query portion or the query as a result of the query comparison that are not equal (step S).
9) When it is confirmed that there is no grammatical error or the like, inquiry accumulation is performed to newly store the corresponding inquiry in the inquiry accumulation means 71 (step S10). Thereafter, in the object generating means 34, steps S4, S6,
The object fetched in S8 and the object for the new query portion generated here (the query portion that did not match by the query comparison means 31) are combined to generate (synthesize) the object for the current query (database If the part constituting the query command matches the part of the previously executed database query command) or create a new object for this query (the part of the database query command is the previously executed database query) When it does not match the component of the command at all) (step S11). Further, the object generated in step S11 is stored in the object storage unit 72 of the storage unit 70 in association with the inquiry (step S1).
2). Next, the object converting means 40 converts the object generated by the object generating means 34 into executable (generates an executable object) (step S13). Next, the database access unit 50 accesses the database 60 using the executable object generated by the object conversion unit 34 (Step S15).

以上の説明から判かるように、以前に実行されたデー
タベース問い合わせコマンドと、今回実行すべきデータ
ベース問い合わせコマンドとを問い合わせ比較手段31に
て比較し、類似あるいは同一の問い合わせの場合(類似
の問い合わせの場合とは、データベース問い合わせコマ
ンドの構成部分(問い合わせ部分)が一致する場合をい
う。)には、既に生成されたオブジェクトや実行可能オ
ブジェクトを利用でき、これらの既に生成されたオブジ
ェクトや実行可能オブジェクトに対しては、問い合わせ
解釈手段33において問い合わせ解釈及びオブジェクト生
成手段34によるオブジェクト生成処理を省略することが
できる。特に、問い合わせ比較手段31による比較の結
果、同一の問い合わせの場合には、オブジェクト選択手
段32において蓄積手段70の実行可能オブジェクト蓄積手
段73より該当する実行可能オブジェクトを直ちに取出す
ことができ、従って、問い合わせ解釈手段33,オブジェ
クト生成手段34,オブジェクト変換手段40による処理を
省略することができる。
As can be understood from the above description, the database comparison command executed previously and the database query command to be executed this time are compared by the query comparison means 31, and when the query is similar or the same (the similar query) Means that the constituent parts (query parts) of the database query command match.) In this case, the already generated objects and executable objects can be used. In other words, the query interpretation means 33 can omit the query interpretation and the object generation processing by the object generation means 34. In particular, if the result of the comparison by the query comparing means 31 is the same query, the corresponding executable object can be immediately extracted from the executable object storage means 73 of the storage means 70 in the object selecting means 32. The processing by the interpreter 33, the object generator 34, and the object converter 40 can be omitted.

このように、問い合わせ解釈手段33による問い合わせ
解釈及びオブジェクト生成手段34やオブジェクト変換手
段40によるオブジェクト(実行可能なオブジェクトも含
む)生成処理の一部又は全部を省略することができる。
そして、データベースアクセス手段50にて必要とする実
行可能なオブジェクトを生成する(構成する)に当た
り、以前に生成されたオブジェクトや実行可能なオブジ
ェクトを利用することができる。但し、以前に生成され
た実行可能オブジェクトを利用する場合はそのままデー
タベースアクセス用の実行可能オブジェクトとなる。従
って、データベース問い合わせ処理装置20が問い合わせ
を受付けてからデータベース60に対する問い合わせを実
行するまでの処理の簡略化を従来に比べ図ることができ
る。よって、高速データベース問い合わせ処理ができ、
もってデータベース問い合わせ処理において高度な処理
応答性能を実現できる。
As described above, it is possible to omit part or all of the query interpretation by the query interpretation unit 33 and the object (including executable object) generation processing by the object generation unit 34 and the object conversion unit 40.
In generating (composing) the executable object required by the database access unit 50, the previously generated object or the executable object can be used. However, when an executable object generated before is used, it becomes an executable object for database access as it is. Therefore, the processing from the time when the database inquiry processing device 20 receives the inquiry to the time when the inquiry to the database 60 is executed can be simplified as compared with the related art. Therefore, high-speed database query processing can be performed,
As a result, high processing response performance can be realized in the database inquiry processing.

本発明は本実施例に限定されることなく、本発明の要
旨を逸脱しない範囲で種々の応用及び変形が考えられ
る。例えば、本実施例において、蓄積手段70としては、
ダイナミックRAMなどのメモリが用いられ、従って、蓄
積手段70を構成する問い合わせ蓄積手段71,オブジェク
ト蓄積手段72,実行可能オブジェクト蓄積手段73は夫々
別々のメモリを用いてもよいが、1つのメモリで構成し
てもよい。
The present invention is not limited to the present embodiment, and various applications and modifications can be considered without departing from the gist of the present invention. For example, in the present embodiment, as the storage means 70,
A memory such as a dynamic RAM is used. Therefore, the query storage unit 71, the object storage unit 72, and the executable object storage unit 73 that constitute the storage unit 70 may use separate memories, respectively. May be.

(発明の効果) 上述したように本発明によるデータベース問い合わせ
処理装置を用いれば、以前に実行されたデータベース問
い合わせコマンドと今回実行すべきデータベース問い合
わせコマンドとを問い合わせ比較手段にて比較し、類似
あるいは同一の問い合わせの場合には、既に生成された
オブジェクトや実行可能オブジェクトに対しては問い合
わせ解釈手段による問い合わせ解釈及びオブジェクト生
成手段によるオブジェクト生成処理を省略することがで
きる。特に問い合わせ比較手段による比較の結果、前記
同一の問い合わせの場合には、オブジェクト選択手段に
おいて蓄積手段より実行可能オブジェクトを取出すこと
ができるので、問い合わせ解釈手段,オブジェクト生成
手段,オブジェクト変換手段による処理を省略すること
ができる。そして、データベースアクセス手段にて必要
とする実行可能なオブジェクトを生成する(構成する)
に当たり、以前に生成されたオブジェクトや実行可能な
オブジェクトを利用することができるので、問い合わせ
を受付けてからデータベースに対する問い合わせを実行
するまでの処理の簡略化を図ることができる。よって、
高速なデータベース問い合わせ処理ができ、もってデー
タベース問い合わせ処理において高度な処理応答性能を
実現できるなどの効果を奏する。
(Effect of the Invention) As described above, if the database query processing device according to the present invention is used, a previously executed database query command and a database query command to be executed this time are compared by query comparison means, and similar or identical database query commands are compared. In the case of an inquiry, it is possible to omit the query interpretation by the query interpretation unit and the object generation processing by the object generation unit for the already generated object or executable object. In particular, as a result of the comparison by the query comparing means, in the case of the same query, the executable object can be extracted from the storage means in the object selecting means, so that the processing by the query interpreting means, the object generating means and the object converting means is omitted. can do. Then, an executable object required by the database access unit is generated (configured).
In this case, the previously generated object and the executable object can be used, so that the processing from receiving the inquiry to executing the inquiry to the database can be simplified. Therefore,
High-speed database query processing can be performed, thereby achieving high processing response performance in database query processing.

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

第1図は本発明によるデータベース問い合わせ処理装置
の一実施例を示すブロック図、第2図は従来のデータベ
ース問い合わせ処理装置の一例を示すブロック図、第3
図はリレーショナルデータベースの内容例を示す図、第
4図はデータベースアクセス用オブジェクトの構成例を
示す図、第5図は第1図のデータベース問い合わせ処理
装置の問い合わせ処理のフローチャートである。 10……入力装置、 20……データベース問い合わせ処理装置、 30……問い合わせ解析手段、 31……問い合わせ比較手段、 32……オブジェクト選択手段、 33……問い合わせ解釈手段、 34……オブジェクト生成手段、 40……オブジェクト変換手段、 50……データベースアクセス手段、 60……データベース。
FIG. 1 is a block diagram showing an embodiment of a database query processing device according to the present invention. FIG. 2 is a block diagram showing an example of a conventional database query processing device.
FIG. 4 is a diagram showing an example of the contents of a relational database, FIG. 4 is a diagram showing a configuration example of a database access object, and FIG. 5 is a flowchart of an inquiry process of the database inquiry processing device of FIG. 10 ... input device, 20 ... database query processing device, 30 ... query analysis means, 31 ... query comparison means, 32 ... object selection means, 33 ... query interpretation means, 34 ... object generation means, 40 …… Object conversion means, 50 …… Database access means, 60 …… Database.

フロントページの続き (56)参考文献 特開 昭59−188766(JP,A) 特開 昭64−25238(JP,A) 特開 昭63−269224(JP,A) 特開 平1−23428(JP,A) 特開 平1−118922(JP,A) 特開 平1−23427(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 G06F 17/30 Continuation of the front page (56) References JP-A-59-188766 (JP, A) JP-A-64-25238 (JP, A) JP-A-63-269224 (JP, A) JP-A-1-23428 (JP) , A) JP-A-1-118922 (JP, A) JP-A-1-23427 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 12/00 G06F 17/30

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力装置からデータベース問い合わせコマ
ンドを入力し、その問い合わせコマンドを解析し実行可
能オブジェクトを生成し、その実行可能オブジェクトを
用いてデータベースをアクセスするデータベース問い合
わせ処理装置において、 前記データベース問い合わせコマンドを入力し、これを
以前に実行された問い合わせコマンドと比較する問い合
わせ比較手段と、 この問い合わせ比較手段による比較の結果、前記データ
ベース問い合わせコマンド全体が前記以前に実行された
問い合わせコマンドと同一の場合には、既に生成済の実
行可能オブジェクトを後記蓄積手段より選択し、前記デ
ータベース問い合わせコマンドと前記以前に実行された
問い合わせコマンドの一部が同一の場合には、その同一
の部分に対応するオブジェクトを後記蓄積手段より選択
するオブジェクト選択手段と、 前記問い合わせ比較手段による比較の結果、一致しなか
った前記データベース問い合わせコマンドの全体又は一
部の問い合わせを解釈し文法上の誤りなどをチェックす
る問い合わせ解釈手段と、 この問い合わせ解釈手段にてチェック済の問い合わせか
らオブジェクトを生成し、あるいは該このオブジェクト
に前記オブジェクト選択手段によって選択されたオブジ
ェクトを合成して新たなオブジェクトを生成するオブジ
ェクト生成手段と、 このオブジェクト生成手段にて生成したオブジェクトを
実行可能なオブジェクトに変換するオブジェクト変換手
段と、 データベース問い合わせコマンドと前記オブジェクト生
成手段にて生成したオブジェクト及び前記オブジェクト
変換手段にて生成した実行可能なオブジェクトを関連付
けて記憶する蓄積手段と、 前記オブジェクト選択手段にて選択された実行可能オブ
ジェクト、あるいは前記オブジェクト変換手段にて生成
された実行可能オブジェクトを用いてデータベースをア
クセスするデータベースアクセス手段とを備えたことを
特徴とするデータベース問い合わせ処理装置。
1. A database query processing device for inputting a database query command from an input device, analyzing the query command to generate an executable object, and accessing a database using the executable object, comprising: Inquiry comparison means for inputting and comparing this with a previously executed inquiry command, As a result of comparison by the inquiry comparison means, if the entire database inquiry command is the same as the previously executed inquiry command, An executable object that has already been generated is selected from storage means described later, and if a part of the database query command and the previously executed query command are the same, the object corresponding to the same part is selected. Object selecting means for selecting the following from the accumulating means; and query interpreting means for interpreting all or some queries of the database query command that did not match as a result of the comparison by the query comparing means and checking for grammatical errors and the like. Object generating means for generating an object from the checked query by the query interpreting means, or combining the object with the object selected by the object selecting means to generate a new object; Object conversion means for converting an object generated by the means into an executable object; a database query command; an object generated by the object generation means; Storage means for storing the executable objects associated with each other, and database access means for accessing a database using the executable objects selected by the object selection means or the executable objects generated by the object conversion means. And a database query processing device.
JP1289919A 1989-11-09 1989-11-09 Database query processing unit Expired - Fee Related JP3016799B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP1289919A JP3016799B2 (en) 1989-11-09 1989-11-09 Database query processing unit
KR1019900018036A KR940001879B1 (en) 1989-11-09 1990-11-08 Apparatus for database access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1289919A JP3016799B2 (en) 1989-11-09 1989-11-09 Database query processing unit

Publications (2)

Publication Number Publication Date
JPH03152640A JPH03152640A (en) 1991-06-28
JP3016799B2 true JP3016799B2 (en) 2000-03-06

Family

ID=17749463

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1289919A Expired - Fee Related JP3016799B2 (en) 1989-11-09 1989-11-09 Database query processing unit

Country Status (2)

Country Link
JP (1) JP3016799B2 (en)
KR (1) KR940001879B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10159587B4 (en) * 2000-12-05 2007-07-26 Fuji Electric Co., Ltd., Kawasaki Resistance and process for its production

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3398672B2 (en) * 1994-04-15 2003-04-21 日本電気株式会社 Intermediate data storage device
JP2758829B2 (en) * 1994-06-14 1998-05-28 中国日本電気ソフトウェア株式会社 Same instruction processing high-speed system
JP3201945B2 (en) * 1995-01-10 2001-08-27 インターナショナル・ビジネス・マシーンズ・コーポレーション How to compare database tables
US9600513B2 (en) 2011-06-09 2017-03-21 International Business Machines Corporation Database table comparison

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59188766A (en) * 1983-04-11 1984-10-26 Nec Corp Processing device of data base retrieval
JPS63269224A (en) * 1987-04-27 1988-11-07 Nec Corp Data base access system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10159587B4 (en) * 2000-12-05 2007-07-26 Fuji Electric Co., Ltd., Kawasaki Resistance and process for its production

Also Published As

Publication number Publication date
KR910010344A (en) 1991-06-29
KR940001879B1 (en) 1994-03-10
JPH03152640A (en) 1991-06-28

Similar Documents

Publication Publication Date Title
US6466931B1 (en) Method and system for transparently caching and reusing query execution plans efficiently
US5157606A (en) System for translation of source language data into multiple target language data including means to prevent premature termination of processing
US6304872B1 (en) Search system for providing fulltext search over web pages of world wide web servers
US5465352A (en) Table-and-cache-based database assist method
JPH0612452A (en) Group information access system
JP2000222212A (en) Real class determination of object in execution
CN106407360B (en) Data processing method and device
US5557788A (en) Relational access system for network type data bases which uses a unique declarative statement
JP3016799B2 (en) Database query processing unit
US8433729B2 (en) Method and system for automatically generating a communication interface
US6269359B1 (en) Relational data base system and method for rapidly realizing a query to a database
JP2002140194A (en) Information processing method, information processing device and agent system
JPH11327879A (en) Device and method for retrieving variable number and computer readable recording medium recording variable number retrieving program
JPH06180717A (en) Data base retrieving system
JPH06259480A (en) Document retrieving method
EP3933611A1 (en) Information processing program, information processing apparatus, and information processing method
US6564200B1 (en) Apparatus for cross referencing routines and method therefor
JP2526531B2 (en) Database-based inquiry control device
JP2655480B2 (en) Target adaptive natural language interface device
JPH11175553A (en) Information processor and method therefor and storage medium for storing program for the method
JPH05120342A (en) Keyword applying/retrieving system
JPS59188765A (en) Processing device of data base inquiry
JPS633351A (en) Buffer retrieving control system
JPS63238622A (en) Relation retrieval system
JPS61170840A (en) Join processing system by partial convolution joining method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees