JPH05113919A - Sql preprocessing device - Google Patents

Sql preprocessing device

Info

Publication number
JPH05113919A
JPH05113919A JP3193515A JP19351591A JPH05113919A JP H05113919 A JPH05113919 A JP H05113919A JP 3193515 A JP3193515 A JP 3193515A JP 19351591 A JP19351591 A JP 19351591A JP H05113919 A JPH05113919 A JP H05113919A
Authority
JP
Japan
Prior art keywords
sql
data base
database
internal format
sentence
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
JP3193515A
Other languages
Japanese (ja)
Inventor
Makoto Kodera
誠 小寺
Akihito Sakamoto
明史 坂本
Takashi Nakayama
敬 中山
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 JP3193515A priority Critical patent/JPH05113919A/en
Publication of JPH05113919A publication Critical patent/JPH05113919A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve system performance by converting plural structured query language (SQL) sentences into a single data base processing request thereby making an access to a data base with the small communication value in the case of using the data base. CONSTITUTION:A preprocessing device 11 reads a single SQL sentence out of an SQL program 10 and then sends it to a state controller 13. Then the device 11 inquires the information on the SQL sentence stored in an SQL sentence storage 13 and also the present state of a state storage 14. The controller 12 decides whether the SQL sentence received from the device 11 can request or not a data base processor together with the hitherto SQL sentences based on the information received from both storages 12 and 14. Based on this deciding result, the device 11 processes the storage contents of an internal form storage 15.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、SQLを用いてデ−タ
ベ−スをアクセスするためのプログラムを作成するSQ
Lプリプロセス装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is an SQ that creates a program for accessing a database using SQL.
The present invention relates to an L preprocessing device.

【0002】[0002]

【従来技術】従来の技術によるSQLプリプロセス装置
を図3に、デ−タベ−スアクセスの実行を図4に示す。
デ−タベ−スをアクセスするためのプログラムの多くが
SQLと呼ばれる言語で作成されている。従来、このよ
うなプログラムは、プリプロス装置と呼ばれる装置によ
り処理を加えられ、実際にデ−タベ−スへのアクセスを
行うためのプログラムに変換されている。
2. Description of the Related Art FIG. 3 shows an SQL preprocessing apparatus according to the prior art, and FIG. 4 shows execution of database access.
Most programs for accessing the database are written in a language called SQL. Conventionally, such a program has been processed by a device called a prepros device and converted into a program for actually accessing the database.

【0003】図3において、まず、SQLプリプロセス
装置31は、SQLによるプログラム30よりSQL文
301を一文だけ読みだす。SQLプリプロセス装置3
1は、SQL文301の内容に基づいて、実際のデ−タ
ベ−スへのアクセスを行うための内部形式302を作り
出し、デ−タベ−スアクセス要求装置32に通知する。
デ−タベ−スアクセス要求装置32は、通知された内部
形式302を逐次、装置内に蓄積する。以下、SQLプ
リプロセス装置31は、SQLプログラム30に含まれ
ている全てのSQL文301に関して同様の処理を行
い、デ−タベ−スへのアクセス処理を行うための内部形
式302の並びをデ−タベ−スアクセス要求装置32の
内部に蓄積する。
In FIG. 3, first, the SQL preprocessing device 31 reads out only one SQL statement 301 from the SQL program 30. SQL preprocessing device 3
1 creates an internal format 302 for actually accessing the database based on the contents of the SQL statement 301, and notifies the database access requesting device 32 of the internal format 302.
The database access requesting device 32 sequentially stores the notified internal format 302 in the device. Thereafter, the SQL preprocessing device 31 performs the same processing for all the SQL statements 301 included in the SQL program 30, and outputs the sequence of the internal format 302 for performing the access processing to the database. It is stored inside the tabular access request device 32.

【0004】続いて図4において、デ−タベ−スアクセ
ス要求装置41はSQLプリプロセス装置31の作り出
したデ−タベ−スアクセスの為の内部形式401に従っ
て、デ−タベ−ス処理装置42へアクセス要求402を
送る。デ−タベ−ス処理装置42はアクセス要求402
の内容に基づいてデ−タベ−スへのアクセス処理を実行
し、デ−タベ−スアクセス結果403を得、デ−タベ−
スアクセス要求装置41に返却する。以下、デ−タベ−
スアクセス要求装置41は、内部に蓄積した並びがなく
なるまで、内部形式401を逐次に読みだしながらデ−
タベ−スアクセス要求402をデ−タベ−ス処理装置4
2に送りこみ、デ−タベ−スアクセス結果403を得る
処理を繰り返す。
Next, in FIG. 4, the data base access requesting device 41 follows the internal format 401 for the data base access created by the SQL preprocessing device 31 to the data base processing device 42. Send an access request 402. The database processing device 42 requests access 402
The access processing to the database is executed based on the contents of the above, and the database access result 403 is obtained, and the database is accessed.
It is returned to the access request device 41. Below, the database
The access requesting device 41 sequentially reads the internal format 401 until data stored in the internal format 401 is exhausted.
The database access request 402 is transmitted to the database processing device 4
2 and the process of obtaining the data base access result 403 is repeated.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、図4に
示したように、従来の方式ではSQLプログラム30の
中に含まれていたSQL文301の個数だけ、デ−タベ
−スアクセス要求装置41から処理要求が送られ、デ−
タベ−ス処理装置42からは結果が返却されて来るた
め、デ−タベ−スアクセス要求装置41とデ−タベ−ス
処理装置42の間の交信量が多くなるという問題が生じ
る。特に、デ−タベ−スアクセス要求装置41とデ−タ
ベ−ス処理装置42とが、低速度の通信回線で繋がれて
いる場合、多量の交信量に伴う通信遅延による性能の低
下という問題が生じる。
However, as shown in FIG. 4, the number of SQL statements 301 included in the SQL program 30 in the conventional method is the same as the number of SQL statements 301 from the database access request device 41. A processing request is sent and the data
Since the result is returned from the database processing device 42, there arises a problem that the amount of communication between the database access request device 41 and the database processing device 42 increases. Particularly, when the database access requesting device 41 and the database processing device 42 are connected by a low-speed communication line, there is a problem that the performance is deteriorated due to communication delay due to a large amount of communication. Occurs.

【0006】本発明は上述の点に鑑みてなされたもの
で、上記問題点を解決するためにSQLプリプロセス装
置31に、複数のSQL文301を一度の処理要求の為
の内部形式に変換するための機能をつけ加えることで、
デ−タベ−スアクセス要求装置41とデ−タベ−ス処理
装置42の間の交信量を減少させることによってシステ
ムの性能向上を図る手段を提供する事を目的とする。
The present invention has been made in view of the above points, and in order to solve the above problems, the SQL preprocessing device 31 converts a plurality of SQL statements 301 into an internal format for one processing request. By adding the function for
It is an object of the present invention to provide means for improving the performance of the system by reducing the amount of communication between the database access request device 41 and the database processing device 42.

【0007】[0007]

【課題を解決するための手段】上記課題を解決するため
本発明は、図1に示すように従来のプリプロセス装置1
1にSQL文を一時的に記録するSQL文記憶装置1
2、状態管理装置13、状態記憶装置14、デ−タベ−
スアクセスの為の内部形式を記録する内部形式記憶装置
15を設けた。
In order to solve the above problems, the present invention provides a conventional preprocess apparatus 1 as shown in FIG.
1. SQL statement storage device 1 for temporarily recording SQL statement in 1
2, state management device 13, state storage device 14, database
An internal format storage device 15 for recording the internal format for access is provided.

【0008】[0008]

【作用】本発明では、上記の装置を設けることにより、
状態管理装置13は、状態記憶装置14をみながら、各
々SQL文の依存関係を調べ、複数個のSQL文を一個
の内部形式に纏める事が可能な条件を満たしてにれば、
一個の内部形式に纏めて変換する。続いて内部形式記憶
装置15に記憶されデ−タベ−スアクセス要求装置17
に送られる。こうしてデ−タベ−ス処理装置42へのア
クセス回数を減らすことが出来る。
In the present invention, by providing the above device,
The state management device 13 checks the dependency relationship of each SQL statement while looking at the state storage device 14, and if a condition capable of collecting a plurality of SQL statements into one internal format is satisfied,
Converts in a single internal format. Subsequently, the data base access requesting device 17 is stored in the internal format storage device 15.
Sent to. In this way, the number of accesses to the database processing device 42 can be reduced.

【0009】[0009]

【実施例】以下本発明の一実施例を図面に基づいて詳細
に説明する。図1に本発明の実施例の構成図を、図2に
実施例における情報の流れを示す。SQLプリプロセス
装置16は、SQLプログラム10から読み込んだSQ
L文を内部形式に変換するプリプロセス装置11、読み
込んだSQL文を一時的に記憶するSQL文記憶装置1
2、新たに読み込んだSQL文をSQL文記憶装置12
に記憶されている今迄のSQL文との依存関係を判断す
るための状態管理装置13、現在の状態を記憶し、状態
管理装置13が判断を行うための情報を格納するための
状態記憶装置14、プリプロセス装置11が作成したデ
−タベ−スアクセスのための内部形式を一時的に記憶す
る内部形式記憶装置15より構成される。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the drawings. FIG. 1 shows a block diagram of an embodiment of the present invention, and FIG. 2 shows a flow of information in the embodiment. The SQL preprocessing device 16 uses the SQ read from the SQL program 10.
A preprocessing device 11 for converting an L statement into an internal format, and an SQL statement storage device 1 for temporarily storing the read SQL statement.
2. The SQL sentence storage device 12 stores the newly read SQL sentence.
State management device 13 for determining the dependency relationship with the previous SQL statement stored in, and a state storage device for storing the current state and storing information for the state management device 13 to make the determination 14, an internal format storage device 15 for temporarily storing the internal format for data base access created by the preprocessing device 11.

【0010】図2は、実施例によるSQLプログラム変
換の為の情報の流れを示したものである。まず、プリプ
ロセス装置21は、SQLプログラム20から一文のS
QL文201を読み込む。プリプロセス装置21は、S
QL文201を状態管理装置23へ送る202。状態管
理装置23は、SQL文記憶装置22に、現在記憶して
いるSQL文に関する情報を問い合わせ203、同時に
状態記憶装置24に現在の状態を問い合わせる204。
状態管理装置23は、SQL文記憶装置22からの情報
203と、状態記憶装置24からの情報204に基づい
て、プリプロセス装置21から新たに来たSQL文20
2が、SQL文記憶装置22に記憶されている今迄のS
QL文と一文に纏めてにデ−タベ−ス処理装置42に処
理を要求できるものであるかどうかを判定する。これを
重畳可能性の判定と呼ぶ。重畳可能性の判定結果はプリ
プロセス装置21に通知される。判定結果に基づき、プ
リプロセス装置21は内部形式記憶装置25の記憶内容
を、状態管理装置23はSQL文記憶装置22と状態記
憶装置24の記憶内容をそれぞれ処理する。
FIG. 2 shows the flow of information for SQL program conversion according to the embodiment. First, the pre-processing device 21 sends an S sentence of one sentence from the SQL program 20.
The QL sentence 201 is read. The preprocessing device 21 is
The QL sentence 201 is sent to the state management device 23 202. The state management device 23 inquires 203 of the SQL statement storage device 22 about the currently stored SQL sentence, and at the same time inquires 204 the state storage device 24 about the current state.
The state management device 23, based on the information 203 from the SQL statement storage device 22 and the information 204 from the state storage device 24, receives the SQL statement 20 newly received from the preprocessing device 21.
2 is the existing S stored in the SQL statement storage device 22.
It is determined whether or not the QL sentence and the sentence can collectively be requested to the database processing device 42. This is called superimposition possibility determination. The determination result of the superimposition possibility is notified to the preprocessing device 21. Based on the determination result, the preprocessing device 21 processes the stored contents of the internal format storage device 25, and the state management device 23 processes the stored contents of the SQL statement storage device 22 and the state storage device 24, respectively.

【0011】重畳可能性の判定条件は次による。デ−タ
ベ−ス処理装置42が、それ迄SQL文記憶装置22に
記憶されてきたSQL文と、プリプロセス装置21から
新たに来たSQL文202を一文に纏めて処理した場合
に、これらのSQL文を別々に実行した場合と同じ処理
結果になるならば、これらのSQL文を単一の処理要求
の為の内部形式に変換してもよい。プリプロセス装置2
1は、判定結果に基づいて、以下の動作をする。
The conditions for determining the possibility of superimposition are as follows. When the database processing device 42 collectively processes the SQL statement stored in the SQL statement storage device 22 and the SQL statement 202 newly received from the pre-processing device 21 into one sentence, these statements are processed. These SQL statements may be converted into an internal format for a single processing request if the processing results are the same as when the SQL statements are executed separately. Preprocessing equipment 2
1 performs the following operations based on the determination result.

【0012】重畳可能であれば、内部形式記憶装置25
に記憶されている内部形式を取り出す208。取り出さ
れた内部形式208に、状態管理装置23に新たに送っ
たSQL文202を追加し1回の要求に纏めた内部形式
に変換し、再び25に記憶させる209。この場合、状
態管理装置23は新たに送られてきたSQL文202を
追加して記憶するよう、SQL文記憶装置22に要求す
る205。同時に、状態管理装置23は状態記憶装置2
4に、現在が重畳処理中であることを示す情報を記憶さ
せる。
If the superposition is possible, the internal format storage device 25
208 retrieves the internal format stored in. The SQL statement 202 newly sent to the state management device 23 is added to the extracted internal format 208, converted into an internal format combined into one request, and stored again in 25 209. In this case, the state management device 23 requests 205 the SQL statement storage device 22 to additionally store the newly sent SQL statement 202. At the same time, the state management device 23 changes the state storage device 2
4 stores information indicating that the superimposition process is currently being performed.

【0013】重畳不可能な場合、状態管理装置23はS
QL文記憶装置22にこれまで記憶してきたSQL文を
破棄し、新たに送ってきたSQL文202を記憶するよ
う要求する205。更に状態記憶装置24に状態の変化
を通告する。プリプロセス装置21は、内部記憶装置2
5の記憶している内部形式を取り出してデ−タベ−スア
クセス要求装置27に通知し、内部に蓄積させる。続い
て新たなSQL文202を内部形式に変換し、内部形式
記憶装置25に記憶するよう要求する。
If superimposition is not possible, the state management device 23 uses S
Request 205 to discard the SQL sentence stored so far in the QL sentence storage device 22 and store the newly sent SQL sentence 202. Furthermore, the state change device 24 is notified of the state change. The preprocessing device 21 is the internal storage device 2.
The internal format stored in No. 5 is taken out, notified to the database access requesting device 27, and stored internally. Subsequently, the new SQL statement 202 is converted into the internal format and requested to be stored in the internal format storage device 25.

【0014】[0014]

【発明の効果】以上、詳細に説明したように本発明によ
れば、下記のような効果が期待される。本発明のSQL
プリプロセス装置によって、複数個のSQL文を一個の
デ−タベ−ス処理要求に変換することを可能にしたた
め、SQLを使ってデ−タベ−スを利用する場合に、従
来より少ない交信量でデ−タベ−スをアクセスすること
が出来、システムの性能向上を図ることが出来る。
As described in detail above, according to the present invention, the following effects are expected. SQL of the present invention
With the pre-processing device, it is possible to convert a plurality of SQL statements into a single database processing request. Therefore, when the database is used using SQL, the communication volume is smaller than before. The database can be accessed and the performance of the system can be improved.

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

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

【図2】本発明の実施例における情報の流れを示す図で
ある。
FIG. 2 is a diagram showing a flow of information in the embodiment of the present invention.

【図3】従来のSQLプリプロセス装置の構成図であ
る。
FIG. 3 is a configuration diagram of a conventional SQL preprocessing apparatus.

【図4】従来技術によるデ−タベ−スアクセスの実行例
である。
FIG. 4 is an execution example of a database access according to a conventional technique.

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

10 SQLプログラム 11 プリプロセス装置 12 SQL文記憶装置 13 状態管理装置 14 状態記憶装置 15 内部形式記憶装置 16 SQLプリプロセス装置 17 デ−タベ−スアクセス要求装置 10 SQL Program 11 Pre-Processing Device 12 SQL Statement Storage Device 13 State Management Device 14 State Storage Device 15 Internal Format Storage Device 16 SQL Pre-Processing Device 17 Data Base Access Request Device

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 SQL言語によるアクセスが可能なデ−
タベ−ス処理装置を有するSQLプリプロセス装置にお
いて、 読み込んだSQL文を記憶するための第1の手段と、 処理の状態を記憶するための第2の手段と、 記憶したSQL文と読み込んだSQL文と処理の状態か
ら、SQL文の重畳可能性を判定するための第3の手段
と、 SQL文の内部形式を格納するための第4の手段とを有
し、 前記第3の手段が前記第1の手段と前記第2の手段によ
る記録を参照することによって重畳可能性を判定し、複
数のSQL文を、単一のデ−タベ−スアクセス可能な内
部形式に変換するための手段を持つことを特徴とするS
QLプリプロセス装置。
1. A data accessible by SQL language.
In an SQL preprocessing device having a tabular processing device, a first means for storing the read SQL statement, a second means for storing the processing state, and a stored SQL statement and the read SQL statement. A third means for determining the possibility of superimposing an SQL sentence from the statement and the processing state; and a fourth means for storing the internal format of the SQL sentence, wherein the third means is A means for determining superimposition possibility by referring to the recording by the first means and the second means and converting a plurality of SQL sentences into a single database-accessible internal format. S characterized by having
QL pre-processing equipment.
JP3193515A 1991-07-08 1991-07-08 Sql preprocessing device Pending JPH05113919A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3193515A JPH05113919A (en) 1991-07-08 1991-07-08 Sql preprocessing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3193515A JPH05113919A (en) 1991-07-08 1991-07-08 Sql preprocessing device

Publications (1)

Publication Number Publication Date
JPH05113919A true JPH05113919A (en) 1993-05-07

Family

ID=16309350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3193515A Pending JPH05113919A (en) 1991-07-08 1991-07-08 Sql preprocessing device

Country Status (1)

Country Link
JP (1) JPH05113919A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100496983B1 (en) * 2002-07-24 2005-06-23 삼성에스디에스 주식회사 Method and system of managing sql query using metasql component

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59188765A (en) * 1983-04-11 1984-10-26 Nec Corp Processing device of data base inquiry
JPS59188766A (en) * 1983-04-11 1984-10-26 Nec Corp Processing device of data base retrieval
JPS62251849A (en) * 1986-04-25 1987-11-02 Hitachi Ltd Access optimizing system for data base
JPH02136929A (en) * 1988-11-17 1990-05-25 Nec Corp Reduction system for instruction sentence of object program
JPH02163831A (en) * 1988-12-16 1990-06-25 Nec Corp Object program reduction system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59188765A (en) * 1983-04-11 1984-10-26 Nec Corp Processing device of data base inquiry
JPS59188766A (en) * 1983-04-11 1984-10-26 Nec Corp Processing device of data base retrieval
JPS62251849A (en) * 1986-04-25 1987-11-02 Hitachi Ltd Access optimizing system for data base
JPH02136929A (en) * 1988-11-17 1990-05-25 Nec Corp Reduction system for instruction sentence of object program
JPH02163831A (en) * 1988-12-16 1990-06-25 Nec Corp Object program reduction system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100496983B1 (en) * 2002-07-24 2005-06-23 삼성에스디에스 주식회사 Method and system of managing sql query using metasql component

Similar Documents

Publication Publication Date Title
CN111723112B (en) Data task execution method and device, electronic equipment and storage medium
CN110196835B (en) Metadata processing method, metadata processing device and electronic equipment
US7882133B2 (en) Apparatus for processing integrated query from various sensor networks and method thereof
CN109241100B (en) Query method, device, equipment and storage medium
CN112506823A (en) FPGA data reading and writing method, device, equipment and readable storage medium
JPH11306021A (en) Data processor having plural pipeline processing mechanisms
JPH05113919A (en) Sql preprocessing device
JPH07141237A (en) Data base access control unit
JPH07146880A (en) Document retrieval device and method therefor
CN112966031A (en) Data processing method and device, electronic equipment and computer readable storage medium
JP3637606B2 (en) Data processing device
CN117812039B (en) Network address translation log recording method, system, equipment and medium
WO2024130795A1 (en) Optimization method for calling data execution on basis of distributed storage, and apparatus
JPH04107741A (en) Draw-out system for service procedure in rpc
CN116841516A (en) Data access method based on SystemVerilog
JPS62131349A (en) Data base processing system
CN115757410A (en) FlinkSQL dimension table join implementation method, device and medium
JP2586829B2 (en) MIB data implementation method in OSI management system
CN114371833A (en) Method for dynamically analyzing API, readable storage medium and computing device
JPH05151043A (en) Remote database access system
CN114880356A (en) Processing method, storage medium and equipment for database shared memory buffer pool
CN114492752A (en) Data processing method and device for neural network, computer equipment and storage medium
JPH0679296B2 (en) Multiple virtual address space access method and data processing device
CN115587571A (en) System data dictionary and associated table name conversion method
JPH07244601A (en) Method and device for accessing relational data base