以下、本発明に係る実施の形態について図面を参照しつつ説明する。なお、すべての図面において、同様な構成要素には同一符号を付し、その詳細な説明は重複しないように適宜省略される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In all the drawings, the same components are denoted by the same reference numerals, and detailed description thereof is appropriately omitted so as not to overlap.
図1は、本発明に係る一実施形態の分散データベース管理システム10の構成を概略的に示す機能ブロック図である。図1に示されるように、この分散データベース管理システム10は、ロードバランサ11、クエリサーバ20A,20B,20C、データサーバ221~22Nおよび管理サーバ30を備える。データサーバ221~22Nには、それぞれ、分散データベースを構成する部分データベースが格納されており、分散データベース管理システム10はこの分散データベースに対するデータ操作を行う。
FIG. 1 is a functional block diagram schematically showing the configuration of a distributed database management system 10 according to an embodiment of the present invention. As shown in FIG. 1, the distributed database management system 10 includes a load balancer 11, query servers 20A, 20B, and 20C, data servers 22 1 to 22 N, and a management server 30. Each of the data servers 22 1 to 22 N stores a partial database constituting the distributed database, and the distributed database management system 10 performs data operations on the distributed database.
後述するように、分散データベースは少なくとも1つのテーブル構造を有し、部分データベースは、このテーブル構造のサブセット(部分集合)を構成する。図2は、分散データベースを構成するデータベース・テーブルTBLの一例を概略的に示す図である。図2に示されるように、このデータベース・テーブルTBLは、複数のタプル(行)と、列方向に定義されたカラム(属性フィールド)A1,A2,...,APとを有する。タプルとカラムA1,A2,...,APとの交差領域で定まる領域にはデータが格納される。図2に示すように、このデータベース・テーブルTBLを行方向に分割(水平分割)することで複数の部分集合TG1,TG2,...,TGNを構成することができる。このような部分集合TG1,TG2,...,TGNを、部分データベースのテーブルとして、それぞれデータサーバ221~22Nに格納することができる。
As will be described later, the distributed database has at least one table structure, and the partial database constitutes a subset (subset) of the table structure. FIG. 2 is a diagram schematically showing an example of the database table TBL constituting the distributed database. As shown in FIG. 2, the database table TBL includes a plurality of tuples (rows), the column defined in the column direction (attribute field) A 1, A 2, ..., and A P. Tuples and columns A 1, A 2, ..., in a region defined by intersections of the A P is stored data. As shown in FIG. 2, a plurality of subsets TG 1 , TG 2 ,..., TG N can be configured by dividing (horizontal division) this database table TBL in the row direction. Such subsets TG 1 , TG 2 ,..., TG N can be stored in the data servers 22 1 to 22 N as tables of partial databases, respectively.
なお、データベース・テーブルTBLをカラム方向に分割(垂直分割)することで複数の部分データベース・テーブルを構成してもよいし、あるいは、水平分割と垂直分割との組み合わせにより複数の部分データベース・テーブルを構成してもよい。
A plurality of partial database tables may be configured by dividing the database table TBL in the column direction (vertical division), or a plurality of partial database tables may be formed by a combination of horizontal division and vertical division. It may be configured.
図1に示されるように、通信網NWには、分散データベース管理システム10とクライアント端末T1とが接続されている。これら分散データベース管理システム10とクライアント端末T1だけでなく、多数のクライアント端末(図示せず)が通信網NWに接続されている。ネットワークNWとしては、たとえば、インターネットなどの広域ネットワークが挙げられるが、これに限定されるものではない。
As shown in FIG. 1, a distributed database management system 10 and a client terminal T1 are connected to the communication network NW. In addition to the distributed database management system 10 and the client terminal T1, many client terminals (not shown) are connected to the communication network NW. Examples of the network NW include a wide area network such as the Internet, but are not limited thereto.
クライアント端末T1は、分散データベース管理システム10が有するデータベースについてSQL(Structured Query Language)やXQuery(XML Query Language:XML問い合わせ言語)などのデータベース言語(データ操作言語)で記述されたクエリを生成し、このクエリを分散データベース管理システム10に宛てて送信する機能を有する。クエリには、分散データベースに対してデータの検索、挿入、更新あるいは削除などのデータ操作を規定するデータベース言語が記述されている。
The client terminal T1 generates a query described in a database language (data manipulation language) such as SQL (Structured Query Query Language) or XQuery (XML Query Language) for the database of the distributed database management system 10. It has a function of transmitting a query to the distributed database management system 10. The query describes a database language that prescribes data operations such as data search, insertion, update, or deletion for the distributed database.
ロードバランサ11は、通信網NWを介してクライアント端末T1から送信されたクエリをデータ処理要求として受信し、このクエリ(以下、受信クエリと呼ぶ。)を、クエリサーバ(クエリ受付部)20A~20Cに均等に振り分けて処理負荷を分散する機能を有する。ロードバランサ11は、たとえばラウンドロビン方式に従ってクエリサーバ20A~20Cのいずれかを選択すればよい。
The load balancer 11 receives a query transmitted from the client terminal T1 via the communication network NW as a data processing request, and uses this query (hereinafter referred to as a received query) as a query server (query accepting unit) 20A to 20C. A function of distributing the processing load evenly. The load balancer 11 may select any of the query servers 20A to 20C according to, for example, a round robin method.
クエリサーバ20A,20B,20Cは、それぞれ、クエリ解析部21A,21B,21Cを備えている。クエリ解析部21A~21Cは、ロードバランサ11により振り分けられた受信クエリを解析し最適化する機能を有している。クエリ解析部21A~21Cは、受信クエリを解析し、この解析結果に基づいて、受信クエリを、特定のデータベース構造に最適化された解析ツリー形式のクエリに変換する。このとき、受信クエリを、たとえば、抽象構文木(AST:Abstract Syntax Tree)形式のクエリに変換することが可能である。
The query servers 20A, 20B, and 20C include query analysis units 21A, 21B, and 21C, respectively. The query analysis units 21A to 21C have a function of analyzing and optimizing the received query distributed by the load balancer 11. The query analysis units 21A to 21C analyze the received query, and convert the received query into an analysis tree format query optimized for a specific database structure based on the analysis result. At this time, it is possible to convert the received query into, for example, an abstract syntax tree (AST) format query.
データサーバ221~22Nの各々は、ルータ24と複数のストレージ処理部251~25Mとを有する。ルータ24は、ストレージ処理部251~25Mのうちの任意のストレージ処理部間のデータ転送を制御する機能を有している。また、データサーバ221~22Nは、LAN(Local Area Network)などの有線伝送路または無線伝送路を介して相互に接続されている。任意のデータサーバ22i内のルータ24は、別のデータサーバ22j(i≠j)内の他のルータ24との間でデータ通信を行う機能を有する。
Each of the data servers 22 1 to 22 N includes a router 24 and a plurality of storage processing units 25 1 to 25 M. The router 24 has a function of controlling data transfer between any storage processing units among the storage processing units 25 1 to 25 M. The data servers 22 1 to 22 N are connected to each other via a wired transmission line such as a LAN (Local Area Network) or a wireless transmission line. The router 24 in any data server 22 i has a function of performing data communication with another router 24 in another data server 22 j (i ≠ j).
管理サーバ30は、分散データベースを構成する複数の部分データベースと、データサーバ221~22Nとの対応関係を規定する管理テーブル30Tを有している。クエリサーバ20A,20B,20Cのうちのいずれれかが、受信クエリの解析結果を管理サーバ30に転送するので、管理サーバ30は、その解析結果に基づいて管理テーブル30Tを参照してデータサーバ221~22Nの中からクエリの供給先を決定し、この結果を当該クエリサーバに通知する。当該クエリサーバは、管理サーバ30からの通知に従い、データサーバ221~22Nの中から単数または複数のデータサーバに変換後のクエリを送信する。
The management server 30 has a management table 30T that defines the correspondence between a plurality of partial databases constituting the distributed database and the data servers 22 1 to 22 N. Since one of the query servers 20A, 20B, and 20C transfers the analysis result of the received query to the management server 30, the management server 30 refers to the management table 30T based on the analysis result, and the data server 22 1 to 22 N determines a query supply destination, and notifies the query server of the result. The query server transmits the converted query to one or more data servers from the data servers 22 1 to 22 N according to the notification from the management server 30.
各ルータ24は、ストレージ処理部251~25Mと、これらストレージ処理部251~25Mにそれぞれ格納されるデータベース・テーブルとの対応関係を規定するルーティングテーブルRTLを有している。ルータ24は、このルーティングテーブルRTLを参照して、クエリサーバ20A~20Cから受信したクエリの供給先としてストレージ処理部251~25Mのいずれかを決定する。
Each router 24 has a routing table RTL defining a storage processing unit 25 1 ~ 25 M, the correspondence between the database tables stored respectively in these storage processing unit 25 1 ~ 25 M. The router 24 refers to the routing table RTL and determines one of the storage processing units 25 1 to 25 M as a supply destination of the query received from the query servers 20A to 20C.
図3は、ストレージ処理部25kの構成を概略的に示す機能ブロック図である。図3に示されるように、ストレージ処理部25kは、キュー部250、データ操作部251およびストレージ装置255を備えている。データ操作部251は、クエリ解析部252、トランザクション実行部253および内部クエリ発行部254を含む。ストレージ装置255は、複数のストレージを搭載しており、これらストレージを制御するコントローラや入出力ポート(図示せず)を有している。
FIG. 3 is a functional block diagram schematically showing the configuration of the storage processing unit 25k . As illustrated in FIG. 3, the storage processing unit 25 k includes a queue unit 250, a data operation unit 251, and a storage device 255. The data operation unit 251 includes a query analysis unit 252, a transaction execution unit 253, and an internal query issue unit 254. The storage device 255 has a plurality of storages, and has a controller and input / output ports (not shown) for controlling these storages.
キュー部250は、ルータ24から順次入力された複数のクエリを一時的に保持する機能を有し、先に入力され保持されたクエリを優先的にデータ操作部251に供給する。データ操作部251では、クエリ解析部252は、キュー部250から供給されたクエリを解析し、実行プランを生成する。トランザクション実行部253は、この実行プランに従ったトランザクションを実行する。
The queue unit 250 has a function of temporarily holding a plurality of queries sequentially input from the router 24, and supplies the previously input and held queries to the data operation unit 251 with priority. In the data operation unit 251, the query analysis unit 252 analyzes the query supplied from the queue unit 250 and generates an execution plan. The transaction execution unit 253 executes a transaction according to this execution plan.
トランザクション実行部253は、トランザクション実行のために必要なデータセットがストレージ装置255内の部分データベースに格納されていないとき、内部クエリ発行部254に対して当該データセットのデータ取得要求を発する。このデータ取得要求に応じて、内部クエリ発行部254は、内部クエリを生成し、ルータ24に対して、当該内部クエリを含むデータ転送要求を発して当該データセットを取得し得る機能を有する。内部クエリ発行部254の機能については後述する。トランザクション実行部253は、内部クエリ発行部254で取得された当該データセットを用いてトランザクションを実行する。
The transaction execution unit 253 issues a data acquisition request for the data set to the internal query issuing unit 254 when the data set necessary for executing the transaction is not stored in the partial database in the storage device 255. In response to this data acquisition request, the internal query issuing unit 254 has a function of generating an internal query and issuing a data transfer request including the internal query to the router 24 to acquire the data set. The function of the internal query issuing unit 254 will be described later. The transaction execution unit 253 executes a transaction using the data set acquired by the internal query issuing unit 254.
上記ストレージ処理部25kのデータ操作部251は、半導体集積回路などのハードウェアで実現されてもよいし、あるいは、不揮発性メモリや光ディスクなどの記録媒体に記録されたアプリケーション・プログラムまたはプログラムコードで実現されてもよい。このようなプログラムまたはプログラムコードは、データ操作部251の処理を、CPUなどのプロセッサを有するコンピュータに実行させるものである。このようなプログラムまたはプログラムコードは、データ操作部251の機能ブロック252~254の全部または一部の処理を、CPUなどのプロセッサを有する実計算機または仮想計算機に実行させるものである。
The storage processing unit 25 k of data manipulation unit 251 may be realized by hardware such as a semiconductor integrated circuit, or by an application program or program code recorded on a recording medium such as a nonvolatile memory or an optical disk It may be realized. Such a program or program code causes a computer having a processor such as a CPU to execute the processing of the data operation unit 251. Such a program or program code causes a real computer or a virtual computer having a processor such as a CPU to execute all or part of the processing of the functional blocks 252 to 254 of the data operation unit 251.
また、ストレージ装置255は、揮発性メモリまたは不揮発性メモリなどの記録媒体(たとえば、半導体メモリや磁気記録媒体)と、この記録媒体に対してデータの書き込みと読み出しを行うための回路や制御プログラムとで構成することができる。ストレージ装置255を構成するストレージの記憶領域は、予め記録媒体の所定の記憶領域上に構成されていてもよいし、あるいは、システムの動作時に割り当てられる適当な記憶領域上に構成されてもよい。
In addition, the storage device 255 includes a recording medium such as a volatile memory or a non-volatile memory (for example, a semiconductor memory or a magnetic recording medium), a circuit and a control program for writing and reading data on the recording medium, Can be configured. The storage area of the storage constituting the storage device 255 may be configured in advance on a predetermined storage area of the recording medium, or may be configured on an appropriate storage area that is allocated during system operation.
上記構成を有する分散データベース管理システム10の動作を以下に説明する。
The operation of the distributed database management system 10 having the above configuration will be described below.
図4は、ストレージ処理部25kのデータ操作部251によるトランザクション処理の手順を概略的に示すフローチャートである。図4を参照すると、データ操作部251では、クエリ解析部252が、キュー部250から与えられたクエリを解析する(ステップS10)。このとき、クエリ解析部252は、この解析結果に基づいて、当該クエリを、ストレージ装置255に格納されている部分データベースの構造に合わせて最適化し、実行プランを生成する。
FIG. 4 is a flowchart schematically showing a procedure of transaction processing by the data operation unit 251 of the storage processing unit 25 k . Referring to FIG. 4, in the data operation unit 251, the query analysis unit 252 analyzes the query given from the queue unit 250 (step S10). At this time, the query analysis unit 252 optimizes the query according to the structure of the partial database stored in the storage device 255 based on the analysis result, and generates an execution plan.
その後、トランザクション実行部253は、トランザクション実行のために必要なデータセットがストレージ装置255内の部分データベースに格納されているか否かを判定する(ステップS11)。
Thereafter, the transaction execution unit 253 determines whether a data set necessary for executing the transaction is stored in the partial database in the storage apparatus 255 (step S11).
トランザクション実行のために必要なデータセットがストレージ装置255内の部分データベースに格納されていると判定された場合(ステップS11のNO)、トランザクション実行部253は、クエリ解析部252で生成された実行プランに従ったトランザクションを実行することにより、部分データベースに対するデータの検索、挿入、更新あるいは削除などのデータ操作を行う(ステップS12)。ここで、トランザクションとは、データベース41の検索や更新などの処理を含む1つの作業単位を意味し、原子性(ATOMICITY)、一貫性(CONSISTENCY)、隔離性(ISOLATION)および持続性(DURABILITY)というACID特性を満たす処理である。トランザクション処理が正常に終了したとき(ステップS13のYES)、トランザクションはコミットされる(ステップS14)。そして、トランザクション実行部253は、トランザクションの実行結果(クエリ結果)をルータ24に送信する(ステップS17)。
When it is determined that the data set necessary for executing the transaction is stored in the partial database in the storage apparatus 255 (NO in step S11), the transaction execution unit 253 executes the execution plan generated by the query analysis unit 252. By executing a transaction in accordance with the data, data operations such as data search, insertion, update or deletion for the partial database are performed (step S12). Here, the transaction means one unit of work including processing such as search and update of the database 41, and is called atomicity (ATOMICITY), consistency (CONSISTENCY), isolation (ISOLATION), and durability (DURABILITY). This process satisfies the ACID characteristics. When the transaction process ends normally (YES in step S13), the transaction is committed (step S14). Then, the transaction execution unit 253 transmits the transaction execution result (query result) to the router 24 (step S17).
一方、トランザクションやシステムに関する障害が発生してトランザクションが正常に終了しなかったとき(ステップS13のNO)、トランザクション実行部253は、ロールフォワードを実行する(ステップS15)。すなわち、トランザクション実行部253は、定期的に設定されたチェックポイントの或る時点から障害発生時点までの期間におけるログ情報を確認する。この期間中にコミットされていないトランザクションが存在する場合、トランザクション実行部253は、ログ情報に基づいて当該トランザクションの実行結果を部分データベースに反映させる。また、トランザクション実行部253は、部分データベースの状態を、コミットされていないトランザクションの処理開始前の状態に戻す、すなわち、ロールバックする(ステップS16)。その後、トランザクション実行部253は、トランザクションの実行結果(クエリ結果)をルータ24を介してクエリサーバ20Aに送信する(ステップS17)。クエリサーバ20Aは、このクエリ結果をロードバランサ11を介してクライアント端末T1に送信する。
On the other hand, when a transaction or system failure occurs and the transaction does not end normally (NO in step S13), the transaction execution unit 253 executes roll forward (step S15). That is, the transaction execution unit 253 confirms log information in a period from a certain time point of a regularly set check point to a failure time point. If there is an uncommitted transaction during this period, the transaction execution unit 253 reflects the execution result of the transaction in the partial database based on the log information. In addition, the transaction execution unit 253 returns the state of the partial database to the state before starting the processing of the uncommitted transaction, that is, rolls back (step S16). Thereafter, the transaction execution unit 253 transmits the transaction execution result (query result) to the query server 20A via the router 24 (step S17). The query server 20A transmits this query result to the client terminal T1 via the load balancer 11.
一方、ステップS11において、トランザクション実行部253は、トランザクション実行のために必要なデータセットがストレージ装置255内の部分データベースに格納されていないと判定した場合には(ステップS11のYES)、内部クエリ発行部254に対して当該データセットのデータ取得要求を発する。このデータ取得要求に応じて、内部クエリ発行部254は、内部クエリを生成し(ステップS20)、ルータ24に対して当該データセットのデータ転送要求を発する(ステップS21)。ここで、データ転送要求には内部クエリが含まれている。内部クエリは、データベースに対するデータの検索、挿入、更新あるいは削除などのデータ操作を規定するデータベース言語で記述されてもよいし、あるいは、システム内で実行可能な形式(たとえば、AST形式などの解析ツリー形式や、マイクロ命令からなる一連の処理手順)で記述されてもよい。
On the other hand, when the transaction execution unit 253 determines in step S11 that the data set necessary for executing the transaction is not stored in the partial database in the storage apparatus 255 (YES in step S11), the internal query issuance is issued. A data acquisition request for the data set is issued to the unit 254. In response to this data acquisition request, the internal query issuing unit 254 generates an internal query (step S20), and issues a data transfer request for the data set to the router 24 (step S21). Here, the data transfer request includes an internal query. The internal query may be described in a database language that defines data operations such as data search, insertion, update, or deletion of data in the database, or a format that can be executed in the system (for example, an analysis tree such as an AST format). It may be described in a format or a series of processing procedures consisting of microinstructions).
たとえば、ストレージ処理部251において、内部クエリ発行部254からデータ転送要求が発行されたとき(ステップS21)、ルータ24は、このデータ転送要求をデータサーバ221内の他のストレージ処理部252~25M、あるいは、他のデータサーバ222~22Nのルータ24に転送する。ルータ24がこのデータ転送要求をデータサーバ221内の他のストレージ処理部252~25Mに転送した場合、ストレージ処理部252~25Mでは、それぞれ、当該データ転送要求に応じて、データ操作部251が自己が管理する部分データベースに対して当該内部クエリに基づいたトランザクション処理を実行してデータ操作(主に、検索操作)を行う。
For example, the storage processing unit 25 1, when the data transfer request is issued from the internal query issuing unit 254 (step S21), and the router 24, another storage unit 25 2 of the data transfer request to the data server 22 in 1 To 25 M or the router 24 of another data server 22 2 to 22 N. If the router 24 transfers the data transfer request to the other storage processor 25 2 ~ 25 M of the data server 22 1, the storage processing unit 25 2 ~ 25 M, respectively, in response to the data transfer request, data The operation unit 251 performs transaction processing based on the internal query on the partial database managed by the operation unit 251 to perform data operation (mainly search operation).
図5は、ストレージ処理部251からデータ転送要求を受信したデータ操作部251による処理手順を概略的に示すフローチャートである。図5を参照すると、先ず、クエリ解析部252が、キュー部250から与えられた内部クエリを解析する(ステップS30)。このとき、クエリ解析部252は、この解析結果に基づいて、当該内部クエリを、ストレージ装置255に格納されている部分データベースの構造に合わせて最適化し、実行プランを生成する。
Figure 5 is a flowchart schematically illustrating a processing procedure by the data manipulation unit 251 which has received the data transfer request from the storage unit 25 1. Referring to FIG. 5, first, the query analysis unit 252 analyzes the internal query given from the queue unit 250 (step S30). At this time, the query analysis unit 252 optimizes the internal query according to the structure of the partial database stored in the storage device 255 based on the analysis result, and generates an execution plan.
その後、トランザクション実行部253は、クエリ解析部252で生成された実行プランに従ったトランザクションを実行することにより、部分データベースに対するデータ操作を行う(ステップS31)。トランザクション処理が正常に終了したとき(ステップS32のYES)、トランザクションはコミットされる(ステップS33)。
Thereafter, the transaction execution unit 253 performs data operations on the partial database by executing a transaction according to the execution plan generated by the query analysis unit 252 (step S31). When the transaction process ends normally (YES in step S32), the transaction is committed (step S33).
そして、トランザクション実行部253は、トランザクションの実行結果(クエリ結果)をルータ24を介してストレージ処理部251に送信する(ステップS36)。すなわち、トランザクション実行部253は、ストレージ装置255から当該データセットの取得に成功した場合には、当該データセットをルータ24を介してストレージ処理部251に転送する。一方、データ操作部251は、ストレージ装置255から当該データセットの取得に失敗した場合には、当該データセットの取得に失敗した旨をルータ24を介してストレージ処理部251に通知する。
The transaction execution section 253 transmits the transaction execution result (query result) through the router 24 to the storage processing unit 25 1 (step S36). That is, the transaction execution section 253, when the storage device 255 has successfully acquired the data set transfers the data set via a router 24 to the storage processing unit 25 1. On the other hand, the data manipulation unit 251, when the storage device 255 fails to get the data set, that it has failed to acquire the data set through the router 24 notifies the storage processing unit 25 1.
一方、トランザクションやシステムに障害が発生してトランザクションが正常に終了しなかったとき(ステップS32のNO)、トランザクション実行部253は、ロールフォワードを実行し(ステップS34)、更に、ロールバックを実行する(ステップS35)。その後、トランザクション実行部253は、トランザクションの実行結果(クエリ結果)をルータ24を介してストレージ処理部251に送信する(ステップS36)。
On the other hand, when a failure occurs in the transaction or system and the transaction does not end normally (NO in step S32), the transaction execution unit 253 executes roll forward (step S34), and further executes rollback. (Step S35). Thereafter, the transaction execution section 253 transmits the transaction execution result (query result) through the router 24 to the storage processing unit 25 1 (step S36).
図4のフローチャートに戻ると、ストレージ処理部251において、内部クエリ発行部254が、ストレージ処理部252~25Mのいずれかから当該データセットの取得に成功した場合(ステップS22のYES)は、トランザクション実行部253は、当該データセットを使用したトランザクションを実行する(ステップS12)。その後、上記ステップS13~S17が実行される。
Returning to the flowchart of FIG. 4, the storage processing unit 25 1, when an internal query issuing unit 254 has successfully acquired the data set from one of the storage processing unit 25 2 ~ 25 M (YES in step S22) is The transaction execution unit 253 executes a transaction using the data set (step S12). Thereafter, the above steps S13 to S17 are executed.
一方、ストレージ処理部251において、内部クエリ発行部254が当該データセットの取得に失敗した場合(ステップS22のNO)は、トランザクション実行部253は、データ操作の実行に失敗した旨を含むクエリ結果をルータ24を介してクエリサーバ20Aに通知する。クエリサーバ20Aは、このクエリ結果をロードバランサ11を介してクライアント端末T1に送信する。
On the other hand, the storage processing unit 25 1, when an internal query issuing unit 254 fails to get the data set (NO in step S22), the transaction execution section 253, the query result comprising indicating a failure of the execution of data manipulation Is sent to the query server 20A via the router 24. The query server 20A transmits this query result to the client terminal T1 via the load balancer 11.
なお、クエリ結果は、クエリサーバ20A,20B,20Cのうちのいずれかのクエリサーバを経由してクライアント端末T1に送信される。このとき、当該クエリサーバは、クエリ結果を管理サーバ30にも送信するので、管理サーバ30は、当該クエリ結果に基づいて管理テーブル30Tを更新することができる。
The query result is transmitted to the client terminal T1 via any one of the query servers 20A, 20B, and 20C. At this time, since the query server also transmits the query result to the management server 30, the management server 30 can update the management table 30T based on the query result.
次に、分散データベース管理システム10の動作を示す各種通信シーケンスについて説明する。
Next, various communication sequences showing the operation of the distributed database management system 10 will be described.
図6は、通信シーケンスの一例を概略的に示す図である。図6を参照すると、先ず、クエリサーバ20Aがロードバランサ11を介してクライアント端末T1からクエリを受信すると、クエリサーバ20Aのクエリ解析部21Aは、当該受信クエリを解析し、この解析結果に基づいて、受信クエリを、特定のデータベース構造に最適化された解析ツリー形式のクエリに変換する。次いで、クエリ解析部21Aは、当該クエリの解析結果に基づいて、当該クエリを送信すべきデータサーバ22i,22jを決定する。そして、クエリサーバ20Aは、これらデータサーバ22i,22jに当該クエリを送信する。
FIG. 6 is a diagram schematically illustrating an example of a communication sequence. Referring to FIG. 6, first, when the query server 20A receives a query from the client terminal T1 via the load balancer 11, the query analysis unit 21A of the query server 20A analyzes the received query, and based on the analysis result. , Convert the incoming query into a parse tree query optimized for a specific database structure. Next, the query analysis unit 21A determines the data servers 22 i and 22 j to which the query is to be transmitted based on the analysis result of the query. The query server 20A transmits the query to the data servers 22 i and 22 j .
データサーバ22iでは、SP(ストレージ処理部)25m,...,25nのデータ操作部251が、それぞれ、クエリを解析し最適化して実行プランを生成する。一方、データサーバ22jでも、同様に、SP(ストレージ処理部)25q,...,25rのデータ操作部251が、それぞれ、クエリを解析し最適化して実行プランを生成する。ここで、クエリサーバ20Aのクエリ解析部21Aが、既に、各データ操作部251が管理する部分データベースの構造に合わせてクエリの最適化を実行している場合には、データ操作部251は、クエリの最適化を行う必要はない。
In the data server 22 i , SP (storage processing units) 25 m ,..., 25 n data operation units 251 each analyze and optimize a query to generate an execution plan. On the other hand, in the data server 22 j , similarly, the data operation units 251 of SPs (storage processing units) 25 q ,..., 25 r each analyze and optimize a query to generate an execution plan. Here, when the query analysis unit 21A of the query server 20A has already executed query optimization according to the structure of the partial database managed by each data operation unit 251, the data operation unit 251 There is no need for optimization.
その後、SP25m,...,25n,25q,...,25rにおいて、それぞれ、トランザクション実行部253が実行プランに従ったトランザクションを実行してデータ操作を行い、その実行結果(クエリ結果)をルータ24に送信する。データサーバ22iのルータ24は、SP25m,...,25nから受信したクエリ結果を集約し、クエリサーバ20Aに送信する。一方、データサーバ22jのルータ24も、SP25q,...,25rから受信したクエリ結果を集約し、クエリサーバ20Aに送信する。クエリサーバ20Aは、データサーバ22i,22jから送信されたクエリ結果を集約し、その結果をクライアント端末T1に送信する。
Thereafter, in SP25 m ,..., 25 n , 25 q ,..., 25 r , the transaction execution unit 253 executes a transaction according to the execution plan and performs data manipulation, and the execution result (query Result) to the router 24. The router 24 of the data server 22 i aggregates the query results received from the SPs 25 m ,..., 25 n and transmits them to the query server 20A. On the other hand, the router 24 of the data server 22 j also aggregates the query results received from the SPs 25 q ,..., 25 r and transmits them to the query server 20A. The query server 20A aggregates the query results transmitted from the data servers 22 i and 22 j, and transmits the results to the client terminal T1.
図6に示されるように、本実施形態の分散データベース管理システム10では、複数のストレージ処理部25m,...,25n,25q,...,25rが、それぞれ自己が管理する部分データベースに対するデータ操作を並列に実行できる。
As shown in FIG. 6, the distributed database management system 10 of the present embodiment, a plurality of storage processing unit 25 m, ..., 25 n, 25 q, ..., is 25 r, self each managed Data operations on partial databases can be executed in parallel.
たとえば、クライアント端末T1から、分散データベースのテーブルにタプル(レコード)の挿入、削除または更新のデータ操作に関するクエリが届いた場合、ストレージ処理部25m,...,25n,25q,...,25rは、それぞれ、自己が管理する部分データベースのテーブルに対して当該データ操作を並列に協働して実行することができる。
For example, when a query about data operation of tuple (record) insertion, deletion, or update arrives in the distributed database table from the client terminal T1, the storage processing units 25 m ,..., 25 n , 25 q ,. ., 25 r, respectively, can be executed in cooperation with the data manipulation in parallel to the sub-database managed by itself to the table.
クライアント端末T1から、分散データベースのテーブルに対する選択(当該テーブルを構成するタプルのうちから、特定条件に合致したタプルを抽出し、当該抽出されたタプルから新たなテーブルを生成する演算)のデータ操作に関するクエリが届いた場合、ストレージ処理部25m,...,25n,25q,...,25rは、それぞれ自己が管理する部分データベースのテーブルに対して当該データ操作を並列に協働して実行することができる。クエリサーバ20Aは、これら実行結果(クエリ結果)を集約した新たなテーブルを構成し、この新たなテーブルの情報をクライアント端末T1に送信することができる。また、データサーバ22i,22jのルータ24,24は、それぞれ、複数の実行結果(クエリ結果)を集約し、当該集約結果をクエリサーバ20Aに送信する機能を有する。データサーバ22i,22jのルータ24が当該実行結果を集約し、その集約結果をクエリサーバ20Aに送信すれば、クエリサーバ20Aは、これらルータ24,24から受信した集約結果を用いて効率良くクエリ結果を集約することが可能である。
From the client terminal T1 to data manipulation of selection of a table of the distributed database (calculation of extracting a tuple that matches a specific condition from the tuples constituting the table and generating a new table from the extracted tuples) When the query arrives, the storage processing units 25 m ,..., 25 n , 25 q ,..., 25 r cooperate in parallel with the data operations for the partial database tables that they manage. And can be executed. The query server 20A can configure a new table in which these execution results (query results) are aggregated, and can transmit information on the new table to the client terminal T1. The routers 24 and 24 of the data servers 22 i and 22 j each have a function of aggregating a plurality of execution results (query results) and transmitting the aggregation results to the query server 20A. If the routers 24 of the data servers 22 i and 22 j aggregate the execution results and transmit the aggregation results to the query server 20A, the query server 20A efficiently uses the aggregation results received from the routers 24 and 24. Query results can be aggregated.
また、図3に示されるように、各ストレージ処理部25kに対して、ストレージ装置255に格納されている1つの部分データベースが割り当てられているので、部分データベースに対するロック(排他制御)を極力排除することができる。
Further, as shown in FIG. 3, since one partial database stored in the storage device 255 is allocated to each storage processing unit 25 k , lock (exclusive control) for the partial database is eliminated as much as possible. can do.
したがって、分散データベース管理システム10は、高いスループットを実現することが可能である。
Therefore, the distributed database management system 10 can achieve high throughput.
更に、分散データベース管理システム10の前段のクエリサーバ20A,20B,20Cでクエリの最適化が実行されるので、後段のストレージ処理部251~25Mは、必ずしもクエリの最適化を実行する必要がないという利点がある。ストレージ処理部251~25Mは、それぞれ、自己が管理する部分データベースの構造に合わせてクエリを最適化する機能を有する。ストレージ処理部251~25Mの大部分が同一構造の部分データベース構造を格納していれば、前段のクエリサーバ20A,20B,20Cは、その同一構造の部分データベース構造に合わせた最適化を一括して実行することができる。
Furthermore, since query optimization is executed by the preceding query servers 20A, 20B, and 20C of the distributed database management system 10, the subsequent storage processing units 25 1 to 25 M need not necessarily execute query optimization. There is no advantage. Each of the storage processing units 25 1 to 25 M has a function of optimizing the query according to the structure of the partial database managed by itself. If most of the storage processing units 25 1 to 25 M store the partial database structure having the same structure, the query servers 20A, 20B, and 20C in the previous stage collectively perform optimization according to the partial database structure having the same structure. And can be executed.
次に、図7は、通信シーケンスの他の例を概略的に示す図である。先ず、クエリサーバ20Aがロードバランサ11を介してクライアント端末T1からクエリを受信すると、クエリサーバ20Aのクエリ解析部21Aは、当該受信クエリを解析し、この解析結果に基づいて、受信クエリを、特定のデータベース構造に最適化された解析ツリー形式のクエリに変換する。次いで、クエリ解析部21Aは、当該クエリの解析結果に基づいて、当該クエリを送信すべきデータサーバ22i,22jを決定する。そして、クエリサーバ20Aは、これらデータサーバ22i,22jのルータ24,24に当該クエリを送信する。
Next, FIG. 7 is a diagram schematically showing another example of the communication sequence. First, when the query server 20A receives a query from the client terminal T1 via the load balancer 11, the query analysis unit 21A of the query server 20A analyzes the received query, and identifies the received query based on the analysis result. Convert to parse tree format query optimized for database structure. Next, the query analysis unit 21A determines the data servers 22 i and 22 j to which the query is to be transmitted based on the analysis result of the query. Then, the query server 20A transmits the query to the routers 24 and 24 of the data servers 22 i and 22 j .
データサーバ22iでは、SP(ストレージ処理部)25m,...,25nのデータ操作部251が、それぞれ、クエリを解析し最適化して実行プランを生成する。一方、データサーバ22iでも、同様に、SP(ストレージ処理部)25q,...,25rのデータ操作部251が、それぞれ、クエリを解析し最適化して実行プランを生成する。ここで、クエリサーバ20Aのクエリ解析部21Aが、既に、各データ操作部251が管理する部分データベースの構造に合わせてクエリの最適化を実行している場合には、データ操作部251は、クエリの最適化を行う必要はない。
In the data server 22 i , SP (storage processing units) 25 m ,..., 25 n data operation units 251 each analyze and optimize a query to generate an execution plan. On the other hand, in the data server 22 i , similarly, the data operation units 251 of the SPs (storage processing units) 25 q ,..., 25 r each analyze and optimize a query to generate an execution plan. Here, when the query analysis unit 21A of the query server 20A has already executed query optimization according to the structure of the partial database managed by each data operation unit 251, the data operation unit 251 There is no need for optimization.
その後、SP25m,...,25q,...,25rにおいて、それぞれ、トランザクション実行部253が実行プランに従ったトランザクションを実行してデータ操作を行い、その実行結果(クエリ結果)をルータ24に送信する。
Thereafter, in SP25 m ,..., 25 q ,..., 25 r , the transaction execution unit 253 executes a transaction according to the execution plan and performs data manipulation, and the execution result (query result) is displayed. Transmit to the router 24.
一方、SP25nでは、トランザクション実行部253が、トランザクション実行のために必要なデータセットがストレージ装置255内の部分データベースに格納されていないと判定する(図4のステップS11のYES)。そして、トランザクション実行部253は、内部クエリ発行部254に対して当該データセットのデータ取得要求を発する。
On the other hand, in SP25 n , the transaction execution unit 253 determines that the data set necessary for executing the transaction is not stored in the partial database in the storage apparatus 255 (YES in step S11 in FIG. 4). Then, the transaction execution unit 253 issues a data acquisition request for the data set to the internal query issuing unit 254.
たとえば、トランザクション実行部253が、選択操作(特定の条件に合致するタプルを抽出し、これら抽出されたタプルから新たなテーブルを生成するためのデータ操作)や結合操作(ジョイン操作:複数のカラムを結合して新たなテーブルを生成するためのデータ操作)を実行しようとしたが、自己が管理する部分テーブルに選択操作や結合操作に必要なタプルやカラムが存在しない場合、これらタプルやカラムのデータセットのデータ取得要求を内部クエリ発行部254に発する。
For example, the transaction execution unit 253 selects a selection operation (a data operation for extracting a tuple that matches a specific condition and generating a new table from the extracted tuple) or a join operation (join operation: multiple columns). Data operation to create a new table by joining), but the tuples and columns required for the selection and join operations do not exist in the partial table managed by the self, the data of these tuples and columns A set data acquisition request is issued to the internal query issuing unit 254.
図7に示されるように、SP25nの内部クエリ発行部254は、当該データ取得要求に応じて内部クエリを発行し、当該内部クエリを含むデータ転送要求をルータ24を介してSP25mに送信する。この場合、SP25mは、転送された内部クエリを解析し最適化してデータ操作を実行する。そして、SP25mは、そのデータ操作により得られたデータセットをクエリ結果としてルータ24を介してSP25nに供給することができる。
As illustrated in FIG. 7, the internal query issuing unit 254 of the SP 25 n issues an internal query in response to the data acquisition request, and transmits a data transfer request including the internal query to the SP 25 m via the router 24. . In this case, the SP 25 m analyzes and optimizes the transferred internal query and executes the data operation. The SP 25 m can supply the data set obtained by the data operation as a query result to the SP 25 n via the router 24.
その後、SP25nのトランザクション実行部253は、内部クエリ発行部254により取得されたデータセットを用いてデータ操作を実行してその実行結果(クエリ結果)をルータ24に送信する。
Thereafter, the transaction execution unit 253 of the SP 25 n executes a data operation using the data set acquired by the internal query issuing unit 254 and transmits the execution result (query result) to the router 24.
なお、SP25nの内部クエリ発行部254は、図8に示すように、上記データ取得要求に応じて、内部クエリを含むデータ転送要求をルータ24を介してデータサーバ22jのSP25qに送信してもよい。この場合、SP25qは、転送された内部クエリを解析し最適化してデータ操作を実行する。そして、SP25qは、クエリ結果をルータ24を介してSP25nに供給することができる。
As shown in FIG. 8, the internal query issuing unit 254 of the SP 25 n transmits a data transfer request including the internal query to the SP 25 q of the data server 22 j via the router 24 in response to the data acquisition request. May be. In this case, SP25 q performs data manipulation by analyzing and optimizing the transferred internal query. Then, the SP 25 q can supply the query result to the SP 25 n via the router 24.
そして、図7に示されるように、データサーバ22iのルータ24は、SP25m,...,25nから受信したクエリ結果を集約し、クエリサーバ20Aに送信する。一方、データサーバ22jのルータ24も、SP25q,...,25rから受信したクエリ結果を集約し、クエリサーバ20Aに送信する。クエリサーバ20Aは、データサーバ22i,22jから送信されたクエリ結果を集約し、その結果をクライアント端末T1に送信する。
Then, as shown in FIG. 7, the router 24 of the data server 22 i aggregates the query results received from the SPs 25 m ,..., 25 n and transmits them to the query server 20A. On the other hand, the router 24 of the data server 22 j also aggregates the query results received from the SPs 25 q ,..., 25 r and transmits them to the query server 20A. The query server 20A aggregates the query results transmitted from the data servers 22 i and 22 j, and transmits the results to the client terminal T1.
図7や図8に示されるように、本実施形態の分散データベース管理システム10においては、データサーバ22iのストレージ処理部25nは、データ操作を実行するために不足のデータセットを他のストレージ処理部25m(図7)やストレージ処理部25q(図8)から取得することができる。ストレージ処理部25nは、取得したデータセットを用いてデータ操作を実行するので、ストレージ処理部251~25M全体で分散処理を効率良く実行できる。よって、不足のデータセットが存在する場合でも、分散データベース管理システム10は、高いスループットを実現することが可能である。
As shown in FIG. 7 and FIG. 8, in the distributed database management system 10 of this embodiment, the storage processing unit 25 n of the data server 22 i uses a data set that is insufficient to execute data operations to other storages. It can be acquired from the processing unit 25 m (FIG. 7) or the storage processing unit 25 q (FIG. 8). Since the storage processing unit 25 n executes data operations using the acquired data sets, distributed processing can be efficiently executed in the entire storage processing units 25 1 to 25 M. Therefore, even when there is a deficient data set, the distributed database management system 10 can achieve high throughput.
図9は、通信シーケンスの更に他の例を概略的に示す図である。図9の通信シーケンスでは、ストレージ処理部25nがデータ操作を実行する際に不足のデータセットが存在する場合、データサーバ22iのルータ24は、データ転送要求(内部クエリ)を、当該データサーバ22i内のストレージ処理部25mに転送すると同時に、他のデータサーバ22j内のルータ24にも転送する。データサーバ22j内のルータ24は、ルーティングテーブルRTLに従って、当該データ転送要求(内部クエリ)をストレージ処理部25qに転送する。このとき、当該データ転送要求が複数のストレージ処理部25q,...,25rに転送されることもあり得る。図9に示されるように、ストレージ処理部25nは、ストレージ処理部25m,25qからそれぞれクエリ結果であるデータセットを取得し、これらデータセットを用いたデータ操作を実行する。
FIG. 9 is a diagram schematically showing still another example of the communication sequence. In the communication sequence of FIG. 9, when there is an insufficient data set when the storage processing unit 25 n executes a data operation, the router 24 of the data server 22 i sends a data transfer request (internal query) to the data server. At the same time as being transferred to the storage processing unit 25 m in 22 i , it is also transferred to the router 24 in another data server 22 j . The router 24 in the data server 22 j transfers the data transfer request (internal query) to the storage processing unit 25 q according to the routing table RTL. At this time, the data transfer request may be transferred to a plurality of storage processing units 25 q ,..., 25 r . As illustrated in FIG. 9, the storage processing unit 25 n acquires data sets that are query results from the storage processing units 25 m and 25 q , and executes data operations using these data sets.
図10は、通信シーケンスの更に他の例を概略的に示す図である。図10の通信シーケンスでは、ストレージ処理部25nがデータ操作を実行する際に不足のデータセットが存在する場合、データサーバ22iのルータ24は、データ転送要求(内部クエリ)を、外部のデータサーバ22j内のルータ24に転送すると同時に、外部のデータサーバ22k内のルータ24にも転送する。データサーバ22j内のルータ24は、ルーティングテーブルRTLに従って、当該データ転送要求(内部クエリ)をストレージ処理部25qに転送する。並行して、データサーバ22k内のルータ24は、ルーティングテーブルRTLに従って、当該データ転送要求(内部クエリ)をストレージ処理部25tに転送する。
FIG. 10 is a diagram schematically showing still another example of the communication sequence. In the communication sequence of FIG. 10, when there is an insufficient data set when the storage processing unit 25 n executes a data operation, the router 24 of the data server 22 i sends a data transfer request (internal query) to an external data At the same time as being transferred to the router 24 in the server 22 j , it is also transferred to the router 24 in the external data server 22 k . The router 24 in the data server 22 j transfers the data transfer request (internal query) to the storage processing unit 25 q according to the routing table RTL. In parallel, the router 24 in the data server 22 k transfers the data transfer request (internal query) to the storage processing unit 25 t according to the routing table RTL.
その後、図10に示されるように、ストレージ処理部25q,25tは、それぞれクエリ結果であるデータセットを、ルータ24,24を介してデータサーバ22i内のストレージ処理部25nに送信する。ストレージ処理部25nは、ストレージ処理部25q,25tとからそれぞれクエリ結果であるデータセットを取得し、これらデータセットを用いたデータ操作を実行する。
Thereafter, as shown in FIG. 10, the storage processing units 25 q and 25 t transmit the data sets as query results to the storage processing unit 25 n in the data server 22 i via the routers 24 and 24, respectively. . The storage processing unit 25 n acquires data sets that are query results from the storage processing units 25 q and 25 t, and executes data operations using these data sets.
ところで、図7では、データサーバ22iにおいて、1台のストレージ処理部25mのみが不足のデータセットをストレージ処理部25nに送信する形態が示されているが、この形態に限定されるものではない。データサーバ22iにおいて、複数台のストレージ処理部25m,...,25uが不足のデータセットをストレージ処理部25nに送信する形態もあり得る。この場合、データサーバ22iのルータ24は、これら複数台のストレージ処理部25m,...,25uから送信された不足のデータセットを集約して新たなテーブルを構成し、この新たなテーブルのデータセットをルータ24経由でストレージ処理部25nに送信する機能を有する。後述するように、部分データベースは、ストレージ装置255の記憶領域に格納された実体データ群と、参照テーブルと、複数の中間識別子テーブルとで構成できる(図14~図15参照)。この種の部分データベースのデータセットを集約して新たなテーブルを構成するとき、同一値を持つ実体データは重複して転送されないので、同じデータサーバ22i内でのデータ転送量の削減が可能となる。
By the way, FIG. 7 shows a mode in which only one storage processing unit 25 m transmits a deficient data set to the storage processing unit 25 n in the data server 22 i . However, the configuration is limited to this mode. is not. In the data server 22 i , there may be a form in which a plurality of storage processing units 25 m ,..., 25 u transmit a deficient data set to the storage processing unit 25 n . In this case, the router 24 of the data server 22 i aggregates the deficient data sets transmitted from the plurality of storage processing units 25 m ,..., 25 u to form a new table. It has a function of transmitting to the storage processing unit 25 n datasets table via a router 24. As will be described later, the partial database can be composed of a group of actual data stored in the storage area of the storage device 255, a reference table, and a plurality of intermediate identifier tables (see FIGS. 14 to 15). When a new table is configured by aggregating data sets of this kind of partial database, entity data having the same value is not transferred redundantly, so that it is possible to reduce the amount of data transferred within the same data server 22 i . Become.
図8の場合、データサーバ22jにおいて、1台のストレージ処理部25qのみが不足のデータセットをデータサーバ22iのルータ24経由でストレージ処理部25nに送信する形態が示されているが、この形態に限定されるものではない。データサーバ22jにおいて、複数台のストレージ処理部25q,...,25rが不足のデータセットをデータサーバ22j,22iのルータ24,24経由でストレージ処理部25nに送信する形態もあり得る。この場合、データサーバ22jのルータ24は、これら複数台のストレージ処理部25q,...,25rから送信された不足のデータセットを集約して新たなテーブルを構成し、この新たなテーブルのデータセットをルータ24経由でストレージ処理部25nに送信する機能を有する。図14に示す部分データベースが使用されるとき、データサーバ22jのルータ24が部分データベースのデータセットを集約することによりデータサーバ22j,22i間でのデータ転送量の削減が可能となる。
In the case of FIG. 8, the data server 22 j shows a mode in which only one storage processing unit 25 q transmits a deficient data set to the storage processing unit 25 n via the router 24 of the data server 22 i . However, it is not limited to this form. In the data server 22 j , a configuration in which a plurality of storage processing units 25 q ,..., 25 r transmit a deficient data set to the storage processing unit 25 n via the routers 24, 24 of the data servers 22 j , 22 i. There is also a possibility. In this case, the router 24 of the data server 22 j aggregates the deficient data sets transmitted from the plurality of storage processing units 25 q ,..., 25 r to form a new table, and creates the new table. It has a function of transmitting to the storage processing unit 25 n datasets table via a router 24. When sub-database shown in FIG. 14 is used, it is possible to reduce the amount of data transfer between the data server 22 j, 22 i by the router 24 of the data server 22 j to aggregate data set of sub-databases.
図9の場合、データサーバ22iのストレージ処理部25nには、データサーバ22i内のストレージ処理部25mから不足のデータセットがルータ24経由で送信され、データサーバ22j内のストレージ処理部25qからも不足のデータセットがルータ24経由で送信される。データサーバ22iのルータ24は、これらデータセットを集約して新たなテーブルを構成し、この新たなテーブルのデータセットをストレージ処理部25nに送信する機能を有する。図14に示す部分データベースが使用されるとき、データサーバ22iのルータ24が部分データベースのデータセットを集約することにより、データサーバ22i内のルータ24からストレージ処理部25nへのデータ転送量の削減が可能となる。図10の場合には、データサーバ22iのストレージ処理部25nは、2台のデータサーバ22j,22k内のストレージ処理部25q,25tからそれぞれ不足データセットをルータ24経由で受信する。この場合も、図14に示す部分データベースが使用されるとき、データサーバ22iのルータ24が部分データベースのデータセットを集約することにより、データサーバ22i内のルータ24からストレージ処理部25nへのデータ転送量の削減が可能となる。
In the case of FIG. 9, an insufficient data set is transmitted from the storage processing unit 25 m in the data server 22 i to the storage processing unit 25 n in the data server 22 i via the router 24, and the storage processing in the data server 22 j is performed. The deficient data set is also transmitted from the unit 25 q via the router 24. The router 24 of the data server 22 i has a function of aggregating these data sets to form a new table and transmitting the data set of the new table to the storage processing unit 25 n . When sub-database shown in FIG. 14 is used, by the data server 22 i of the router 24 is to aggregate the data sets of the partial database, the amount of data transferred from the router 24 of the data server in 22 i to the storage unit 25 n Can be reduced. In the case of FIG. 10, the storage processing unit 25 n of the data server 22 i may receive the storage processing unit 25 q, 25 respectively missing data set from t in two data servers 22 j, 22 k through the router 24 To do. In this case, when the sub-database shown in FIG. 14 is used, by the data server 22 i of the router 24 is to aggregate the data set of sub-databases, from the router 24 of the data server in 22 i storage unit to 25 n The amount of data transfer can be reduced.
また、ストレージ処理部25nは、不足のデータセットが複数ある場合に、当該データセットの全てを取得した後でデータ操作を実行してもよいし、あるいは、当該データセットの一部のみを取得した段階で、当該一部を用いたデータ操作を実行してもよい。図9の通信シーケンスでは、ストレージ処理部25nは、ストレージ処理部25mとストレージ処理部25qとからそれぞれクエリ結果であるデータセットの全部を取得した後にデータ操作を実行している。この代わりに、ストレージ処理部25nは、ストレージ処理部25mから第1のデータセットを取得した直後に当該第1のデータセットのみを用いたデータ操作を実行してもよく、その後、ストレージ処理部25qから第2のデータセットを取得した後に当該第2のデータセットを用いたデータ操作を実行してもよい。
In addition, when there are a plurality of deficient data sets, the storage processing unit 25 n may execute the data operation after acquiring all of the data sets, or acquire only a part of the data sets. At this stage, data operation using the part may be executed. In the communication sequence of FIG. 9, the storage processing unit 25 n executes data operations after acquiring all of the data sets that are query results from the storage processing unit 25 m and the storage processing unit 25 q , respectively. Instead, the storage processing unit 25 n may execute a data operation using only the first data set immediately after acquiring the first data set from the storage processing unit 25 m , and then perform storage processing. After obtaining the second data set from the unit 25 q , the data operation using the second data set may be executed.
次に、分散データベースを構成する部分データベースの構造の好適な例を以下に説明する。
Next, a preferred example of the structure of the partial database constituting the distributed database will be described below.
図11は、部分データベースの構造の一例を概略的に示す図である。図11に示されるように、この部分データベース構造は、ストレージ装置255内の記憶領域DA0に格納されている実体データ群と、ストレージ装置255において記憶領域DA0とは異なる記憶領域に格納されている参照テーブル(識別子テーブル)RT0とを有する。
FIG. 11 is a diagram schematically showing an example of the structure of the partial database. As shown in FIG. 11, this partial database structure includes a substantial data group stored in the storage area DA0 in the storage apparatus 255 and a reference stored in a storage area different from the storage area DA0 in the storage apparatus 255. Table (identifier table) RT0.
参照テーブルRT0は、行方向に定義された5つのタプルと、列方向に定義された5つの属性フィールドTID,Val1,Val2,Val3,Val4とを有している。第1の実施形態では、説明の便宜上、参照テーブルRT0のタプルの数は5つであるが、これに限定されず、タプルの数を、たとえば、数十~数百万に設定することができる。属性フィールドTID,Val1,Val2,Val3,Val4の数も5つに限定されるものではない。
The reference table RT0 has five tuples defined in the row direction and five attribute fields TID, Val1, Val2, Val3, and Val4 defined in the column direction. In the first embodiment, for convenience of explanation, the number of tuples in the reference table RT0 is five. However, the number is not limited to this, and the number of tuples can be set to several tens to several millions, for example. . The number of attribute fields TID, Val1, Val2, Val3, and Val4 is not limited to five.
参照テーブルRT0の5つのタプルには、それぞれ、一意のタプル識別子(TID)R1,R2,R3,R4,R5が割り当てられている。これらタプルと属性フィールドVal1,Val2,Val3,Val4とで定まる領域(タプルと属性フィールドVal1,Val2,Val3,Val4とが交差する領域)にそれぞれ固定長のデータ識別子VR11,VR12,...,VR43が格納されている。すなわち、属性フィールドVal1は、タプル識別子R1,R2,R3,R4,R5に対応する領域にそれぞれデータ識別子VR11,VR12,VR13,VR14,VR15を含み、属性フィールドVal2は、タプル識別子R1,R2,R3,R4,R5に対応する領域にそれぞれデータ識別子VR21,VR22,VR23,VR23,VR24を含み、属性フィールドVal3は、タプル識別子R1,R2,R3,R4,R5に対応する領域にそれぞれデータ識別子VR31,VR32,VR33,VR34,VR35を含み、属性フィールドVal4は、タプル識別子R1,R2,R3,R4,R5に対応する領域にそれぞれデータ識別子VR41,VR41,VR41,VR42,VR43を含む。
Unique tuple identifiers (TID) R1, R2, R3, R4, and R5 are assigned to the five tuples of the reference table RT0, respectively. Data identifiers VR11, VR12,..., VR43 each having a fixed length in an area defined by these tuples and attribute fields Val1, Val2, Val3, Val4 (area where the tuples and attribute fields Val1, Val2, Val3, Val4 intersect). Is stored. That is, the attribute field Val1 includes data identifiers VR11, VR12, VR13, VR14, and VR15 in areas corresponding to the tuple identifiers R1, R2, R3, R4, and R5, respectively. The attribute field Val2 includes the tuple identifiers R1, R2, and R3. , R4, R5 include data identifiers VR21, VR22, VR23, VR23, VR24, respectively, and attribute field Val3 includes data identifiers VR31, VR3, R4, R5, R4, R5, respectively. VR32, VR33, VR34, and VR35, and attribute field Val4 includes data identifiers VR41, VR41, VR41, VR42, and VR43 in areas corresponding to tuple identifiers R1, R2, R3, R4, and R5, respectively.
データ識別子VR11~VR43の値は、ハッシュ関数を用いて算出することができる。ハッシュ関数は、実体データのビット列の入力に対して固定長のビット列を出力する演算子である。このハッシュ関数の出力値(ハッシュ値)をデータ識別子VR11~VR34の値として利用すればよい。トランザクション実行部253は、検索文字列をハッシュ値に変換し、このハッシュ値と一致する値を持つデータ識別子を参照テーブルRT0から探し出し、探し出されたデータ識別子に対応する実体データを記憶領域DA0から探し出すことができる。このとき、トランザクション実行部253は、可変長データを含まない固定長データ群のみからなる参照テーブルRT0を検索するので、文字列を高速に探し出すことができる。
The values of the data identifiers VR11 to VR43 can be calculated using a hash function. The hash function is an operator that outputs a fixed-length bit string in response to the bit string input of the actual data. The output value (hash value) of this hash function may be used as the values of the data identifiers VR11 to VR34. The transaction execution unit 253 converts the search character string into a hash value, searches the reference table RT0 for a data identifier having a value that matches the hash value, and stores entity data corresponding to the found data identifier from the storage area DA0. You can find out. At this time, the transaction execution unit 253 searches the reference table RT0 including only the fixed-length data group not including the variable-length data, so that the character string can be searched at high speed.
属性フィールドVal1、Val2、Val3の名称(属性名)としては、たとえば、「店名」、「地域」、「売上」、「年月」を設定できる。図11に示すデータベース構造は、実体データの集合である実テーブルから生成することができる。図12は、実テーブルSTの一例を模式的に示す図である。5行4列の実テーブルSTの「A店」、「B店」、「九州」などの実体データをハッシュ化(実体データの値をハッシュ値に変換)することで、図11に示した固定長のデータ識別子VR11,VR12,...,VR34を生成できる。
As the names (attribute names) of the attribute fields Val1, Val2, Val3, for example, “Store name”, “Region”, “Sales”, “Year / month” can be set. The database structure shown in FIG. 11 can be generated from a real table that is a collection of entity data. FIG. 12 is a diagram schematically illustrating an example of the real table ST. By fixing the entity data such as “Store A”, “Store B”, “Kyushu”, etc. in the real table ST of 5 rows and 4 columns (converting the value of the entity data into a hash value), the fixed data shown in FIG. Long data identifiers VR11, VR12,..., VR34 can be generated.
上記データ識別子VR11~VR43は、記憶領域DA0内の実体データをそれぞれ実質的に一意に表す値を有する。このため、トランザクション実行部253は、データ識別子VR11~VR43を検索し、その検索結果に基づいてこれらデータ識別子VR11~VR43に対応する可変長の実体データにアクセスすることが可能である。なお、本明細書において「実質的に一意」とは、部分データベースに対するデータ操作上の一意性を満たしていることを意味する。
The data identifiers VR11 to VR43 each have a value that uniquely represents the actual data in the storage area DA0. Therefore, the transaction execution unit 253 can search the data identifiers VR11 to VR43, and can access variable-length entity data corresponding to the data identifiers VR11 to VR43 based on the search result. In this specification, “substantially unique” means that the uniqueness in data operation for the partial database is satisfied.
図13(A)および図13(B)は、部分データベースを構成する論理データ構造を示す図である。図13(A)に示されるデータ構造は、先頭部分にヘッダ領域を有し、末尾部分にアロケーション管理テーブルを有している。また、ヘッダ領域とアロケーション管理テーブルとの間に実体データ群が格納される領域が設けられている。
FIG. 13 (A) and FIG. 13 (B) are diagrams showing a logical data structure constituting the partial database. The data structure shown in FIG. 13A has a header area at the beginning and an allocation management table at the end. In addition, an area for storing the entity data group is provided between the header area and the allocation management table.
図13(B)は、ヘッダ領域に含まれる変換テーブルの一例を示す概略図である。この変換テーブルは、データ識別子VR11~VR43と、これらデータ識別子VR11~VR43それぞれの記憶領域との間の対応関係を規定するテーブルである。この変換テーブルにおいては、図13(B)に示されるように、データ識別子VR11~VR34が格納される領域Fidと、これらデータ識別子VR11~VR34それぞれの記憶領域を示す位置データA11~A43が格納される領域Faとが設けられている。
FIG. 13B is a schematic diagram illustrating an example of a conversion table included in the header area. This conversion table is a table that defines the correspondence between the data identifiers VR11 to VR43 and the storage areas of these data identifiers VR11 to VR43. In this conversion table, as shown in FIG. 13B, an area Fid in which data identifiers VR11 to VR34 are stored, and position data A11 to A43 indicating storage areas of these data identifiers VR11 to VR34 are stored. Region Fa is provided.
図11に示されるように、実体データD11~D43の記憶領域DA0と、これら実体データD11~D43をそれぞれ一意に表すデータ識別子VR11~VR43の記憶領域とは互いに完全に分離されているので、部分データベースの更新処理の高効率化、検索速度の向上、並びに移植性の向上を実現することができる。
As shown in FIG. 11, since the storage area DA0 of the entity data D11 to D43 and the storage areas of the data identifiers VR11 to VR43 each uniquely representing the entity data D11 to D43 are completely separated from each other, It is possible to improve the efficiency of database update processing, improve search speed, and improve portability.
たとえば、記憶領域DA0内の実体データ群の一部を更新、追加または削除したとき、参照テーブルRT0と図13(B)の変換テーブルとを更新すれば済むので、更新処理を短時間で行うことができる。実体データの更新、追加または削除に伴い、部分データベースは必要最小限に更新されるので、部分データベースに対する更新が頻繁に行われる場合でも、かかる更新を効率的かつ高速に実行することが可能である。
For example, when a part of the actual data group in the storage area DA0 is updated, added, or deleted, the reference table RT0 and the conversion table in FIG. Can do. As the entity data is updated, added, or deleted, the partial database is updated to the minimum necessary. Therefore, even when the partial database is frequently updated, it is possible to execute such update efficiently and at high speed. .
また、図13(B)の変換テーブルでは、同一値を有するデータ識別子の重複が排除されている(すなわち、変換テーブル内にある任意の2つのデータ識別子の値は必ず異なる)ので、この変換テーブルを使用することにより、同一値を有する実体データを重複させずに記憶領域DA0に記憶させることができる。言い換えれば、部分データベースを構成する実体データ群を圧縮して記憶領域DA0に記憶させることができるので、記憶領域DA0の効率的な利用が可能となる。
In the conversion table of FIG. 13B, duplication of data identifiers having the same value is eliminated (that is, the values of any two data identifiers in the conversion table are always different). By using, entity data having the same value can be stored in the storage area DA0 without overlapping. In other words, since the entity data group constituting the partial database can be compressed and stored in the storage area DA0, the storage area DA0 can be used efficiently.
次に、部分データベースの構造の他の好適な例を以下に説明する。
Next, another preferred example of the partial database structure will be described below.
図14は、部分データベースの構造を概略的に示す図である。図14に示されるように、このデータベース構造は、ストレージ装置255の記憶領域DA3に格納された実体データ群と、記憶領域DA3とは別の記憶領域に格納された参照テーブルRT1および第1~第3の中間識別子テーブルIT41,IT42,IT43とを有する。
FIG. 14 is a diagram schematically showing the structure of the partial database. As shown in FIG. 14, this database structure includes an entity data group stored in the storage area DA3 of the storage device 255, a reference table RT1 stored in a storage area different from the storage area DA3, and the first to first data. 3 intermediate identifier tables IT41, IT42, IT43.
図15(A)は、参照テーブルRT1の概略構成を示す図である。参照テーブルRT1は、行方向に定義された複数のタプルと、列方向に定義された4つの属性フィールドTID,Col1Ref,Col2Ref,Col3Refとを有している。参照テーブルRT1のタプルの数については、たとえば、これを数十~数百万に設定することができる。属性フィールドTID,Col1Ref,Col2Ref,Col3Refの数も4つに限定されるものではない。
FIG. 15A is a diagram showing a schematic configuration of the reference table RT1. The reference table RT1 has a plurality of tuples defined in the row direction, and four attribute fields TID, Col1Ref, Col2Ref, and Col3Ref defined in the column direction. For example, the number of tuples in the reference table RT1 can be set to several tens to several millions. The number of attribute fields TID, Col1Ref, Col2Ref, and Col3Ref is not limited to four.
参照テーブルRT1のタプルには、それぞれ、一意のタプル識別子(TID)R1,R2,R3,R4,...が割り当てられている。これらタプルと属性フィールドCol1Ref,Col2Ref,Col3Refとで定まる領域(タプルと属性フィールドCol1Ref,Col2Ref,Col3Refとが交差する領域)にそれぞれ固定長の参照識別子CRV11,CRV12,...,CRV31,...が格納されている。参照識別子CRV11~CRV31の値は、上記第1の実施形態のデータ識別子の場合と同様のハッシュ関数を用いて算出することができる。すなわち、データ識別子VR11~VR31の入力に対するハッシュ関数の出力値をそれぞれ参照識別子CRV11~CRV31の値とすればよい。
Unique tuple identifiers (TID) R1, R2, R3, R4,... Are assigned to the tuples of the reference table RT1, respectively. CRV11, CRV12,..., CRV31,..., CRV31,..., CRV31,. Is stored. The values of the reference identifiers CRV11 to CRV31 can be calculated using the same hash function as that of the data identifier of the first embodiment. That is, the output values of the hash functions for the inputs of the data identifiers VR11 to VR31 may be the values of the reference identifiers CRV11 to CRV31, respectively.
図15(B)~図15(D)は、第1~第3の中間識別子テーブルIT41,IT42,IT43の構造を概略的に示す図である。第1の中間識別子テーブルIT41は、行方向に定義された複数のタプルと、列方向に定義された2つの属性フィールドCol1,Valとを有する。属性フィールドCol1は、固定長の参照識別子CRV11,CRV12,...を含み、属性フィールドValは、タプルにそれぞれ対応する領域にそれぞれ固定長のデータ識別子VR11,VR12,...を含む。
FIGS. 15B to 15D are diagrams schematically showing the structures of the first to third intermediate identifier tables IT41, IT42 and IT43. The first intermediate identifier table IT41 has a plurality of tuples defined in the row direction and two attribute fields Col1 and Val defined in the column direction. The attribute field Col1 includes fixed-length reference identifiers CRV11, CRV12,..., And the attribute field Val includes fixed-length data identifiers VR11, VR12,.
第2の中間識別子テーブルIT42は、行方向に定義された複数のタプルと、列方向に定義された2つの属性フィールドCol2,Valとを有する。属性フィールドCol2は、固定長の参照識別子CRV21,CRV22,...を含み、属性フィールドValは、タプルにそれぞれ対応する領域にそれぞれ固定長のデータ識別子VR21,VR22,...を含む。
The second intermediate identifier table IT42 has a plurality of tuples defined in the row direction and two attribute fields Col2 and Val defined in the column direction. The attribute field Col2 includes fixed-length reference identifiers CRV21, CRV22,..., And the attribute field Val includes fixed-length data identifiers VR21, VR22,.
そして、第3の中間識別子テーブルIT43は、行方向に定義された複数のタプルと、列方向に定義された2つの属性フィールドCol3,Valとを有する。属性フィールドCol3は、固定長の参照識別子CRV31,CRV32,...を含み、属性フィールドValは、タプルにそれぞれ対応する領域にそれぞれ固定長のデータ識別子VR31,VR32,...を含む。
The third intermediate identifier table IT43 has a plurality of tuples defined in the row direction and two attribute fields Col3 and Val defined in the column direction. The attribute field Col3 includes fixed-length reference identifiers CRV31, CRV32,..., And the attribute field Val includes fixed-length data identifiers VR31, VR32,.
第1~第3の中間識別子テーブルIT41,IT42,IT43の各々は、互いに重複した値を持つ複数の参照識別子を持たない(すなわち、各中間識別子テーブル内にある任意の2つの参照識別子の値は必ず異なる)ので、冗長性を排除したデータ構造を有する。言い換えれば、中間識別子テーブルIT41,IT42,IT43の各々は、参照識別子とデータ識別子との一対一の対応関係を当該対応関係の重複を排除するように規定するテーブルである。図15(A)に示されるように、参照テーブルRT1の属性フィールドCol1Refのカラムには、参照識別子CRV12,CRV12,CRV11,CRV11,...が格納されている。属性フィールドCol1Refに対応する中間識別子テーブルIT41は、図15(B)に示されるように、これら参照識別子CRV12,CRV12,CRV11,CRV11,...と、データ識別子VR12,VR12,VR11,VR11,...との対応関係を規定するテーブルである。中間識別子テーブルIT41では、互いに重複する対応関係は排除されている(たとえば、参照識別子CRV12とデータ識別子VR12との対応関係は重複して規定されていない)。同様に、図15(C)と図15(D)に示されるように、属性フィールドCol2Refに対応する中間識別子テーブルIT42と、属性フィールドCol3Refに対応する中間識別子テーブルIT43においても、それぞれ、重複する対応関係が排除されている。
Each of the first to third intermediate identifier tables IT41, IT42, IT43 does not have a plurality of reference identifiers having overlapping values (that is, the values of any two reference identifiers in each intermediate identifier table are Therefore, it has a data structure that eliminates redundancy. In other words, each of the intermediate identifier tables IT41, IT42, IT43 is a table that prescribes a one-to-one correspondence between the reference identifier and the data identifier so as to eliminate duplication of the correspondence. As shown in FIG. 15A, reference identifiers CRV12, CRV12, CRV11, CRV11,... Are stored in the column of the attribute field Col1Ref of the reference table RT1. As shown in FIG. 15B, the intermediate identifier table IT41 corresponding to the attribute field Col1Ref includes these reference identifiers CRV12, CRV12, CRV11, CRV11,..., And data identifiers VR12, VR12, VR11, VR11,. It is a table that defines the correspondence with .. In the intermediate identifier table IT41, the overlapping correspondence relationship is excluded (for example, the correspondence relationship between the reference identifier CRV12 and the data identifier VR12 is not defined redundantly). Similarly, as shown in FIG. 15C and FIG. 15D, the intermediate identifier table IT42 corresponding to the attribute field Col2Ref and the intermediate identifier table IT43 corresponding to the attribute field Col3Ref are respectively duplicated correspondences. The relationship has been eliminated.
トランザクション実行部253は、参照識別子CRV11~CRV33およびデータ識別子VR11~VR33を検索し、この検索結果を用いて可変長の実体データにアクセスすることができる。記憶領域DA3は、図13(A)に示した変換テーブルと同様の変換テーブルを有しているので、トランザクション実行部253は、当該検索結果に基づいて実体データにアクセスすることができる。
The transaction execution unit 253 can search the reference identifiers CRV11 to CRV33 and the data identifiers VR11 to VR33, and use this search result to access variable-length entity data. Since the storage area DA3 has a conversion table similar to the conversion table shown in FIG. 13A, the transaction execution unit 253 can access the entity data based on the search result.
上述した通り、第1~第3の中間識別子テーブルIT41,IT42,IT43の各々は、冗長性を排除したデータ構造を有する。よって、データサーバ22iのストレージ処理部25nにおいてデータ操作を実行するためのデータセットが不足し、ストレージ処理部25nが、図14の構造の部分データベースを有するストレージ処理部25m(図7)やストレージ処理部25q(図8)から不足のデータセットを取得する場合、中間識別子テーブルIT41,IT42,IT43を利用すれば、同じ値を持つデータセットを繰り返し転送せずに済むので、データセットの転送量を小さくすることができるという利点がある。
As described above, each of the first to third intermediate identifier tables IT41, IT42, IT43 has a data structure excluding redundancy. Accordingly, the storage processing unit 25 n of the data server 22 i lacks a data set for executing a data operation, and the storage processing unit 25 n has a storage processing unit 25 m (FIG. 7) having a partial database having the structure of FIG. ) And the storage processing unit 25 q (FIG. 8), if the intermediate identifier tables IT41, IT42, IT43 are used, it is not necessary to repeatedly transfer data sets having the same value. There is an advantage that the transfer amount of the set can be reduced.
たとえば、ストレージ処理部25mに対して、図15(A)の参照テーブルRT1の属性フィールドCol1Refにおける1カラム分のデータセットのデータ転送要求があった場合、ストレージ処理部25mは、固定長の参照識別子CRV12,CRV12,CRV11,CRV11,...を送信するとともに、中間識別子テーブルIT41の対応関係を用いて参照識別子CRV11,CRV12,...とこれらに対応する実体データD11,D12,...とを送信すればよい。この場合、参照識別子CRV12,CRV12,CRV11,CRV11,...の値は、ハッシュ関数という圧縮関数の出力値(ハッシュ値)であり、同一値を持つ実体データは重複して送信されないので、データ転送量は少なくて済む。
For example, the storage processing section 25 m, if a one column data transfer request of the data set of the attribute field Col1Ref reference table RT1 of FIG. 15 (A), the storage processing portion 25 m is a fixed length The reference identifiers CRV12, CRV12, CRV11, CRV11,... Are transmitted, and the reference identifiers CRV11, CRV12,... And the entity data D11, D12,. And send it. In this case, the values of the reference identifiers CRV12, CRV12, CRV11, CRV11,. The transfer amount is small.
また、中間識別子テーブルIT41,IT42,IT43は、それぞれ、カラム単位で構成されている。よって、ストレージ処理部25iが結合操作(ジョイン操作:複数のカラムを結合して新たなテーブルを生成するためのデータ操作)を実行する際に、その結合操作に必要な不足のデータセットが他のストレージ処理部25jからストレージ処理部25iへ転送される場合にも、データ転送量を小さくすることができるという利点がある。
The intermediate identifier tables IT41, IT42, IT43 are each configured in units of columns. Therefore, when the storage processing unit 25 i executes a join operation (join operation: a data operation for joining a plurality of columns to generate a new table), there are other insufficient data sets necessary for the join operation. Even when data is transferred from the storage processing unit 25 j to the storage processing unit 25 i , there is an advantage that the data transfer amount can be reduced.
ストレージ処理部251~25Mの全てが、参照識別子やデータ識別子の算出のために同一のハッシュ関数を使用してもよいし、あるいは、異なるハッシュ関数を使用してもよい。しかしながら、ストレージ処理部毎に異なるハッシュ関数が使用された場合、たとえばストレージ処理部25q,25r間で、同一値を持つ実体データに対してデータ識別子や参照識別子のハッシュ値が異なる可能性がある。上述の通り、ルータ24は、複数のストレージ処理部25q,25rから転送されたデータセットを集約して新たなテーブルを構成する機能を有する。この集約を行う際に、ルータ24は、データ識別子や参照識別子の不整合を調整する機能を有している。図16は、ルータ24の集約・調整機能を説明するための図である。
All of the storage processing units 25 1 to 25 M may use the same hash function for calculating the reference identifier or the data identifier, or may use different hash functions. However, when a different hash function is used for each storage processing unit, for example, there is a possibility that the hash value of the data identifier or the reference identifier differs for the entity data having the same value between the storage processing units 25 q and 25 r. is there. As described above, the router 24 has a function of aggregating data sets transferred from the plurality of storage processing units 25 q and 25 r to form a new table. When performing this aggregation, the router 24 has a function of adjusting inconsistencies between the data identifier and the reference identifier. FIG. 16 is a diagram for explaining the aggregation / adjustment function of the router 24.
図16に示されるように、データサーバ22jのストレージ処理部25q,25rは、データサーバ22iのストレージ処理部25nからのデータ転送要求に応じてそれぞれデータセットDSa,DSbをルータ24に送信する。一方のデータセットDSaは、図16に示されるようにテーブルRTa,Ca1,Ca2のデータであり、他方のデーセットDSbは、図16に示されるようにテーブルRTb,Cb1,Cb2のデータである。データサーバ22jのルータ24は、これらのデータセットDSa,DSbを集約して新たなテーブルRTd,Cd1,Cd2を構成し、当該新たなテーブルRTd,Cd1,Cd2のデータセットDSdをデーサーバ22iに転送する。
As shown in FIG. 16, a storage processing unit of the data server 22 j 25 q, 25 r are each dataset in response to a data transfer request from the storage unit 25 n of the data server 22 i DSa, router 24 DSb Send to. One data set DSa is data of tables RTa, Ca1, and Ca2 as shown in FIG. 16, and the other data set DSb is data of tables RTb, Cb1, and Cb2, as shown in FIG. The router 24 of the data server 22 j aggregates the data sets DSa and DSb to form new tables RTd, Cd1 and Cd2, and the data sets DSd of the new tables RTd, Cd1 and Cd2 are stored in the data server 22 i. Forward to.
参照テーブルRTaは、図15(A)に示した参照テーブルRT1と同じ構造を有する。また、テーブルCa1,Ca2は、ストレージ処理部25q内の中間識別子テーブルを用いて構成される。テーブルCa1は、参照識別子CRV11,CRV12,CRV13と実体データ値"AA"、"AB"、"AC"との間の一対一の対応関係を規定するテーブルであり、テーブルCa2は、参照識別子CRV21と実体データの値"AD"との間の一対一の対応関係を規定するテーブルである。同様に、参照テーブルRTbは、図15(A)に示した参照テーブルRT1と同じ構造を有する。テーブルCb1,Cb2は、ストレージ処理部25r内の中間識別子テーブルを用いて構成される。テーブルCb1は、参照識別子CRV11,CRV12と実体データ値"BA"、"AA"との間の一対一の対応関係を規定するテーブルであり、テーブルCb2は、参照識別子CRV22と実体データの値"AD"との間の一対一の対応関係を規定するテーブルである。
The reference table RTa has the same structure as the reference table RT1 shown in FIG. The table Ca1, Ca @ 2 is configured with an intermediate identifier table storage processing unit 25 q. The table Ca1 is a table that defines a one-to-one correspondence between the reference identifiers CRV11, CRV12, and CRV13 and the entity data values “AA”, “AB”, and “AC”, and the table Ca2 is the reference identifier CRV21. It is a table which prescribes | regulates the one-to-one correspondence between the value "AD" of entity data. Similarly, the reference table RTb has the same structure as the reference table RT1 shown in FIG. Table Cb1, Cb2 is configured with an intermediate identifier table storage processing unit 25 r. The table Cb1 defines a one-to-one correspondence between the reference identifiers CRV11 and CRV12 and the entity data values “BA” and “AA”, and the table Cb2 includes the reference identifier CRV22 and the entity data value “AD”. It is a table which prescribes | regulates the one-to-one correspondence with ".
図16に示されるように、テーブルCa1とテーブルCb1とで、同一の実体データ値"AA"に対して異なる参照識別子CRV11,CRV12が使用されている。また、テーブルCa2とテーブルCb2とで、同一の実体データ値"AD"に対して異なる参照識別子CRV21,CRV22が使用されている。このような場合、ルータ24は、データセットDSa,DSbを集約して参照テーブルRTdとテーブルCd1,Cd2とを構成する際に、ルータ24は、同一の実体データ値"AA"に対して一意の参照識別子CRV11を割り当て、同一の実体データ値"AD"に対して一意の参照識別子CRV21を割り当てる。これにより、参照識別子の不整合を解消することができる。
As shown in FIG. 16, different reference identifiers CRV11 and CRV12 are used for the same entity data value “AA” in the table Ca1 and the table Cb1. Further, the table Ca2 and the table Cb2 use different reference identifiers CRV21 and CRV22 for the same entity data value “AD”. In such a case, when the router 24 aggregates the data sets DSa and DSb to form the reference table RTd and the tables Cd1 and Cd2, the router 24 is unique with respect to the same entity data value “AA”. A reference identifier CRV11 is assigned, and a unique reference identifier CRV21 is assigned to the same entity data value “AD”. Thereby, the mismatch of a reference identifier can be eliminated.
より具体的には、たとえば、以下の手順を採用することができる。先ず、ルータ24は、データセットDSa,DSb間で同一の実体データ値に対する参照識別子の不整合を検査する。この検査の結果、参照識別子の不整合があった場合には、ルータ24は、ストレージ処理部25q,25rのうちの一方のストレージ処理部25qで使用されているハッシュ関数を使用して、テーブルRTb,Cb1,Cb2の参照識別子を更新する。このとき、ルータ24は、ハッシュ値の変換テーブルを作成し、この変換テーブルに従ってテーブルRTb,Cb1,Cb2の参照識別子を更新してもよい。そして、ルータ24は、更新されたテーブルRTb,Cb1,Cb2と、テーブルRTa,Ca1,Ca2とを集約して新たなテーブルRTd,Cd1,Cd2を構成する。その後、テーブルRTb,Cb1,Cb2と、テーブルRTa,Ca1,Ca2とは破棄される。
More specifically, for example, the following procedure can be adopted. First, the router 24 checks the inconsistency of the reference identifier for the same actual data value between the data sets DSa and DSb. The results of this inspection, if there is inconsistency of the reference identifier, the router 24 may use a hash function that is used by the storage processing unit 25 q, 25 one of the storage processing unit 25 q of r The reference identifiers of the tables RTb, Cb1, and Cb2 are updated. At this time, the router 24 may create a hash value conversion table and update the reference identifiers of the tables RTb, Cb1, and Cb2 according to the conversion table. Then, the router 24 aggregates the updated tables RTb, Cb1, Cb2 and the tables RTa, Ca1, Ca2 to form new tables RTd, Cd1, Cd2. Thereafter, the tables RTb, Cb1, Cb2 and the tables RTa, Ca1, Ca2 are discarded.
以上、図面を参照して本発明の実施形態について述べたが、これらは本発明の例示であり、上記以外の様々な構成を採用することもできる。たとえば、上記実施形態は、分散データベースに対してトランザクションを実行するために好適な構成を有するが、これに限定されるものではない。上述の通り、トランザクションは、ACID特性を満たす処理であるが、これらACID特性のうちのいずれかの特性を満たさない場合のデータ操作にも本発明を適用することが可能である。
As described above, the embodiments of the present invention have been described with reference to the drawings. However, these are exemplifications of the present invention, and various configurations other than the above can be adopted. For example, the above-described embodiment has a configuration suitable for executing a transaction on a distributed database, but is not limited to this. As described above, a transaction is a process that satisfies the ACID characteristics, but the present invention can also be applied to a data operation when any of these ACID characteristics is not satisfied.
上記実施形態では、分散データベース管理システム10は、図1に示されるように、3つのクエリサーバ20A,20B,20Cを有するが、これに限定されるものではない。また、データサーバ221~22Nの各々は、複数のストレージ処理部251~25Mを有しているが、これに限定されることなく、いずれかのデータサーバ22iが単数のストレージ処理部を有してもよい。データサーバ221~22Nの基本機能は同一であるが、データサーバ221~22Nに組み込まれるハードウェア構成は、必ずしも同一である必要はない。
In the above embodiment, the distributed database management system 10 includes the three query servers 20A, 20B, and 20C as shown in FIG. 1, but is not limited thereto. Each of the data servers 22 1 to 22 N has a plurality of storage processing units 25 1 to 25 M. However, the data server 22 i is not limited to this, and any one of the data servers 22 i has a single storage processing. You may have a part. The basic functions of the data servers 22 1 to 22 N are the same, but the hardware configuration incorporated in the data servers 22 1 to 22 N is not necessarily the same.
また、上記の通り、ルータ24は、複数のクエリ結果(データセット)を集約する機能を有しているが、ルータ24は、処理時間を削減するために、この集約を実行しない場合もあり得る。
Further, as described above, the router 24 has a function of aggregating a plurality of query results (data sets), but the router 24 may not execute this aggregation in order to reduce processing time. .
この出願は、日本国特許庁に出願された特願2009-040777号(出願日:2009年2月24日)を基礎とする優先権を主張するものであり、その開示の全ては、本明細書の一部として援用(incorporation herein by reference)される。
This application claims priority based on Japanese Patent Application No. 2009-040777 (filing date: February 24, 2009) filed with the Japan Patent Office, the entire disclosure of which is incorporated herein by reference. Incorporation “herein” by “reference”.