JPH03189741A - Remote data base access method - Google Patents

Remote data base access method

Info

Publication number
JPH03189741A
JPH03189741A JP1327240A JP32724089A JPH03189741A JP H03189741 A JPH03189741 A JP H03189741A JP 1327240 A JP1327240 A JP 1327240A JP 32724089 A JP32724089 A JP 32724089A JP H03189741 A JPH03189741 A JP H03189741A
Authority
JP
Japan
Prior art keywords
client
cursor
server
row data
remote database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP1327240A
Other languages
Japanese (ja)
Inventor
Katsunori Terada
寺田 克則
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP1327240A priority Critical patent/JPH03189741A/en
Publication of JPH03189741A publication Critical patent/JPH03189741A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明はデータベース言語SQLによる遠隔データベー
スアクセス方法に係り、特にカーソル操作によってアク
セスする場合に用いて好適な遠隔データベースアクセス
方法に関する。
[Detailed Description of the Invention] [Object of the Invention] (Industrial Application Field) The present invention relates to a remote database access method using the database language SQL, and particularly relates to a remote database access method suitable for use when accessing by cursor operation. .

(従来の技術) 一般に、データベース言語SQLを用い、カーソル操作
によって遠隔データベースアクセス(例えばリレーショ
ナルデータベースを対象としたリモートアクセス)を行
なう場合は、カーソル宣言(宣言文)、カーソルのオー
プン(実行文)等をサーバ側へ送り、その処理の実行後
、行データの取出し要求(FETCH文)をサーバ側へ
送り、1件の行データを返送しており、このFETCH
文の転送と結果の行データの返送を繰返すことにより、
カーソル宣言で指定した条件を満たす全ての行データを
取出していた。
(Prior Art) Generally, when performing remote database access (for example, remote access to a relational database) using the database language SQL, cursor operations are performed using the following methods: cursor declaration (declaration statement), cursor open (execution statement), etc. is sent to the server side, and after the processing is executed, a row data retrieval request (FETCH statement) is sent to the server side, and one row data is returned, and this FETCH
By repeatedly transferring statements and returning the resulting row data,
All row data that met the conditions specified in the cursor declaration was being retrieved.

(発明が解決しようとする課題) 上記したように、従来のSQLのカーソル操作に於ける
遠隔データベースアクセスでは、FETCH文の転送と
結果の行データの返送を繰返すことにより、カーソル宣
言で指定した条件を満たす全ての行データを取出してい
たため、FETCH文と結果の行データの転送のための
時間が多くかかってしまい、又、同じFETCH文を繰
返し転送すること、並びに結果の行データを1件ずつ転
送することから転送データ量も多くなってしまうという
問題があった。
(Problems to be Solved by the Invention) As described above, in remote database access in conventional SQL cursor operations, by repeating the transfer of the FETCH statement and the return of the resulting row data, the conditions specified in the cursor declaration are Because all the row data that satisfies the requirements were retrieved, it took a lot of time to transfer the FETCH statement and the resulting row data.Also, it was necessary to repeatedly transfer the same FETCH statement and to transfer the resulting row data one by one. There is a problem in that the amount of data to be transferred increases due to the transfer.

本発明は上記実情に鑑みなされたもので、データベース
言語SQLによって遠隔データベースアクセスを行なう
際に、サーバ側がカーソル宣言にて指定された条件を満
たす全ての行データをカーソル宣言時或いはカーソルの
オープン時にクライアント側へ転送し、以後のFETC
H文の実行をクライアント側のみで行なうようにして、
クライアント側とサーバ側との間に於けるFETCH文
や行データ等の転送時間及び転送量を大幅に低減するこ
とのできる遠隔データベースアクセス方法を提供するこ
とを目的とする。
The present invention has been made in view of the above circumstances, and when remote database access is performed using the database language SQL, the server side sends all row data that satisfies the conditions specified in the cursor declaration to the client at the time of the cursor declaration or when the cursor is opened. Transfer to the side and subsequent FETC
Execute the H statement only on the client side,
It is an object of the present invention to provide a remote database access method that can significantly reduce the time and amount of transfer of FETCH statements, line data, etc. between the client side and the server side.

[発明の構成] (課題を解決するための手段及び作用)本発明による遠
隔データベースアクセス方法は、クライアント側に、第
2図(a)に示す如く、カーソル宣言の条件を満たす全
ての行データを取出し、カーソル宣言時或いはカーソル
のオープン時にクライアント側へ転送する手段を設け、
サーバ側に、同図(b)に示す如く、サーバ側より受け
た行データ群を貯え、以後のFETCH文を上記貯えた
行データ群から1件ずつ取出して実行する手段を設ける
ことにより実現される。即ち、クライアントは、遠隔デ
ータベースアクセスを行なう利用者からのカーソル宣言
やカーソルのオープン要求を受取ると、そのアクセス要
求をサーバへ伝える。サーバはそのアクセス要求を受取
ると、対象となるデータベースへアクセスして、カーソ
ル宣言の条件を満たす全ての行データをクライアントへ
渡す。クライアントはサーバより受取ったカーソル宣言
の条件を満たす全ての行データを主記憶装置或いは補助
記憶装置に蓄え、以後、利用者からFETCH文を受け
ると上記記憶装置に蓄えた行データから1件を取出し、
利用者へ返却する。このような遠隔データベースアクセ
スにより、クライアント側とサーバ側との間でのFET
CH文や行データ等の転送時間及び転送量を大幅に低減
できる。
[Structure of the Invention] (Means and Effects for Solving the Problems) The remote database access method according to the present invention provides the client side with all row data that satisfies the conditions of the cursor declaration, as shown in FIG. 2(a). Provide a means for retrieving, transferring to the client side when declaring a cursor or opening a cursor,
This is achieved by providing a means on the server side to store the row data group received from the server side and to extract and execute subsequent FETCH statements one by one from the stored row data group, as shown in FIG. Ru. That is, when the client receives a cursor declaration or a cursor open request from a user accessing a remote database, the client transmits the access request to the server. When the server receives the access request, it accesses the target database and passes all row data that satisfies the conditions of the cursor declaration to the client. The client stores all row data that satisfies the conditions of the cursor declaration received from the server in the main memory or auxiliary storage, and thereafter, when it receives a FETCH statement from the user, retrieves one item from the row data stored in the storage device. ,
Return it to the user. Such remote database access allows FET between the client side and the server side.
The time and amount of transfer of CH statements, line data, etc. can be significantly reduced.

(実施例) 以下図面を参照して本発明の一実施例を説明する。(Example) An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例による構成を示すブロック図
である。
FIG. 1 is a block diagram showing a configuration according to an embodiment of the present invention.

第1図に於いて、■は一つの計算機組織でなるクライア
ントであり、遠隔データベースアクセスを行なう利用者
の応用プログラムが動作する。2はクライアント1とは
別の一つの計算機組織でなるサーバであり、遠隔データ
ベースアクセスの対象となるデータベースが存在する。
In FIG. 1, ``■'' is a client consisting of one computer organization, and a user's application program that accesses a remote database runs thereon. A server 2 is a computer organization different from the client 1, and there is a database to be accessed remotely.

3はクライアント1とサーバ2との間の通信路となる通
信回線であり、クライアントlの計算機とサーバ2の計
算機との間の情報交換を可能とする。11はクライアン
トlに設けられた利用者プログラムであり、カーソル宣
言、カーソルのオープン、FETCH文などの遠隔デー
タベースアクセスの要求を発行する。12はクライアン
トlに設けられた処理プログラムAであり、第2図(a
)に示す処理機能を含む遠隔データベースアクセス処理
を実行する。
A communication line 3 serves as a communication path between the client 1 and the server 2, and enables information exchange between the computer of the client 1 and the computer of the server 2. Reference numeral 11 denotes a user program provided in the client 1, which issues requests for remote database access such as cursor declaration, cursor opening, and FETCH statements. 12 is a processing program A provided in the client l, and is shown in FIG.
) Executes remote database access processing including the processing functions shown in ().

21はサーバ2に設けられたデータベースであり、遠隔
データベースアクセスの対象となる。22はサーバ2に
設けられた処理プログラムBであり、第2図(b)に示
す処理機能を含む遠隔データベースアクセス処理を実行
する。
Reference numeral 21 denotes a database provided in the server 2, which is a target of remote database access. 22 is a processing program B provided in the server 2, which executes remote database access processing including the processing functions shown in FIG. 2(b).

第2図は本発明の一実施例に於ける動作処理手順を示す
フローチャートであり、同図(a)はクライアントlの
処理手順を示すフローチャート、同図(b)はサーバ2
の処理手順を示すフローチャートである。
FIG. 2 is a flowchart showing the operation processing procedure in an embodiment of the present invention, in which (a) is a flowchart showing the processing procedure of the client 1, and (b) is a flowchart showing the processing procedure of the server 2.
2 is a flowchart showing a processing procedure.

第2図に於いて、81〜S4はクライアントIの処理ス
テップであり、このうちSlは遠隔データベースアクセ
スを行なう利用者からの要求がカーソル宣言又はカーソ
ルのオープンであるかFETCH文であるかを判定する
ステップ、S2は利用者の要求がFETCH文である際
に、ステップS4で蓄えた行データから1件を取出し利
用者へ返却するステップである。S3は利用者からの要
求がカーソル宣言又はカーソルのオープンであるとき、
サーバ2へ遠隔データベースアクセス要求を送出するス
テップであり、カーソル宣言或いはカーソルのオープン
の要求をサーバ2へ通知する。S4はカーソル宣言で指
定した条件を満たす全ての行データをサーバ2より受は
格納するステップであり、サーバ2から返送された全て
の行データをクライアント1の計算機組織にある主記憶
装置又は補助記憶装置へ蓄える。Sll、S12はサー
バ2の処理ステップであり、このうちSllはクライア
ントlからの要求を受取るステップである。S12は行
データをクライアントlへ返送するステップであり、ク
ライアントlからの要求に従いデータベース21をアク
セスしてカーソル宣言で指定した条件を満たす全ての行
データを取出し、クライアント1へ返送する。
In FIG. 2, 81 to S4 are processing steps of client I, and among these, Sl determines whether the request from the user accessing the remote database is a cursor declaration, a cursor open, or a FETCH statement. Step S2 is a step of extracting one item from the row data stored in step S4 and returning it to the user when the user's request is a FETCH statement. When the request from the user is to declare a cursor or open a cursor, S3
This is a step of sending a remote database access request to the server 2, and notifies the server 2 of a cursor declaration or cursor open request. S4 is a step in which all row data satisfying the conditions specified in the cursor declaration is received from the server 2 and stored, and all row data returned from the server 2 is stored in the main storage or auxiliary storage in the computer organization of the client 1. Store in device. Sll and S12 are processing steps of the server 2, and among these, Sll is a step for receiving a request from the client l. S12 is a step of returning the line data to the client 1, in which the database 21 is accessed in accordance with a request from the client 1, all line data satisfying the conditions specified in the cursor declaration are retrieved, and the data is returned to the client 1.

ここで上記第1図及び第2図を参照して本発明の一実施
例に於ける動作を説明する。
The operation of an embodiment of the present invention will now be described with reference to FIGS. 1 and 2.

クライアントlでは、遠隔データベースアクセスを行な
う利用者からのカーソル宣言やカーソルのオープン要求
を受けると、そのアクセス要求を通信回線3を介してサ
ーバ2へ通知する(第2図ステップSl、S3)。即ち
、クライアントlの処理プログラムA12は利用者プロ
グラム11からカーソル宣言やカーソルのオープン要求
が発行されると、そのアクセス要求を所定の通信手段に
より通信回線3を介してサーバ2の処理プログラムB2
2に受渡す。
When the client 1 receives a cursor declaration or a cursor open request from a user who is accessing a remote database, it notifies the server 2 of the access request via the communication line 3 (steps S1 and S3 in FIG. 2). That is, when a cursor declaration or a cursor open request is issued from the user program 11, the processing program A12 of the client 1 transmits the access request to the processing program B2 of the server 2 via the communication line 3 using a predetermined communication means.
Hand it over to 2.

サーバ2はクライアントlから上記アクセス要求を受取
ると、対象となるデータベース21ヘアクセスしてカー
ソル宣言の条件を満たす全ての行データを取出し、その
行データをクライアントlへ返送する(第2図ステップ
Sll、  512)。即ち、サーバ2の処理プログラ
ムB22は通信回線3を介してクライアントlの処理プ
ログラムA12より上記アクセス要求を受けると、対象
となるデータベース21へアクセスしてカーソル宣言の
条件を満たす全ての行データを取出し、その行データの
全てを通信回線3を介しクライアントlの処理プログラ
ムA12へ転送する。
When the server 2 receives the above access request from the client l, it accesses the target database 21, retrieves all the row data that satisfies the conditions of the cursor declaration, and sends the row data back to the client l (step Sll in FIG. 2). , 512). That is, when the processing program B 22 of the server 2 receives the above access request from the processing program A 12 of the client 1 via the communication line 3, it accesses the target database 21 and retrieves all row data that satisfies the conditions of the cursor declaration. , transfers all of the row data to the processing program A12 of the client l via the communication line 3.

クライアント1はサーバ2より受けた、カーソル寡言に
従う全ての行データを主記憶装置又は補助記憶装置に蓄
える(第2図ステップS4)。即ち、クライアント1の
処理プログラムAI2は、通信回線3を介してサーバ2
の処理プログラムB22より、カーソル宣言に従う行デ
ータを受けると、その行データの全てを自己のアクセス
制御対象にある計算機の主記憶装置又は補助記憶装置に
格納する。
The client 1 stores all line data according to the cursor command received from the server 2 in the main memory or auxiliary memory (step S4 in FIG. 2). That is, the processing program AI2 of the client 1 is sent to the server 2 via the communication line 3.
When the line data according to the cursor declaration is received from the processing program B22, all of the line data is stored in the main memory or auxiliary memory of the computer that is subject to its own access control.

その後、クライアントlは、利用者からFETCH文を
受取ると、上記主記憶装置又は補助記憶装置に蓄えた行
データから1件を取出し、利用者へ返却する(第2図ス
テップS2)。即ち、利用者プログラム11からFET
CH文が発行されると処理プログラムA12は、サーバ
2とのデータ更新を行なわず、自己の制御対象にある主
記憶装置又は補助記憶装置をアクセスして同記憶装置に
記憶した行データから1件を取出し、利用者プログラム
11へ返却する。このように、クライアントlは利用者
からFETCH文を受取ると、そのFETCH文をサー
バ2に送出せず、自己の制御対象にある主記憶装置又は
補助記憶装置に記憶した行データから1件を取出して利
用者に渡す。この処理をFETCH文を受取る毎に繰返
し実行する。従ってクライアント1とサーバ2との間に
通信路を介してのFETCH文や行データの転送処理が
介在しなくなり、しかもクライアントlとサーバ2との
処理負荷が大幅に軽減されることから、高速かつ円滑な
遠隔データベースアクセス機構が実現できる。
After that, when the client l receives a FETCH statement from the user, it retrieves one item from the row data stored in the main storage device or auxiliary storage device and returns it to the user (step S2 in FIG. 2). That is, from the user program 11
When the CH statement is issued, the processing program A12 does not update the data with the server 2, but accesses the main storage device or auxiliary storage device under its own control and reads one item from the row data stored in the storage device. is taken out and returned to the user program 11. In this way, when the client l receives a FETCH statement from the user, it does not send the FETCH statement to the server 2, but retrieves one item from the row data stored in the main storage or auxiliary storage that is under its control. and hand it to the user. This process is repeatedly executed every time a FETCH statement is received. Therefore, there is no need to transfer FETCH statements or row data between client 1 and server 2 via a communication path, and the processing load on client 1 and server 2 is significantly reduced, resulting in high-speed and A smooth remote database access mechanism can be realized.

上記した遠隔データベースアクセス方法は各種の遠隔デ
ータベースアクセス機構や分散データベース機構に於い
て広く適用可能である。
The remote database access method described above is widely applicable to various remote database access mechanisms and distributed database mechanisms.

[発明の効果] 以上詳記したように本発明の遠隔データベースアクセス
方法によれば、SQLによって遠隔データベー人アクセ
スを行なう際に、カーソル宣言にて指定された条件を満
たす全ての行データをカーソル宣言時或いはカーソルの
オープン時にクライアント側へ転送し、以後のFETC
H文の実行をクライアント側のみで行なうことにより、
クライアント側とサーバ側との間に於けるFETCH文
や行データ等の転送時間及び転送量を大幅に低減するこ
とができる。
[Effects of the Invention] As detailed above, according to the remote database access method of the present invention, when remote database access is performed using SQL, all row data that satisfies the conditions specified in the cursor declaration can be accessed using the cursor. Transferred to the client side when declaring or opening a cursor, and subsequent FETC
By executing the H statement only on the client side,
The time and amount of transfer of FETCH statements, line data, etc. between the client side and the server side can be significantly reduced.

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

第1図は本発明の一実施例を示すブロック図、第2図(
a)、(b)はそれぞれ上記実施例の処理フローを示す
もので、同図(a)はクライアント側の処理手順を示す
フローチャート、同図(b)はサーバ側の処理手順を示
すフローチャートである。
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG. 2 (
Figures a) and (b) respectively show the processing flow of the above embodiment, where (a) is a flowchart showing the processing procedure on the client side, and (b) is a flowchart showing the processing procedure on the server side. .

Claims (1)

【特許請求の範囲】[Claims] SQLによって遠隔データベースアクセスを行なう際に
、カーソル宣言にて指定された条件を満たす全ての行デ
ータをカーソル宣言時或いはカーソルのオープン時にク
ライアント側へ転送し、以後のFETCH文の実行をク
ライアント側のみで行なうことを特徴とした遠隔データ
ベースアクセス方法。
When accessing a remote database using SQL, all row data that satisfies the conditions specified in the cursor declaration is transferred to the client side when the cursor is declared or opened, and subsequent FETCH statements are executed only on the client side. A remote database access method characterized by:
JP1327240A 1989-12-19 1989-12-19 Remote data base access method Pending JPH03189741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1327240A JPH03189741A (en) 1989-12-19 1989-12-19 Remote data base access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1327240A JPH03189741A (en) 1989-12-19 1989-12-19 Remote data base access method

Publications (1)

Publication Number Publication Date
JPH03189741A true JPH03189741A (en) 1991-08-19

Family

ID=18196897

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1327240A Pending JPH03189741A (en) 1989-12-19 1989-12-19 Remote data base access method

Country Status (1)

Country Link
JP (1) JPH03189741A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06103129A (en) * 1992-08-03 1994-04-15 Internatl Business Mach Corp <Ibm> Method and device for data transfer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06103129A (en) * 1992-08-03 1994-04-15 Internatl Business Mach Corp <Ibm> Method and device for data transfer

Similar Documents

Publication Publication Date Title
US6353828B1 (en) Concurrency control for transactions that update base tables of a materialized view using different types of locks
US6105017A (en) Method and apparatus for deferring large object retrievals from a remote database in a heterogeneous database system
US5493728A (en) System and methods for optimized access in a multi-user environment
US6321234B1 (en) Database server system with improved methods for logging transactions
US5774716A (en) Computer program product to enable multiple computer systems to share single sequential log
JPS5839341A (en) Method and device for data access control of data base management system
JPH09167145A (en) How to access the message queue
JPH10240590A (en) Parallel database system routine execution method
US20090198703A1 (en) Intelligent data storage system
US5920860A (en) Method and apparatus for accessing of large object data segments from a remote database
CN107704603A (en) A kind of method and device for realizing read and write abruption
JPH03189741A (en) Remote data base access method
JPH1011464A (en) Client / server type database system
US20030018653A1 (en) Database management method, system for practicing the method and medium recording process program
US7526489B2 (en) Methods to integrate user-defined operations into a database
JP3330006B2 (en) Network system including information storage system, input system of the system, and
JP2780601B2 (en) Message batch processing system
JPH1091503A (en) Information resource management control method and system
JPH0293862A (en) Record retrieving mechanism in network type data base
JP2816430B2 (en) Set fetch processing method
JPH0410038A (en) Remote access system
JP4241216B2 (en) Database management method, execution apparatus, and processing program
JPH01120621A (en) Retrieving/updating system for data base
JPS63269224A (en) Data base access system
JPH064447A (en) Asynchronous i/o processing system