JP2001101221A - Data base access system and its method - Google Patents

Data base access system and its method

Info

Publication number
JP2001101221A
JP2001101221A JP28107499A JP28107499A JP2001101221A JP 2001101221 A JP2001101221 A JP 2001101221A JP 28107499 A JP28107499 A JP 28107499A JP 28107499 A JP28107499 A JP 28107499A JP 2001101221 A JP2001101221 A JP 2001101221A
Authority
JP
Japan
Prior art keywords
query result
database
query
access method
synchronous
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
JP28107499A
Other languages
Japanese (ja)
Inventor
Chikayoshi Nakano
智加良 中野
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.)
NTT Data Group Corp
Original Assignee
NTT Data 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 NTT Data Corp filed Critical NTT Data Corp
Priority to JP28107499A priority Critical patent/JP2001101221A/en
Publication of JP2001101221A publication Critical patent/JP2001101221A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a data base accessing system with excellent operability and responsiveness. SOLUTION: An asynchronous data base accessing method is normally performed by an application program 4, however, the method is switched to a synchronous data base accessing method if necessary. A query result buffering/ information part 11 can cope with both accessing methods. A query result acquiring part 8 and the query result buffering/informing part 11 are simultaneously operated in parallel as separate threads. The query result acquiring part 8 has a function to adjust the number of acquired records in each time so as to suitably shorten time intervals at which query results are successively acquired in the case of the asynchronous accessing method. The query result buffering/informing part 11 has a function to enable a user to cancel acquisition of the query results halfway in the case of the synchronous accessing method.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の技術分野】本発明は、データベースへのアクセ
ス方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for accessing a database.

【0002】[0002]

【従来の技術】データベースへのアクセス方法には、一
般に、同期アクセス方法と非同期アクセス方法がある。
同期的アクセス方法では、データベースへの問い合わせ
(クエリー発行)と、データベースからのクエリー結果
(検索結果)の取得とが同期的に行われる。同期的アク
セス方法を採用するアプリケーション(GUI部分)
は、データベースへのクエリーを発した後、データベー
スから全てのクエリー結果(検索結果)を取得し終わる
まで、他の処理に進まずに待つ。全てのクエリー結果を
取得して、それをGUI(例えばリストボックス)に表
示し終わってから、他の処理へ進むことができるように
なる。そのため、全てのクエリー結果が取得され表示さ
れ終わるまで、ユーザはアプリケーションに対して他の
操作を行なうことができない。特に、データベースの負
荷、又はデータベースとの間の通信ネットワークの負荷
が高いときは、ユーザは長時間待たされることになり、
アプリケーションの応答性と操作性が低下する。
2. Description of the Related Art Generally, a method for accessing a database includes a synchronous access method and an asynchronous access method.
In the synchronous access method, an inquiry to the database (issuance of a query) and acquisition of a query result (search result) from the database are performed synchronously. Application that adopts synchronous access method (GUI part)
Issues a query to the database and waits until all query results (search results) have been obtained from the database without proceeding to other processing. After obtaining all the query results and displaying them in a GUI (for example, a list box), it becomes possible to proceed to other processing. Therefore, the user cannot perform another operation on the application until all the query results are obtained and displayed. In particular, when the load of the database or the load of the communication network with the database is high, the user has to wait for a long time,
The responsiveness and operability of the application decrease.

【0003】この問題を解決するのが、非同期的アクセ
ス方法である。同方式では、データベースへの問い合わ
せとクエリー結果取得とが非同期的に行われる。すなわ
ち、同方式を採用するアプリケーションは、クエリーを
発した後、クエリー結果がイベントとしてメッセージに
より通知されたときのみそのクエリー結果をリストボッ
クスに表示するだけであり、そのとき以外は他の処理が
行える。従って、全てのクエリー結果を取得し終わらな
くても、ユーザはアプリケーションに対して他の操作を
行うことができる。
[0003] The asynchronous access method solves this problem. In this method, the inquiry to the database and the query result acquisition are performed asynchronously. In other words, an application that employs the same method only issues a query and then displays the query result in a list box only when the query result is notified by a message as an event. Other than that time, other processes can be performed. . Therefore, the user can perform other operations on the application without acquiring all the query results.

【0004】[0004]

【発明が解決しようとする課題】非同期的アクセス方法
では、クエリー発行後、メッセージが到来する都度、取
得されたクエリー結果がGUIのリストボックスなどに
逐次的に表示されていくが、ユーザにとっては、「もう
全てのクエリー結果を取得し終わった」のか「まだ終わ
ってない」のかが分りずらい。特に、クエリー結果を最
後まで完全に表示させてから、次の操作へ進む必要があ
るような場合、上記の分りずらさが、かえって操作性を
低下させてしまう。
In the asynchronous access method, after a query is issued, each time a message arrives, the obtained query result is sequentially displayed in a list box or the like of a GUI. It's hard to tell if you've finished getting all the query results or if you're not done yet. In particular, when it is necessary to display the query result completely until the end, and then proceed to the next operation, the above-mentioned inconsistency rather reduces the operability.

【0005】従って、本発明の目的は、これらの問題点
を解消し、操作性及び応答性に優れたデータベースアク
セス方式を提供することにある。
Accordingly, it is an object of the present invention to solve these problems and to provide a database access method excellent in operability and responsiveness.

【0006】[0006]

【課題を解決するための手段】本発明に従うデータベー
スアクセス方式は、ユーザが操作することができ、デー
タベースに対するクエリーを発し、データベースからの
クエリ結果の通知を受けるアプケーションプログラム
と、このアプリケーションプログラムから発されたクエ
リーに対するクエリ結果を、データベースから取得する
クエリー結果取得手段と、このクエリー結果取得手段が
取得したクエリー結果をアプリケーションプログラムに
通知するクエリー結果通知手段とを備える。そして、ア
プリケーションプログラムは、非同期的なデータベース
アクセス方法と同期的なデータベースアクセス方法を選
択的に用いてデータベースにアクセスすることができ、
また、クエリー結果通知手段は、アプリケーションプロ
グラムが行う非同期的なデータベースアクセス方法と同
期的なデータベースアクセス方法にそれそれ対応した非
同期的な方法と同期的な通知方法を選択的に用いて、ク
エリー結果をアプリケーションに通知するようになって
いる。
According to the present invention, there is provided a database access method which can be operated by a user, issues a query to a database, and receives notification of a query result from the database. Query result acquiring means for acquiring a query result for the obtained query from the database; and query result notifying means for notifying the application program of the query result acquired by the query result acquiring means. Then, the application program can access the database by selectively using the asynchronous database access method and the synchronous database access method,
In addition, the query result notifying means selectively uses an asynchronous method and a synchronous notification method corresponding to the asynchronous database access method and the synchronous database access method performed by the application program, and transmits the query result. The application is notified.

【0007】好適な実施形態では、アプリケーションプ
ログラムは、標準的に非同期的なアクセス方法でデータ
ベースにアクセスし、ユーザから要求があると、非同期
的なアクセス方法から同期的アクセス方法に切り替える
てデータベースにアクセスする。
In a preferred embodiment, the application program accesses the database using a standard asynchronous access method, and switches from the asynchronous access method to the synchronous access method when requested by the user to access the database. I do.

【0008】好適な実施形態では、クエリー結果取得手
段が、データベースから一度に取得するクエリー結果の
量を調整する機能を有している。
[0008] In a preferred embodiment, the query result obtaining means has a function of adjusting the amount of query results obtained at a time from the database.

【0009】好適な実施形態では、同期的データベース
アクセス方法が行われているとき、クエリ結果取得をユ
ーザの要求でキャンセルする手段が更に設けられてい
る。
In a preferred embodiment, there is further provided means for canceling query result acquisition at the request of the user when the synchronous database access method is being performed.

【0010】好適な実施形態では、クエリー取得手段と
クエリー結果通知手段とが、別のスレッドとして、同時
並行的に動作できるようになっている。
[0010] In a preferred embodiment, the query acquisition means and the query result notification means can operate simultaneously and concurrently as separate threads.

【0011】[0011]

【発明の実施の形態】図1は、本発明の一実施形態に係
るデータベースアクセス方式の構成を示す。
FIG. 1 shows the configuration of a database access system according to an embodiment of the present invention.

【0012】データベースを利用するクライアントシス
テム1が、そのデータベースを管理するデータベース管
理システム3と通信可能に接続されている。クライアン
トシステム1とデータベース管理システム3とは、典型
的には、別のコンピュータマシンを用いて構成され、マ
シン間を結ぶ通信ネットワークなどを通じて通信するよ
うになっている。しかし、これは単なる一例であり、他
の形態、例えばクライアントシステム1とデータベース
管理システム3が同じコンピュータマシンで構成されて
いてもよい。
A client system 1 that uses a database is communicably connected to a database management system 3 that manages the database. The client system 1 and the database management system 3 are typically configured using different computer machines, and communicate with each other via a communication network connecting the machines. However, this is only an example, and other forms, for example, the client system 1 and the database management system 3 may be configured by the same computer machine.

【0013】クライアントシステム1は、GUI(グラ
フィックユーザインタフェース)を画面に表示するアプ
リケーションプログラム4と、このアプリケーションプ
ログラム(つまり、GUI)4とは別に用意された、デ
ータベースアクセスを実際に行うためのプログラム(デ
ータベースアクセス部)13とを備える。
The client system 1 includes an application program 4 for displaying a GUI (graphic user interface) on a screen, and a program (a GUI) 4 provided separately from the application program for actually performing database access. Database access unit) 13.

【0014】データベースアクセス部13は、アプリケ
ーションプログラム4からクエリーを受けそれをデータ
ベース管理システム3へ発行するデータベースクエリー
発行部5、データベース管理システム3からクエリー結
果を受信するクエリー結果取得部8、及びアプリケーシ
ョンプログラム4にクエリー結果を通知するクエリー結
果バッファリング/通知部11という3つの機能要素か
ら構成される。さらに、データベースアクセス部13
は、クエリー結果を一時的に蓄積するための共通バッフ
ァ9を有する。
The database access unit 13 receives a query from the application program 4, issues the query to the database management system 3, issues a query result from the database management system 3, receives a query result from the database management system 3, and obtains an application program. 4 is a query result buffering / notification unit 11 for notifying the query result to three. Further, the database access unit 13
Has a common buffer 9 for temporarily storing query results.

【0015】データベースクエリー発行部5は、アプリ
ケーションプログラム4からクエリーを受けるクエリー
受付部6と、クエリー受付部6からクエリーを受けそれ
をデータベース管理システム3に送るクエリー実発行部
7とを有する。クエリー受付部6とクエリー実発行部7
は、後述するように別のスレッドに属するので、同時並
行的に動作でき、そして、両者間ではスレッド間通信用
メッセージによってクエリーを受け渡しする。
The database query issuing unit 5 includes a query receiving unit 6 that receives a query from the application program 4 and a query actual issuing unit 7 that receives a query from the query receiving unit 6 and sends the query to the database management system 3. Query receiving unit 6 and actual query issuing unit 7
Belongs to another thread, as will be described later, so that they can operate simultaneously and in parallel, and pass a query between them using an inter-thread communication message.

【0016】クエリー結果取得部8は、データベース管
理システム3からクエリー結果(検索結果)を取得し
て、そのクエリー結果を共通バッファ9に格納する。後
述するように、クエリー結果取得部8は、所定の望まし
い時間間隔で逐次にクエリー結果を取得していけるよう
に、一度に取得するクエリー結果のレコード数を最適化
する機能を有している。
The query result obtaining unit 8 obtains a query result (search result) from the database management system 3 and stores the query result in the common buffer 9. As will be described later, the query result obtaining unit 8 has a function of optimizing the number of records of the query results to be obtained at one time so that the query results can be sequentially obtained at predetermined desired time intervals.

【0017】クエリー結果バッファリング/通知部11
は、共通バッファ9をポーリングにより常に監視してお
り、共通バッファ9にクエリー結果が入ると、そのクエ
リー結果をアプリケーションプログラム4に通知する。
クエリー結果バッファリング/通知部11は、後述する
ようにクエリー結果取得部8とは別のスレッドに属し、
クエリー結果取得部8とは同時並行的に動作できる。
Query result buffering / notification unit 11
Always monitors the common buffer 9 by polling, and when a query result enters the common buffer 9, notifies the application program 4 of the query result.
The query result buffering / notification unit 11 belongs to a different thread from the query result acquisition unit 8 as described later,
It can operate concurrently with the query result acquisition unit 8.

【0018】クエリー結果バッファリング/通知部11
がクエリー結果をアプリケーションプログラム4に通知
する方法には、「非同期的」な方法と「同期的」な方法
の2通りがある。非同期的な方法とは、共通バッファ9
にクエリー結果が入る都度、そのクエリー結果をイベン
トとして、アプリケーションプログラム4にメッセージ
で通知する方法である。アプリケーションプログラム4
は、そのメッセージを受けたときだけクエリー結果を表
示すれば良く、他の時は別の処理を行うことができる。
つまり、アプリケーションプログラム4は、非同期的ア
クセス方法で動作することができる。
Query result buffering / notification unit 11
There are two methods for notifying the application program 4 of the query result: an "asynchronous" method and a "synchronous" method. The asynchronous method refers to the common buffer 9
Each time a query result is input to the application program 4, the query result is notified as an event to the application program 4 by a message. Application program 4
Needs to display the query result only when it receives the message, and can perform another process at other times.
That is, the application program 4 can operate by the asynchronous access method.

【0019】クエリー結果バッファリング/通知部11
は、標準的には上記の非同期的な方法でクエリー結果を
アプリケーションプログラム4に通知する。しかし、ア
プリケーションプログラム4からクエリー結果取得要求
が来た場合には、非同期的な通知方法から以下の同期的
な通知方法に切り替える。
Query result buffering / notification unit 11
Notifies the application program 4 of the query result by the above asynchronous method. However, when a query result acquisition request is received from the application program 4, the asynchronous notification method is switched to the following synchronous notification method.

【0020】同期的な通知方法とは、アプリケーション
プログラム4からのクエリー結果取得要求に応答して、
要求されたクエリー結果をアプリケーションプログラム
4に通知する方法である。この場合、アプリケーション
プログラム4は、同期的アクセス方法による動作を行う
ことになり、要求した全てのクエリー結果が通知される
まで、他の処理には進まない。
The synchronous notification method means that in response to a query result acquisition request from the application program 4,
This is a method of notifying the application program 4 of the requested query result. In this case, the application program 4 operates according to the synchronous access method, and does not proceed to other processing until all requested query results are notified.

【0021】この同期的な通知方法を用いる場合、クエ
リー結果バッファリング/通知部11は、全クエリーの
取得に一定時間以上かかるか否かを判断し、かかると判
断した場合には、後に説明するダイアログボックス(図
6参照)を画面に表示して、ユーザにクエリー結果の取
得を続けるかキャンセルするかを選択させる機能を有し
ている。そのダイアログボックス上でユーザがキャンセ
ルを選択した場合には、クエリー結果バッファリング/
通知部11は、クエリ結果を返す代わりにキャンセル通
知をアプリケーションプログラム4に返し、それによ
り、アプリケーションプログラム4は、クエリー結果を
受けて表示する処理から抜けて、他の処理へ進むことが
できるようになる。
When this synchronous notification method is used, the query result buffering / notification unit 11 determines whether or not it takes a certain time or more to acquire all the queries. It has a function of displaying a dialog box (see FIG. 6) on the screen and allowing the user to select whether to continue acquiring or cancel the query result. If the user selects cancel on that dialog box, the query result buffering /
The notification unit 11 returns a cancellation notification to the application program 4 instead of returning the query result, so that the application program 4 can exit from the process of receiving and displaying the query result and proceed to another process. Become.

【0022】上述した構成のデータベースアクセス部1
3は、アプリケーションプログラム4と通信しつつ協働
する一つのコンポーネント、例えば、マイクロソフト社
のWindows環境で普及している技術を利用したとすれ
ば、COM(Component Object Model)で定義された方法で
アプリケーションプログラム4と通信しつつ協働するAc
tiveXコンポーネント、として実装することができる。
ただし、これは一例にすぎず、Java Beansやその他のコ
ンポーネント技術を用いて実装することも可能である。
また、個々の機能要素5(6、8)、7、11を別々の
コンポーネントとして実装することも可能である。さら
に、コンポーネント化しない実装方法も可能である。
The database access unit 1 having the above configuration
Reference numeral 3 denotes a component that cooperates with the application program 4 while communicating with the application program 4. For example, if a technology widely used in the Windows environment of Microsoft Corporation is used, an application is defined by a method defined by COM (Component Object Model). Ac working with and communicating with Program 4
tiveX components, which can be implemented as
However, this is only an example, and implementation using Java Beans or other component technologies is possible.
Also, the individual functional elements 5 (6, 8), 7, 11 can be implemented as separate components. Furthermore, a mounting method without using components is also possible.

【0023】このクライアントシステム1は、Windows
環境のようなマルチスレッドをサポートするOS環境を用
いることにより、同時並行的に動作する複数のスレッ
ド、例えば、アプリケーションプログラム(つまりGU
I)4及びこれと通信する機能要素、つまりクエリー受
付部6及びクエリー結果バッファリング/通知部11、
から構成されるユーザインタフェーススレッド15と、
データベースにアクセスする機能要素、つまりクエリー
実発行部7及びクエリー結果取得部8、から成るデータ
ベースアクセスレッド17との2つのスレッドに分けて
構成することができる。このようにユーザインタフェー
ススレッド15とデータベースアクセスレッド17に分
けることで、アプリケーションプログラム4つまりGU
Iの動作と、データベースアクセス動作とが、同時並行
的に実行することができる。ただし、これは一例にずぎ
ず、他の実装方法も可能である。例えば、マルチスレッ
ドをサポートしないOS環境において、データベースアク
セス13が、アプリケーションプログラム4に対するメ
ッセージループ中のアイドル時に、データベースアクセ
スを行なうという方法でも実装可能である。
This client system 1 uses Windows
By using an OS environment that supports multi-threads such as an environment, a plurality of threads operating in parallel, for example, an application program (that is, a GU)
I) 4 and functional elements that communicate with it, namely the query receiving unit 6 and the query result buffering / notifying unit 11,
A user interface thread 15 composed of
It can be divided into two threads, that is, a database access red 17 including a functional element for accessing the database, that is, a query actual issuing unit 7 and a query result obtaining unit 8. By dividing the user interface thread 15 and the database access red 17 in this way, the application program 4, ie, the GU
The operation of I and the database access operation can be performed concurrently. However, this is just an example, and other mounting methods are possible. For example, in an OS environment that does not support multi-threading, the method can be implemented by a method in which the database access 13 accesses the database when the application program 4 is idle in a message loop.

【0024】ここで、クエリー結果取得部8がもつ、一
度に取得するクエリー結果のレコード数を最適化する機
能について説明する。トータルで多数のレコードからな
るクエリー結果を受け取る場合、それら多数のレコード
を、一度に適当な少数レコードづつ複数回に分けて受信
することになる。その場合に、この機能は、前回に取得
したクエリー結果のレコード数とその取得に要した時間
とに基づいて、データベース管理システム3又は通信ネ
ットワークの負荷状態を推測し、次回の取得時間が所定
の望ましい値になるように、次回に取得すべきレコード
数を調整するものである。
Here, a function of the query result obtaining unit 8 for optimizing the number of records of the query result obtained at one time will be described. When a query result consisting of a large number of records is received in total, such a large number of records are received at a time by dividing the appropriate small number of records into a plurality of times. In this case, this function estimates the load state of the database management system 3 or the communication network based on the number of records of the query result acquired last time and the time required for the acquisition, and the next acquisition time is a predetermined time. The number of records to be acquired next time is adjusted so as to obtain a desired value.

【0025】すなわち、クエリー結果取得部8は、初回
については取得レコード数を既定しておくが、2回目以
降については、例えば次の計算式に基づいて取得するレ
コード数の最適化を行なう。
That is, the query result acquisition unit 8 sets the number of records to be acquired for the first time, but optimizes the number of records to be acquired for the second time and thereafter based on, for example, the following formula.

【0026】[0026]

【数1】 この計算式によれば、前回の取得レコード数r[n]とそ
の取得に要した時間t[n]から、所定の望ましい応答時
間Tでの応答を得るために最適と予想される次回の取得
レコード数r[n+1]が決定される。例えば、望ましい
応答時間Tを1.6秒、初回の取得レコード数r[1]が
10レコードと既定したところ、初回に取得に要した時
間t[1]が3.0秒であった場合、クエリー結果取得部
8は、2回目の取得レコード数r[2]を、1.0×1.
6/3.0≒5の計算により、5レコードと決定する。
なお、上記計算式は、一つの最も簡単な例を示したに過
ぎず、より複雑な計算式を用いることも可能である。
(Equation 1) According to this formula, from the number r [n] of previously acquired records and the time t [n] required for the acquisition, the next acquisition that is expected to be optimal for obtaining a response with a predetermined desired response time T is performed. The number of records r [n + 1] is determined. For example, if the desired response time T is set to 1.6 seconds, and the number r [1] of first acquired records is set to 10 records, and the time t [1] required for the first acquisition is 3.0 seconds, The query result acquisition unit 8 calculates the number r [2] of acquired records for the second time as 1.0 × 1.
By the calculation of 6 / 3.0 ≒ 5, 5 records are determined.
It should be noted that the above calculation formula is merely one of the simplest examples, and a more complicated calculation formula can be used.

【0027】クエリー結果取得部8は、このようにして
毎回一度に取得すべき好適なレコード数を決定すること
により、毎回のクエリー結果取得時間を望ましい時間に
制御することができる。その結果、データベース管理シ
ステム3又は通信ネットワークの負荷が多少増大して
も、ユーザにとって、GUIに次のクエリー結果が表示
されるまで異常に長い時間待つということがなくなる。
このことは、特に非同期的アクセス方法を採る場合に、
全てのクエリー結果が取得し終わるまでは、ほぼ望まし
い応答時間の間隔でGUIに後続のクエリー結果が追加
表示されていくので、全クエリー結果が取得し終わった
か否かを判断がし易くなる。
The query result obtaining unit 8 can control the query result obtaining time for each time to a desired time by determining the suitable number of records to be obtained at one time each time in this way. As a result, even if the load on the database management system 3 or the communication network slightly increases, the user does not have to wait an abnormally long time until the next query result is displayed on the GUI.
This is especially true for asynchronous access methods.
Until all the query results have been obtained, the subsequent query results are additionally displayed on the GUI at substantially desired response time intervals, so that it is easy to determine whether all the query results have been obtained.

【0028】以下、上記構成の下でのクライアントシス
テム1の動作を詳細に説明する。
Hereinafter, the operation of the client system 1 under the above configuration will be described in detail.

【0029】アプリケーションプログラム4は、GUI
を画面に表示する。図2は、GUIの一例を示す。この
例は、ビジネス支援システムにおける顧客登録を行うウ
ィンドウ20であって、顧客の氏名や生年月日や住所な
どをエントリするためのフィールド21、23、25
や、それらのフィールドにエントリ可能な情報のデータ
ベース検索を実行するための実行ボタン27や、その検
索結果(クエリー結果)を表示するリストボックス29
などがある。このGUI上でユーザがクエリーを要求す
ると(例えば、実行ボタン27がクリックされると)、
アプリケーションプログラム4は、そのクエリーをデー
タベースアクセス部13のクエリー受付部6に対して送
る。
The application program 4 is a GUI
Is displayed on the screen. FIG. 2 shows an example of the GUI. This example is a window 20 for registering a customer in the business support system, and fields 21, 23, and 25 for entering a customer's name, date of birth, address and the like.
And an execute button 27 for executing a database search for information that can be entered in those fields, and a list box 29 for displaying the search results (query results)
and so on. When the user requests a query on this GUI (for example, when the execute button 27 is clicked),
The application program 4 sends the query to the query receiving unit 6 of the database access unit 13.

【0030】データベースアクセス部13では、クエリ
ー受付部6がアプリケーションプログラム4から受けた
クエリーをクエリー実発行処理部8に渡し、クエリー実
発行部7がそのクエリーをデータベース管理システム3
に送信する。そして、クエリー結果取得部8が、データ
ベース管理システム3から、上述したように適当なレコ
ード数づつクエリー結果を逐次に受信して、共通バッフ
ァ9に格納する。クエリー結果バッファリング/通知部
11が、共通バッファ9をポーリングによって常に監視
し、そこにクエリー結果が入ってくると、そのクエリー
結果をアプリケーションプログラム4に通知する。
In the database access unit 13, the query receiving unit 6 passes the query received from the application program 4 to the query actual issue processing unit 8, and the query actual issue unit 7 sends the query to the database management system 3.
Send to Then, the query result obtaining unit 8 sequentially receives the query results for each appropriate number of records from the database management system 3 as described above, and stores the query results in the common buffer 9. The query result buffering / notification unit 11 constantly monitors the common buffer 9 by polling, and when a query result enters therein, notifies the application program 4 of the query result.

【0031】アプリケーションプログラム4へのクエリ
ー結果の通知は、前述したように標準的に非同期的な方
法で行われる。すなわち、クエリー結果バッファリング
/通知部11は、共通バッファ9に逐次に入ってくるク
エリー結果を、毎回、イベントとして、アプリケーショ
ンプログラム4にメッセージにより通知する。アプリケ
ーションプログラム4は、そのメッセージを受ける都
度、通知されたクエリー結果を、例えば図3に示すよう
に(図3は、住所フィールド25にエントリできる市町
村名を検索した例を示している)をリストボックス29
に追加エントリしていく。前述したように、クエリ結果
の通知はほぼ望ましい応答時間の間隔で来るので、その
短い時間間隔でリストボックス29に後続のクエリー結
果の追加エントリが行われていく。その短い時間間隔で
の追加エントリが続いている限り、ユーザは全クエリ結
果の取得がまだ終わっていないことを知ることができ
る。また、このように非同期的なクエリ取得が行われて
いる間、ユーザは、例えば図4に示すように氏名フィー
ルド21に氏名をエントリするというような、クエリ結
果取得以外の他の処理をアプリケーションプログラム4
に行わせることができる。
The notification of the query result to the application program 4 is performed in a standard asynchronous manner as described above. That is, the query result buffering / notifying unit 11 notifies the application program 4 of the query result sequentially entering the common buffer 9 by using a message as an event each time. Each time the application program 4 receives the message, the notified query result is displayed in a list box, for example, as shown in FIG. 3 (FIG. 3 shows an example of searching for a municipal name that can be entered in the address field 25). 29
Add more entries. As described above, since the notification of the query result comes at a substantially desired response time interval, additional entries of the subsequent query result are made in the list box 29 at the short time interval. As long as the additional entries continue in the short time interval, the user can know that the retrieval of all query results has not been completed yet. Further, during the asynchronous query acquisition, the user performs other processing other than query result acquisition, such as entering a name in the name field 21 as shown in FIG. 4
Can be performed.

【0032】このように、アプリケーションプログラム
4は非同期的アクセス方法を標準的に行なうが、ユーザ
の要求に応じて、同期的なアクセス方法に切り替える。
切り替えのトリガとしては、図5に示すようにリストボ
ックス29のスクロールバー31をユーザが一番下まで
引き下げたり、あるいは、キーボードから「Control+En
d」を入力したときのように、ユーザア全てのクエリー
結果の表示を要求した場合を、一例として挙げることが
できる。このようなユーザ要求があった場合、アプリケ
ーションプログラム4は非同期的アクセス方法から同期
的なアクセス方法に切り替えて、クエリ結果取得要求を
データベースアクセス部13のクエリー結果バッファリ
ング/通知部11に処理呼び出しの形で送る。クエリー
結果バッファリング/通知部11は、イベントを通知す
るメッセージの形ではなく、処理呼び出しに対するコー
ルバックの形で、要求された全てのクエリー結果をアプ
リケーションプログラム4に返す。アプリケーションプ
ログラム4は、他の処理へ進まずにクエリー結果バッフ
ァリング/通知部11からのコールバックを待ち、そし
て、コールバックを受けると、それにより通知されたク
エリ結果を図5に示すようにリストボックス29に表示
する。
As described above, the application program 4 normally uses the asynchronous access method, but switches to the synchronous access method according to the user's request.
As a trigger for switching, the user pulls down the scroll bar 31 of the list box 29 to the bottom as shown in FIG.
As an example, a case where a request to display the query results of all the users, such as when "d" is input, can be given. When such a user request is made, the application program 4 switches from the asynchronous access method to the synchronous access method, and sends a query result acquisition request to the query result buffering / notification unit 11 of the database access unit 13 for processing call. Send in form. The query result buffering / notification unit 11 returns all requested query results to the application program 4 in the form of a callback for a process call, not in the form of a message for notifying an event. The application program 4 waits for the callback from the query result buffering / notification unit 11 without proceeding to other processing, and upon receiving the callback, lists the query result notified thereby as shown in FIG. It is displayed in box 29.

【0033】上記のようにアプリケーションプログラム
4からクエリ結果取得要求を受けたとき、クエリー結果
バッファリング/通知部11は、要求された全てのクエ
リ結果の取得に一定時間以上がかかるか否かを推測し、
かかると推定した場合には、図6に示すようなダイアロ
グボックス40を画面に表示する。このダイアログボッ
クス40には、現在全てのクエリ結果を読み込み中であ
る(つまり、同期的アクセス方法を行っている)旨をユ
ーザを知らせるメッセージ41と、読みこむべき全レコ
ード中のどの位の割合を既に読みこんだかを示す棒グラ
フ43と、このクエリ結果取得を途中でキャンセルする
ためのキャンセルボタン45とを含んでいる。ユーザ
は、このダイアログボックス40中の棒グラフ43か
ら、全クエリ結果の取得時間を予想することができ、キ
ャンセルボタン45をクリックすることで、このクエリ
結果取得を途中でキャンセルすることができる。キャン
セルボタン45がクリックされると、クエリー結果バッ
ファリング/通知部11は、そのキャンセルの旨をコー
ルバックの形でアプリケーションプログラム4に通知す
る。そのコールバックを受けるとアプリケーションプロ
グラム4は、クエリ結果を取得する処理から抜けるの
で、ユーザはアプリケーションプログラム4に対して他
の操作を行うことができるようになる。
When a query result acquisition request is received from the application program 4 as described above, the query result buffering / notification unit 11 estimates whether or not it will take a certain time or more to acquire all the requested query results. And
If it is estimated that such is the case, a dialog box 40 as shown in FIG. 6 is displayed on the screen. The dialog box 40 includes a message 41 for notifying the user that all query results are currently being read (that is, performing a synchronous access method), and a percentage of all records to be read. It includes a bar graph 43 indicating whether or not the query has already been read, and a cancel button 45 for canceling the acquisition of the query result in the middle. The user can predict the acquisition time of all query results from the bar graph 43 in the dialog box 40, and can cancel the query result acquisition halfway by clicking the cancel button 45. When the cancel button 45 is clicked, the query result buffering / notification unit 11 notifies the application program 4 of the cancellation in the form of a callback. Upon receiving the callback, the application program 4 exits from the process of acquiring the query result, so that the user can perform another operation on the application program 4.

【0034】上述した実施形態によれば、同期的アクセ
ス方法と非同期的アクセス方法の利点を生かし、欠点を
改善しているので、データベースアクセスの応答性と操
作性を向上させることができる。特にモバイル環境のよ
うに低速又は不安定な通信ネットワークを通じてデータ
ベースにアクセスせざるを得ない環境では、本発明の効
果は大きい。
According to the above-described embodiment, since the advantages of the synchronous access method and the asynchronous access method are utilized and the disadvantages are improved, the responsiveness and operability of database access can be improved. In particular, the effect of the present invention is great in an environment where a database must be accessed through a low-speed or unstable communication network such as a mobile environment.

【0035】以上、本発明の好適な実施形態を説明した
が、これは本発明の説明のための例示であって、本発明
の範囲をこの実施例にのみ限定する趣旨ではない。
Although the preferred embodiment of the present invention has been described above, this is an exemplification for describing the present invention, and is not intended to limit the scope of the present invention only to this embodiment.

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

【図1】本発明の一実施形態に係るデータベースアクセ
ス方式の構成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of a database access method according to an embodiment of the present invention.

【図2】アプリケーションのGUIの一例を示す図。FIG. 2 is a diagram illustrating an example of a GUI of an application.

【図3】非同期的アクセス方法でデータベースアクセス
を行っている場合のGUIの表示例を示す図。
FIG. 3 is a view showing a display example of a GUI when a database is accessed by an asynchronous access method.

【図4】非同期的アクセス方法でデータベースアクセス
を行っている場合のクエリ結果取得中に別の操作を行っ
たときのGUIの表示例を示す図。
FIG. 4 is a diagram showing a display example of a GUI when another operation is performed during acquisition of a query result when a database access is performed by an asynchronous access method.

【図5】同期的アクセス方法でデータベースアクセスを
行った場合のGUIの表示例を示す図。
FIG. 5 is a view showing a display example of a GUI when a database is accessed by a synchronous access method.

【図6】同期的アクセス方法でデータベースアクセスに
時間がかかる場合に表示されるキャンセル用のダイアロ
グボックスの表示例を示す図。
FIG. 6 is a view showing a display example of a dialog box for cancellation displayed when it takes time to access a database by a synchronous access method.

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

1 クライアントシステム 3 データベース管理システム 4 アプリケーションプログラム 5 データベースクエリー発行部 6 クエリー受付部 7 クエリー実発行部 8 クエリー結果取得部 9 共通バッファ 11 クエリー結果バッファリング/通知部 13 データベースアクセス部 15 ユーザインタフェーススレッド 17 データベースアクセススレッド Reference Signs List 1 client system 3 database management system 4 application program 5 database query issuing unit 6 query receiving unit 7 query actual issuing unit 8 query result obtaining unit 9 common buffer 11 query result buffering / notifying unit 13 database access unit 15 user interface thread 17 database Access thread

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 ユーザが操作することができ、データベ
ースに対するクエリーを発し、データベースからのクエ
リ結果の通知を受けるアプケーションプログラムと、 前記アプリケーションプログラムから発されたクエリー
に対するクエリ結果を、前記データベースから取得する
クエリー結果取得手段と、 前記クエリー結果取得手段が取得したクエリー結果を前
記アプリケーションに通知するクエリー結果通知手段と
を備え、 前記アプリケーションプログラムは、非同期的なデータ
ベースアクセス方法と同期的なデータベースアクセス方
法を選択的に行うことができ、 前記クエリー結果通知手段は、前記アプリケーションプ
ログラムが行う非同期的なデータベースアクセス方法と
同期的なデータベースアクセス方法にそれそれ対応した
非同期的な方法と同期的な通知方法を選択的に用いて、
前記クエリー結果を前記アプリケーションに通知する、
データベースアクセス方式。
1. An application program that can be operated by a user, issues a query to a database, and receives a notification of a query result from the database; and obtains a query result for the query issued from the application program from the database. Query result notifying means, and a query result notifying means for notifying the application of the query result obtained by the query result obtaining means, wherein the application program executes an asynchronous database access method and a synchronous database access method. The query result notifying means may be an asynchronous corresponding to an asynchronous database access method and a synchronous database access method performed by the application program. Selectively using the method and synchronous notification method,
Notifying the application of the query result,
Database access method.
【請求項2】 前記アプリケーションプログラムは、標
準的に前記非同期的なデータベースアクセス方法を行
い、ユーザの要求に応じて前記非同期的なデータベース
アクセス方法から前記同期的なデータベースアクセス方
法に切り替える請求項1記載のデータベースアクセス方
式。
2. The method according to claim 1, wherein the application program performs the asynchronous database access method in a standard manner, and switches from the asynchronous database access method to the synchronous database access method in response to a user request. Database access method.
【請求項3】 前記クエリー結果取得手段が、前記デー
タベースから一度に取得する前記クエリー結果の量を調
整する手段を有する請求項2記載のデータベースアクセ
ス方式。
3. The database access method according to claim 2, wherein said query result obtaining means has means for adjusting an amount of said query result obtained at one time from said database.
【請求項4】 前記同期的データベースアクセス方法が
行われているとき、クエリ結果取得をユーザの要求でキ
ャンセルする手段を更に備えた請求項1記載のデータベ
ースアクセス方式。
4. The database access method according to claim 1, further comprising means for canceling a query result acquisition by a user request when the synchronous database access method is being performed.
【請求項5】 前記クエリー取得手段と前記クエリー結
果通知手段が、別のスレッドとして構成され、それによ
り同時並行的に動作できる請求項1記載のデータベース
アクセス方式。
5. The database access method according to claim 1, wherein the query acquisition unit and the query result notification unit are configured as separate threads, and can operate simultaneously in parallel.
【請求項6】 アプリケーションプログラムから発され
たクエリーに対するクエリ結果をデータベースから取得
するステップと、 前記アプリケーションプログラムが非同期的なデータベ
ースアクセス方法を行う場合に、前記データベースから
取得したクエリー結果を、前記非同期的なデータベース
アクセス方法に対応した非同期的な通知方法で前記アプ
リケーションに通知するステップと、 前記アプリケーションプログラムが同期的なデータベー
スアクセス方法を行う場合に、前記データベースから取
得したクエリー結果を、前記同期的なデータベースアク
セス方法に対応した同期的な通知方法で前記アプリケー
ションに通知するステップと、を有するデータベースア
クセス方法。
6. A step of obtaining a query result for a query issued from an application program from a database, and when the application program performs an asynchronous database access method, the query result obtained from the database is converted to the asynchronous result. Notifying the application using an asynchronous notification method corresponding to the database access method, and, when the application program performs a synchronous database access method, the query result obtained from the database is transmitted to the synchronous database. Notifying the application using a synchronous notification method corresponding to the access method.
【請求項7】 アプリケーションプログラムから発され
たクエリーに対するクエリ結果をデータベースから取得
するクエリー結果取得ステップと、 前記アプリケーションプログラムが非同期的なデータベ
ースアクセス方法を行う場合に、前記データベースから
取得したクエリー結果を、前記非同期的なデータベース
アクセス方法に対応した非同期的な通知方法で前記アプ
リケーションに通知する非同期的結果通知ステップと、 前記アプリケーションプログラムが同期的なデータベー
スアクセス方法を行う場合に、前記データベースから取
得したクエリー結果を、前記同期的なデータベースアク
セス方法に対応した同期的な通知方法で前記アプリケー
ションに通知する同期的結果通知ステップと、をコンピ
ュータに実行させるためのプログラムを担持したコンピ
ュータ読み取り可能な記録媒体。
7. A query result obtaining step of obtaining a query result for a query issued from an application program from a database; and a query result obtained from the database when the application program performs an asynchronous database access method. An asynchronous result notification step of notifying the application using an asynchronous notification method corresponding to the asynchronous database access method; and a query result obtained from the database when the application program performs a synchronous database access method. A synchronous result notifying step of notifying the application with a synchronous notifying method corresponding to the synchronous database accessing method. Carrying computer readable recording medium.
【請求項8】 前記プログラムが、 標準的には前記非同期的結果通知ステップを前記コンピ
ュータに行わせ、 前記アプリケーションプログラムからクエリ結果取得要
求があったときに、前記同期的結果通知ステップを前記
コンピュータに行わせる、 請求項7記載のコンピュータ読み取り可能な記録媒体。
8. The program normally causes the computer to perform the asynchronous result notification step, and when the application program receives a query result acquisition request, sends the synchronous result notification step to the computer. The computer-readable recording medium according to claim 7, wherein:
【請求項9】 前記プログラムが、 前記クエリ結果取得ステップで一度に取得する前記クエ
リー結果の量を調整するステップを前記コンピュータに
更に行わせる、請求項7記載のコンピュータ読み取り可
能な記録媒体。
9. The computer-readable recording medium according to claim 7, wherein the program causes the computer to further perform a step of adjusting an amount of the query result obtained at one time in the query result obtaining step.
【請求項10】 前記プログラムが、 前記同期的結果通知ステップを前記コンピュータに行わ
せているときに、ユーザからキャンセル要求があったと
きに、前記同期的結果通知ステップを前記コンピュータ
にキャンセルさせる、請求項7記載のコンピュータ読み
取り可能な記録媒体。
10. The program causes the computer to cancel the synchronous result notifying step when there is a cancellation request from a user while the program causes the computer to perform the synchronous result notifying step. Item 8. A computer-readable recording medium according to Item 7.
【請求項11】 前記プログラムが、 前記クエリ結果取得ステップと、前記非同期的結果通知
ステップ又は前記同期的結果通知ステップとを、同時並
行的に前記コンピュータに行わせる、請求項7記載のコ
ンピュータ読み取り可能な記録媒体。
11. The computer-readable computer according to claim 7, wherein the program causes the computer to perform the query result acquisition step and the asynchronous result notification step or the synchronous result notification step concurrently. Recording medium.
【請求項12】 GUIを表示するステップと、 非同期的なデータベースアクセス方法と同期的なデータ
ベースアクセス方法を選択的に用いてデータベースにア
クセスするステップと、 前記データベースにアクセスして得られたクエリー結果
を前記GUIに表示するステップとをコンピュータに実
行させるためのプログラムを担持したコンピュータ読み
取り可能な記録媒体。
12. Displaying a GUI, accessing a database by selectively using an asynchronous database access method and a synchronous database access method, and displaying a query result obtained by accessing the database. A computer-readable recording medium carrying a program for causing a computer to execute the steps of displaying on the GUI.
JP28107499A 1999-10-01 1999-10-01 Data base access system and its method Pending JP2001101221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28107499A JP2001101221A (en) 1999-10-01 1999-10-01 Data base access system and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28107499A JP2001101221A (en) 1999-10-01 1999-10-01 Data base access system and its method

Publications (1)

Publication Number Publication Date
JP2001101221A true JP2001101221A (en) 2001-04-13

Family

ID=17633969

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28107499A Pending JP2001101221A (en) 1999-10-01 1999-10-01 Data base access system and its method

Country Status (1)

Country Link
JP (1) JP2001101221A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009289149A (en) * 2008-05-30 2009-12-10 Toshiba Tec Corp Data processor
JPWO2015145762A1 (en) * 2014-03-28 2017-04-13 株式会社日立製作所 Database management system, computer, database management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009289149A (en) * 2008-05-30 2009-12-10 Toshiba Tec Corp Data processor
JPWO2015145762A1 (en) * 2014-03-28 2017-04-13 株式会社日立製作所 Database management system, computer, database management method

Similar Documents

Publication Publication Date Title
US8577960B2 (en) Providing status information for components in a distributed landscape
KR101647071B1 (en) Architectural pattern for persistent web application design
CN106502902B (en) Web page operational efficiency monitoring method and device
US20060015763A1 (en) Real-time web sharing system
JP2001511609A (en) User interface for examining graphical expressions of packet trace information
US20040119753A1 (en) Scrolling through data in a graphical user interface
US20110093478A1 (en) Filter hints for result sets
US20140019888A1 (en) Enhanced multi-tab co-browsing between one or more operators and one or more visitors
KR20130017234A (en) Method of updating software list on software as a service and system for the same
JP2002324155A (en) Workflow system and program
US8140478B2 (en) Commit rate management with decoupled commit operations
WO2012065478A1 (en) Method and apparatus for intelligent data push
JP2001101221A (en) Data base access system and its method
CN110275785A (en) Data processing method, device, client and server
CN113274736B (en) Cloud game resource scheduling method, device, equipment and storage medium
JP2846270B2 (en) New arrival information display device in computer displaying multiple windows
JPH11175537A (en) Information retrieving device and method therefor and storage medium
US20080306753A1 (en) System and method for providing quick links
JP5351746B2 (en) Data processing apparatus and method
US7716343B2 (en) System and method for operating a networked software application on a network with sporadic connectivity
JP2002157386A (en) Workflow management method, its device, its processing program and recording medium with its processing program stored
US20070156631A1 (en) Synchronization of transactional applications and analytical applications
JP2000312222A (en) Client and method for device retrieval
JP5049856B2 (en) Information processing apparatus and information processing method
JP2994299B2 (en) Request for program execution and notification of result

Legal Events

Date Code Title Description
RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20040903