JP2017027471A - Distribution database system - Google Patents
Distribution database system Download PDFInfo
- Publication number
- JP2017027471A JP2017027471A JP2015147089A JP2015147089A JP2017027471A JP 2017027471 A JP2017027471 A JP 2017027471A JP 2015147089 A JP2015147089 A JP 2015147089A JP 2015147089 A JP2015147089 A JP 2015147089A JP 2017027471 A JP2017027471 A JP 2017027471A
- Authority
- JP
- Japan
- Prior art keywords
- search
- computer
- search query
- database
- copy
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、分散データベースシステムに関する。 The present invention relates to a distributed database system.
大規模なデータを効率的に処理するデータベースの1実装方式として、分散データベースシステムが知られている。分散データベースシステムは一般に、レコードを複数のホストコンピュータに分散して配置し、各ホストコンピュータが並列動作することにより、データの処理効率を高めようとするものである。 A distributed database system is known as one implementation method of a database that efficiently processes large-scale data. A distributed database system generally attempts to increase data processing efficiency by distributing records to a plurality of host computers and operating the host computers in parallel.
下記特許文献1は、データの登録・問い合わせ処理を高速に実行する分散データベース管理システムについて記載している。同文献においては、アクセスするデータがどのデータベース管理装置にあるかをあらかじめ判断することにより、全てのデータベース管理装置に対してアクセスが生じることに起因する性能劣化を回避している(同文献の0006〜0007参照)。
The following
下記非特許文献1〜2は、比較的安価なサーバコンピュータを多数用いる分散データベースの事例について記載している。
Non-Patent
上記各文献に記載されている分散データベースにおいては、検索対象となっているデータを保持しているコンピュータに対してどの程度の負荷がかかっているかに応じて、検索リクエストに対する応答速度が異なり、必ずしも高速に応答が得られるとは限らないと考えられる。 In the distributed database described in each of the above documents, the response speed for the search request varies depending on how much load is applied to the computer holding the data to be searched, and is not necessarily It is considered that a response is not always obtained at high speed.
分散データベースの1実装例として、例えば個人用コンピュータなどのように電源がOFFされていることが比較的多いコンピュータを多数用いることにより、安価に分散データベースを構築することが考えられる。この場合、端末コストは安価に抑えることができる反面、検索対象となっているデータを保持しているコンピュータが稼働していない可能性がある。かかる場合においても検索対象データをできる限り確実に取得できるようにすることが望ましい。 As one implementation example of a distributed database, it is conceivable to construct a distributed database at a low cost by using a large number of computers that are relatively turned off, such as personal computers. In this case, the terminal cost can be kept low, but the computer holding the data to be searched may not be operating. Even in such a case, it is desirable to ensure that the search target data can be acquired as reliably as possible.
本発明は、上記のような課題に鑑みてなされたものであり、分散データベースシステムにおける検索速度を向上させるとともに、検索結果を確実に取得することができる技術を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique capable of improving the search speed in a distributed database system and reliably acquiring search results.
本発明に係る分散データベースシステムは、それぞれ異なるレコードを保持する複数のデータベースを有する複数のコンピュータを有し、各データベースに対する検索順序の異なるクエリを各コンピュータに対して並列に発行する。 The distributed database system according to the present invention has a plurality of computers having a plurality of databases each holding different records, and issues queries having different search orders for the respective databases to each computer in parallel.
本発明に係る分散データベースシステムによれば、各コンピュータに対して並列にクエリを発行するので、応答の速いものを優先して採用することにより、検索速度を向上させることができる。さらには各コンピュータが同一のレコードを保持しているので、いずれかのコンピュータがダウンしていてもその他コンピュータから検索結果を得ることができる。 According to the distributed database system of the present invention, a query is issued to each computer in parallel, so that the search speed can be improved by preferentially adopting the one with fast response. Furthermore, since each computer holds the same record, search results can be obtained from other computers even if one of the computers is down.
<実施の形態1>
図1は、本発明の実施形態1に係る分散データベースシステム1000の構成図である。分散データベースシステム1000は、複数のDB(DataBase)コンピュータによって構成されたデータベースシステムである。図1においては、3つのDBコンピュータ100a〜100cを有する例を示した。各DBコンピュータは同じ構成を備えるので、以下では主にDBコンピュータ100aについて説明する。各コンピュータおよびその構成要素を区別するときは、アルファベットの添え字を用いる。
<
FIG. 1 is a configuration diagram of a
DBコンピュータ100aは、CPU(Central Processing Unit)110a、DBMS(DataBase Management System)111aを備える。
The DB
CPU110aは、DBMS111aを実行する演算装置である。DBMS111aはデータベースを実装するプログラムである。DBMS111aは、例えばレコード操作や検索クエリに対する応答などデータベースが備えるべき機能を実装している。図1においてDBMS111aは、3つのデータベースDB210〜230を提供している。データベース210〜230は、それぞれ異なるレコードを保持する。各DBコンピュータが有しているDB210〜230は、それぞれ他のDBコンピュータが有しているDB210〜230のコピーである。
The
分散データベースシステム1000はさらに、検索コンピュータ300を有する。検索コンピュータ300は、CPU310と検索プログラム311を備える。CPU310は検索プログラム311を実行する。検索プログラム311は、分散データベースシステム1000を構成する各データベースに対して検索クエリを発行する処理を実装している。検索プログラム311の動作については後述する。
The
以下では記載の便宜上、各プログラムを動作主体として説明する場合があるが、実際にこれらプログラムを実行するのは当該プログラムを搭載したコンピュータが備えるCPUなどの演算装置であることを付言しておく。 In the following description, for convenience of description, each program may be described as an operation subject. However, it is noted that the program is actually executed by an arithmetic unit such as a CPU provided in a computer on which the program is installed.
図2は、検索コンピュータ300が検索クエリを発行する手順を説明する図である。ユーザは、例えば検索キーワードを指定した上で、検索クエリを発行するように検索コンピュータ300へ指示する。検索プログラム311は、その指示にしたがって以下の手順により検索クエリを発行する。
FIG. 2 is a diagram illustrating a procedure in which the
(図2:ステップ(1):DBコンピュータ100aに対する検索)
検索プログラム311は、指定された検索キーワードにしたがって、DBコンピュータ100aが備える各データベースを(i)DB210、(ii)DB220、(iii)DB230、の順番で検索するよう要求する検索クエリをDBコンピュータ100aに対して発行する。
(FIG. 2: Step (1): Search for DB
The
(図2:ステップ(1):DBコンピュータ100bに対する検索)
検索プログラム311は、DBコンピュータ100aに対して発行する検索クエリと並行して、DBコンピュータ100bに対する同様の検索クエリを発行する。ただし各データベースを検索する順序は、DBコンピュータ100aに対する検索クエリとは異なるようにする。ここでは(i)DB220、(ii)DB230、(iii)DB210、の順番で検索するものとする。
(FIG. 2: Step (1): Search for DB
The
(図2:ステップ(1):DBコンピュータ100cに対する検索)
検索プログラム311は、DBコンピュータ100aおよび100bに対して発行する検索クエリと並行して、DBコンピュータ100cに対する同様の検索クエリを発行する。ただし各データベースを検索する順序は、DBコンピュータ100aに対する検索クエリとは異なり、さらにDBコンピュータ100bに対する検索クエリとも異なるようにする。ここでは(i)DB230、(ii)DB210、(iii)DB220、の順番に検索するものとする。
(FIG. 2: Step (1): Search for
The
(図2:ステップ(1):補足)
検索プログラム311は、必ずしも厳密に各DBコンピュータに対して同時に検索クエリを発行する必要はない。すなわち、あるDBコンピュータに対する検索クエリの応答が完了するよりも前にその他DBコンピュータに対して検索クエリを発行すればよい。
(Figure 2: Step (1): Supplement)
The
図3は、検索コンピュータ300が検索クエリに対する応答を処理する手順を説明する図である。検索プログラム311は、以下の手順により検索クエリに対する応答を処理する。
FIG. 3 is a diagram illustrating a procedure in which the
(図3:ステップ(2):DB210に対する検索結果)
各DBコンピュータは、検索クエリに対する応答を検索コンピュータ300に対して送信する。ここではまず、DB210に対する検索クエリの応答について説明する。各DBコンピュータは、自身の演算負荷状況などに応じて検索クエリを処理するので、各データベースに対する検索を完了するまでに要する時間はそれぞれ異なる。ただし一般的には、最初に検索クエリを受信したデータベースに対する応答が最も速く得られると思われる。図2〜図3に示す例においては、DBコンピュータ100a〜100cのなかでDBコンピュータ100aがDB210に対する検索クエリを最初に受け取るので、DBコンピュータ100aがDB210に対する検索クエリの応答を最初に送信するものと仮定した。
(FIG. 3: Step (2): Search result for DB 210)
Each DB computer transmits a response to the search query to the
(図3:ステップ(3):100aからの結果を採用)
検索プログラム311は、DB210に対する検索クエリの(有効な)応答として最初に受け取ったものを、同DBに対する検索クエリの応答として採用する。ここではDBコンピュータ100aから受信した検索結果を、DB210に対する検索結果として採用することになる。
(Figure 3: Step (3): Adopt the result from 100a)
The
(図3:ステップ(3):補足)
本ステップにおいて、DBコンピュータ100aから取得した応答から検索結果が得られない場合は、有効な応答として取り扱わないこととする。例えば単にDB210へ接続できなかった旨の応答はDB210に対する検索結果を含んでいないので、検索クエリの応答としては採用しない。
(Figure 3: Step (3): Supplement)
In this step, when a search result cannot be obtained from the response acquired from the
(図3:ステップ(4):DB210に対する検索をキャンセル)
検索プログラム311は、DBコンピュータ100bと100cに対して発行した検索クエリのうち、DB210に対するものをキャンセルする。DB210に対する検索クエリの結果は既に得られたので、同じレコードを有するデータベースをさらに検索する必要はないからである。
(FIG. 3: Step (4): Cancel search for DB 210)
The
(図3:ステップ(4):補足その1)
本ステップにおいてDBコンピュータ100bと100cに対する検索クエリをキャンセルすることにより、これらコンピュータの演算負荷を抑制することができる。ただし演算負荷があまり問題にならないのであれば、検索プログラム311は検索クエリをキャンセルするための別命令を改めて発行することに代えて、単に重複した検索結果を受信後に破棄することにより、検索クエリに対するアウトプットという観点からは当該検索クエリを実質的にキャンセルしたものとして取り扱うことができる。
(Figure 3: Step (4): Supplement 1)
By canceling the search query for the
(図3:ステップ(4):補足その2)
既に発行した検索クエリをキャンセルする手段は、データベース管理システムによって異なる。例えば検索クエリを発行する際にそのクエリのIDをDBMSからあらかじめ受け取っておき、そのIDを指定してキャンセル指示を改めて送信する、などの手法が考えられる。
(Figure 3: Step (4): Supplement 2)
The means for canceling a search query that has already been issued differs depending on the database management system. For example, when issuing a search query, a method is conceivable in which the ID of the query is received from the DBMS in advance, and the ID is specified and a cancel instruction is transmitted again.
(図3:ステップ(2)〜(4):補足)
検索プログラム311は、DB220〜230に対する検索クエリについても上記と同様に処理する。すなわち、検索クエリに対する応答として最初に受け取ったものを採用するとともに、その応答を送信したDBコンピュータ以外については先に送信した検索クエリをキャンセル(または検索結果を破棄)する。
(FIG. 3: Steps (2) to (4): Supplement)
The
<実施の形態1:まとめ>
本実施形態1に係る分散データベースシステム1000は、各DBコンピュータがそれぞれ異なるレコードを保持するDB210〜230のコピーを有し、各DBコンピュータに対してそれぞれ異なる順序でDB210〜230を検索するように構成された検索クエリを並行的に発行する。これにより、DBコンピュータ100a〜100cのうちいずれかがダウンするなどにより検索を実施できない場合であっても、その他DBコンピュータから検索結果を得ることができる。
<Embodiment 1: Summary>
The distributed
本実施形態1に係る分散データベースシステム1000は、各DBコンピュータが有するDBに対する検索クエリのうち最初に受け取ったものをそのDBに対する検索結果として採用するとともに、その他DBコンピュータが有する同DBに対する検索クエリをキャンセルする。これにより、検索結果をできる限り早く得るとともに、各DBコンピュータに対して過剰な検索負荷を課すことを抑制できる。
The distributed
<実施の形態2>
実施形態1において、例えばDB210に対する検索クエリの応答をDBコンピュータ100aが最初に送信することが所定回数または所定時間連続した場合、その後もDBコンピュータ100aはDB210に対する検索クエリの応答を最初に送信するであろうと想定される。かかる場合においてDBコンピュータ100bと100cに対してDB210を検索する処理負荷を課すことは、処理効率の観点から望ましくない。
<Embodiment 2>
In the first embodiment, for example, when the
そこでかかる場合には、DBコンピュータ100bと100cに対してはDB210を検索するクエリを送信しないか、または少なくともDB210を検索する順序を現状よりも早めることが望ましいと考えられる。本発明の実施形態2ではその1動作例について説明する。
In such a case, it may be desirable not to transmit a query for searching the
図4は、本実施形態2において検索コンピュータ300が検索クエリを発行する手順を説明する図である。図4の前提として、上述したようにDB210に対する検索クエリの応答をDBコンピュータ100aが最初に送信することが所定回数または所定時間連続したものと仮定する。例えば10回連続して、または1時間にわたって継続して、DBコンピュータ100aが最初にDB210に対する検索クエリの応答を返信したものと仮定する。
FIG. 4 is a diagram illustrating a procedure for the
検索プログラム311は当初、DBコンピュータ100bに対して発行する検索クエリにおいては、DB210を最後に検索することとしている。しかしDBコンピュータ100aが最初に応答する可能性が高いことに鑑みると、DB210を最後に検索するクエリを発行しても後にキャンセルすることになる蓋然性が高いと考えられる。そこで検索プログラム311は、以後DBコンピュータ100bに対して発行する検索クエリにおいては、DB210を検索する順序を早める。
The
図2に示す例においては、DBコンピュータ100bはDB210を3番目に検索していたところ、図4においては2番目に検索するように検索順序を変更している。これにより例えばDBコンピュータ100aの負荷が増して応答性能が低下した際には、DBコンピュータ100bが最初にDB210に関する検索結果を送信する可能性が高まる。したがってDBコンピュータ100bがDB210を検索するようリクエストすることは、必ずしも無駄な負荷を課すものではなく、分散データベースシステム1000全体の検索効率を高めるための処理として有用となる。
In the example shown in FIG. 2, the
なおDBコンピュータ100cは従前よりDB210を2番目に検索しているので、DB210に対する検索順序を変更する必要はない。
Since the
図5は、本実施形態2において検索コンピュータ300が検索クエリを発行する別手順を説明する図である。図4においてDBコンピュータ100bはDB210を2番目に検索しているが、DBコンピュータ100aからDB210に関する検索結果が得られることがほぼ確実である場合、DBコンピュータ100bはDB210を検索しないようにしてもよい。したがって図5において、DBコンピュータ100bはDB220〜DB230の順で検索を実施するよう指定することとした。
FIG. 5 is a diagram illustrating another procedure in which the
DBコンピュータ100aの負荷が急激に高まるか、またはダウンする可能性もある。そこで図5に示す例において、DBコンピュータ100cは従前同様の順序で検索を実施することとした。
There is also a possibility that the load on the
上記例においては、DBコンピュータ100aがDB210に関する検索結果を最初に送信する例を示したが、その他DBコンピュータおよびその他DBについても同様の基準により検索順序を変更することができる。
In the above example, the
<実施の形態2:まとめ>
本実施形態2に係る分散データベースシステム1000は、いずれかのDBに関する検索結果を特定のDBコンピュータが最初に送信することが連続した場合は、その他DBコンピュータが当該DBを検索する順序を変更する。これにより、当該DBを検索するための余剰な処理負荷を削減することができる。
<Embodiment 2: Summary>
In the distributed
<本発明の変形例について>
本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換える事が可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について他の構成の追加・削除・置換をすることができる。
<Modification of the present invention>
The present invention is not limited to the above-described embodiments, and includes various modifications. For example, the above-described embodiments have been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. Further, a part of the configuration of a certain embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of a certain embodiment. In addition, it is possible to add, delete, and replace other configurations for a part of the configuration of each embodiment.
以上の実施形態において、分散データベースシステム1000は3台のDBコンピュータがそれぞれ3つのDBを有しているが、DBコンピュータの台数およびDBの個数はこれらに限られるものではない。少なくとも2台のDBコンピュータと2つのDBを含む分散データベースシステムであれば、本発明を適用することができる。
In the above embodiment, the distributed
以上の実施形態において、分散データベースシステム1000を構成する各DBは、関係データベースでもよいしキーバリューストア型データベースでもよい。その他種類のデータベース(例えばオブジェクト指向データベース)でもよい。
In the above embodiment, each DB constituting the distributed
各DBコンピュータが同じデータベースのコピーを保持していれば本発明を適用することができるので、各DBMSの種類は必ずしも同一でなくともよい。例えばDB210が関係データベースであり、DB220がキーバリューストア型データベースであってもよい。
Since each DB computer holds a copy of the same database, the present invention can be applied, so the types of DBMSs do not necessarily have to be the same. For example, the
100a〜100c:DBコンピュータ、300:検索コンピュータ、311:検索プログラム、1000:分散データベースシステム。 100a to 100c: DB computer, 300: search computer, 311: search program, 1000: distributed database system.
Claims (2)
第1データベースを有するとともに、前記第1データベースが保持するものとは異なるレコードを保持する第2データベースを有する、第1コンピュータ、
前記第1および第2データベースそれぞれのコピーを有する第2コンピュータ、
前記分散データベースシステムが保持するレコードに対して検索クエリを発行する検索コンピュータ、
を有し、
前記検索コンピュータは、前記第1コンピュータに対して、前記第1データベースを検索した後に前記第2データベースを検索するように構成された第1順序で、前記検索クエリを発行し、
前記検索コンピュータはさらに、前記第1コンピュータに対して前記検索クエリを発行することと並行して、前記第1順序とは異なる順序で前記第1および第2データベースそれぞれのコピーを検索するように構成された第2順序で、前記検索クエリを発行し、
前記検索コンピュータは、前記第1データベースまたはそのコピーに対する前記検索クエリの応答のうち最初に受け取ったものを採用するとともに、その送信元以外に対して送信した前記第1データベースまたはそのコピーに対する前記検索クエリをキャンセルし、さらに前記第2データベースまたはそのコピーに対する前記検索クエリの応答のうち最初に受け取ったものを採用するとともに、その送信元以外に対して送信した前記第2データベースまたはそのコピーに対する前記検索クエリをキャンセルし、
前記第1データベースまたはそのコピーに対する前記検索クエリの応答と、前記第2データベースまたはそのコピーに対する前記検索クエリの応答とを結合することにより、前記第1および第2データベースに対する前記検索クエリの結果を取得する
ことを特徴とする分散データベースシステム。 A distributed database system composed of a plurality of databases each holding different records,
A first computer having a first database and having a second database holding records different from those held by the first database;
A second computer having a copy of each of the first and second databases;
A search computer that issues a search query to records held by the distributed database system;
Have
The search computer issues the search query to the first computer in a first order configured to search the second database after searching the first database;
The search computer is further configured to search for a copy of each of the first and second databases in an order different from the first order in parallel with issuing the search query to the first computer. Issued the search query in the second order
The search computer employs the first response received from the search query response to the first database or a copy thereof, and the search query for the first database or the copy transmitted to a source other than the transmission source. And the search query for the second database or its copy sent to other than the sender is adopted, and the first received response of the search query to the second database or its copy is adopted. Cancel the
Obtaining the search query results for the first and second databases by combining the search query response for the first database or a copy thereof and the search query response for the second database or a copy thereof. A distributed database system characterized by
ことを特徴とする請求項1記載の分散データベースシステム。 The search computer issues the search query to the second computer thereafter when the first response to the search query for the first database is received from the first computer for a predetermined number of times or for a predetermined time. 2. The distributed database system according to claim 1, wherein the order of searching for the copy of the second database is made earlier than the order in the second order, or the copy of the second database is not searched. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015147089A JP2017027471A (en) | 2015-07-24 | 2015-07-24 | Distribution database system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015147089A JP2017027471A (en) | 2015-07-24 | 2015-07-24 | Distribution database system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2017027471A true JP2017027471A (en) | 2017-02-02 |
Family
ID=57946640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015147089A Pending JP2017027471A (en) | 2015-07-24 | 2015-07-24 | Distribution database system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2017027471A (en) |
-
2015
- 2015-07-24 JP JP2015147089A patent/JP2017027471A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11281669B2 (en) | Parallel processing database system | |
US11163809B2 (en) | Management of a database system | |
US20110179002A1 (en) | System and Method for a Vector-Space Search Engine | |
US10558702B2 (en) | Unified storage system for online image searching and offline image analytics | |
US9424311B2 (en) | Query routing based on complexity class determination | |
US9424291B2 (en) | Efficient multi-tenant spatial and relational indexing | |
US9928178B1 (en) | Memory-efficient management of computer network resources | |
US9229961B2 (en) | Database management delete efficiency | |
US10409800B2 (en) | Priority queue for exclusive locks | |
US10540353B2 (en) | Autonomic caching for in memory data grid query processing | |
US9378235B2 (en) | Management of updates in a database system | |
US20150358383A1 (en) | Odbc access to external services | |
US9229969B2 (en) | Management of searches in a database system | |
CN105574010B (en) | Data query method and device | |
US20230214391A1 (en) | Metadata search via n-gram index | |
Deka | NoSQL web crawler application | |
JP2017027471A (en) | Distribution database system | |
US9996589B2 (en) | Holistic federated ranking algorithm | |
US10313438B1 (en) | Partitioned key-value store with one-sided communications for secondary global key lookup by range-knowledgeable clients | |
US9692633B2 (en) | Role-based resource navigation | |
US8645316B2 (en) | Storing records in databases in a randomized manner to effectively utilize database servers |