JP2015022554A - Data processing device, data processing program, database system, communication control device, and network system - Google Patents
Data processing device, data processing program, database system, communication control device, and network system Download PDFInfo
- Publication number
- JP2015022554A JP2015022554A JP2013150642A JP2013150642A JP2015022554A JP 2015022554 A JP2015022554 A JP 2015022554A JP 2013150642 A JP2013150642 A JP 2013150642A JP 2013150642 A JP2013150642 A JP 2013150642A JP 2015022554 A JP2015022554 A JP 2015022554A
- Authority
- JP
- Japan
- Prior art keywords
- data
- search
- database
- database server
- records
- 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.)
- Granted
Links
Images
Abstract
Description
この発明は、データ処理装置、データ処理プログラム、データベースシステム、通信制御装置、及びネットワークシステムに関し、例えば、データベースサーバから多量の検索データを取得するデータベースクライアント(RDBMS(Relational DataBase Management System)のデータベースクライアント)を備える通信制御装置に適用し得る。 The present invention relates to a data processing device, a data processing program, a database system, a communication control device, and a network system. For example, a database client that acquires a large amount of search data from a database server (RDBMS (Relational DataBase Management System database client)) It can apply to a communication control apparatus provided with.
従来のデータベースシステムでは、データベースクライアントから発行されたトランザクション(データ検索要求)に対する応答結果が、多量のデータとなる場合、一般的には、検索結果を任意のレコード数単位に小分けし、データベースサーバからデータを取得するフェッチ処理を採用することが多い。 In a conventional database system, when the response result to a transaction (data search request) issued from a database client is a large amount of data, generally, the search result is subdivided into an arbitrary number of records and sent from the database server. In many cases, fetch processing for acquiring data is employed.
従来のデータベースクライアントにおけるフェッチ機能(RDBMSに実装されているフェッチ機能)では、データベースサーバから、所定数(フェッチ処理する単位)分の検索結果についてカーソルをオープンして、カーソルオープンしたレコードについてフェッチ処理する(データ取得する)動作を繰りかえすことにより多量データを順次取得する。 In the fetch function in the conventional database client (the fetch function implemented in the RDBMS), a cursor is opened from the database server for a predetermined number of search results (units for fetch processing), and the cursor opened record is fetched. A large amount of data is acquired sequentially by repeating the (data acquisition) operation.
従来のデータベースクライアントでは、このフェッチ機能により、多量データを取得する為のバッファ(メモリ)を検索結果の多量データ全レコード数分のサイズよりも小さく実装することができる。 In a conventional database client, a buffer (memory) for acquiring a large amount of data can be mounted smaller than the size corresponding to the total number of records of a large amount of search results by this fetch function.
従来、フェッチ機能に対応したデータベースシステム(データベースクライアント)としては、例えば、特許文献1の記載技術がある。
Conventionally, as a database system (database client) corresponding to the fetch function, for example, there is a technique described in
従来のデータベースクライアントでは、フェッチ機能により、カーソルオープン及びフェッチ処理を繰り返す場合、データベースサーバとの間で通信セッションを維持し、当該セッションでカーソルの位置が維持・管理される。したがって、従来のデータベースクライアントでは、フェッチ機能によりデータ取得を開始した場合、検索結果のレコードの全てのフェッチ処理がするまで、通信セッションが維持される必要がある。 In the conventional database client, when the cursor open and fetch processing are repeated by the fetch function, a communication session is maintained with the database server, and the cursor position is maintained and managed in the session. Therefore, in the conventional database client, when data acquisition is started by the fetch function, the communication session needs to be maintained until all the retrieval result records are fetched.
従来のデータベースクライアントにおいて、フェッチ機能によりデータ取得中にデータベースサーバとの間の通信セッションが、何等かの障害(例えば、ネットワーク障害やデータベースサーバの故障等)により切断された場合、カーソル情報は破棄され、検索結果の取得が途中終了することになる。このカーソルには、取得対象データに関するフェッチ情報、すなわち、どのデータを取得したかが記録されている。したがって、従来のデータベースクライアントにおいて、セッションが切断されカーソルがクローズされると、以降のデータ取得が実施できないこととなる。 In a conventional database client, if the communication session with the database server is disconnected due to some failure (for example, network failure or database server failure) during data acquisition by the fetch function, the cursor information is discarded. The search result acquisition ends in the middle. This cursor records fetch information related to acquisition target data, that is, which data has been acquired. Therefore, in a conventional database client, if the session is disconnected and the cursor is closed, subsequent data acquisition cannot be performed.
このような場合、従来のデータベースクライアントは、障害の復旧後、再度検索を実施し、結果を取得し直す事となるが、検索結果のレコード数が増加すれば、それだけフェッチ回数、全データ取得までの所要時間も増加するため、障害発生時のリスクは大きく、データ検索処理が完了しないことによるシステムヘの影響が懸念される。 In such a case, the conventional database client will perform the search again after recovery from the failure and acquire the result again. However, if the number of records in the search result increases, the number of fetches and the acquisition of all data will increase accordingly. Therefore, the time required for the failure also increases, so the risk at the time of the occurrence of the failure is great, and there is a concern that the system may be affected by the fact that the data search process is not completed.
例えば、通信キャリアのネットワーク上に構築されたSIP(Session Initiation Protocol)サーバ(例えば、SIP通信の呼制御を行う呼制御装置等)では、当該通信制御装置で必要となる分の顧客データ(加入者データ)をデータベースサーバから取得して動作するものがある。通常、通信キャリアの通信制御装置で管理される顧客データは大量であるため、通信制御装置の処理能力を考慮して、データベースクライアントのフェッチ機能を用いたデータ取得が行われる場合がある。しかしながら、この通信制御装置で、フェッチ機能により顧客データの取得中に障害があった場合、サービス開始できない状態が長期間継続してしまうおそれがある。 For example, in a SIP (Session Initiation Protocol) server (for example, a call control device that performs call control of SIP communication) built on a network of a communication carrier, customer data (subscribers) required by the communication control device Data) from a database server. Usually, since there is a large amount of customer data managed by the communication control device of the communication carrier, data acquisition using the fetch function of the database client may be performed in consideration of the processing capability of the communication control device. However, in this communication control device, if there is a failure during acquisition of customer data by the fetch function, there is a possibility that the state where the service cannot be started continues for a long period of time.
そのため、データ処理装置(例えば、データベースクライアント)がデータベースサーバから検索処理結果を逐次取得(例えば、フェッチ処理によりデータ取得する場合)する際に、データベースサーバからのデータ供給が停止し、データ取得を再開する場合に、中断による遅延時間を短縮させるデータ処理装置、データ処理プログラム、データベースシステム、通信制御装置、及びネットワークシステムが望まれている。 Therefore, when a data processing device (for example, a database client) sequentially acquires search processing results from the database server (for example, when acquiring data by fetch processing), data supply from the database server is stopped and data acquisition is resumed. In this case, a data processing device, a data processing program, a database system, a communication control device, and a network system that reduce the delay time due to interruption are desired.
第1の本発明のデータ処理装置は、(1)複数のレコードのデータが蓄積されたデータベースから検索処理を実行し、その検索処理による検索結果について、1又は複数の項目で構成される主キーに基づく順序で、所定件数のレコードを1つの送信単位データとして送信するデータ送信処理を、データベースサーバに依頼する第1の検索依頼手段と、(2)上記データベースサーバから供給された各送信単位データに含まれるレコードのデータ処理を行うデータ処理手段と、(3)上記データベースサーバから供給された送信単位データを構成する最後の順序のレコードについて、少なくとも主キーの項目のデータを最終受信位置情報として保持する最終受信位置情報保持手段と、(4)上記第1の検索依頼手段により依頼した検索処理に基づく上記データベースサーバからのデータ供給が中断した後、上記最終受信位置情報保持手段が保持している最終受信位置情報に基づいて、上記第1の検索依頼手段が依頼した検索処理の検索結果のうち上記データベースサーバから供給されなかったレコードのみを検索処理し、その検索結果について上記データ送信処理を依頼する第2の検索依頼手段とを有することを特徴とする。 The data processing apparatus according to the first aspect of the present invention is (1) executing a search process from a database in which data of a plurality of records are stored, and a primary key comprising one or a plurality of items for a search result by the search process First search requesting means for requesting a database server to perform data transmission processing for transmitting a predetermined number of records as one transmission unit data in the order based on the above, and (2) each transmission unit data supplied from the database server. Data processing means for processing data included in the record, and (3) at least the data of the item of the primary key as the final reception position information for the record in the last order constituting the transmission unit data supplied from the database server A final reception position information holding means to hold, and (4) based on the search processing requested by the first search request means. After the data supply from the database server is interrupted, based on the final reception position information held by the final reception position information holding means, out of the search results of the search processing requested by the first search request means And a second search requesting unit that searches only the record that has not been supplied from the database server and requests the data transmission process for the search result.
第2の本発明のデータ処理プログラムは、コンピュータを、(1)複数のレコードのデータが蓄積されたデータベースから検索処理を実行し、その検索処理による検索結果について、1又は複数の項目で構成される主キーに基づく順序で、所定件数のレコードを1つの送信単位データとして送信するデータ送信処理を、データベースサーバに依頼する第1の検索依頼手段と、(2)上記データベースサーバから供給された各送信単位データに含まれるレコードのデータ処理を行うデータ処理手段と、(3)上記データベースサーバから供給された送信単位データを構成する最後の順序のレコードについて、少なくとも主キーの項目のデータを最終受信位置情報として保持する最終受信位置情報保持手段と、(4)上記第1の検索依頼手段により依頼した検索処理に基づく上記データベースサーバからのデータ供給が中断した後、上記最終受信位置情報保持手段が保持している最終受信位置情報に基づいて、上記第1の検索依頼手段が依頼した検索処理の検索結果のうち上記データベースサーバから供給されなかったレコードのみを検索処理し、その検索結果について上記データ送信処理を依頼する第2の検索依頼手段として機能させることを特徴とする。 The data processing program according to the second aspect of the present invention comprises (1) a search process from a database in which data of a plurality of records is stored, and a search result by the search process is configured by one or a plurality of items. First search request means for requesting a database server to perform data transmission processing for transmitting a predetermined number of records as one transmission unit data in an order based on the primary key, and (2) each of the data supplied from the database server Data processing means for performing data processing of records included in the transmission unit data; and (3) finally receiving at least the data of the item of the primary key for the records in the last order constituting the transmission unit data supplied from the database server. A final received position information holding means for holding as position information; and (4) the first search request means. After the data supply from the database server based on the requested search process is interrupted, the search process requested by the first search request means based on the last received position information held by the last received position information holding means Of these search results, only a record that has not been supplied from the database server is searched, and the search result is made to function as a second search request means for requesting the data transmission process.
第3の本発明は、1又は複数のデータベースサーバと、上記データベースサーバに検索処理を依頼するデータ処理装置とを備えるデータベースシステムにおいて、上記データ処理装置として第1の本発明のデータ処理装置を適用したことを特徴とするデータベースシステム。 In a third aspect of the present invention, in a database system including one or a plurality of database servers and a data processing apparatus that requests the database server to perform a search process, the data processing apparatus of the first aspect of the present invention is applied as the data processing apparatus. A database system characterized by that.
第4の本発明の通信制御装置は、データベースサーバから通信制御に係るデータを取得するデータ処理装置と、上記データ処理装置が取得したデータを用いて通信装置間の通信制御処理を行う通信制御処理手段とを備える通信制御装置において、上記データ処理装置として第1の本発明のデータ処理装置を適用したことを特徴とする通信制御装置。 A communication control device according to a fourth aspect of the present invention includes a data processing device that acquires data related to communication control from a database server, and a communication control process that performs communication control processing between the communication devices using the data acquired by the data processing device. A communication control apparatus comprising: a data processing apparatus according to the first aspect of the present invention as the data processing apparatus.
第5の本発明は、複数の通信装置と、上記通信装置間の通信制御処理を行う通信制御装置とを備えるネットワークシステムにおいて、上記通信制御装置として第4の本発明の通信制御装置を適用したことを特徴とするネットワークシステム。 In a fifth aspect of the present invention, in a network system including a plurality of communication devices and a communication control device that performs communication control processing between the communication devices, the communication control device of the fourth aspect of the present invention is applied as the communication control device. A network system characterized by this.
本発明によれば、データ処理装置がデータベースサーバから検索処理結果を逐次取得する際に、データベースサーバからのデータ供給が停止し、データ取得を再開する場合に、中断による遅延時間を短縮させることができる。 According to the present invention, when the data processing apparatus sequentially acquires the search processing results from the database server, when the data supply from the database server is stopped and the data acquisition is restarted, the delay time due to the interruption can be reduced. it can.
(A)主たる実施形態
以下、本発明によるデータ処理装置、データ処理プログラム、データベースシステム、通信制御装置、及びネットワークシステムの一実施形態を、図面を参照しながら詳述する。なお、以下では、本発明のデータ処理装置をデータベースクライアントに適用する例について説明する。
(A) Main Embodiment Hereinafter, an embodiment of a data processing device, a data processing program, a database system, a communication control device, and a network system according to the present invention will be described in detail with reference to the drawings. In the following, an example in which the data processing apparatus of the present invention is applied to a database client will be described.
(A−1)実施形態の構成
図1は、この実施形態のネットワークシステムの全体構成について示したブロック図である。また、図1では、この実施形態の通信制御装置10の機能的構成についても示している。
(A-1) Configuration of Embodiment FIG. 1 is a block diagram showing the overall configuration of the network system of this embodiment. Further, FIG. 1 also shows a functional configuration of the
ネットワークシステム1は、通信制御装置10、2台のデータベースサーバ20(20−1、20−2)、及び通信制御装置10の配下に接続される複数の通信装置30を有している。なお、ネットワークシステム1を構成する各装置の台数は限定されないものである。また、通信制御装置10及びデータベースサーバ20−1、20−2は、それぞれネットワークN1に接続しており、相互に通信可能な構成となっている、また、通信制御装置10及び通信装置30は、それぞれネットワークN3に接続しており、相互に通信可能な構成となっている。
The
通信制御装置10は、通信装置30間の通信の通信制御(例えば、SIPのメッセージ交換による呼制御)を行う装置である。
The
各通信装置30は、通信制御装置10の通信制御に基づいて他の通信装置30と通信するものである。各通信装置30としては、例えば、SIPメッセージ交換に基づいた音声通話、ビデオ通話等に対応したソフトウェアがインストールされたPCやスマートホン等を適用することができるため詳しい説明は省略する。
Each
データベースサーバ20−1、20−2は、2台で冗長化された1つのデータベースサービスを提供するサーバである。 The database servers 20-1 and 20-2 are servers that provide one database service made redundant by two units.
次に、データベースサーバ20−1、20−2の詳細構成について説明する。 Next, the detailed configuration of the database servers 20-1 and 20-2 will be described.
データベースサーバ20−1、20−2は、通信制御装置10が通信制御処理を行うために必要な顧客データ(各通信装置30自体や各通信装置30を利用する顧客(加入者)に係る情報等を含むデータ)をデータベース化して管理しており、管理しているデータベースを通信制御装置10に提供する。データベースサーバ20−1、20−2は、いずれか一方が現用系(アクティブ状態)として動作し、他方が待機系(スタンバイ状態)として動作する冗長構成(ホットスタンバイ方式)で、動作しているものとする。以下では、通常、データベースサーバ20−1が現用系として動作し、データベースサーバ20−2が待機系として動作しているものとして説明する。なお、データベースサーバ20−1、20−2の冗長構成の具体的な方式は上述のホットスタンバイに限定されないものであり、コールドスタンバイ方式やクラスタリング方式等の種々の冗長構成を適用することができる。
The database servers 20-1 and 20-2 have customer data necessary for the
各データベースサーバ20は、同じ構成となっており、機能的には、データベースサービスのデータ処理を行うサーバプロセス21と、データベースのデータストレージとして機能するファイルシステム22を有している。
Each
サーバプロセス21は、例えば、種々のRDBMSのサーバプラットフォームを用いて構築することができる。また、ファイルシステム22は、種々のデータストレージ(例えば、ハードディスクドライブ等を用いたデータストレージ)を用いることができる。この実施形態では、サーバプロセス21は、データベースクライアントからSQL(Structured Query Language)を用いた命令(プログラム)に基づくデータ処理(データ検索)を受付けることができるRDBMSにより構築されているものとして説明する。
The
また、データベースサーバ20−1のファイルシステム22と、データベースサーバ20−2のファイルシステム22とは、ネットワークN2を介して接続されており、リアルタイムにデータ同期が行われているものとする。データベースサーバ20間のデータ同期構成については種々のデータストレージと同様の構成を適用することができるため、詳しい説明を省略する。上述の通り、ファイルシステム22には、通信制御装置10に提供するための顧客データのデータベースが格納されている。
Further, it is assumed that the
この実施形態では、データベースサーバ20のファイルシステム22に格納される顧客データのデータベース(以下、「顧客データベース」とも呼ぶ)として、図2に示すようなテーブルで示すことができる構造のデータが格納されているものとして説明する。なお、データベースサーバ20のファイルシステム22に格納される顧客データベースの具体的な構造については限定されないものである。
In this embodiment, data of a structure that can be represented by a table as shown in FIG. 2 is stored as a customer data database (hereinafter also referred to as “customer database”) stored in the
図2に示すように、顧客データベースでは、1人の顧客について1つのレコード(1行のデータ)で示されるデータが蓄積されている。図2に示すように、この実施形態において、各レコードには、少なくとも当該顧客に係る、顧客登録番号、氏名、性別、住所、電話番号のデータが含まれているものとするが、各レコードを構成する項目についても限定されないものである。例えば、各レコードを構成する項目として、各種システムに用いるユーザID、パスワード、アドレス情報(対応する通信装置30の識別情報)等を含めるようにしてもよい。 As shown in FIG. 2, in the customer database, data represented by one record (one line of data) is stored for one customer. As shown in FIG. 2, in this embodiment, each record includes at least customer registration number, name, sex, address, and telephone number data relating to the customer. The items to be configured are not limited. For example, items constituting each record may include a user ID, password, address information (identification information of the corresponding communication device 30) used for various systems, and the like.
次に、通信制御装置10の詳細構成について説明する。
Next, a detailed configuration of the
図1に示すように、通信制御装置10は、機能的には、データベースクライアント11、顧客データ記憶部12、及び通信処理部13を有している。なお、通信制御装置10としては、例えば、既存のPCやワークステーション等のコンピュータに、データベースクライアント11及び通信処理部13等に対応するソフトウェア(本発明のデータ処理プログラムを含むプログラム)をインストールすることにより実現するようにしてもよい。
As shown in FIG. 1, the
なお、この実施形態のデータベースシステムは、通信制御装置10のデータベースクライアント11、及びデータベースサーバ20−1、20−2により構成されているものとして説明する。この実施形態では、データベースクライアント11は通信制御装置10に搭載されているものとして説明するが、データベースクライアント11を単独の装置として構築するようにしてもよい。
The database system of this embodiment will be described as being configured by the
顧客データ記憶部12は、データベースクライアント11がデータベースサーバ20−1、20−2に検索処理を依頼して取得した各レコード(顧客データ)を記憶するための記憶手段である。
The customer
通信処理部13は、SIPメッセージ等を用いて通信装置30間の通信制御を行う通信制御手段の機能を担っている。通信処理部13は、通信制御に際して、顧客データ記憶部12に記憶されている顧客データを利用するものとする。なお、通信処理部13が通信制御に用いるプロトコルや、通信処理部13が通信制御に際しても散る顧客データの項目については限定されないものである。通信処理部13自体の構成は、種々の通信制御装置(例えば、SIPサーバ等)と同様の構成を適用することができるため、詳しい説明は省略する。
The
データベースクライアント11は、データベースサーバ20(20−1、20−2)から顧客データベースの一部又は全部を検索依頼処理により取得して、顧客データ記憶部12に記憶する顧客データの登録・更新等の処理を行う。なお、通信制御装置10がソフトウェア的に実現される場合、データベースクライアント11に対応するプログラムは、本発明のデータ処理プログラムに該当する。
The
データベースクライアント11は、例えば、種々のRDBMSのプラットフォームにより提供されるデータベースアプリケーション(ミドルウェア)上で、ユーザプログラムを動作させることにより実現するようにしてもよい。この実施形態において、データベースクライアント11は、機能的には、データベース処理部111、ポインタ保持部112、及びデータ取得継続処理113の3つの構成要素(プログラム、モジュール)を用いて構成されるものとして説明するが、各構成要素を実現する具体的なモジュール構成については限定されないものである。この実施形態では、説明を簡易とするために、データベースクライアント11は上述の3つの構成要素を用いて構成されるものとして説明するが、具体的なモジュール構造について限定されるものではない。例えば、1つモジュールに上述の3つの構成要素の各機能を全て盛り込んでデータベースクライアント11を構成するようにしてもよい。
The
データベース処理部111は、主として、データベースサーバ20に顧客データベースに対する検索処理を依頼し、その検索結果を処理(この実施形態では、取得した検索結果を顧客データとして、顧客データ記憶部12に記憶させる処理)するものである。具体的には、データベース処理部111は、フェッチ機能を利用した検索処理(顧客データベースに対する検索処理)を、データベースサーバ20(サーバプロセス21)に要求して、検索結果(該当するレコードのデータ)の供給を受ける。ここでは、データベース処理部111には、1回のフェッチ処理で、取得するレコード数(以下、「フェッチ数」と呼ぶ)として100が設定されているものとする。言い換えると、データベース処理部111は、データベースサーバ20(サーバプロセス21)に対して、検索結果のうちフェッチ数のレコードを1つの送信単位として逐次送信を依頼する。なお、データベース処理部111がデータ取得の際に用いるフェッチ数は動的に変更するようにしてもよいが、この実施形態のデータベース処理部111は、当初設定されたフェッチ数のみを用いるものとして説明する。
The database processing unit 111 mainly requests the
また、この実施形態では、データベース処理部111は、SQL文を用いて、データベースサーバ20(サーバプロセス21)に検索処理依頼を行うものとして説明するが、検索処理依頼に用いる具体的なデータベース言語やシーケンスの内容については限定されないものである。例えば、データベースクライアント11は、図3に示す「SELECT顧客登録番号、氏名、性別、年齢、住所、電話番号 FROM 頑客データ ORDER BY 顧客登録番号」というSQL文(SELECTコマンドを用いたSQL文)を用いて、データベースサーバ20(サーバプロセス21)に顧客データを要求することができる。
In this embodiment, the database processing unit 111 is described as performing a search processing request to the database server 20 (server process 21) using an SQL statement. However, a specific database language or the like used for the search processing request is described. The contents of the sequence are not limited. For example, the
図3に示すSQL文は、データベースサーバ20の「顧客データベース」テーブルのうち、「顧客登録番号、氏名、性別、年齢、住所、電話番号」の項目のデータについて、「顧客登録番号」をプライマリキー(主キー)としてソートされた順序で取得することをあらわしている。以下では、SQL文で抽出対象となる項目(SELECTに続く項目、例えば、図3では「顧客登録番号、氏名、性別、年齢、住所、電話番号」の項目)については「抽出項目」と呼ぶものとする。
The SQL statement shown in FIG. 3 includes “customer registration number” as a primary key for data items of “customer registration number, name, gender, age, address, telephone number” in the “customer database” table of the
したがって、データベースクライアント11から、図3のSQL文が発行された場合、データベースサーバ20(サーバプロセス21)は、顧客データから、各レコードの抽出項目(「顧客登録番号、氏名、性別、年齢、住所、電話番号」)のデータを抽出した検索結果(SQL文の処理結果)を展開(例えば、メモリ上に展開)し、その検索結果を、フェッチ数分(100個のレコード)ずつ、データベースクライアント11にを送信することになる。また、データベースクライアント11とデータベースサーバ20(サーバプロセス21)との間で、通信セッションが維持されている間は、フェッチした位置(カーソル)は、ミドルウェアで提供される機能により自動的に更新される。以下では、データベースクライアント11が、データベースサーバ20(サーバプロセス21)との間で通信セッションを用いて接続し、フェッチ処理により逐次データ取得する一連の処理(シーケンス)を、「データ取得シーケンス」と呼ぶものとする。データベースクライアント11とデータベースサーバ20(サーバプロセス21)との間の正常時のデータ取得シーケンスについては、種々のRDBMSの処理を適用することができるため、詳しい説明は省略する。
Therefore, when the SQL statement in FIG. 3 is issued from the
そして、ポインタ保持部112は、データベース処理部111がデータベースサーバ20からデータをフェッチ処理(フェッチ数分のレコードのデータを取得)する度に最後にフェッチした位置(カーソル位置)をポインタ情報として保持する。具体的には、ポインタ保持部112は、データベース処理部111が1回のフェッチ処理でフェッチ数分のレコードのデータを取得したときに、当該フェッチ処理で最後に取得したレコード(すなわち、取得したフェッチ数分のレコードのうち、プライマリキーでソートしたときに最後の順序となるレコード)のデータ(少なくともプライマリキーのデータ)を「ポインタ情報」として保持する。
The
そして、データベース処理部111は、フェッチ機能を用いたデータ取得シーケンスにより、データベースサーバ20−1(サーバプロセス21)から顧客データの取得中に、通信障害等によりデータ取得シーケンスが中断(通信セッションが切断)した場合には、新たに現用系として動作することになるデータベースサーバ20−2(サーバプロセス21)から顧客データの取得を再開することができる。このとき、データベース処理部111は、ポインタ保持部112に保持されているポインタ情報に基づいて、前回フェッチしたカーソル位置の次のレコードからデータ取得シーケンスを再開するためのSQL文を作成して、データベースサーバ20−2(サーバプロセス21)にデータ取得シーケンスの再開を要求する。言い換えると、このとき、データベース処理部111は、データ取得シーケンスが中断した場合、検索結果のうち中断により取得できなかったレコードのデータ送信を依頼するためのSQL文を生成して、データベースサーバ20−2(サーバプロセス21)に送信する
(A−2)実施形態の動作
次に、以上のような構成を有するこの実施形態のネットワークシステム1の動作を説明する。
Then, the database processing unit 111 interrupts the data acquisition sequence due to a communication failure or the like (communication session is disconnected) while acquiring customer data from the database server 20-1 (server process 21) by the data acquisition sequence using the fetch function. ), The acquisition of customer data can be resumed from the database server 20-2 (server process 21) that will newly operate as the active system. At this time, the database processing unit 111 creates an SQL statement for restarting the data acquisition sequence from the next record at the cursor position fetched last time based on the pointer information held in the
(A−2−1)データ取得シーケンスの正常動作
まず、通信制御装置10(データベースクライアント11)がデータベースサーバ20−1とのデータ取得シーケンスを正常に完結する場合の動作(特に障害が発生しない場合の正常系の動作)について、図4のシーケンス図を用いて説明する。なお、初期において、通信制御装置10の顧客データ記憶部12の内容は初期化された状態(1つもレコードが登録されていない状態)であるものとする。
(A-2-1) Normal operation of data acquisition sequence First, the operation when the communication control device 10 (database client 11) completes the data acquisition sequence with the database server 20-1 normally (when no failure occurs) Will be described with reference to the sequence diagram of FIG. In the initial stage, it is assumed that the contents of the customer
まず、通信制御装置10のデータベースクライアント11が、データベースサーバ20−1(サーバプロセス21)に対して、通信セッション(ミドルウェアにより提供される通信セッション)の生成要求を行い、データベースサーバ20−1(サーバプロセス21)との間の通信セッションを確立したものとする(S101、S102)。
First, the
次に、データベースクライアント11が、データベースサーバ20−1(サーバプロセス21)に対して、上述の図3に示すSQL文により検索要求(SELECT文を用いたデータベース処理の要求)を行ったものとする(S103)。なお、このとき、データベースクライアント11とデータベースサーバ20−1(サーバプロセス21)との間の通信セッションにおいて、フェッチ数として100が設定されているものとする。また、上述の図3に示すように、顧客データの検索要求のプライマリキーは登録顧客番号である。
Next, it is assumed that the
そして、SQL文を受け取ったデータベースサーバ20−1(サーバプロセス21)では、ファイルシステム22の顧客データベースに対して受け取ったSQL文に基づいた検索処理(SELECT文を用いたSQL文の処理)を行い、その検索結果を保持する(S104)。
Then, the database server 20-1 (server process 21) that has received the SQL statement performs a search process (SQL statement processing using the SELECT statement) based on the received SQL statement for the customer database of the
このとき、データベースサーバ20−1(サーバプロセス21)で保持される検索結果をテーブル形式で表すと図5のようになる。図5に示すテーブルでは、各抽出項目のデータを有するレコード(行)が、プライマリキー(顧客登録番号)に基づく順序でソートされた状態となっている。また、図5に示すテーブルでは、顧客登録番号1〜10000の10000レコードのデータを有しているものとする。データベースサーバ20−1(サーバプロセス21)は、この検索結果のテーブルについて先頭から100レコードずつデータベースクライアント11へ送信(フェッチ)する処理を行う。
At this time, the search results held in the database server 20-1 (server process 21) are represented in a table format as shown in FIG. In the table shown in FIG. 5, the records (rows) having the data of each extraction item are sorted in the order based on the primary key (customer registration number). Further, the table shown in FIG. 5 has data of 10,000 records with
そして、データベースサーバ20−1(サーバプロセス21)は、検索結果から最初の100レコード(プライマリキーに基づくソート順序が1〜100番目のレコード)を取得して、データベースクライアント11に送信する(S105)。 Then, the database server 20-1 (server process 21) acquires the first 100 records (records with the first to 100th sort order based on the primary key) from the search result, and transmits them to the database client 11 (S105). .
そして、データベースクライアント11は最初の100レコードのデータをフェッチ(取得)すると、その100レコードのデータを処理(顧客データ記憶部12に追加記録)する(S106)。
Then, when the
また、データベースクライアント11は最初の100レコードのデータをフェッチ(取得)すると、フェッチしたレコードうち最後のレコード(プライマリキーのソート順で最後となるレコード)のプライマリキーの値をポインタ保持部112に供給して保持させる(S107)。このとき、データベースクライアント11では、登録番号1〜100のレコードをフェッチしているので、その最後にあたる登録番号100をポインタ保持部112に供給して保持させる。
Further, when the
次に、データベースクライアント11は、データベースサーバ20−1(サーバプロセス21)に対して次のフェッチ要求(2回目のフェッチ要求)を送信する(S108)。
Next, the
次のフェッチ要求(2回目のフェッチ要求)を受けると、データベースサーバ20−1は、検索結果から次の100レコード(プライマリキーに基づくソート順序が101〜200番目のレコード)を取得して、データベースクライアント11に送信する(S109)。 Upon receiving the next fetch request (second fetch request), the database server 20-1 obtains the next 100 records (records with a 101 to 200th sort order based on the primary key) from the search result, and The data is transmitted to the client 11 (S109).
そして、データベースクライアント11は次の100レコード(プライマリキーに基づくソート順序が101〜200番目のレコード)のデータをフェッチ(取得)すると、その100レコードのデータを処理(顧客データ記憶部12に追加記録)し(S110)、さらに、フェッチしたレコードうち最後のレコードのプライマリキーの値(登録顧客番号=200)をポインタ保持部112に供給して保持させる(S111)。
Then, when the
以後、データベースクライアント11とデータベースサーバ20−1との間でデータ取得シーケンスが継続(上述のステップS108〜S111のフェッチ処理が繰り返し実行)され、データベースクライアント11が、データベースサーバ20−1(サーバプロセス21)に対して、100回目のフェッチ要求(フェッチ要求)を送信したものとする(S201)。
Thereafter, the data acquisition sequence is continued between the
100回目のフェッチ要求を受けると、データベースサーバ20−1は、検索結果から最後の100レコード(プライマリキーに基づくソート順序が9901〜10000番目のレコード)を取得して、データベースクライアント11に送信する(S202)。また、データベースサーバ20−1は、このとき、今回のフェッチで全ての検索結果のレコード送信が完了する旨もデータベースクライアント11に通知するものとする。
Upon receiving the 100th fetch request, the database server 20-1 acquires the last 100 records (the records with the sort order of 9901 to 10000 based on the primary key) from the search result, and transmits them to the database client 11 ( S202). At this time, the database server 20-1 also notifies the
そして、最後の100レコードのデータのフェッチ(取得)が完了すると、データベースクライアント11は、その100レコードのデータを処理(顧客データ記憶部12に追加記録)し(S203)、さらに、ポインタ保持部112のポインタ情報を初期化(破棄)(S204)する。
When the data fetching (acquisition) of the last 100 records is completed, the
また、データベースクライアント11は、最後の100レコードのデータのフェッチ(取得)が完了すると、データベースサーバ20−1に対してセッション解放(セッション切断要求)を送信する(S205)。
Further, when the data fetch (acquisition) of the last 100 records is completed, the
そして、セッション解放(セッション切断要求)を受けたデータベースサーバ20−1は、セッション解放を実行し、セッション解放の旨を結果応答として、データベースクライアント11に返答する(S206)。 Upon receiving the session release (session disconnection request), the database server 20-1 executes the session release and returns a response indicating that the session has been released to the database client 11 (S206).
データベースクライアント11におけるデータ取得シーケンスは正常系の場合、以上のようなシーケンスにより行われる。
In the case of a normal system, the data acquisition sequence in the
(A−2−2)データ取得シーケンスの異常系動作
次に、データベースクライアント11がデータベースサーバ20−1とデータ取得シーケンスを実行している間に、データベースサーバ20−1に障害が発生し、データ取得シーケンスが中断した場合の動作について、図6、図7のシーケンス図を用いて説明する。
(A-2-2) Abnormal operation of data acquisition sequence Next, while the
図6、図7のシーケンス図では、上述の図4のシーケンス図と同様の処理のステップについては同一のステップ番号(符号)を付している。 In the sequence diagrams of FIGS. 6 and 7, the same step numbers (symbols) are assigned to the same processing steps as those in the sequence diagram of FIG.
まず、上述の正常系の動作と同様に、データベースクライアント11により、データベースサーバ20−1(サーバプロセス21)との間でデータ取得シーケンスが開始され、フェッチ処理が開始され(上述のステップS101〜S111と同様の処理)、継続してフェッチ処理が繰り返されたものとする。
First, in the same manner as the normal operation described above, the
そして、その後、データベースクライアント11から、データベースサーバ20−1(サーバプロセス21)に、50回目のフェッチ処理を要求して(S301)、フェッチ数分のレコード(100レコード)のデータを取得し(S302)、顧客データ記憶部12に追加登録したものとする(S303)。また、このとき、データベースクライアント11は、フェッチしたレコードうち最後のレコードのプライマリキーの値(登録顧客番号=5000)をポインタ保持部112に供給して保持させる(S304)。
After that, the
そして、データベースクライアント11による50回目のフェッチ処理が終了した後、次のフェッチ処理が終了する前に、データベースサーバ20−1に障害が発生し動作を停止したものとする(S401)。
Then, after the 50th fetch process by the
その後、データベースサーバ20−2が、データベースサーバ20−1の障害発生を検知し、待機系から現用系(アクティブ系)として動作するように切り替わったものとする(S402)。 Thereafter, it is assumed that the database server 20-2 detects a failure of the database server 20-1 and switches from the standby system to operate as the active system (active system) (S402).
その後、データベースクライアント11により、データベースサーバ20−1に障害が発生し、データ取得シーケンスが中断したこと、及びデータベースサーバ20−2が現用系に切り替わったことが認識され、接続先をデータベースサーバ20−2に切替えたものとする(S403)。
Thereafter, the
なお、データベースサーバ20−1からデータベースサーバ20−2への現用系の切替え、及び、データベースクライアント11におけるサーバ切替の構成については、種々の冗長化されたデータベースシステムの構成を適用することができるため詳しい説明を省略する。例えば、データベースクライアント11とデータベースサーバ20−1との間の通信セッションがTCPにより管理されている場合には、例えば、データベースクライアント11において、一定時間以上当該通信セッション(TCPセッション)でパケット送受信ができない場合に通信セッション切断を検知することができる。
It should be noted that various redundant database system configurations can be applied to the switching of the active system from the database server 20-1 to the database server 20-2 and the server switching configuration in the
次に、データベースクライアント11は、ポインタ保持部112に保持されているポインタ情報(顧客登録番号=5000)に基づいて、前回フェッチしたカーソル位置の次のレコードからデータ取得シーケンスを再開するためのSQL文を作成する(S404)。
Next, based on the pointer information (customer registration number = 5000) held in the
具体的には、データベースクライアント11は、ポインタ保持部112に保持されているポインタ情報(顧客登録番号=5000)に基づいて、図8に示すSQL文を生成する。図8に示すSQL文では、SELECT文の検索条件として、初期のSQL文(上述の図3のSQL文)に、ソート順序がポインタ情報(顧客登録番号=5000)以後となるレコードを抽出する検索条件である「WHERE 顧客登録番号>5000」を追加したSQL文を生成する。
Specifically, the
そして、通信制御装置10のデータベースクライアント11は、データベースサーバ20−2(サーバプロセス21)に対して、通信セッションの生成要求を行い、データベースサーバ20−2(サーバプロセス21)との間のセッションを確立する(S405、S406)。
Then, the
次に、データベースクライアント11が、データベースサーバ20−2(サーバプロセス21)に対して、上述のステップS404で生成したSQL文(上述の図8)により検索要求を行う(S407)。
Next, the
そして、SQL文を受け取ったデータベースサーバ20−2(サーバプロセス21)では、ファイルシステム22の顧客データベースから受け取ったSQL文に基づいた検索処理を行い、その検索結果を保持する(S408)。
The database server 20-2 (server process 21) that has received the SQL statement performs a search process based on the SQL statement received from the customer database of the
このとき、データベースサーバ20−2(サーバプロセス21)で保持される検索結果例をテーブル形式で表すと図9のようになる。このとき、データベースサーバ20−2(サーバプロセス21)で保持される検索結果は、図9に示すように顧客登録番号5001〜10000の5000レコードのデータで構成されることになる。データベースサーバ20−2(サーバプロセス21)は、この検索結果のテーブルについて100レコードずつデータベースクライアント11へ送信(フェッチ)する処理を、あと50回行うことになる。
At this time, an example of a search result held in the database server 20-2 (server process 21) is shown in a table format as shown in FIG. At this time, the search result held in the database server 20-2 (server process 21) is composed of data of 5000 records with customer registration numbers 5001 to 10000 as shown in FIG. The database server 20-2 (server process 21) performs the process of transmitting (fetching) 100 records to the
そして、データベースサーバ20−2(サーバプロセス21)は、検索結果から最初の100レコード(プライマリキーに基づくソート順序が1〜100番目のレコード、顧客登録番号が5001〜5100のレコード)を取得して、データベースクライアント11に送信する(S409)。 Then, the database server 20-2 (server process 21) obtains the first 100 records from the search result (the records with the first to 100th sort order based on the primary key and the records with customer registration numbers 5001 to 5100). The data is sent to the database client 11 (S409).
そして、データベースクライアント11は、100レコードのデータをフェッチ(取得)すると、その100レコードのデータを処理(顧客データ記憶部12に追加記録)し(S410)、さらに、今回フェッチしたレコードうち最後のレコードのプライマリキーの値(登録顧客番号=5100)を、ポインタ情報としてポインタ保持部112に供給して保持させる(S411)。
When the
そして、その後、データベースクライアント11は、データベースサーバ20−2(サーバプロセス21)に、再開後の2回目のフェッチ処理を要求して(S412)、フェッチ数分のレコード(顧客登録番が5101〜5200の100レコード)のデータを取得し(S413)、顧客データ記憶部12に追加登録したものとする(S414)。また、このとき、データベースクライアント11は、今回フェッチしたレコードうち最後のレコードのプライマリキーの値(登録顧客番号=5200)を、ポインタ情報としてポインタ保持部112に供給して保持させる(S415)。
After that, the
以後データベースクライアント11とデータベースサーバ20−2との間でデータ取得シーケンスが継続(上述のステップS411〜S415の処理が繰り返し実行)され、データベースクライアント11が、データベースサーバ20−2(サーバプロセス21)に対して、再開後50回目のフェッチ要求(フェッチ要求)を送信したものとする(S501)。
Thereafter, the data acquisition sequence is continued between the
再開後50回目のフェッチ要求を受けると、データベースサーバ20−2は、検索結果から最後の100レコード(プライマリキーに基づくソート順序が9901〜10000番目のレコード)を取得して、データベースクライアント11に送信する(S502)。
Upon receiving the 50th fetch request after the restart, the database server 20-2 obtains the last 100 records (records having a sort order of 9901 to 10000 based on the primary key) from the search result, and transmits them to the
そして、データベースクライアント11は、最後の100レコードのデータのフェッチ(取得)が完了すると、その100レコードのデータを処理(顧客データ記憶部12に追加記録)し(S503)、さらに、ポインタ保持部112のポインタ情報を初期化(破棄)(S504)する。
Then, when the fetching (acquisition) of the data of the last 100 records is completed, the
また、データベースクライアント11は、最後の100レコードのデータのフェッチ(取得)が完了すると、データベースサーバ20−2に対してセッション解放(セッション切断要求)を送信する(S505)。
Further, when the data fetch (acquisition) of the last 100 records is completed, the
そして、セッション解放(セッション切断要求)を受けたデータベースサーバ20−2は、セッション解放を実行し、セッション解放の旨を結果応答として、データベースクライアント11に返答する(S506)。 Upon receiving the session release (session disconnection request), the database server 20-2 executes the session release and returns a response indicating that the session has been released to the database client 11 (S506).
(A−2−3)プライマリキーが複数の項目で構成される場合
上述の例では、通信制御装置10(データベースクライアント11)が、顧客データを取得する順序を決定するためのプライマリキーは、1つの項目(顧客登録番号)のみを用いているが、実際に加入者データを処理する際にはプライマリキーに複数項目が適用される場合もあり得る。
(A-2-3) When the primary key is composed of a plurality of items In the above example, the primary key for the communication control device 10 (database client 11) to determine the order in which customer data is acquired is 1 Although only one item (customer registration number) is used, a plurality of items may be applied to the primary key when actually processing the subscriber data.
以下では、プライマリキーが2つ以上の項目で構成される場合のネットワークシステム1の動作例について説明する。
Below, the operation example of the
例えば、顧客データ中に、同一世帯となるユーザのレコードが存在している場合を考えると、その世帯は、住所、及び、電話番号(固定電話の場合)が同一となると考えられる。そして、顧客データの各レコードを、世帯ごとにソートした検索結果を得るためのSQL文例は図10のようになる。 For example, if there is a record of users who are in the same household in the customer data, the household is considered to have the same address and telephone number (in the case of a fixed telephone). An example SQL sentence for obtaining a search result obtained by sorting each record of customer data for each household is as shown in FIG.
図10に示すSQL文では、「ORDER BY 住所、電話番号、氏名」と記述し、3つのプライマリキーを「住所、電話番号、氏名」の順で適用する旨が記載されている。ただし、ここでは、説明を簡易とするため、顧客データの同一世帯中に同姓同名(氏名文字列が全くの同一)のユーザのレコードが存在しないことと仮定する。 The SQL sentence shown in FIG. 10 describes “ORDER BY address, telephone number, name” and describes that three primary keys are applied in the order of “address, telephone number, name”. However, here, for the sake of simplicity, it is assumed that there is no record of a user having the same family name and the same name (name character strings are exactly the same) in the same household of customer data.
そして、データベースクライアント11から、図10に示すSQL文を用いたデータ検索要求が、データベースサーバ20に供給されると、データベースサーバ20では、図11に示すような検索結果例が得られるものとする。
Then, when a data search request using the SQL statement shown in FIG. 10 is supplied from the
この例によれば、SQL文の条件となる「ORDER BY 住所、電話番号、氏名」は、「住所による昇順ソート且つ、電話番号によるソート、且つ、氏名によるソート」である。したがって、図11のような検索結果が得られた場合、顧客番号00002のレコードと顧客番号00800のレコードは、住所と電話番号が一致するため、同一世帯とみなすことができる。また、図11のような検索が得られた場合顧客登録番号00001のレコードのユーザと、顧客登録番号00003のレコードのユーザについても同一世帯とみなすことができる。
According to this example, “ORDER BY address, telephone number, name”, which is the condition of the SQL sentence, is “sorting in ascending order by address, sorting by telephone number, and sorting by name”. Therefore, when the search result as shown in FIG. 11 is obtained, the record of the
そして、データベースクライアント11において、図10に示すSQL文でデータ取得シーケンス(フェッチ処理の繰り返し処理)を行う場合、フェッチ数分のレコードをフェッチするごとに、当該フェッチで最後に取得したレコードのプライマリキーのデータ(すなわち、住所、電話番号、及び氏名の項目のデータ)を「ポインタ情報」として保持する。
When the
ここで、仮に、データベースクライアント11(ポインタ保持部112)で保持したポインタ情報が、「住所=×××××」、「電話番号= nnnnnnnnnn」、「氏名=ZZZZ」という内容であった場合を想定する。 Here, it is assumed that the pointer information held by the database client 11 (pointer holding unit 112) has the contents of “address = xxxxxxx”, “phone number = nnnnnnnnnn”, “name = ZZZZ”. Suppose.
この場合、データベースクライアント11がデータ取得シーケンス再開後にポインタ情報に基づいて生成するSQL文を図12に示す。
In this case, FIG. 12 shows an SQL sentence generated by the
データベースクライアント11は、データ取得シーケンスを再開すると、まず、図12(a)に示すように、検索条件に「WHERE 住所=××××× AND 電話番号= nnnnnnnnnn 氏名 > ZZZZ」という条件を加えたSQL文を生成して、データ取得シーケンスを実行する(検索結果がなくなるまでデータベースサーバ20からフェッチする処理を繰り返す)。
When the
次に、データベースクライアント11は、図12(b)に示すように、検索条件に「WHERE 住所=××××× AND 電話番号 > nnnnnnnnnn」という条件を加えたSQL文を生成して、データ取得シーケンスを実行する。
Next, as shown in FIG. 12B, the
最後に、データベースクライアント11は、図12(c)に示すように、検索条件に「WHERE 住所 > ×××××」という条件を加えたSQL文を生成して、データ取得シーケンスを実行する。
Finally, as shown in FIG. 12C, the
この例では、上述の通り、プライマリキーが「住所、電話番号、氏名」の順序で複数の項目で構成されているため、データベースクライアント11は、データ取得シーケンス再開後に、上述の3つのSQL文を実行することにより、正常動作した場合の検索結果(上述の図10のSQL文の検索結果)と同様の検索結果を顧客データ記憶部12に保持することができる。
In this example, as described above, since the primary key is composed of a plurality of items in the order of “address, telephone number, name”, the
例えば、データベースクライアント11において、フェッチ数を「1」として、上述の図10のSQL文によりデータ取得シーケンスを行った場合の例について説明する。この場合、図10のSQL文で取得される検索結果は、同様に図11の内容となる。このとき、データベースクライアント11において、検索結果のうち顧客登録番号「00001」番までフェッチが実施された後に障害が発生し、データ取得シーケンスが中断したものとする。このとき、ポインタ保持部112には、ポインタ情報として、「住所=東京都A区B町1−1−1、電話番号=03−1111−1111、氏名=佐藤 太郎」という情報が保持される。
For example, in the
そしてこの場合、検索結果には、顧客登録番号「00001」と同一世帯のデータが存在する可能性があるため、データベースクライアント11が継続的な検索を実施する際には、まず、「住所が同一、且つ、電話番号が同一であり、氏名の文字列がソート上、顧客番号00001の氏名より順序が後となる」データの検索(上述の図12(a)のSQL文による検索)を実施する必要がある。この時、該当するレコード(同一世帯の他のユーザのレコード)が存在する場合、データベースクライアント11は、そのレコードのデータを継続検索処理上、最初にフェッチして、顧客データ記憶部12に追加しなければ、「世帯単位に検索する」仕様に反することになるためである。
In this case, since there is a possibility that data of the same household as the customer registration number “00001” exists in the search result, when the
なお、通常データベース上の検索では、文字列の比較については、登録の文字列をバイナリコードとして扱い、その値の昇順(または、降順)によりソートされるため、単純な数値の比較とは検索方式が異なる。データベースサーバ20における文字列の具体的な比較方式については限定されないものであり、種々のコード体系に基づく方式を適用することができる。
In general, in database searches, registered character strings are handled as binary codes and sorted in ascending order (or descending order) of their values, so simple numeric comparison is a search method. Is different. A specific method of comparing character strings in the
再開後1回目の条件による検索(上述の図12(a)のSQL文による検索)にて、データ取得シーケンスが終了した場合(「全てのレコードのデータ取得」、または、「該当レコードなし」となった場合)、データベースクライアント11は、次に、「住所が同一、且つ、電話番号が障害発生時の最終フェッチデータの電話番号(=03−1111−1111)よりも検索順序が後にある」レコードを検索(上述の図12(b)のSQL文による検索))する必要がある。再開後2回目の条件による検索(上述の図12(b)のSQL文による検索)は、同一世帯において、例えば、顧客データ登録時の電話番号が、携帯電話の番号であった場合などが考えられるために必要な処理である。
When the data acquisition sequence is completed in the search based on the first condition after the restart (search by the SQL statement in FIG. 12A) ("data acquisition of all records" or "no corresponding record") Next, the
そして、再開後2回目の条件による検索(上述の図12(b)のSQL文による検索)にて、データ取得シーケンスが終了した場合、データベースクライアント11は、同一世帯の未取得データを全て取得できたことになり、次の検索は、本来の生成リスト上の次の世帯以降のデータ検索となるため、「ポインタ情報の住所(=東京都A区B町1−1−1)以後の検索順序」のレコードを検索(上述の図12(c)のSQL文による検索))する必要がある。
Then, when the data acquisition sequence is completed in the second search after the restart (search by the SQL statement in FIG. 12B), the
結果として、データベースクライアント11は、データ取得シーケンス再開後に、上述の3つのSQL文による検索処理(データ取得シーケンス)を順に実行し、顧客データ記憶部12にその検索結果を追加する処理(上述の図6、図7等と同様の処理)を行うことにより、中断する前に取得したデータを併せて、正常動作時と同等の結果を得られる事になる。
As a result, after the data acquisition sequence is resumed, the
上述の具体例に基づいて、データベースクライアント11がデータ取得シーケンス再開時に生成するSQL文の検索条件(WHERE以後の記述)を一般化した表現で図示すると、図13のようになる。
Based on the above-described specific example, the SQL statement search condition (description after WHERE) generated by the
図13(a)は、n個のプライマリキーのカラム(項目)をそれぞれ「C1、C2、…、Cn−2、Cn−1、Cn」とした場合のポインタ情報を示している。なお、図13(a)では、n個のカラム「C1、C2、…、Cn−2、Cn−1、Cn」のそれぞれについてポインタ保持部112が保持したポインタ情報を「V1、V2、…、Vn−2、Vn−1、Vn」と図示している。例えば、上述の図10の例のようにプライマリキーが、「住所、電話番号、氏名」の場合、カラムC1(V1)が「住所」、カラムC2(V2)が「電話番号」、カラムC3(V3)が「氏名」となり、さらに、カラム数n=3となる。
FIG. 13A shows the pointer information when the columns (items) of the n primary keys are “C1, C2,..., Cn−2, Cn−1, Cn”, respectively. 13A, the pointer information held by the
そして、図13の一般化した例において、データベースクライアント11がデータ取得シーケンスを再開したとき生成するn個のSQL文の検索条件(WHERE以後の記述)は、それぞれ図13(b)の内容となる。
In the generalized example of FIG. 13, the search conditions (descriptions after the WHERE) of n SQL statements generated when the
図13(b)において、データ取得シーケンス再開後の1回目の検索条件では、カラムC1〜Cn−1については、ポインタ情報の値(V1〜Vn−1)とイコール条件「=」としてWHERE句に付与し、さらに、カラムCnについては、ポインタ情報の値Vnに対して>(大なり)の条件としてWHERE句に付与している。 In FIG. 13B, in the first search condition after the data acquisition sequence is restarted, the values of the pointer information (V1 to Vn-1) and the equal condition “=” are set in the WHERE clause for the columns C1 to Cn-1. Further, the column Cn is assigned to the WHERE clause as a condition of> (greater than) the value Vn of the pointer information.
また、図13(b)において、データ取得シーケンス再開後の2回目の検索条件では、カラムC1〜Cn−2については、ポインタ情報の値(V1〜Vn−2)とイコール条件「=」としてWHERE句に付与し、カラムCn−1については、ポインタ情報の値Vn−1に対して「>」(大なり)の条件としてWHERE句に付与している。 In FIG. 13B, in the second search condition after the data acquisition sequence is restarted, the values of the pointer information (V1 to Vn-2) and the equal condition “=” are set for the columns C1 to Cn-2. The column Cn−1 is added to the WHERE clause as a condition “>” (greater than) for the pointer information value Vn−1.
データベースクライアント11は、以上のような付与論理での検索条件の生成を繰り返す。
The
そして、図13(b)に示すように、データ取得シーケンス再開後のn−1回目の検索条件では、カラムC1については、ポインタ情報の値(V1)とイコール条件「=」としてWHERE句に付与し、カラムC2については、ポインタ情報の値V2に対して「>」(大なり)の条件としてWHERE句に付与している。 As shown in FIG. 13B, in the (n-1) th search condition after resuming the data acquisition sequence, the column C1 is assigned to the WHERE clause as the pointer information value (V1) and the equal condition “=”. The column C2 is assigned to the WHERE clause as a condition “>” (greater than) with respect to the value V2 of the pointer information.
さらにまた、図13(b)に示すように、データ取得シーケンス再開後のn回目の検索条件では、カラムC1について、ポインタ情報の値V1に対して「>」(大なり)の条件としてWHERE句に付与している。 Furthermore, as shown in FIG. 13B, in the n-th search condition after the data acquisition sequence is resumed, the WHERE clause is set as a condition “>” (greater than) for the value V1 of the pointer information for the column C1. Has been granted.
プライマリキーの構成が変わった場合でも、データベースクライアント11(データベース処理部111)は、図13に示す順序で検索条件を設定したSQL文を生成し、それぞれのSQL文を用いてデータ取得シーケンスを実行することができる。 Even when the configuration of the primary key changes, the database client 11 (database processing unit 111) generates an SQL statement in which search conditions are set in the order shown in FIG. 13, and executes a data acquisition sequence using each SQL statement. can do.
通常SELECTコマンドの「ORDER BY」の句では、ソートに用いるカラム(項目)が優先度の高いものから順に記述される。例えば、上述の図10の例では「ORDER BY」の後に「住所、電話番号、氏名」と記述されているため、プライマリキーの中でも「住所」が最も優先度の高いカラム(項目)として設定されている。これは、顧客データ(加入者データ)の中で世帯を分類するキー(カラム)として、住所が最も重要だからである。そのため、上述の図12の例では、データベースクライアント11は、データシーケンス再開後1回目の検索条件のSQL文と、2回目の検索条件のSQL文で、住所(世帯)が同じユーザのレコードを検索した後、3回目の検索条件のSQL文で当該住所(世帯)よりも検索順序が後となるレコードを検索処理している。同様の処理を図13の一般化した例で説明すると、データベースクライアント11は、データ取得シーケンス再開後1回目〜n−1回目の検索条件のSQL文で、最も優先度の高いカラムC1=V1(ポインタ情報の値と同一)で未取得のレコード(まだフェッチしていないレコード)の検索処理を実行し、n回目の検索条件のSQL文で、カラムC1がV1以後の検索順序となるレコードの検索処理を行っていることになる。
In the phrase “ORDER BY” of the normal SELECT command, columns (items) used for sorting are described in descending order of priority. For example, since “address, phone number, name” is described after “ORDER BY” in the example of FIG. 10 described above, “address” is set as the highest priority column (item) in the primary key. ing. This is because the address is the most important key (column) for classifying households in customer data (subscriber data). Therefore, in the example of FIG. 12 described above, the
なお、図12、図13に示すSQL文はあくまで、上述の処理の具体例であり、利用するミドルウェア(データベースアプリケーション)の仕様に沿って同様の処理が可能であれば、別の記述内容であってもよい。 Note that the SQL statements shown in FIGS. 12 and 13 are merely specific examples of the above-described processing. If the same processing is possible in accordance with the specifications of the middleware (database application) to be used, the description content is different. May be.
(A−3)実施形態の効果
この実施形態によれば、以下のような効果を奏することができる。
(A-3) Effects of Embodiment According to this embodiment, the following effects can be achieved.
データベースクライアント11は、データ取得シーケンスが中断した場合、検索結果のうち中断により取得できなかったレコードのデータ送信を依頼するためのSQL文を生成して、データベースサーバ20−2(サーバプロセス21)に送信し、データ取得シーケンスを再開している。これにより、データベースクライアント11では、データ取得シーケンスの中断前に取得した検索結果と、データ取得シーケンス再開後に取得した検索結果を合わせて、正常動作時と同等の結果を得られる事になる。したがって、データベースクライアント11では、データ取得シーケンスで、全ての検索結果についてデータ取得が完了するまでの間に、中断が複数回発生した場合でも、その都度、検索条件を変更(SQL文にポインタ保持部112が保持するポインタ情報に基づく検索条件を設定)するだけで、継続的なデータ取得シーケンスが可能となる。すなわち、データベースクライアント11では、データ取得シーケンスに中断が発生した場合、その中断による遅延時間は、データ取得シーケンスを再開する動作(データベースサーバとの通信セッションの確立や新たなSQL文の生成送信処理等)を行う時間しか発生しないため、従来よりも短くすることができる。
When the data acquisition sequence is interrupted, the
特に、通信キャリアの通信制御装置(SIPサーバ等)で用いられる顧客データ(加入者データ)の登録レコード数は膨大な数となるため、従来技術では、例えば百万件単位のレコード登録についてデータ取得シーケンスを最初から行う場合の遅延時間も非常に長い時間となるおそれがある。また、通信キャリアの通信制御装置では、顧客データが揃わない状態でサービス開始することは困難であるため、データ取得シーケンスの遅延が、キャリアサービスに影響を与える場合もあり得る。そのため、本発明のデータベースクライアント(データ処理装置、データ処理プログラム)を通信キャリアの通信制御装置に用いる場合、より大きな効果を奏することができる。 In particular, since the number of registered records of customer data (subscriber data) used in communication control devices (SIP servers, etc.) of communication carriers is enormous, in the conventional technology, for example, data acquisition is performed for record registration in units of one million items. The delay time when the sequence is performed from the beginning may be very long. In addition, since it is difficult for a communication control device of a communication carrier to start a service when customer data is not available, a delay in the data acquisition sequence may affect the carrier service. Therefore, when the database client (data processing apparatus, data processing program) of the present invention is used for a communication control apparatus of a communication carrier, a greater effect can be achieved.
(B)他の実施形態
本発明は、上記の実施形態に限定されるものではなく、以下に例示するような変形実施形態も挙げることができる。
(B) Other Embodiments The present invention is not limited to the above-described embodiments, and may include modified embodiments as exemplified below.
(B−1)上記の実施形態では、説明を簡易とするために、データベースクライアント11のデータ取得シーケンスで用いるSQL文に付与する初期の検索条件(初期のWHERE句)は無い例について説明したが、任意の検索条件を初期から付与してもよい。
(B-1) In the above embodiment, in order to simplify the description, an example in which there is no initial search condition (initial WHERE clause) added to the SQL statement used in the data acquisition sequence of the
また、本方式を適用した検索条件においては、データ検索範囲を絞り込むためのWHERE句は任意に付与してよく、適用条件として付与するソート条件項目は、任意に付与されたWHERE句カラムによって、絞り込まれたデータ範囲内において、一意性が得られる為の項目となる。 In addition, in the search condition to which this method is applied, a WHERE clause for narrowing down the data search range may be arbitrarily given, and the sort condition item given as the applicable condition is narrowed down by an arbitrarily given WHERE clause column. This is an item for obtaining uniqueness within the specified data range.
図14は、データベースクライアント11がデータ取得シーケンスに用いるSQL文(初期から検索条件が付与されているSQL文)の例について示した説明図である。
FIG. 14 is an explanatory diagram showing an example of an SQL sentence (an SQL sentence to which a search condition is given from the beginning) used by the
図14(a)は、データ取得シーケンスの初期のSQL文を示している。また、図14(b)は、データ取得シーケンス再開時のSQL文を示している。なお、図14ではプライマリキーは「顧客登録番号」だけとなっている。 FIG. 14A shows an initial SQL statement in the data acquisition sequence. FIG. 14B shows an SQL statement when the data acquisition sequence is restarted. In FIG. 14, the primary key is only “customer registration number”.
図14(a)では、例として、WHERE句に、「男性で、年齢が30歳以上、東京都在住」という条件で検索するための検索条件として「WHERE 性別=男 AND 年齢>=30 AND 住所 LIKE 東京都」が付与されている。
In FIG. 14 (a), as an example, in the WHERE clause, “WHERE gender = male AND age> = 30 AND address as a search condition for searching under the condition“ male,
そして、データベースクライアント11が図14(a)のSQL文を用いてデータ取得シーケンスを実行中に中断が発生し、再開する場合には、図14(b)に示すように、「WHERE 性別=男 AND 年齢>=30 AND 住所LIKE 東京都 AND 顧客登録番号>nnnn」という検索条件を付与したSQL文を用いることができる。なお、図14(b)のSQL文における「nnnn」は、ポインタ保持部112に保持されているポインタ情報の値(プライマリキー「顧客登録番号」の値)である。
When the
(B−2)上記の実施形態では、本発明のデータベースクライアント(データ処理装置、データ処理プログラム)を、通信制御装置の顧客データ(加入者データ)の処理に適用したが、本発明のデータベースクライアント(データ処理装置、データ処理プログラム)の利用用途は限定されないものであり、「データベースから特定の条件において検索を実施し、その結果を、複数回のフェッチにより取得する」全てのシステムにおいて適用が可能である。 (B-2) In the above embodiment, the database client (data processing apparatus, data processing program) of the present invention is applied to the processing of customer data (subscriber data) of the communication control apparatus. The usage of (data processing device, data processing program) is not limited, and can be applied to all systems that "search from a database under specific conditions and obtain the result by multiple fetches" It is.
(B−3)上記の各実施形態では、データベースクライアント11がデータベースサーバ20からフェッチしたデータについて、顧客データ記憶部12に追加記録する処理のみを行っているが、フェッチしたデータについて種々の加工処理(例えば、データの表示形式や内容を変換する処理)を行うようにしてもよい。その場合、本発明のデータベースクライアント11では、データ取得シーケンスで中断が発生した場合の遅延時間短縮の効果はより大きなものとなる。
(B-3) In each of the above embodiments, only the process of additionally recording the data fetched from the
(B−4)上記の実施形態ではデータベースサーバは冗長化されている構成として説明したが、データベースサーバは冗長化されていなくてもよい。その場合、データベースクライアントは、データ取得シーケンスが中断した場合、データベースサーバのサービス復旧後(例えば、通信障害等の復旧後)に、同じデータベースサーバとデータ取得シーケンスを再開することになる。 (B-4) In the above embodiment, the database server has been described as being redundant. However, the database server may not be redundant. In this case, when the data acquisition sequence is interrupted, the database client resumes the data acquisition sequence with the same database server after restoration of the service of the database server (for example, after restoration of a communication failure or the like).
1…ネットワークシステム、10…SIPサーバ、20、20−1、20−2…データベースサーバ、21…サーバプロセス、22…ファイルシステム、10…通信制御装置、11…データベースクライアント、111…データベース処理部、112…ポインタ保持部、…顧客デ憶部、13…通信処理部、30…通信装置、N1、N2、N3…ネットワーク。
DESCRIPTION OF
Claims (6)
上記データベースサーバから供給された各送信単位データに含まれるレコードのデータ処理を行うデータ処理手段と、
上記データベースサーバから供給された送信単位データを構成する最後の順序のレコードについて、少なくとも主キーの項目のデータを最終受信位置情報として保持する最終受信位置情報保持手段と、
上記第1の検索依頼手段により依頼した検索処理に基づく上記データベースサーバからのデータ供給が中断した後、上記最終受信位置情報保持手段が保持している最終受信位置情報に基づいて、上記第1の検索依頼手段が依頼した検索処理の検索結果のうち上記データベースサーバから供給されなかったレコードのみを検索処理し、その検索結果について上記データ送信処理を依頼する第2の検索依頼手段と
を有することを特徴とするデータ処理装置。 A search process is executed from a database in which data of a plurality of records is stored, and a predetermined number of records are transmitted as one transmission unit in an order based on a primary key composed of one or a plurality of items for a search result by the search process. First search requesting means for requesting a database server for data transmission processing to be transmitted as data;
Data processing means for performing data processing of records included in each transmission unit data supplied from the database server;
Final reception position information holding means for holding at least the data of the item of the primary key as final reception position information for the record in the last order constituting the transmission unit data supplied from the database server;
After the data supply from the database server based on the search process requested by the first search requesting unit is interrupted, the first receiving position information holding unit holds the first receiving position information based on the first receiving position information. A second search requesting unit that searches only the records that are not supplied from the database server among the search results of the search processing requested by the search requesting unit, and requests the data transmission processing for the search result. Characteristic data processing device.
複数のレコードのデータが蓄積されたデータベースから検索処理を実行し、その検索処理による検索結果について、1又は複数の項目で構成される主キーに基づく順序で、所定件数のレコードを1つの送信単位データとして送信するデータ送信処理を、データベースサーバに依頼する第1の検索依頼手段と、
上記データベースサーバから供給された各送信単位データに含まれるレコードのデータ処理を行うデータ処理手段と、
上記データベースサーバから供給された送信単位データを構成する最後の順序のレコードについて、少なくとも主キーの項目のデータを最終受信位置情報として保持する最終受信位置情報保持手段と、
上記第1の検索依頼手段により依頼した検索処理に基づく上記データベースサーバからのデータ供給が中断した後、上記最終受信位置情報保持手段が保持している最終受信位置情報に基づいて、上記第1の検索依頼手段が依頼した検索処理の検索結果のうち上記データベースサーバから供給されなかったレコードのみを検索処理し、その検索結果について上記データ送信処理を依頼する第2の検索依頼手段と
して機能させることを特徴とするデータ処理プログラム。 Computer
A search process is executed from a database in which data of a plurality of records is stored, and a predetermined number of records are transmitted as one transmission unit in an order based on a primary key composed of one or a plurality of items for a search result by the search process. First search requesting means for requesting a database server for data transmission processing to be transmitted as data;
Data processing means for performing data processing of records included in each transmission unit data supplied from the database server;
Final reception position information holding means for holding at least the data of the item of the primary key as final reception position information for the record in the last order constituting the transmission unit data supplied from the database server;
After the data supply from the database server based on the search process requested by the first search requesting unit is interrupted, the first receiving position information holding unit holds the first receiving position information based on the first receiving position information. Of the search results of the search process requested by the search request means, only the records that are not supplied from the database server are searched, and the search results are made to function as the second search request means for requesting the data transmission process. A data processing program characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013150642A JP6135352B2 (en) | 2013-07-19 | 2013-07-19 | Data processing apparatus, data processing program, database system, communication control apparatus, and network system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013150642A JP6135352B2 (en) | 2013-07-19 | 2013-07-19 | Data processing apparatus, data processing program, database system, communication control apparatus, and network system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015022554A true JP2015022554A (en) | 2015-02-02 |
JP6135352B2 JP6135352B2 (en) | 2017-05-31 |
Family
ID=52486939
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013150642A Active JP6135352B2 (en) | 2013-07-19 | 2013-07-19 | Data processing apparatus, data processing program, database system, communication control apparatus, and network system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6135352B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294009A (en) * | 2016-08-05 | 2017-01-04 | 北京小米移动软件有限公司 | Database filing method and system |
CN113051317A (en) * | 2021-04-09 | 2021-06-29 | 上海云从企业发展有限公司 | Data exploration method and system and data mining model updating method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08221433A (en) * | 1995-02-13 | 1996-08-30 | Fujitsu Ltd | Information retrieval system |
JP2003296349A (en) * | 2002-04-03 | 2003-10-17 | Mitsubishi Electric Corp | Data retrieval device and update method by server |
JP2005115514A (en) * | 2003-10-06 | 2005-04-28 | Ibm Japan Ltd | Database search system, its search method, and program |
US20060100982A1 (en) * | 2004-11-08 | 2006-05-11 | International Business Machines Corporation | Storage configuration loader with automatic error recovery |
-
2013
- 2013-07-19 JP JP2013150642A patent/JP6135352B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08221433A (en) * | 1995-02-13 | 1996-08-30 | Fujitsu Ltd | Information retrieval system |
JP2003296349A (en) * | 2002-04-03 | 2003-10-17 | Mitsubishi Electric Corp | Data retrieval device and update method by server |
JP2005115514A (en) * | 2003-10-06 | 2005-04-28 | Ibm Japan Ltd | Database search system, its search method, and program |
US20060100982A1 (en) * | 2004-11-08 | 2006-05-11 | International Business Machines Corporation | Storage configuration loader with automatic error recovery |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294009A (en) * | 2016-08-05 | 2017-01-04 | 北京小米移动软件有限公司 | Database filing method and system |
CN113051317A (en) * | 2021-04-09 | 2021-06-29 | 上海云从企业发展有限公司 | Data exploration method and system and data mining model updating method and system |
Also Published As
Publication number | Publication date |
---|---|
JP6135352B2 (en) | 2017-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109800222B (en) | HBase secondary index self-adaptive optimization method and system | |
US20180365254A1 (en) | Method and apparatus for processing information flow data | |
US11310066B2 (en) | Method and apparatus for pushing information | |
CN112434059B (en) | Data processing method, data processing device, computer equipment and storage medium | |
WO2021218144A1 (en) | Data processing method and apparatus, computer device, and storage medium | |
CN110083627B (en) | Data processing method, system, computer device and storage medium | |
US20130132828A1 (en) | Method and apparatus for implementing microblog message pages | |
CN104809199A (en) | Database synchronization method and device | |
CN108733666B (en) | Server information pushing method, terminal information sending method, device and system | |
US20170300129A1 (en) | Keypress processing method and apparatus for terminal | |
CN102143214A (en) | Mainframe data stream proxy and method for caching communication between emulators and mainframes | |
CN107818129A (en) | Inquire about restarting property | |
US20170060922A1 (en) | Method and device for data search | |
CN110096258A (en) | A method of the OpenStack infrastructure architecture management based on Terraform | |
CN107870982B (en) | Data processing method, system and computer readable storage medium | |
JP6135352B2 (en) | Data processing apparatus, data processing program, database system, communication control apparatus, and network system | |
CN114780615A (en) | Error code management method and device thereof | |
CN113127564B (en) | Parameter synchronization method and device | |
CN113157734B (en) | Data processing method, device and equipment based on search framework and storage medium | |
CN112347192A (en) | Data synchronization method, device, platform and readable medium | |
CN116894078A (en) | Information interaction method, device, electronic equipment and medium | |
US9471650B2 (en) | System and method for contextual workflow automation | |
US10866960B2 (en) | Dynamic execution of ETL jobs without metadata repository | |
CN114130035A (en) | User matching method, device, equipment and storage medium | |
US20090006443A1 (en) | Method and system for processing 1:n relationships between data object nodes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160517 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170317 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170328 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170410 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6135352 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |