JPH034365A - Data base operation processing system - Google Patents
Data base operation processing systemInfo
- Publication number
- JPH034365A JPH034365A JP1139498A JP13949889A JPH034365A JP H034365 A JPH034365 A JP H034365A JP 1139498 A JP1139498 A JP 1139498A JP 13949889 A JP13949889 A JP 13949889A JP H034365 A JPH034365 A JP H034365A
- Authority
- JP
- Japan
- Prior art keywords
- request
- database
- program
- access system
- registered
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、プリコンパイル機能を提供するデータベース
管理システムを利用してデータベースアクセスを行うよ
うなシステムにおけるデータベース(以下、rDBJと
いう)操作処理方式に関する。Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a database (hereinafter referred to as rDBJ) operation processing method in a system that accesses a database using a database management system that provides a precompile function. .
〔従来の技術)
最近のデータベース管理システム(以下、rDBMSJ
という)が提供するアプリケーションプログラムインタ
フェースは、DB操作文を直接プログラム中に記述する
「埋込み型」が主流になって来ている。埋込み型の目的
は、端末操作で使用するDB操作文(コマンド)を、そ
のままプログラム中に記述(し、これをプログラム言語
の文に変換する、すなわち、プリプロセス)することに
よりユーザの使い勝手を向上させること、および、プリ
プロセス時にDB操作文を解析して実行し易い形式に変
換しておくこと(すなわち、プリコンパイル)により、
プログラム実行時の処理の高速化を可能とすることにあ
る。[Prior art] Recent database management systems (hereinafter referred to as rDBMSJ)
The mainstream of application program interfaces provided by companies such as ``Embedded'', in which DB operation statements are written directly in the program, has become mainstream. The purpose of the embedded type is to improve user-friendliness by writing the DB operation statements (commands) used in terminal operations in the program as they are (and converting them into programming language statements, i.e., preprocessing). By analyzing the DB operation statement during preprocessing and converting it into an easy-to-execute format (i.e., precompilation),
The purpose is to enable faster processing during program execution.
この具体的な例としては、D 、 D 、 Chamb
erl in他により、ニーシーエム トランザクショ
ンズオンデータベースシステムズ、第6巻第1号に発表
された論文“5upport for Repetit
ive Transact。Specific examples of this include D , D , Chamb
The paper “5upport for Repetit” published in NCM Transactions on Database Systems, Volume 6, No. 1 by Erl In et al.
ive Transact.
1onsand Ad Hoe Queries in
System R″′(D。1onsand Ad Hoe Queries in
System R″′ (D.
D、Chamberlin et all“5uppo
rt for RepetitiveTransac
tions and Ad Hoe Quer
ies in System R”、ACM
Transactions on Database
Systems、vol、6.Nal、March +
981.pp、7O−94)に詳しい。D. Chamberlin et all “5uppo
rt for RepetitiveTransac
tions and Ad Hoe Quer
ies in System R”, ACM
Transactions on Database
Systems, vol. 6. Nal, March +
981. pp, 7O-94).
上述の論文では、リレーショナルデータベース管理シス
テムにおけるプリコンパイル機能について、その実現方
式が論じられている。第4図に、上記公知例のシステム
の概略を示す。ここでは、DBMS40aは、ブリコン
パイラ部4Iと実行時システム部42aから構成されて
いる。ブリコンパイラ部41は、ユーザプログラムのソ
ースプログラム21aをプリプロセスし、プログラム2
1a中に記述されたDB操作文を抽出し、それらの解析
、実行手順の決定(いわゆる最適化)、実行形式のコー
ド生成を行っている。DB操作文毎に生成した実行形式
のコードをセクションと呼び、また、一つのプログラム
から生成したセクション全体をまとめてアクセスモジュ
ールと呼んでいる。ブリコンパイラIIfJ41は、こ
のアクセスモジュールの管理情報とアクセスモジュール
とをDB50に格納する。更に、プログラム21a中の
DB操作文を、対応するアクセスモジュール名、セクシ
ョン番号(識別子)等をパラメータとするコール文に置
換えた変更後ソースプログラム22aを作成する。The above-mentioned paper discusses a method for implementing the precompile function in a relational database management system. FIG. 4 shows an outline of the system of the above-mentioned known example. Here, the DBMS 40a includes a precompiler section 4I and a runtime system section 42a. The precompiler unit 41 preprocesses the source program 21a of the user program, and converts the program 2
The DB operation statements written in 1a are extracted, their analysis is performed, execution procedures are determined (so-called optimization), and executable code is generated. The executable code generated for each DB operation statement is called a section, and the entire section generated from one program is collectively called an access module. The precompiler IIfJ41 stores the management information of this access module and the access module in the DB50. Furthermore, a modified source program 22a is created in which the DB operation statements in the program 21a are replaced with call statements that use the corresponding access module name, section number (identifier), etc. as parameters.
ユーザは、プログラムをプリプロセスした後、プログラ
ムを記述した言語のコンパイラにかけ、実行形式のプロ
グラム20aを作成する。その後、実行形式のプログラ
ム20aを起動することにより必要なりB操作を実行す
る。プログラム実行時には、DBMS40aの実行時シ
ステム部42aが呼び出される。実行時システム部42
aは、呼ばれたときに渡されるパラメータに基づいて、
対応するアクセスモジュールを主記憶上にロードし、指
定されたセクションを実行する。After preprocessing the program, the user creates an executable program 20a by running it on a compiler of the language in which the program is written. Thereafter, by starting the executable program 20a, operation B is executed as necessary. When a program is executed, the runtime system section 42a of the DBMS 40a is called. Runtime system section 42
Based on the parameters passed when a is called,
Loads the corresponding access module into main memory and executes the specified section.
上述の如き方式(プリコンパイル機能)では、プログラ
ムに記述されたDB操作文の解析処理をプリプロセス時
点に行ってしまうので、プログラム実行時のDB操作文
の解析処理を省略でき、処理時間を短縮することができ
る。In the method described above (precompile function), the analysis of DB operation statements written in the program is performed at the time of preprocessing, so the analysis of DB operation statements during program execution can be omitted, reducing processing time. can do.
一方、端末lOからユーザの要求を受付け、その要求を
DBMS40aに引き渡すようなプログラム(第4図の
、ユーザフレンドリインタフェースIt)の場合には、
プリプロセス時点ではなく、プログラム実行時に要求す
るDB操作が決まる。このようなプログラムのために、
プログラム実行時にDB操作文を指定するようなインタ
フェースを使用した場合には、プログラム実行時にDB
MSとの間でDB操作文そのものを受は渡しするので、
プログラム実行時に、DB操作文の解析処理が必要にな
る。第4図の例では、実行時システム部42aが、DB
操作文の解析を行い、動的にセクションを生成した後、
そのセクションを実行する。On the other hand, in the case of a program (user-friendly interface It in FIG. 4) that accepts a user's request from the terminal IO and passes the request to the DBMS 40a,
The requested DB operation is determined at the time of program execution, not at the time of preprocessing. For such programs,
If you use an interface that specifies DB operation statements when executing a program,
Since the DB operation statement itself is passed between the receiver and the MS,
When executing a program, it is necessary to analyze the DB operation statement. In the example shown in FIG. 4, the runtime system unit 42a uses the DB
After parsing the operation statement and dynamically generating sections,
Run that section.
上述の如き、プログラム実行時に要求するDB操作が決
まるようなプログラムを、ここでは、DBアクセスシス
テムと総称することにする。このDBアクセスシステム
の例としては、リレーショナルDBMSをベースとした
マルチメディアDBMSや、各DBMSの端末ユーザ用
インタフェースプログラム、DBの内容を編集出力する
ユーティリティプログラム等がある。As mentioned above, programs that determine the DB operation required at the time of program execution are collectively referred to as a DB access system. Examples of this DB access system include a multimedia DBMS based on a relational DBMS, an interface program for terminal users of each DBMS, and a utility program for editing and outputting DB contents.
上述のDBアクセスシステムの場合、プログラム実行時
にならないと、つまり、ユーザからの要求を受付けるま
では、実行するDB操作が決まらない。そのため、プロ
グラム実行時にDB操作文を受は渡しするようなインタ
フェースを利用せざるを得ない。しかしながら、実際に
は、DBアクセスシステムを利用する端末ユーザあるい
はユーザプログラムにとっては、定型的な操作が存在す
る。但し、上記従来技術においては、定型的な操作であ
っても、DBアクセスシステムは、その都度DB操作文
を受は渡ししなければならない。つまり、プリコンパイ
ルによる処理高速化の恩恵を受けることができないとい
う問題がある。In the case of the above-mentioned DB access system, the DB operation to be executed is not determined until the program is executed, that is, until a request from the user is received. Therefore, it is necessary to use an interface that receives and passes DB operation statements during program execution. However, in reality, there are routine operations for terminal users or user programs that use the DB access system. However, in the above-mentioned conventional technology, the DB access system must receive and pass the DB operation statement each time even if it is a routine operation. In other words, there is a problem in that it is not possible to benefit from faster processing due to precompilation.
また、DBアクセスシステムを利用して、DB操作を行
うユーザプログラムの場合、DB操作が決まっていても
、DBアクセスシステムからDBMS側にプリコンパイ
ル要求するインタフェースがないため、こちらもプリコ
ンパイルによる処理高速化の恩恵を受けることができな
い。In addition, in the case of a user program that uses a DB access system to perform DB operations, even if the DB operation is decided, there is no interface to request precompilation from the DB access system to the DBMS side, so precompilation also speeds up processing. cannot benefit from the change.
更に、DBアクセスシステムが、前述の従来技術の如く
、リレーショナルDBMSを利用したマルチメディアD
BMSであるような場合、このDBアクセスシステムが
提供するDB操作機能を、DBMSが提供するDB操作
に変換する必要があり、この変換操作を要求の都度毎回
行うのは、処理効率低下につながるという問題もある。Furthermore, the DB access system, like the above-mentioned conventional technology, is a multimedia DB using relational DBMS.
In the case of a BMS, it is necessary to convert the DB operation function provided by this DB access system to the DB operation provided by the DBMS, and performing this conversion operation every time a request is made will lead to a decrease in processing efficiency. There are also problems.
本発明は上記事情に鑑みてなされたもので、その目的と
するところは、従来の技術における上述の如き問題を解
消し、プログラム実行時にDB操作が決まるようなりB
アクセスシステムからでもDBMSのプリコンパイル機
能を利用可能としたDB操作処理方式を提供することに
ある。The present invention has been made in view of the above circumstances, and its purpose is to solve the above-mentioned problems in the conventional technology, and to enable DB operations to be determined at the time of program execution.
An object of the present invention is to provide a DB operation processing method that makes it possible to use the precompile function of a DBMS even from an access system.
言い換えれば、本発明の目的は、前述の定型的な操作に
関しては、プリプロセス時に、プログラム中に記述され
たDB操作文を抽出し、それらのいわゆる最適化、実行
形式のコード生成を行っておくようにして、プリコンパ
イルによる処理高速化の恩恵を受けることを可能とした
DB操作処理方式を提供することにある。In other words, the purpose of the present invention is to extract the DB operation statements written in the program at the time of preprocessing, perform so-called optimization, and generate executable code for the above-mentioned routine operations. In this way, it is an object of the present invention to provide a DB operation processing method that makes it possible to benefit from faster processing due to precompilation.
本発明の上記目的は、プリコンパイル機能を有するDB
MSを対象として、端末ユーザあるいはユーザプログラ
ムからのDB操作要求を受付け、該DB操作要求を前記
DBMSに引き渡してその実行を要求するDBアクセス
システムと、前記DB操作実行要求に対応するDB操作
を実行する前記DBMSから成るシステムにおいて、前
記DBアクセスシステムに、端末ユーザあるいはユーザ
プログラムからのDB操作の!!録要求を受けたとき、
該DB操作のプリコンパイル要求を前記DBMSに伝達
するステップと、端末ユーザあるいはユーザプログラム
からの前記登録済みDB操作の実行要求を受けたとき、
該登録済みDB操作に対応するプリコンパイル済みDB
操作の実行を前記DBMSに要求するステップとを設け
るとともに、前記DBMS側に、前記DBアクセスシス
テムがらのDB操作のコンパイル要求を受けたとき、該
DB操作のプリコンパイルを行うステップを設けたこと
を特徴とするDB操作処理方式、または、前記システム
において、前記DBアクセスシステムに、該DBアクセ
スシステムを利用するプログラムをプリプロセスし、該
プログラム中のDB操作要求を抽出して前記DBMSに
対してプリコンパイル要求を行い、その結果に基づいて
前記プログラム中のDB操作要求を前記DBアクセスシ
ステムに対する登録済みDB操作の実行要求に変更する
プリプロセッサ部を設けるとともに、前記DBアクセス
システムは、前記プリプロセッサ部を介してプリプロセ
スした前記ユーザプログラムの実行時に発行される、登
録済みDB操作の実行要求を受取ったときに、前記DB
MSに対して実行要求されたDB操作に対応するプリコ
ンパイル済みDB操作の実行を要求するステップを有す
ることを特徴とするDB操作処理方式によって達成され
る。The above-mentioned object of the present invention is to
A DB access system that accepts a DB operation request from a terminal user or user program for an MS, delivers the DB operation request to the DBMS and requests its execution, and executes a DB operation corresponding to the DB operation execution request. In the system consisting of the DBMS, the DB access system receives DB operations from a terminal user or a user program! ! When receiving a recording request,
transmitting a precompilation request for the DB operation to the DBMS; and upon receiving a request to execute the registered DB operation from a terminal user or user program;
Precompiled DB corresponding to the registered DB operation
A step of requesting the DBMS to execute the operation is provided, and a step of precompiling the DB operation when the DBMS receives a request to compile the DB operation from the DB access system. In the characterized DB operation processing method or the system, the DB access system preprocesses a program that uses the DB access system, extracts a DB operation request from the program, and preprocesses it to the DBMS. A preprocessor unit is provided that makes a compile request and changes a DB operation request in the program into a registered DB operation execution request for the DB access system based on the result, and the DB access system When receiving a registered DB operation execution request issued when executing the user program preprocessed by
This is achieved by a DB operation processing method characterized by comprising the step of requesting the MS to execute a precompiled DB operation corresponding to the DB operation requested to be executed.
〔作用J
本発明に係るDB操作処理方法においては、DBアクセ
スシステムを利用する端末ユーザあるいはユーザプログ
ラムは、何度も繰返して利用するような定型のDB操作
要求がある場合、当該DB操作を登録要求する。DB操
作登録要求を行う場合には、登録するDB操作の内容と
その識別名を指定して要求する。登録したDB操作を実
行したい場合には、その識別名をパラメータにして登録
済みDB操作の実行要求を出す。[Operation J] In the DB operation processing method according to the present invention, when a terminal user or user program using a DB access system has a fixed DB operation request that is used repeatedly, the DB operation is registered. request. When making a DB operation registration request, the request is made by specifying the details of the DB operation to be registered and its identification name. If a registered DB operation is to be executed, a request to execute the registered DB operation is issued using the identification name as a parameter.
第3図に要求例を示す。ここでは、従業員ファイル(E
MPLOYEE)から指定した部署名($DEPT)の
部署(DEPT)に所属する従業貴名(NAME)を検
索し、その後その人数(COUNTD))を検索すると
いうDB操作要求CIを登録しており(80)、端末ユ
ーザが定型的な操作を登録することを想定している。登
録したDB操作の実行要求は、例えば、同図81のよう
に指示する。An example of the request is shown in FIG. Here, the employee file (E
We have registered a DB operation request CI that searches for the name (NAME) of employees belonging to the department (DEPT) with the specified department name ($DEPT) from MPLOYEE, and then searches for the number of employees (COUNTD). 80), it is assumed that the terminal user registers routine operations. The registered DB operation execution request is issued, for example, as shown in FIG. 81.
DBアクセスシステムは、DB操作登録要求が来た場合
に、対応するDB操作文とその識別名をパラメータとし
て、プリプロセス要求をDBMSに発行する。DBMS
は、プリコンパイル要求されたDB操作文を実行形式に
変換し、DBに格納した後、DBアクセスシステムにリ
ターンする。When a DB operation registration request is received, the DB access system issues a preprocessing request to the DBMS using the corresponding DB operation statement and its identification name as parameters. DBMS
converts the DB operation statement requested for precompilation into an executable format, stores it in the DB, and then returns to the DB access system.
第3図の例の場合では、82のように二つのDB操作を
登録することになる。登録したDB操作の実行要求が来
た場合、DBアクセスシステムは、DBMSに、指定さ
れた登録名称のDB操作に対応するセクションの実行要
求を行う。In the example shown in FIG. 3, two DB operations, such as 82, are registered. When a request to execute a registered DB operation is received, the DB access system requests the DBMS to execute a section corresponding to the DB operation with the specified registered name.
また、ユーザがDBアクセスシステムを利用するプログ
ラムを作成する場合には、プログラム中に直接DBアク
セスシステムに対する要求を記述する。ユーザはこのプ
ログラムをDBアクセスシステムのプリプロセッサにか
け、DBアクセスシステムに対する要求を、プログラム
を記述した言語の文に変更する。その後、プログラムを
記述した言語のコンパイラにかけ、実行形式のプログラ
ムを作成する。Furthermore, when a user creates a program that uses the DB access system, a request to the DB access system is directly written in the program. The user submits this program to the preprocessor of the DB access system and changes requests to the DB access system into statements in the language in which the program is written. The program is then run through a compiler for the language in which it was written to create an executable program.
DBアクセ°スジステムのプリプロセッサ部は、プログ
ラムを解析し、DBアクセスシステムに対する要求を抽
出する。各要求毎に、その要求をDBMSに対する要求
に変換し、DBMSのプリコンパイラ部にプリコンパイ
ル要求を出す。プリコンパイル結果に基づいて、操作要
求をDBアクセスシステムに対する登録済みDB操作の
実行要求に変換した変更後ソースプログラムを生成する
。The preprocessor section of the DB access system analyzes the program and extracts requests to the DB access system. For each request, the request is converted into a request to the DBMS, and a precompile request is issued to the precompiler section of the DBMS. Based on the precompilation result, a modified source program is generated in which the operation request is converted into a registered DB operation execution request for the DB access system.
プリプロセッサ部は、すべての要求のプリコンパイルが
終了したら、アクセスモジュールとしての登録要求を出
す。The preprocessor section issues a registration request as an access module after precompilation of all requests is completed.
ユーザプログラム実行時には、ユーザプログラムからの
登録済みDB操作実行要求を受取り、前述のユーザプロ
グラムからの登録の場合と同様の処理を行う。When the user program is executed, a registered DB operation execution request is received from the user program, and the same processing as in the case of registration from the user program described above is performed.
以上の如き処理により、DBアクセスシステムは、DB
MSのプリコンパイル機能が利用できるようになり、処
理の高速化を図ることができるようになる。Through the above-described processing, the DB access system
The precompile function of MS can now be used, making it possible to speed up processing.
以下、本発明の実施例を図面に基づいて詳細に説明する
。Embodiments of the present invention will be described in detail below with reference to the drawings.
第1図は、本発明の一実施例の全体構成を説明する図で
ある。ユーザは、端末10と端末インタフェース15、
あるいはユーザプログラム20bを介して、DBアクセ
スシステム30に処理を要求する。FIG. 1 is a diagram illustrating the overall configuration of an embodiment of the present invention. The user uses a terminal 10 and a terminal interface 15,
Alternatively, a process is requested to the DB access system 30 via the user program 20b.
DBアクセスシステム30は、ユーザからの要求を解析
し、該当するDB操作を08MS40bに要求する。0
8MS40bは、要求に従ってDB50内のDB操作を
実施する。The DB access system 30 analyzes the request from the user and requests the 08MS 40b to perform the corresponding DB operation. 0
The 8MS 40b performs DB operations within the DB 50 according to the request.
また、第2図は、本発明を実施する最小機器構成を示す
図である。本発明の構成要素である、が1述の08MS
40b、DBアクセスシステム30.ユーザプログラム
20bおよび端末インタフェース15は、計算機60上
で稼動する。2次記憶装置70は、DB50や、各プロ
グラムが利用するデータファイルを格納している。端末
10は、端末ユーザが、端末インタフェース15を介し
てDBアクセスシステム30を利用したり、ユーザプロ
グラム20bを起動したりするのに使用する。第2図で
は、一つの計算機だけを示したが、ネットワークで結ば
れた複数の計算機上に、前述の構成要素が配置されてい
ても良い。Moreover, FIG. 2 is a diagram showing the minimum equipment configuration for implementing the present invention. 08MS, which is a component of the present invention, is described in 1.
40b, DB access system 30. The user program 20b and the terminal interface 15 run on the computer 60. The secondary storage device 70 stores the DB 50 and data files used by each program. The terminal 10 is used by a terminal user to utilize the DB access system 30 or to start the user program 20b via the terminal interface 15. In FIG. 2, only one computer is shown, but the above-mentioned components may be arranged on a plurality of computers connected by a network.
以下、定型的なりB操作の登録および実行に関する処理
方法を示す。なお、08MS40bは、前述の従来技術
に示したようなプリコンパイル機能を提供しているもの
とする。A processing method regarding registration and execution of routine B operations will be described below. It is assumed that the 08MS 40b provides a precompile function as shown in the prior art described above.
」一連のDBアクセスシステム30は、要求内容により
処理を振り分ける要求制御部31.DB操作要求を解析
し08MS40bに実行を要求するDB操作解析実行部
32.DB操作の登録要求によって、08MS40bに
アクセスモジュールの生成・登録を要求するDB操作登
録部33および登録したDB操作の実行を要求する登録
DB操作実行部34がら構成されている。” The series of DB access systems 30 includes a request control unit 31 . A DB operation analysis execution unit 32 that analyzes a DB operation request and requests the MS 40b to execute it. It consists of a DB operation registration unit 33 that requests the 08MS 40b to generate and register an access module in response to a DB operation registration request, and a registered DB operation execution unit 34 that requests execution of the registered DB operation.
DBアクセスシステム30を利用する端末ユーザあるい
はユーザプログラム20bは、DB操作登録要求を行う
場合、登録するDB操作の内容とその識別名を指定して
要求する。登録したDB操作を実行したい場合には、そ
の識別名をパラメータにして登録済みDB操作実行要求
を出す。When a terminal user or user program 20b using the DB access system 30 makes a DB operation registration request, the request is made by specifying the contents of the DB operation to be registered and its identification name. When a registered DB operation is desired to be executed, a registered DB operation execution request is issued using the identification name as a parameter.
以下、DBアクセスシステムの各処理の詳細について説
明する。The details of each process of the DB access system will be described below.
(1)要求制御処理 要求制御部31の処理の流れを、第6図に示す。(1) Request control processing The flow of processing by the request control unit 31 is shown in FIG.
要求制御部31は、最初に要求内容をチエツクする(ス
テップ3+1)。DB操作の解析実行要求の場合には、
DB操作解析実行部32に指定されたDB操作要求と一
緒に制御を渡す(ステップ312)。DB操作の登録要
求の場合には、指定されたDB操作要求とその登録名称
を、D、B操作登録部33に渡す(ステップ313)。The request control unit 31 first checks the request content (step 3+1). In the case of a DB operation analysis execution request,
Control is passed along with the specified DB operation request to the DB operation analysis execution unit 32 (step 312). In the case of a DB operation registration request, the specified DB operation request and its registered name are passed to the D and B operation registration section 33 (step 313).
また、登録済みDB操作の実行要求の場合は、指定され
た登録名称を登録DB操作実行部34に渡す(ステップ
315)。各処理が終了したら、結果を呼出し元に返す
(ステップ314)。Further, in the case of a request to execute a registered DB operation, the specified registered name is passed to the registered DB operation execution unit 34 (step 315). When each process is completed, the results are returned to the caller (step 314).
(2)DB操作解析実行処理
DB操作解析実行部32の処理の流れを、第7図に示す
。DB操作解析実行部32は、DB操作要求の内容を解
析しくステップ321)、対応するDB操作文を生成す
る(ステップ322)。生成後、08MS40bに解析
、実行を要求する(ステップ323)。(2) DB operation analysis execution process The process flow of the DB operation analysis execution unit 32 is shown in FIG. The DB operation analysis execution unit 32 analyzes the content of the DB operation request (step 321) and generates a corresponding DB operation statement (step 322). After generation, the 08MS 40b is requested to analyze and execute (step 323).
その後、結果を要求元に返す(ステップ324)、。Thereafter, the results are returned to the requester (step 324).
(3)DB操作登録処理
DB操作登録部33の処理の流れを、第8図に示す。D
B操作登録部33は、指定されたDB操作要求内容を解
析しくステップ331)、対応するDB操作文を生成す
る(ステップ332)。なお、複数個のDB操作文にな
ることもある。いずれの場合もDB操作文毎にセクショ
ン番号を設定し、DB操作要求と一緒に指定された!l
録名称との対応表90を作成する(ステップ333)。(3) DB operation registration processing The flow of processing of the DB operation registration section 33 is shown in FIG. D
The B operation registration unit 33 analyzes the specified DB operation request content (step 331) and generates a corresponding DB operation statement (step 332). Note that there may be multiple DB operation statements. In either case, a section number is set for each DB operation statement and specified along with the DB operation request! l
A correspondence table 90 with record names is created (step 333).
上述の対応表90は、第5図に示す如き、登録名称とD
B操作文に対応するセクション群とを関連付ける配列を
含む構造体領域で表わす。作成者91はDB操作登録要
求したユーザの名1r11であり、プログラム名92は
、登録要求を発行したユーザプログラム20bあるいは
端末インタフェース15の名1Ijiである。操作ID
93は登録名称である。対応表90は、更に、DB操作
文数(94)分のセクション番号95、パラメータ数9
6等の情報を持つ。対応表90を作成後、DB操作要求
と一緒に指定された名称をD B操作登録名称として、
08MS40bにプリコンパイル開始要求を出す(ステ
ップ334)。引き続き、DBMS40bに各DB操作
文のプリコンパイル要求を出す(ステップ335)。プ
リコンパイル要求では、DB操作文とその識別名(操作
ID)をパラメータとして引き渡す。すべてのDB操作
文のプリコンパイルが終了したら、プリコンパイル終了
要求を出す(ステップ336)。その後、上記対応表9
0をDB50に保管する(ステップ337)。The above-mentioned correspondence table 90, as shown in FIG.
B Represented by a structure area including an array that associates the section group corresponding to the operation statement. The creator 91 is the name 1r11 of the user who requested the DB operation registration, and the program name 92 is the name 1Iji of the user program 20b or terminal interface 15 that issued the registration request. Operation ID
93 is a registered name. The correspondence table 90 further includes section numbers 95 and parameters 9 for the number of DB operation statements (94).
It has information of 6th class. After creating the correspondence table 90, the name specified along with the DB operation request is set as the DB operation registration name.
08 A request to start precompilation is issued to the MS 40b (step 334). Subsequently, a precompilation request for each DB operation statement is issued to the DBMS 40b (step 335). In the precompile request, a DB operation statement and its identification name (operation ID) are passed as parameters. When precompilation of all DB operation statements is completed, a precompilation end request is issued (step 336). After that, the above correspondence table 9
0 is stored in the DB 50 (step 337).
(4)登録DB操作実行処理
登録DB操作実行部34の処理の流れを、第9図に示す
。登録DB操作実行部34は、指定された登録済みDB
操作要求の名称(操作ID)とユーザ名(作成者)、要
求元プログラム名92をキーとして、上記処理によりプ
リコンパイルしたDB操作文のセクション番号との対応
表90をDB50から取出す(ステップ341)。その
後、対応表90を見ながら、各セクションの実行を、D
BMS40bに要求していく(ステップ342〜345
)。(4) Registration DB operation execution process The flow of processing of the registration DB operation execution unit 34 is shown in FIG. The registered DB operation execution unit 34 executes the specified registered DB
Using the name of the operation request (operation ID), user name (creator), and request source program name 92 as keys, a correspondence table 90 between the section numbers of the DB operation statements precompiled by the above process is retrieved from the DB 50 (step 341). . Then, while looking at the correspondence table 90, execute each section
Requests are made to the BMS 40b (steps 342 to 345).
).
なお、対応表90のDB50への格納およびその検索は
、当然、DBMS40bを介して行う。Note that the storage of the correspondence table 90 in the DB 50 and its search are naturally performed via the DBMS 40b.
対応表90を主記憶上に保持し、DB50から検索する
処理を割愛する方式もある。この場合、DB操作登録時
の対応表90のDB50への格納処理は、前述の通り行
うが、主記憶からの消去処理は行わない。また、DBア
クセスシステム30開始時に、すべての対応表90を主
記憶上に取出しておく必要がある。この場合、主記憶の
スペース効率を上げるために、対応表90用のバッファ
領域を用意し、L RU (Last Recentl
yUsed)方式により管理することも考えられる。There is also a method in which the correspondence table 90 is held in the main memory and the process of searching from the DB 50 is omitted. In this case, the process of storing the correspondence table 90 in the DB 50 at the time of DB operation registration is performed as described above, but the process of erasing it from the main memory is not performed. Furthermore, when starting the DB access system 30, it is necessary to take out all the correspondence tables 90 onto the main memory. In this case, in order to improve the space efficiency of the main memory, a buffer area for the correspondence table 90 is prepared, and LRU (Last Recent
yUsed) method may also be considered.
最後に、DBMS40bの実行時システム部42aの処
理の流れを、第10図に示す。DBMS40b側では、
従来と同様の処理に加え、下記(4)〜(6)処理を行
う。Finally, the flow of processing of the runtime system section 42a of the DBMS 40b is shown in FIG. On the DBMS40b side,
In addition to the conventional processing, the following processing (4) to (6) is performed.
まず、要求内容をチエツクしくステップ401)、該要
求が、
(1)プログラム開始要求の揚台は、アクセスモジュー
ル管理領域に、当該プログラムのアクセスモジュールを
ロードする(ステップ402)。First, the contents of the request are checked (step 401), and the request is as follows: (1) The platform for the program start request loads the access module of the program into the access module management area (step 402).
ロード後、要求元へ制御を戻す。After loading, control is returned to the requester.
(2)DB操作文の解析実行要求の場合は、受取ったD
B操作文を解析しくステップ403)、実行可能なセク
ションを作成しくステップ404)。(2) In the case of a DB operation statement analysis execution request, the received D
Analyze the B operation statement (step 403) and create an executable section (step 404).
実行環境を設定した(ステップ405)後、セクション
を実行する(ステップ406)。終了後、実行結果を要
求元へ返す(ステップ407)。After setting the execution environment (step 405), the section is executed (step 406). After completion, the execution result is returned to the requester (step 407).
本要求は、動的DB操作実行要求に対応する要求である
。プリプロセス時に解析し、実行形式のセクションを作
成した場合には、次のセクション実行要求が来る。This request is a request corresponding to a dynamic DB operation execution request. When an executable section is created by analyzing it during preprocessing, a request to execute the next section comes.
(3)セクション実行要求の場合は、アクセスモジュー
ル中の対応するセクションの実行環境を設定しくステッ
プ405)、セクションを実行する(ステップ406)
。終了後、実行結果を要求元へ返す(ステップ407)
。(3) In the case of a section execution request, set the execution environment of the corresponding section in the access module (Step 405), and execute the section (Step 406).
. After completion, return the execution result to the requester (step 407)
.
セクションを実行する場合、特に検索の場合には、検索
結果の受は渡しのための操作要求が必要になるが、本特
許とは関係が無いのでここでは省略する。When executing a section, especially in the case of a search, an operation request for passing the search results is required, but this is not related to this patent and will therefore be omitted here.
(4)プリコンパイル開始要求の場合は、プリコンパイ
ルするプログラム、あるいは、DB操作文群の識別名を
受取り、アクセスモジュールの管理情報を生成する(ス
テップ408)。(4) In the case of a precompilation start request, the identification name of the program to be precompiled or the DB operation statement group is received, and the management information of the access module is generated (step 408).
(5)プリコンパイル要求の場合は、DB操作文を解析
しくステップ409)、解析結果のセクションをアクセ
スモジュール管理情報と関連付ける(ステップ410,
411)。(5) In the case of a precompilation request, the DB operation statement is analyzed (step 409), and the section of the analysis result is associated with the access module management information (step 410).
411).
(6)プリコンパイル終了要求の場合は、アクセスモジ
ュール管理情報とアクセスモジュール本体をDB50に
格納する(ステップ412)。(6) In the case of a precompilation end request, the access module management information and the access module body are stored in the DB 50 (step 412).
上記実施例によれば、プログラムからDBMS40bの
プリコンパイル機能が利用できるようになり、処理の高
速化が図れるという効果がある。According to the above embodiment, the precompile function of the DBMS 40b can be used from a program, and the processing speed can be increased.
次に、DBアクセスシステム30を利用するプログラム
中に記述されたDBアクセスシステム30に対する定型
的な操作要求をプリコンパイルする方式を示す。これは
、前述のプリプロセッサ部35がソースプログラム21
bを解析し、DBMS40bにプリコンパイル要求を出
すことにより実現する。Next, a method for precompiling a routine operation request to the DB access system 30 written in a program that uses the DB access system 30 will be described. This is because the preprocessor section 35 described above
This is achieved by analyzing ``b'' and issuing a precompilation request to the DBMS 40b.
以下、プリプロセッサ部35の処理手順を、第11図の
フローチャートに従って説明する。The processing procedure of the preprocessor section 35 will be explained below according to the flowchart of FIG. 11.
プリプロセッサ部35は、最初に、DBMS40bにプ
リコンパイル要求を出す(ステップ351)。その後、
プリプロセスするソースプログラム21b中のソース文
を、1文ずつ読込み(ステップ352)、ソース文がな
くなるまで、ステップ325〜358の処理を繰り返す
。The preprocessor unit 35 first issues a precompilation request to the DBMS 40b (step 351). after that,
The source sentences in the source program 21b to be preprocessed are read one by one (step 352), and steps 325 to 358 are repeated until there are no more source sentences.
ソース文がDB操作文でない場合には、ソース文を、そ
のまま、変更後プログラムとして書出す(ステップ35
5)。ソース文がDB操作文の場合、プリコンパイル要
求を、DBMS40bに発行する(ステップ356)。If the source statement is not a DB operation statement, write the source statement as is as a modified program (step 35).
5). If the source statement is a DB operation statement, a precompile request is issued to the DBMS 40b (step 356).
その結果に基づき、前記対応表90を更新しくステップ
357)、DB操作文を登録済みDB操作実行要求を行
うソース文に変換し、変更後ソースプログラムに書出す
(ステップ358)。Based on the results, the correspondence table 90 is updated (step 357), the DB operation statement is converted into a source statement for requesting the execution of a registered DB operation, and the source statement is written to the changed source program (step 358).
すべてのソース文について1以上の処理が終了したら、
DBMS40bに、プリコンパイル終了要求(ステップ
359)と、対応表90のDBへの格納要求(ステップ
360)を発行し、処理を終了する。Once one or more processes have been completed for all source statements,
A precompilation end request (step 359) and a request to store the correspondence table 90 in the DB (step 360) are issued to the DBMS 40b, and the process ends.
以上により、DBアクセスシステム30を利用するユー
ザプログラム中に記述された定型的なりB操作に対して
も、DBMSのプリコンパイル機能を利用することが可
能となり、処理の高速化を図ることができる。As described above, it is possible to use the precompile function of the DBMS even for routine B operations written in a user program that uses the DB access system 30, and it is possible to speed up the processing.
なお、上記各実施例は、いずれも本発明の一例として示
したものであり、本発明はこれらに限定されるべきもの
ではない。It should be noted that each of the above embodiments is shown as an example of the present invention, and the present invention should not be limited thereto.
以上、詳細に述べた如く、本発明においては、DBアク
セスシステムを利用する端末ユーザあるいはユーザプロ
グラムが定型のDB操作を登録要求し、登録したDB操
作を実行したい場合には、その識別名をパラメータにし
て登録済みDB操作の実行要求を出すことにより、DB
アクセスシステムは、DBllk作登録要未登録要求合
に対応するDB操作文のプリプロセス要求をDBMSに
発行する。DBMSはプリプロセス実行後、DB操作文
を実行形式に変換したものをDBに格納して、DBアク
セスシステムにリターンする。登録したDB操作の実行
要求が来た場合、DBアクセスシステムは、指定された
登録名称のDB操作のセクションの実行要求をDBMS
に行うことにより、DBアクセスシステムからDBMS
のプリプロセス機能が利用できるようになり、処理の高
速化を図ることができるようになる。As described above in detail, in the present invention, when a terminal user or a user program using a DB access system requests registration of a standard DB operation and wants to execute the registered DB operation, the identification name is sent as a parameter. By issuing a request to execute a registered DB operation using
The access system issues a DB operation statement preprocessing request to the DBMS corresponding to the DBllk work registration required/unregistered request. After executing the preprocess, the DBMS converts the DB operation statement into an executable format, stores it in the DB, and returns it to the DB access system. When a request to execute a registered DB operation comes, the DB access system sends the execution request for the DB operation section with the specified registered name to the DBMS.
from the DB access system to the DBMS by performing
The preprocessing function will be available to speed up processing.
すなわち、本発明によれば、プログラム実行時にDB操
作が決まるようなりBアクセスシステムから、プリコン
パイル機能を利用できるようになり、DBアクセスシス
テムを利用する端末ユーザあるいはユーザプログラムか
らのDB操作処理の高速化を図ることができる。That is, according to the present invention, since the DB operation is determined at the time of program execution, the precompile function can be used from the B access system, and the DB operation processing from the terminal user or user program using the DB access system can be performed at high speed. It is possible to aim for
第1図は本発明の一実施例を示すDBシステムの全体構
成を説明する図、第2図は本発明を実施する最小機器構
成を示す図、第3図は端末からのDB操作登録の要求例
を示す図、第4図は公知例のDBシステムの全体構成を
示す図、第5図は登録要求したDB操作とイ1録要求識
別名との対応関係を保持する対応表の構成例を示す図、
第6図〜第1t図は実施例の各部の動作を示す処理フロ
ーチャートである。
IO=端末、15:端末インタフェース、20a、20
bニユーザブログラム、21a、 21b :ソースプ
ログラム、30:DBアクセスシステム、31:要求制
御部、32:DB操作解析実行部、33:DB操作登録
部、34:登録DB操作実行、35・プリプロセッサ部
、40a、40b : DBMS、旧・プリコンパイラ
部、42a、42b 実行時システム部、50:DB
、60、計算機、702次記憶装置。
第
2
図
0
0
U
←
第
7
図
第
8
図
第
図Fig. 1 is a diagram explaining the overall configuration of a DB system showing an embodiment of the present invention, Fig. 2 is a diagram showing the minimum equipment configuration for implementing the present invention, and Fig. 3 is a request for DB operation registration from a terminal. Figure 4 is a diagram showing the overall configuration of a known example DB system, and Figure 5 is a diagram showing an example of the configuration of a correspondence table that maintains the correspondence between the DB operation that requested registration and the request identification name of record 1. diagram showing,
6 to 1t are processing flowcharts showing the operation of each part of the embodiment. IO = terminal, 15: terminal interface, 20a, 20
b user program, 21a, 21b: source program, 30: DB access system, 31: request control section, 32: DB operation analysis execution section, 33: DB operation registration section, 34: registered DB operation execution, 35. preprocessor Parts, 40a, 40b: DBMS, old/precompiler part, 42a, 42b Runtime system part, 50: DB
, 60, computer, 70 secondary storage device. Figure 2 0 0 U ← Figure 7 Figure 8 Figure
Claims (1)
テムを対象として、端末ユーザあるいはユーザプログラ
ムからのデータベース操作要求を受付け、該データベー
ス操作要求を前記データベース管理システムに引き渡し
てその実行を要求するデータベースアクセスシステムと
、前記データベース操作実行要求に対応するデータベー
ス操作を実行する前記データベース管理システムから成
るシステムにおいて、前記データベースアクセスシステ
ムに、端末ユーザあるいはユーザプログラムからのデー
タベース操作の登録要求を受けたとき、該データベース
操作のプリコンパイル要求を前記データベース管理シス
テムに伝達するステップと、端末ユーザあるいはユーザ
プログラムからの前記登録済みデータベース操作の実行
要求を受けたとき、該登録済みデータベース操作に対応
するプリコンパイル済みデータベース操作の実行を前記
データベース管理システムに要求するステップとを設け
るとともに、前記データベース管理システム側に、前記
データベースアクセスシステムからのデータベース操作
のコンパイル要求を受けたとき、該データベース操作の
プリコンパイルを行うステップを設けたことを特徴とす
るデータベース操作処理方式。 2、プリコンパイル機能を有するデータベース管理シス
テムを対象として、端末ユーザあるいはユーザプログラ
ムからのデータベース操作要求を受付け、該データベー
ス操作要求を前記データベース管理システムに引き渡し
てその実行を要求するデータベースアクセスシステムと
、前記データベース操作実行要求に対応するデータベー
ス操作を実行する前記データベース管理システムから成
るシステムにおいて、前記データベースアクセスシステ
ムに、該データベースアクセスシステムを利用するプロ
グラムをプリプロセスし、該プログラム中のデータベー
ス操作要求を抽出して前記データベース管理システムに
対してプリコンパイル要求を行い、その結果に基づいて
前記プログラム中のデータベース操作要求を前記データ
ベースアクセスシステムに対する登録済みデータベース
操作の実行要求に変更するプリプロセッサ部を設けると
ともに、前記データベースアクセスシステムは、前記プ
リプロセッサ部を介してプリプロセスした前記ユーザプ
ログラムの実行時に発行される、登録済みデータベース
操作の実行要求を受取ったときに、前記データベース管
理システムに対して実行要求されたデータベース操作に
対応するプリコンパイル済みデータベース操作の実行を
要求するステップを有することを特徴とするデータベー
ス操作処理方式。[Claims] 1. For a database management system having a precompile function, accepting a database operation request from a terminal user or a user program, and passing the database operation request to the database management system to request its execution. In a system comprising a database access system and the database management system that executes a database operation corresponding to the database operation execution request, when the database access system receives a database operation registration request from a terminal user or a user program, transmitting a precompile request for the database operation to the database management system, and upon receiving a request to execute the registered database operation from a terminal user or a user program, transmitting a precompiled database corresponding to the registered database operation; a step of requesting the database management system to execute the operation; and a step of pre-compiling the database operation when the database management system receives a request to compile the database operation from the database access system. A database operation processing method is provided. 2. A database access system that accepts a database operation request from a terminal user or a user program, and passes the database operation request to the database management system to request its execution, targeting a database management system having a precompile function; In a system comprising the database management system that executes a database operation corresponding to a database operation execution request, the database access system preprocesses a program that uses the database access system and extracts a database operation request from the program. a preprocessor unit that issues a precompilation request to the database management system, and changes a database operation request in the program into a registered database operation execution request to the database access system based on the result; When the access system receives a request to execute a registered database operation issued when executing the user program preprocessed through the preprocessor section, the access system executes the database operation requested to the database management system. A database operation processing method comprising the step of requesting execution of a corresponding precompiled database operation.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1139498A JPH034365A (en) | 1989-06-01 | 1989-06-01 | Data base operation processing system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1139498A JPH034365A (en) | 1989-06-01 | 1989-06-01 | Data base operation processing system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH034365A true JPH034365A (en) | 1991-01-10 |
Family
ID=15246676
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1139498A Pending JPH034365A (en) | 1989-06-01 | 1989-06-01 | Data base operation processing system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH034365A (en) |
-
1989
- 1989-06-01 JP JP1139498A patent/JPH034365A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7921416B2 (en) | Formal language and translator for parallel processing of data | |
| US5802523A (en) | Method and apparatus for reducing the memory required to store bind variable descriptors in a database | |
| US6694312B2 (en) | Database processing method and apparatus for processing data by analyzing query input | |
| JP2510004B2 (en) | Query processing method for release database system | |
| US6556986B2 (en) | Database management method of invoking a function retrieving index type definition, cataloging particular index which has not yet been supported by a database system | |
| US20050021502A1 (en) | Data federation methods and system | |
| JP2009080849A (en) | Method for responding to single high-level structured user query | |
| US6353819B1 (en) | Method and system for using dynamically generated code to perform record management layer functions in a relational database manager | |
| US7174553B1 (en) | Increasing parallelism of function evaluation in a database | |
| Venkatrao et al. | SQL/CLI—a new binding style for SQL | |
| JP2976891B2 (en) | Remote database access method | |
| JPH034365A (en) | Data base operation processing system | |
| JP2001134597A (en) | Method and apparatus for accessing a plurality of different information sources and a storage medium storing a program for accessing a plurality of different information sources | |
| Ghandeharizadeh et al. | Omega: A parallel object-based system | |
| D'silva et al. | Keep your host language object and also query it: A case for SQL query support in RDBMS for host language objects | |
| Kloepping et al. | The Design and Implementation of a Relational Interface for the Multi-Lingual Database System. | |
| JPH01211029A (en) | Processing system for data base operating language | |
| US12086128B2 (en) | Mechanisms for serializing triples of a database store | |
| Emdi | The implementation of a network CODASYL-DML interface for the multi-lingual database system. | |
| Mullen et al. | Supporting queries in the O-Raid object-oriented database system | |
| US20240012803A1 (en) | Mechanisms for deleting triples of a database store | |
| JPH0877201A (en) | Document database search system and document database search method | |
| JPS6318777B2 (en) | ||
| JPS58166461A (en) | Syntax checking system of relational type data base system | |
| Berens | Execution Strategies for Compute Intensive Queries in Particle Physics. |