Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7654585B2 - Database system and data management method - Google Patents
[go: Go Back, main page]

JP7654585B2 - Database system and data management method - Google Patents

Database system and data management method Download PDF

Info

Publication number
JP7654585B2
JP7654585B2 JP2022037646A JP2022037646A JP7654585B2 JP 7654585 B2 JP7654585 B2 JP 7654585B2 JP 2022037646 A JP2022037646 A JP 2022037646A JP 2022037646 A JP2022037646 A JP 2022037646A JP 7654585 B2 JP7654585 B2 JP 7654585B2
Authority
JP
Japan
Prior art keywords
data
stored
area
database
management unit
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.)
Active
Application number
JP2022037646A
Other languages
Japanese (ja)
Other versions
JP2023132379A (en
Inventor
聡 渡辺
能毅 黒川
記史 西川
和彦 茂木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2022037646A priority Critical patent/JP7654585B2/en
Publication of JP2023132379A publication Critical patent/JP2023132379A/en
Application granted granted Critical
Publication of JP7654585B2 publication Critical patent/JP7654585B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、データベースシステム及びデータ管理方法に関する。 The present invention relates to a database system and a data management method.

コンピュータシステムにおいて、データを管理する方法として、データベース(DB)が広く用いられている。データベースにおいて、広く用いられる方式として、リレーショナルデータベース(Relational DB(RDB))がある。リレーショナルデータベースにおいては、データは表形式で管理され、データのアクセスには、SQL言語が利用される。 In computer systems, databases (DBs) are widely used as a method for managing data. A widely used method for databases is the relational database (Relational DB (RDB)). In a relational database, data is managed in a tabular format, and the SQL language is used to access the data.

近年、コンピュータリソースを共有するクラウドシステムにおいて動作するリレーショナルデータベース(RDB)が普及している。クラウドシステムにおいては、データはオブジェクトストレージに格納される。オブジェクトストレージは、データをオブジェクトに分割し、データの入出力を行うストレージである。オブジェクトストレージの特徴としては、データの入出力に要する時間が長い点があげられる。データの入出力に要する時間は、オブジェクトストレージに対して読み書きするオブジェクトの個数に応じて増大する。 In recent years, relational databases (RDBs) that operate in cloud systems that share computer resources have become widespread. In cloud systems, data is stored in object storage. Object storage is a type of storage that divides data into objects and inputs and outputs the data. One characteristic of object storage is the long time it takes to input and output data. The time required to input and output data increases depending on the number of objects that are read and written to the object storage.

オブジェクトストレージをデータベースシステムに適用する技術としては特許文献1がある。また、データの入出力を高速化するための研究としては特許文献2がある。 Patent Document 1 describes a technology for applying object storage to a database system. Patent Document 2 describes research into accelerating data input and output.

特許第6730189号公報Patent No. 6730189 特許第4095840号公報Patent No. 4095840

オブジェクトストレージを利用するデータベースシステムにおいて、オブジェクトの入出力回数を削減し、データの入出力に要する時間を短縮することが求められている。しかしながら、上記技術(特許文献1及び特許文献2)は、オブジェクトの入出力回数を削減し、データの入出力に要する時間を短縮する技術ではない。 In database systems that use object storage, there is a demand for reducing the number of object input/output operations and shortening the time required for data input/output. However, the above technologies (Patent Documents 1 and 2) are not technologies that reduce the number of object input/output operations and shorten the time required for data input/output.

本発明は上記課題を解決するためになされた。即ち、本発明の目的の一つは、データの入出力に要する時間を短縮できるデータベースシステム及びデータ管理方法を提供することにある。 The present invention has been made to solve the above problems. That is, one of the objects of the present invention is to provide a database system and a data management method that can reduce the time required for data input and output.

上記課題を解決するために、本発明のデータベースシステムは、テーブルを含むデータベースが構築されたデータベースシステムであって、前記データベースを管理するデータ管理部を含む計算機と、オブジェクトストレージと、を備え、前記データ管理部は、前記データベースの前記テーブルのデータを含む第一のデータ領域と、前記第一のデータ領域に対応し、前記テーブルのデータの更新に伴って更新される第一の管理データを含む第二のデータ領域と、が格納された第一のオブジェクトを、前記オブジェクトストレージに格納し、前記テーブルに関する第二の管理データであって、前記テーブルのデータの更新に伴って更新されない前記第二の管理データを含む第三のデータ領域が格納された第二のオブジェクトを、前記オブジェクトストレージに格納する、ように構成されている。 In order to solve the above problem, the database system of the present invention is a database system in which a database including a table is constructed, and includes a computer including a data management unit that manages the database, and an object storage, and the data management unit is configured to store in the object storage a first object in which a first data area including data of the table of the database and a second data area including first management data corresponding to the first data area and updated in conjunction with updates to the data of the table are stored, and to store in the object storage a second object in which a third data area including second management data related to the table and the second management data that is not updated in conjunction with updates to the data of the table are stored.

本発明のデータ管理方法は、テーブルを含むデータベースが構築されたデータベースシステムにおいて、前記データベースを管理するデータ管理部を含む計算機と、オブジェクトストレージと、を用いたデータ管理方法であって、前記データ管理部が、前記データベースの前記テーブルのデータを含む第一のデータ領域と、前記第一のデータ領域に対応し、前記テーブルのデータの更新に伴って更新される第一の管理データを含む第二のデータ領域と、が格納された第一のオブジェクトを、前記オブジェクトストレージに格納し、前記テーブルに関する第二の管理データであって、前記テーブルのデータの更新に伴って更新されない前記第二の管理データを含む第三のデータ領域が格納された第二のオブジェクトを、前記オブジェクトストレージに格納する。 The data management method of the present invention is a data management method using a computer including a data management unit that manages a database in a database system in which a database including a table is constructed, and an object storage, in which the data management unit stores in the object storage a first object in which a first data area that includes data of the table of the database and a second data area that corresponds to the first data area and includes first management data that is updated in conjunction with updates to the data of the table, and stores in the object storage a second object in which a third data area that includes second management data related to the table and that is not updated in conjunction with updates to the data of the table is stored.

本発明のデータベースシステムは、テーブルを含むデータベースを管理するデータ管理部と、メモリと、を含む計算機と、を備え、前記データベースを格納するオブジェクトストレージに接続されたデータベースシステムにおいて、前記データ管理部は、前記データベースのデータを前記メモリの領域上で更新して管理するとともに、前記メモリから前記オブジェクトストレージへの格納及び前記オブジェクトストレージから前記メモリへの読み出しを行い、前記データベースのデータは、前記データベースの前記テーブルのデータを含む第一のデータ領域と、前記第一のデータ領域に対応し、前記テーブルのデータの更新に伴って更新される第一の管理データを含む第二のデータ領域と、が格納された第一のオブジェクトと、前記テーブルに関する第二の管理データであって、前記テーブルのデータの更新に伴って更新されない前記第二の管理データを含む第三のデータ領域が格納された第二のオブジェクトと、を含み、前記メモリは、アクセス履歴に基づいてデータを削除するLRU管理を行う第一のキャッシュ領域と、前記LRU管理を行わない第二のキャッシュ領域とを有し、前記データ管理部は、前記第一のオブジェクトを前記第一のキャッシュ領域で管理し、前記第二のオブジェクトを前記第二のキャッシュ領域で管理することを特徴とする。 The database system of the present invention comprises a computer including a data management unit that manages a database including a table and a memory, and is connected to an object storage that stores the database. The data management unit updates and manages the data of the database in an area of the memory, and stores the data from the memory to the object storage and reads the data from the object storage to the memory. The data of the database includes a first object in which a first data area that includes the data of the table of the database and a second data area that corresponds to the first data area and includes first management data that is updated with updates to the data of the table, and a second object in which a third data area that includes second management data related to the table and is not updated with updates to the data of the table is stored. The memory has a first cache area that performs LRU management to delete data based on access history, and a second cache area that does not perform the LRU management. The data management unit manages the first object in the first cache area and manages the second object in the second cache area.

本発明によれば、データの入出力に要する時間を短縮できる。 The present invention can reduce the time required for data input and output.

図1は本発明の実施形態に係るデータベースシステムの構成例を示す概略構成図である。FIG. 1 is a schematic diagram showing an example of the configuration of a database system according to an embodiment of the present invention. 図2は第一のオブジェクトに格納されたデータの一例を説明するための図である。FIG. 2 is a diagram for explaining an example of data stored in a first object. 図3は第二のオブジェクトに格納されたデータの一例を説明するための図である。FIG. 3 is a diagram for explaining an example of data stored in the second object. 図4はオブジェクト管理テーブルの一例を説明するための図である。FIG. 4 is a diagram for explaining an example of an object management table. 図5はストレージ領域管理テーブルの一例を説明するための図である。FIG. 5 is a diagram for explaining an example of a storage area management table. 図6はインポートデータの一例を説明するための図である。FIG. 6 is a diagram for explaining an example of the import data. 図7はインポート制御情報の一例を説明するための図である。FIG. 7 is a diagram for explaining an example of the import control information. 図8は主ノードのデータインポート機能が実行する動作フローを示すフローチャートである。FIG. 8 is a flow chart showing the operational flow executed by the data import function of the main node. 図9はデータ検索機能が受信する検索クエリの一例を説明するための図である。FIG. 9 is a diagram for explaining an example of a search query received by the data search function. 図10は主ノードのデータ検索機能が実行する動作フローを示すフローチャートである。FIG. 10 is a flow chart showing the operational flow executed by the data search function of the main node. 図11は副ノードの副ノードデータ検索機能が実行する動作フローを示すフローチャートである。FIG. 11 is a flow chart showing the operation flow executed by the sub-node data search function of the sub-node. 図12は主ノードのデータ更新機能が受信する更新クエリの例を説明するための図である。FIG. 12 is a diagram for explaining an example of an update query received by the data updating function of the main node. 図13は主ノードのデータ更新機能が実行する動作フローの一例を説明するための図である。FIG. 13 is a diagram for explaining an example of an operational flow executed by the data updating function of the main node. 図14は主ノードのキャッシュ無効化機能が実行する動作フローの一例を説明するための図である。FIG. 14 is a diagram for explaining an example of an operation flow executed by the cache invalidation function of the main node. 図15は副ノードの副ノードキャッシュ無効化機能が実行する動作フローの一例を説明するための図である。FIG. 15 is a diagram for explaining an example of an operational flow executed by the sub-node cache invalidation function of the sub-node.

以下、本発明の実施形態について図面を参照しながら説明する。以下の説明では、識別情報について説明する際、「ID」、「名称」等の表現を用いるが、これらについてはお互いに置換が可能である。また、以下の説明では、機能ブロックを主語として処理を説明する場合があるが、処理の主語が、機能ブロックに代えて、CPUとされてもよい。同様に、機能ブロックを実行して行う処理の主体が、システム、計算機、ノードなどであってもよい。また、以下の説明では、「テーブル」、「レコード」等の表現にて各種情報を説明することがあるが、各種情報は、これら以外のデータ構造で表現されてもよい。 Below, an embodiment of the present invention will be described with reference to the drawings. In the following description, when describing identification information, expressions such as "ID" and "name" are used, but these are interchangeable. In addition, in the following description, processing may be described with a functional block as the subject, but the subject of the processing may be the CPU instead of the functional block. Similarly, the subject of processing performed by executing a functional block may be a system, a computer, a node, etc. In addition, in the following description, various information may be described with expressions such as "table" and "record", but the various information may be expressed in data structures other than these.

<<実施形態>>
図1に示すように、本発明の実施形態に係るデータベースシステムは、主ノード101と、副ノード117と、オブジェクトストレージ114とを含む。これらは、ネットワーク113を介して、データ(情報)を互いに送受信可能に構成されている。
<<Embodiment>>
1, a database system according to an embodiment of the present invention includes a main node 101, a sub node 117, and an object storage 114. These are configured to be able to transmit and receive data (information) to and from each other via a network 113.

主ノード101は、計算機(サーバ)であり、メモリ102aと、CPU111aと、ストレージ装置112aとを含む。なお、計算機は、物理計算機であっても、仮想計算機であってもよい。これらは、バス110aを介して接続されている。なお、主ノード101は、図示しない外部(例えば、外部の端末など)とデータ(情報)を互いに送受信可能に接続されている。メモリ102aは、ソフトウェアとしてのデータベース103aと、キャッシュ領域としての第一のキャッシュ領域108a及び第二のキャッシュ領域109bと、を含む。データベース103aは、データベースシステムにおいて、データベースを実現(構築)するためのソフトウェア(データベースソフト)であり、便宜上、「データ管理部」とも称呼される。 The main node 101 is a computer (server) and includes a memory 102a, a CPU 111a, and a storage device 112a. The computer may be a physical computer or a virtual computer. These are connected via a bus 110a. The main node 101 is connected to an external device (not shown) (e.g., an external terminal) so that data (information) can be sent and received between them. The memory 102a includes a database 103a as software, and a first cache area 108a and a second cache area 109b as cache areas. The database 103a is software (database software) for realizing (constructing) a database in a database system, and is also referred to as the "data management unit" for convenience.

データベース103aは、データインポート機能104と、データ検索機能105と、データ更新機能106と、キャッシュ無効化機能107とを含む。なお、これらが実現する各機能については、後に詳述する。CPU111は、メモリ102aに格納された、データベース103aに含まれるプログラムを実行することにより、上記した各機能を実現する。ストレージ装置112aは、データの読み出し及び書き込み可能な不揮発性の記憶装置である。 The database 103a includes a data import function 104, a data search function 105, a data update function 106, and a cache invalidation function 107. The functions realized by these will be described in detail later. The CPU 111 realizes the above-mentioned functions by executing the programs contained in the database 103a stored in the memory 102a. The storage device 112a is a non-volatile storage device that can read and write data.

副ノード117は、計算機(サーバ)であり、メモリ102bと、CPU111bと、ストレージ装置112bとを含む。なお、計算機は、物理計算機であっても、仮想計算機であってもよい。これらは、バス110bを介して接続されている。メモリ102bは、ソフトウェアとしてのデータベース103bと、キャッシュ領域としての第一のキャッシュ領域108b及び第二のキャッシュ領域109bと、を含む。データベース103aは、データベースシステムにおいて、データベースを実現(構築)するためのソフトウェア(データベースソフト)であり、便宜上、「データ管理部」とも称呼される。 The secondary node 117 is a computer (server) and includes a memory 102b, a CPU 111b, and a storage device 112b. The computer may be a physical computer or a virtual computer. These are connected via a bus 110b. The memory 102b includes a database 103b as software, and a first cache area 108b and a second cache area 109b as cache areas. The database 103a is software (database software) for realizing (constructing) a database in a database system, and is also referred to as the "data management unit" for convenience.

データベース103bは、副ノードデータ検索機能118と、副ノードキャッシュ無効化機能119と、を含む。なお、これらが実現する各機能については、後に詳述する。CPU111は、メモリ102bに格納された、データベース103bに含まれるプログラムを実行することにより、上記した各機能を実現する。ストレージ装置112bは、データの読み出し及び書き込み可能な不揮発性の記憶装置である。 The database 103b includes a sub-node data search function 118 and a sub-node cache invalidation function 119. The functions realized by these will be described in detail later. The CPU 111 realizes the above-mentioned functions by executing the programs contained in the database 103b stored in the memory 102b. The storage device 112b is a non-volatile storage device that can read and write data.

オブジェクトストレージ114は、データをオブジェクトという単位で扱うストレージシステムである。オブジェクトは、データとオブジェクトIDを含むメタデータとを含む。オブジェクトIDは、オブジェクトを識別するための識別情報である。オブジェクトストレージ114には、オブジェクトとして、第一のオブジェクト115と、第二のオブジェクト116とが格納されている。なお、オブジェクトストレージ114は、例えば、「Amazon S3(Amazon Simple Storage Service)(登録商標)」のようなオブジェクトストレージサービスであってもよい。なお、第一のオブジェクト115及び第二のオブジェクト116の詳細は、後述する。 The object storage 114 is a storage system that handles data in units called objects. An object includes data and metadata including an object ID. The object ID is identification information for identifying an object. In the object storage 114, a first object 115 and a second object 116 are stored as objects. Note that the object storage 114 may be an object storage service such as "Amazon S3 (Amazon Simple Storage Service) (registered trademark)". Note that the first object 115 and the second object 116 will be described in detail later.

図2は第一のオブジェクト115に格納されたデータの一例を説明するための図である。オブジェクトストレージ114には、データベースのデータが、オブジェクトとして、格納される。本例のデータベースは、例えば、カラムストア形式のリレーショナルデータベースであり、表形式でデータが管理される。表は行と列とから構成されている。表の横方向は行と称呼され、縦方向は列と称呼される。データベースは、表形式のテーブルと管理データ(第一の管理データ及び第二の管理データ)と、を含む。 Figure 2 is a diagram illustrating an example of data stored in the first object 115. Database data is stored as an object in the object storage 114. The database in this example is, for example, a relational database in a column store format, and data is managed in a tabular format. A table is made up of rows and columns. The horizontal direction of a table is called a row, and the vertical direction is called a column. The database includes a table in a tabular format and management data (first management data and second management data).

データベースは、データが格納される論理的な領域である第一のデータ領域202、第二のデータ領域201及び第三のデータ領域301(後述の図3を参照。)を含む。 The database includes a first data area 202, a second data area 201, and a third data area 301 (see Figure 3 below), which are logical areas in which data is stored.

第一のデータ領域202及び第二のデータ領域201が、第一のオブジェクト115として、オブジェクトストレージ114に格納され、第三のデータ領域301が、第二のオブジェクト116として、オブジェクトストレージ114に格納される。 The first data area 202 and the second data area 201 are stored in the object storage 114 as a first object 115, and the third data area 301 is stored in the object storage 114 as a second object 116.

第一のデータ領域202は、ページ203という単位で構成される。ページ203には、テーブルの同列のデータが格納される。即ち、一つのページ203には、テーブルの同列の一部又は全部のデータが格納される。データベースの第一のデータ領域202は、テーブルの全ての行の全ての列が、一つの第一のオブジェクト115に対して定義された最大ページ数の範囲内に収まる場合、一つの第一のオブジェクト115に格納される。 The first data area 202 is composed of units called pages 203. Data of the same column of a table is stored in a page 203. In other words, one page 203 stores some or all of the data of the same column of a table. The first data area 202 of the database is stored in one first object 115 if all columns of all rows of the table fit within the range of the maximum number of pages defined for one first object 115.

第一のデータ領域202は、テーブルの全ての行の全ての列のデータが、一つの第一のオブジェクト115に対して定義された最大ページ数の範囲内に収まらない場合、複数の小領域に分割され、分割された複数の小領域のそれぞれは、複数の第一のオブジェクト115のそれぞれに格納される。なお、複数の小領域のそれぞれは、「分割された第一のデータ領域202」又は単に「第一のデータ領域202」とも称呼される場合がある。 If the data of all columns of all rows of the table does not fit within the range of the maximum number of pages defined for one first object 115, the first data area 202 is divided into multiple small areas, and each of the multiple divided small areas is stored in each of the multiple first objects 115. Each of the multiple small areas may also be referred to as a "divided first data area 202" or simply as a "first data area 202."

具体的に述べると、テーブルの全ての行の全ての列のデータが、一つの第一のオブジェクト115に対して定義された最大ページ数の範囲内に収まらない場合、第一のデータ領域202は、「表の複数の行(なお、一つの行であってもよい)及びこれらの行の全ての列の単位」で、複数の小領域に分割される。このとき、第一のデータ領域202は、分割後の小領域が一つの第一のオブジェクト115に対して定義された最大ページ数の範囲内に収まるように、分割される。そして、分割された複数の小領域(第一のデータ領域202)のそれぞれが、複数の第一のオブジェクト115のそれぞれに格納される。 Specifically, if the data of all columns of all rows of the table does not fit within the range of the maximum number of pages defined for one first object 115, the first data area 202 is divided into multiple small areas in units of "multiple rows of the table (which may be a single row) and all columns of these rows." At this time, the first data area 202 is divided so that the divided small areas each fit within the range of the maximum number of pages defined for one first object 115. Then, each of the multiple divided small areas (first data area 202) is stored in each of the multiple first objects 115.

第二のデータ領域201は、第一のデータ領域202に対応した第一の管理データを含む。第一の管理データは、例えば、インデクス、行削除フラグなどを含む。インデクスは、例えば、レンジインデクなどであり、第一のデータ領域202の各列の格納ページ範囲、各列の値域を示す情報などを含む。行削除フラグは、対応する行が削除された行であるとみなすことを示すフラグであり、その値が「1」である場合、対応する行が削除された行であるとみなすことを示し、その値が「0」である場合、そうではないことを示す。第一の管理データは、テーブルのデータの更新に伴い更新されるデータであり、対応する第一のデータ領域202に含まれるデータが更新された場合、その更新内容が反映されるように、更新される。 The second data area 201 includes first management data corresponding to the first data area 202. The first management data includes, for example, an index and a row deletion flag. The index is, for example, a range index, and includes information indicating the storage page range of each column of the first data area 202 and the value range of each column. The row deletion flag is a flag indicating that the corresponding row is considered to be a deleted row, and if its value is "1", it indicates that the corresponding row is considered to be a deleted row, and if its value is "0", it indicates that it is not. The first management data is data that is updated when the data in the table is updated, and when the data included in the corresponding first data area 202 is updated, it is updated to reflect the update contents.

なお、第一のデータ領域202が、複数の小領域に分割された場合、複数の小領域(第一のデータ領域202)のそれぞれに対応した第一の管理データを含む第二のデータ領域201が作成される。小領域(分割された第一のデータ領域202)と、小領域に対応する第一の管理データを含む第二のデータ領域201とが、第一のオブジェクト115に格納される。即ち、この場合、一つの第一のオブジェクトに115は、一つの小領域(分割された第一のデータ領域202)と、その小領域に対応する第二のデータ領域201とが、格納される。 When the first data area 202 is divided into multiple small areas, a second data area 201 is created that contains first management data corresponding to each of the multiple small areas (first data area 202). The small areas (divided first data area 202) and the second data area 201 that contains the first management data corresponding to the small areas are stored in the first object 115. That is, in this case, one first object 115 stores one small area (divided first data area 202) and the second data area 201 corresponding to that small area.

図3は第二のオブジェクト116に格納された第三のデータ領域301の一例を説明するための図である。第三のデータ領域301は、第二の管理データを含む。図3に示すように、第二の管理データは、テーブルが格納されたオブジェクトストレージ114のオブジェクトストレージ名と、そのオブジェクトストレージのオブジェクトストレージパスと、一つのオブジェクトに格納される最大ページ数と、テーブル名称と、テーブルの定義情報と、を含む。第二の管理データは、テーブルのデータの更新に伴い更新されない「テーブルに関するデータ」である。 Figure 3 is a diagram illustrating an example of a third data area 301 stored in a second object 116. The third data area 301 includes second management data. As shown in Figure 3, the second management data includes the object storage name of the object storage 114 in which the table is stored, the object storage path of the object storage, the maximum number of pages that can be stored in one object, the table name, and definition information for the table. The second management data is "data related to the table" that is not updated when the data in the table is updated.

図4はオブジェクト管理テーブルの一例を説明するための図である。オブジェクト管理テーブルTB1は、データインポート時に作成され、ストレージ装置112aに格納される。オブジェクト管理テーブルTB1は、オブジェクトが格納されたオブジェクトストレージ114のオブジェクトストレージ名と、オブジェクトストレージ114のオブジェクトストレージパスと、オブジェクトストレージ114に格納されたテーブルのテーブル名称と、オブジェクトストレージ114に格納されたオブジェクトのオブジェクトIDと、を含む。 Figure 4 is a diagram illustrating an example of an object management table. Object management table TB1 is created when data is imported and stored in storage device 112a. Object management table TB1 includes the object storage name of object storage 114 in which the object is stored, the object storage path of object storage 114, the table name of the table stored in object storage 114, and the object ID of the object stored in object storage 114.

図5はストレージ領域管理テーブルの一例を説明するための図である。ストレージ領域管理テーブルTB2は、主ノード101の第一のキャッシュ領域108a、第二のキャッシュ領域109a及びストレージ装置112a、並びに、副ノード117の第一のキャッシュ領域108b、第二のキャッシュ領域109b及びストレージ装置112bに格納されるオブジェクトの管理情報が格納されたテーブルである。ストレージ領域管理テーブルTB2は、ストレージ装置112a及びストレージ装置112bに格納されている。ストレージ領域管理テーブルTB2は、ストレージ領域名と、ストレージ領域名に対応するストレージ領域に格納されたオブジェクトのオブジェクトIDとを含む。 Figure 5 is a diagram for explaining an example of a storage area management table. Storage area management table TB2 is a table that stores management information of objects stored in the first cache area 108a, second cache area 109a, and storage device 112a of the main node 101, and the first cache area 108b, second cache area 109b, and storage device 112b of the secondary node 117. Storage area management table TB2 is stored in storage device 112a and storage device 112b. Storage area management table TB2 includes the storage area name and the object ID of the object stored in the storage area corresponding to the storage area name.

以下、上述したデータインポート機能104の詳細について、具体例を挙げて説明する。図6はインポートデータの一例を説明するための図である。図6に示すように、インポートデータ401は、データベースのテーブルに格納されるデータ(値)を含んでいる。図7はインポート制御情報の一例を説明するための図である。図7に示すように、インポート制御情報501は、インポートデータを格納する、オブジェクトストレージ114のオブジェクトストレージ名を示す情報と、オブジェクトストレージパスを示す情報と、一つのオブジェクト(第一のオブジェクト115)に格納する最大ページ数を示す情報と、テーブル名称を示す情報と、テーブル定義情報と、を含む。 The details of the data import function 104 described above will be explained below with a specific example. FIG. 6 is a diagram for explaining an example of import data. As shown in FIG. 6, the import data 401 includes data (values) to be stored in a table of a database. FIG. 7 is a diagram for explaining an example of import control information. As shown in FIG. 7, the import control information 501 includes information indicating the object storage name of the object storage 114 that stores the import data, information indicating the object storage path, information indicating the maximum number of pages to be stored in one object (first object 115), information indicating the table name, and table definition information.

図8はデータインポート機能104が実行する動作フロー(処理フロー)を示すフローチャートである。以下では、インポートデータ401が、一つの第一のオブジェクト115に対して定義された最大ページ数の範囲内に収まらない場合を前提として説明する。なお、インポートデータ401が、一つの第一のオブジェクト115に対して定義された最大ページ数の範囲内に収まる場合、ステップ803の処理が省略され、且つ、ステップ804の「各小領域」を「第一のデータ領域202」に読み替えたことのみ異なる処理を、ステップ804に代えて実行する。 Figure 8 is a flowchart showing the operation flow (processing flow) executed by the data import function 104. The following description is based on the assumption that the import data 401 does not fall within the range of the maximum number of pages defined for one first object 115. If the import data 401 falls within the range of the maximum number of pages defined for one first object 115, the processing of step 803 is omitted, and processing that differs only in that "each small area" in step 804 is replaced with "first data area 202" is executed instead of step 804.

データインポート機能104は、図8のステップ800から処理を開始して以下に述べるステップ801乃至ステップ807の処理を順に実行した後、ステップ808に進んで本動作フローを一旦終了する。 The data import function 104 starts processing from step 800 in FIG. 8, and executes the processing from step 801 to step 807 described below in order, and then proceeds to step 808 to temporarily end this operation flow.

ステップ801:データインポート機能104は、インポートデータ401及びインポート制御情報501を含む入力データを読み込む。 Step 801: The data import function 104 reads input data including the import data 401 and the import control information 501.

ステップ802:データインポート機能104は、インポートデータ401の各列のデータについて、第一のデータ領域202に格納するデータを生成する。 Step 802: The data import function 104 generates data to be stored in the first data area 202 for each column of data in the import data 401.

ステップ803:データインポート機能104は、データベースの第一のデータ領域202を小領域に分割する。具体的に述べると、データインポート機能104は、一つの「第一のオブジェクトに格納可能な最大ページ数」に収まるように、インポートデータ401の何行分の全列データを一つの第一のオブジェクトに入れるかを決めて、データベースの第一のデータ領域202を小領域に分割する。 Step 803: The data import function 104 divides the first data area 202 of the database into small areas. Specifically, the data import function 104 determines how many rows of all column data of the import data 401 to put into one first object so that it fits into one "maximum number of pages that can be stored in a first object," and divides the first data area 202 of the database into small areas.

ステップ804:データインポート機能104は、各小領域に対して、第二のデータ領域201を生成する。 Step 804: The data import function 104 generates a second data area 201 for each small area.

ステップ805:データインポート機能104は、第一のデータ領域202と対応する第二のデータ領域201をオブジェクトにまとめてオブジェクトストレージ114に格納する。第一のデータ領域202及び第二のデータ領域201は、分割された小領域毎に、一つの第一のオブジェクト115に格納される。 Step 805: The data import function 104 compiles the first data area 202 and the corresponding second data area 201 into an object and stores them in the object storage 114. The first data area 202 and the second data area 201 are stored in one first object 115 for each divided small area.

ステップ806:データインポート機能104は、インポート制御情報501に基づいて、データベースの第三のデータ領域301を生成する。 Step 806: The data import function 104 generates a third data area 301 of the database based on the import control information 501.

ステップ807:データインポート機能104は、第三のデータ領域301をオブジェクトに格納する。なお、データインポート機能104は、オブジェクト管理テーブルTB1を作成し、ストレージ装置112aに格納する。 Step 807: The data import function 104 stores the third data area 301 in an object. The data import function 104 creates an object management table TB1 and stores it in the storage device 112a.

以下、上述したデータ検索機能105の詳細について、具体例を挙げて説明する。図9はデータ検索機能105が受領する検索クエリの一例を説明するための図である。図9に示すように、検索クエリ901は、テーブルからデータを取得するためのSQL命令(「TABLEからAGEが30以上60以下のものを取得しなさいという命令」)を示している。 The details of the data search function 105 described above will be explained below with a specific example. FIG. 9 is a diagram for explaining an example of a search query received by the data search function 105. As shown in FIG. 9, a search query 901 indicates an SQL command for retrieving data from a table ("a command to retrieve from TABLE data with AGE between 30 and 60").

図10は主ノード101のデータ検索機能105が実行する動作フロー(処理フロー)を示すフローチャートである。 Figure 10 is a flowchart showing the operation flow (processing flow) executed by the data search function 105 of the main node 101.

データ検索機能105は、主ノード101が検索クエリ901を受信すると、図10のステップ1000から処理を開始してステップ1001に進み、ストレージ領域管理テーブルTB2を参照して、第二のオブジェクト116が第二のキャッシュ領域109aに格納されているか否かを判定する。 When the main node 101 receives the search query 901, the data search function 105 starts processing from step 1000 in FIG. 10 and proceeds to step 1001, where it refers to the storage area management table TB2 to determine whether the second object 116 is stored in the second cache area 109a.

第二のオブジェクト116が第二のキャッシュ領域109aに格納されていない場合、データ検索機能105はステップ1001にて「No」と判定してステップ1002に進み、第二のオブジェクト116を第二のキャッシュ領域109aに格納する。その後、データ検索機能105はステップ1003に進む。 If the second object 116 is not stored in the second cache area 109a, the data search function 105 determines "No" in step 1001 and proceeds to step 1002, where it stores the second object 116 in the second cache area 109a. After that, the data search function 105 proceeds to step 1003.

これに対して、第二のオブジェクト116が第二のキャッシュ領域109aに格納されている場合、データ検索機能105はステップ1001にて「Yes」と判定して、直接ステップ1003に進む。 In contrast, if the second object 116 is stored in the second cache area 109a, the data search function 105 determines "Yes" in step 1001 and proceeds directly to step 1003.

データ検索機能105は、ステップ1003に進むと、オブジェクト管理テーブルTB1を参照して、クエリ(検索クエリ901)を処理するために必要な第一のオブジェクト115のリストを作成し、以下に述べるステップ1004乃至ステップ1009の処理を順に実行した後、ステップ1010に進んで本動作フローを一旦終了する。 When the data search function 105 proceeds to step 1003, it references the object management table TB1 to create a list of the first objects 115 required to process the query (search query 901), and executes the processes of steps 1004 to 1009 described below in order, after which it proceeds to step 1010 and ends this operation flow for the time being.

ステップ1004:データ検索機能105は、作成したリストの一部を副ノード117の副ノードデータ検索機能118に通知する。 Step 1004: The data search function 105 notifies the sub-node data search function 118 of the sub-node 117 of part of the created list.

ステップ1005:データ検索機能105は、副ノード117に通知しなかった第一のオブジェクト115をストレージ領域(ストレージ装置112a)に読み込む。 Step 1005: The data search function 105 reads the first object 115 that has not been notified to the secondary node 117 into the storage area (storage device 112a).

ステップ1006:データ検索機能105は、ストレージ領域(ストレージ装置112b)に読み込んだ第一のオブジェクト115からクエリの実行に必要なページ203を第一のキャッシュ領域108aに読み込む。なお、ステップ1005及びステップ1006の処理では、データ検索機能105は、LRU(Least Recently Used)管理を行う。LRU管理のアルゴリズムに従って、容量が満杯になった場合に、最もアクセスされていないデータが削除され、新たなデータが追加される。第一のキャッシュ領域108aがLRU管理(LRU制御)されるのに対して、第二のキャッシュ領域109aでは追い出しが発生しないため、その分、第二のオブジェクト116の読み書き回数が削減される効果が得られる。 Step 1006: The data search function 105 reads the page 203 required to execute the query from the first object 115 read into the storage area (storage device 112b) into the first cache area 108a. In the processes of steps 1005 and 1006, the data search function 105 performs LRU (Least Recently Used) management. According to the LRU management algorithm, when the capacity becomes full, the least accessed data is deleted and new data is added. While the first cache area 108a is managed (LRU controlled), no eviction occurs in the second cache area 109a, which has the effect of reducing the number of reads and writes to the second object 116.

ステップ1007:データ検索機能105は、第一のキャッシュ領域108aに読み込んだデータを使用してクエリの処理を実行する。 Step 1007: The data search function 105 executes the query processing using the data read into the first cache area 108a.

ステップ1008:データ検索機能105は、副ノード117のクエリの処理結果を受領する。 Step 1008: The data search function 105 receives the query processing results from the subnode 117.

ステップ1009:データ検索機能105は、主ノード101及び副ノード117のクエリの処理結果をまとめて、クエリの処理結果を出力する。 Step 1009: The data search function 105 consolidates the query processing results of the main node 101 and the secondary node 117 and outputs the query processing results.

図11は副ノード117の副ノードデータ検索機能118が実行する動作フロー(処理フロー)を示すフローチャートである。副ノードデータ検索機能118は、図11のステップ1100から処理を開始してステップ1101に進み、ストレージ領域管理テーブルTB2を参照して、第二のオブジェクト116が第二のキャッシュ領域109bに格納されているか否かを判定する。 Figure 11 is a flowchart showing the operation flow (processing flow) executed by the sub-node data search function 118 of the sub-node 117. The sub-node data search function 118 starts processing at step 1100 in Figure 11, proceeds to step 1101, and refers to the storage area management table TB2 to determine whether the second object 116 is stored in the second cache area 109b.

第二のオブジェクト116が第二のキャッシュ領域109bに格納されていない場合、副ノードデータ検索機能118はステップ1101にて「No」と判定してステップ1102に進み、第二のオブジェクト116を第二のキャッシュ領域109bに格納する。その後、副ノードデータ検索機能118はステップ1105に進む。 If the second object 116 is not stored in the second cache area 109b, the sub-node data search function 118 determines "No" in step 1101 and proceeds to step 1102, where it stores the second object 116 in the second cache area 109b. After that, the sub-node data search function 118 proceeds to step 1105.

これに対して、第二のオブジェクト116が第二のキャッシュ領域109bに格納されている場合、副ノードデータ検索機能118はステップ1101にて「Yes」と判定して、直接ステップ1105に進む。 In contrast, if the second object 116 is stored in the second cache area 109b, the sub-node data search function 118 determines "Yes" in step 1101 and proceeds directly to step 1105.

副ノードデータ検索機能118は、ステップ1105に進むと、主ノード101から通知された第一のオブジェクト115をストレージ領域(ストレージ装置112b)に読み込む。 When the secondary node data search function 118 proceeds to step 1105, it reads the first object 115 notified by the primary node 101 into the storage area (storage device 112b).

その後、副ノードデータ検索機能118は、以下に述べるステップ1106乃至ステップ1108の処理を順に実行した後、ステップ1109に進んで本動作フローを一旦終了する。 Then, the sub-node data search function 118 executes the processes of steps 1106 to 1108 described below in order, and then proceeds to step 1109 to temporarily end this operation flow.

ステップ1106:副ノードデータ検索機能118は、ストレージ装置112b(ストレージ領域)に読み込んだ第一のオブジェクト115からクエリの実行に必要なページ203を第一のキャッシュ領域108bに読み込む。なお、ステップ1105及びステップ1106の処理では、データ検索機能105は、LRU管理を行う。LRU管理のアルゴリズムに従って、容量が満杯になった場合に、最もアクセスされていないデータが削除され、新たなデータが追加される。第一のキャッシュ領域108bがLRU管理(LRU制御)されるのに対して、第二のキャッシュ領域109bでは追い出しが発生しないため、その分、第二のオブジェクト116の読み書き回数が削減される効果が得られる。 Step 1106: The secondary node data search function 118 reads the page 203 required to execute the query from the first object 115 read into the storage device 112b (storage area) into the first cache area 108b. In the processing of steps 1105 and 1106, the data search function 105 performs LRU management. According to the LRU management algorithm, when the capacity becomes full, the least accessed data is deleted and new data is added. While the first cache area 108b is LRU managed (LRU controlled), no eviction occurs in the second cache area 109b, which has the effect of reducing the number of reads and writes to the second object 116.

ステップ1107:副ノードデータ検索機能118は、第一のキャッシュ領域108bに読み込んだデータを使用してクエリの処理を実行する。 Step 1107: The sub-node data search function 118 processes the query using the data read into the first cache area 108b.

ステップ1108:副ノードデータ検索機能118は、クエリの処理結果をデータ検索機能105に通知する。 Step 1108: The sub-node data search function 118 notifies the data search function 105 of the query processing results.

以下、上述したデータ更新機能106、キャッシュ無効化機能107及び副ノードキャッシュ無効化機能119の詳細について、具体例を挙げて説明する。図12はデータ更新機能が受信する更新クエリの例を説明するための図である。図12に示すように、更新クエリ1201は、テーブルのデータを更新するためのSQL命令(「TABLEからID=1の行を削除しなさいという命令」)を示している。 The details of the data update function 106, cache invalidation function 107, and sub-node cache invalidation function 119 described above will be explained below with specific examples. Figure 12 is a diagram for explaining an example of an update query received by the data update function. As shown in Figure 12, an update query 1201 indicates an SQL command for updating data in a table ("a command to delete the row with ID=1 from TABLE").

図13は主ノード101のデータ更新機能106が実行する動作フロー(処理フロー)を示すフローチャートである。 Figure 13 is a flowchart showing the operation flow (processing flow) executed by the data update function 106 of the main node 101.

データ更新機能106は、主ノード101が更新クエリ1201を受信すると、図13のステップ1300から処理を開始して以下に述べるステップ1301乃至ステップ1305の処理を順に実行した後、ステップ1306に進んで本動作フローを一旦終了する。 When the main node 101 receives the update query 1201, the data update function 106 starts processing from step 1300 in FIG. 13 and executes the processing from step 1301 to step 1305 described below in order, and then proceeds to step 1306 to temporarily end this operation flow.

ステップ1301:データ更新機能106は、データ検索機能105を使用して、更新対象の行が格納された更新対象の第一のオブジェクト115を特定する。 Step 1301: The data update function 106 uses the data search function 105 to identify the first object 115 to be updated in which the row to be updated is stored.

ステップ1302:データ更新機能106は、特定した第一のオブジェクト115をオブジェクトストレージ114から削除する。 Step 1302: The data update function 106 deletes the identified first object 115 from the object storage 114.

ステップ1303:データ更新機能106は、第一のオブジェクト115を更新した新たな第一のオブジェクト115を、オブジェクトストレージ114に格納する。なお、更新がDELETE処理を含む場合、データ更新機能106は、更新対象の第一のオブジェクト115の該当する行に対応する第二のデータ領域201の行削除フラグの値を「0」から「1」に変更し、新たな第一のオブジェクト115を作成する。 Step 1303: The data update function 106 stores the new first object 115 obtained by updating the first object 115 in the object storage 114. Note that if the update includes a DELETE process, the data update function 106 changes the value of the row deletion flag in the second data area 201 corresponding to the relevant row of the first object 115 to be updated from "0" to "1" and creates a new first object 115.

ステップ1304:データ更新機能106は、オブジェクトストレージ114から削除したオブジェクト(第一のオブジェクト115)を特定可能な情報(例えば、オブジェクトID)をキャッシュ無効化機能107に通知する。 Step 1304: The data update function 106 notifies the cache invalidation function 107 of information (e.g., object ID) that can identify the object (first object 115) that was deleted from the object storage 114.

ステップ1305:データ更新機能106は、キャッシュ無効機能107から処理の完了(オブジェクトの無効化の完了)を受領する。 Step 1305: The data update function 106 receives processing completion (object invalidation completion) from the cache invalidation function 107.

図14は主ノードのキャッシュ無効化機能107が実行する動作フロー(処理フロー)を示すフローチャートである。 Figure 14 is a flowchart showing the operation flow (processing flow) executed by the cache invalidation function 107 of the main node.

キャッシュ無効化機能107は、図14のステップ1400から処理を開始して以下に述べるステップ1401及びステップ1402の処理を順に実行した後、ステップ1403に進む。 The cache invalidation function 107 starts processing from step 1400 in FIG. 14, executes the processing of steps 1401 and 1402 described below in order, and then proceeds to step 1403.

ステップ1401:キャッシュ無効化機能107は、オブジェクトストレージ114から削除した第一のオブジェクト115を特定可能な情報(例えば、オブジェクトID)をデータ更新機能106から受領する。 Step 1401: The cache invalidation function 107 receives information (e.g., object ID) capable of identifying the first object 115 deleted from the object storage 114 from the data update function 106.

ステップ1402:キャッシュ無効化機能107は、受領した第一のオブジェクト115を特定可能な情報を副ノードキャッシュ無効化機能119に通知する。 Step 1402: The cache invalidation function 107 notifies the sub-node cache invalidation function 119 of information that can identify the received first object 115.

キャッシュ無効化機能107は、ステップ1403に進むと、ストレージ領域テーブルTB2を参照して、該当オブジェクト(即ち、第一のオブジェクト115を特定可能な情報が示すオブジェクト)がストレージ装置112aに格納されているか否かを判定する。 When the cache invalidation function 107 proceeds to step 1403, it refers to the storage area table TB2 to determine whether the relevant object (i.e., the object indicated by the information capable of identifying the first object 115) is stored in the storage device 112a.

該当オブジェクトがストレージ装置112aに格納されている場合、キャッシュ無効化機能107はステップ1403にて「Yes」と判定してステップ1404に進み、該当のオブジェクトをストレージ装置112aから削除した後、ステップ1405に進む。 If the object is stored in the storage device 112a, the cache invalidation function 107 judges "Yes" in step 1403 and proceeds to step 1404, where it deletes the object from the storage device 112a, and then proceeds to step 1405.

これに対して、該当オブジェクトがストレージ装置112aに格納されていない場合、キャッシュ無効化機能107はステップ1403にて「No」と判定してステップ1405に直接進む。 On the other hand, if the object in question is not stored in the storage device 112a, the cache invalidation function 107 determines "No" in step 1403 and proceeds directly to step 1405.

キャッシュ無効化機能107は、ステップ1405に進むと、ストレージ領域テーブルTB2を参照して、該当オブジェクトのページ203が第一のキャッシュ領域108aに格納されているか否かを判定する。 When the cache invalidation function 107 proceeds to step 1405, it refers to the storage area table TB2 to determine whether the page 203 of the object in question is stored in the first cache area 108a.

該当オブジェクトのページ203が第一のキャッシュ領域108aに格納されている場合、キャッシュ無効化機能107は、ステップ1405にて「Yes」と判定してステップ1406に進み、該当のページ203を第一のキャッシュ領域108aから削除した後、ステップ1407に進む。 If the page 203 of the object in question is stored in the first cache area 108a, the cache invalidation function 107 judges "Yes" in step 1405 and proceeds to step 1406, where it deletes the page 203 in question from the first cache area 108a, and then proceeds to step 1407.

これに対して、該当オブジェクトのページ203が第一のキャッシュ領域108aに格納されていない場合、キャッシュ無効化機能107は、ステップ1405にて「No」と判定してステップ1407に直接進む。 On the other hand, if the page 203 of the object in question is not stored in the first cache area 108a, the cache invalidation function 107 determines "No" in step 1405 and proceeds directly to step 1407.

キャッシュ無効化機能107は、ステップ1407に進むと、副ノードキャッシュ無効化機能119からの応答を待ち合わせる。その後、キャッシュ無効化機能107は、ステップ1408に進んで本動作フローを一旦終了する。 When the cache invalidation function 107 proceeds to step 1407, it waits for a response from the secondary node cache invalidation function 119. After that, the cache invalidation function 107 proceeds to step 1408 and temporarily ends this operation flow.

図15は副ノードキャッシュ無効化機能119が実行する動作フロー(処理フロー)を示すフローチャートである。 Figure 15 is a flowchart showing the operation flow (processing flow) executed by the sub-node cache invalidation function 119.

副ノードキャッシュ無効化機能119は、図15のステップ1500から処理を開始して以下に述べるステップ1501に進み、無効化対象の第一のオブジェクト115を特定可能な情報を受領した後、ステップ1502に進む。 The subnode cache invalidation function 119 starts processing at step 1500 in FIG. 15, proceeds to step 1501 described below, and after receiving information capable of identifying the first object 115 to be invalidated, proceeds to step 1502.

副ノードキャッシュ無効化機能119は、ステップ1502に進むと、ストレージ領域テーブルTB2を参照して、該当オブジェクト(即ち、無効化対象の第一のオブジェクト115を特定可能な情報が示すオブジェクト)がストレージ装置112bに格納されているか否かを判定する。 When the secondary node cache invalidation function 119 proceeds to step 1502, it refers to the storage area table TB2 to determine whether the relevant object (i.e., the object indicated by the information capable of identifying the first object 115 to be invalidated) is stored in the storage device 112b.

該当オブジェクトがストレージ装置112bに格納されている場合、副ノードキャッシュ無効化機能119は、ステップ1502にて「Yes」と判定してステップ1503に進み、該当のオブジェクトをストレージ装置112bから削除した後、ステップ1504に進む。 If the object is stored in storage device 112b, the secondary node cache invalidation function 119 judges "Yes" in step 1502 and proceeds to step 1503, where it deletes the object from storage device 112b, and then proceeds to step 1504.

該当オブジェクトがストレージ装置112bに格納されていない場合、副ノードキャッシュ無効化機能119は、ステップ1502にて「No」と判定して直接ステップ1504に進む。 If the object in question is not stored in storage device 112b, the secondary node cache invalidation function 119 determines "No" in step 1502 and proceeds directly to step 1504.

副ノードキャッシュ無効化機能119は、ステップ1504に進むと、ストレージ領域テーブルTB2を参照して、該当オブジェクトのページ203が第一のキャッシュ領域108bに格納されているか否かを判定する。 When the secondary node cache invalidation function 119 proceeds to step 1504, it refers to the storage area table TB2 to determine whether the page 203 of the object in question is stored in the first cache area 108b.

該当オブジェクトのページ203が第一のキャッシュ領域108bに格納されている場合、副ノードキャッシュ無効化機能119は、ステップ1504にて「Yes」と判定してステップ1505に進み、該当のページ203を第一のキャッシュ領域108bから削除した後、ステップ1506に進む。 If the page 203 of the object in question is stored in the first cache area 108b, the secondary node cache invalidation function 119 judges "Yes" in step 1504 and proceeds to step 1505, where it deletes the page 203 in question from the first cache area 108b, and then proceeds to step 1506.

これに対して、該当オブジェクトのページ203が第一のキャッシュ領域108bに格納されていない場合、副ノードキャッシュ無効化機能119は、ステップ1504にて「No」と判定してステップ1506に進む。 On the other hand, if the page 203 of the object in question is not stored in the first cache area 108b, the secondary node cache invalidation function 119 determines "No" in step 1504 and proceeds to step 1506.

副ノードキャッシュ無効化機能119は、ステップ1506に進むと、処理の完了を主ノード101のキャッシュ無効化機能107に通知する。その後、副ノードキャッシュ無効化機能119は、ステップ1507に進んで本動作フローを一旦終了する。 When the sub-node cache invalidation function 119 proceeds to step 1506, it notifies the cache invalidation function 107 of the main node 101 of the completion of the processing. After that, the sub-node cache invalidation function 119 proceeds to step 1507 and temporarily ends this operation flow.

<効果>
以上説明したように、本発明の実施形態に係るオブジェクトストレージを利用するデータベースシステムは、データの入出力に長時間を要する課題を解決することができる。特に、本発明の実施形態に係るデータベースシステムは、データベースの操作であるデータ検索及びデータ更新において実行されるオブジェクトの入出力回数を削減することにより、データの入出力時間を短縮することができる。
<Effects>
As described above, the database system using the object storage according to the embodiment of the present invention can solve the problem of data input/output taking a long time. In particular, the database system according to the embodiment of the present invention can shorten the data input/output time by reducing the number of object input/output operations performed in data search and data update, which are database operations.

<<変形例>>
本発明は上記実施形態に限定されることなく、本発明の範囲内において種々の変形例を採用することができる。例えば、本発明は、データベースの形式は上述した例に限定されるものではなく、例えば、本発明が適用されるデータベースは、ローストア形式のリレーショナルデータベースなどであってもよい。
<<Modifications>>
The present invention is not limited to the above-described embodiment, and various modifications can be adopted within the scope of the present invention. For example, the format of the database in the present invention is not limited to the above-described example, and the database to which the present invention is applied may be a relational database in a row store format.

101…主ノード、102a,102b…メモリ、103a,103b…データベース、104…データインポート機能、105…データ検索機能、106…データ更新機能、107…キャッシュ無効化機能、108a,108b…第一のキャッシュ領域、109a,109b…第二のキャッシュ領域、111a,111b…CPU、112a,112b…ストレージ装置、114…オブジェクトストレージ、115…第一のオブジェクト、116…第二のオブジェクト、117…副ノード、118…副ノードデータ検索機能、119…副ノードキャッシュ無効化機能 101...Main node, 102a, 102b...Memory, 103a, 103b...Database, 104...Data import function, 105...Data search function, 106...Data update function, 107...Cache invalidation function, 108a, 108b...First cache area, 109a, 109b...Second cache area, 111a, 111b...CPU, 112a, 112b...Storage device, 114...Object storage, 115...First object, 116...Second object, 117...Sub-node, 118...Sub-node data search function, 119...Sub-node cache invalidation function

Claims (14)

テーブルを含むデータベースが構築されたデータベースシステムであって、
前記データベースを管理するデータ管理部を含む計算機と、
オブジェクトストレージと、
を備え、
前記データ管理部は、
前記データベースの前記テーブルのデータを含む第一のデータ領域と、
前記第一のデータ領域に対応し、前記テーブルのデータの更新に伴って更新される第一の管理データを含む第二のデータ領域と、
が格納された第一のオブジェクトを、前記オブジェクトストレージに格納し、
前記テーブルに関する第二の管理データであって、前記テーブルのデータの更新に伴って更新されない前記第二の管理データを含む第三のデータ領域が格納された第二のオブジェクトを、前記オブジェクトストレージに格納する、
ように構成された、
データベースシステム。
A database system in which a database including a table is constructed,
a computer including a data management unit that manages the database;
Object storage and
Equipped with
The data management unit
a first data area containing data of said table of said database;
a second data area corresponding to the first data area and including first management data that is updated in accordance with updates to the data in the table;
storing a first object in the object storage;
storing a second object in the object storage, the second object having a third data area including second management data related to the table, the second management data not being updated in association with an update of the data in the table;
It was configured as follows:
Database system.
請求項1に記載のデータベースシステムにおいて、
前記計算機は、第一のキャッシュ領域と第二のキャッシュ領域とを含むメモリを備え、
前記データ管理部は、
前記第一のオブジェクトのデータを前記第一のキャッシュ領域に格納し、
前記第二のオブジェクトのデータを前記第二のキャッシュ領域に格納する、
ように構成された、
データベースシステム。
2. The database system according to claim 1,
the computer includes a memory including a first cache area and a second cache area;
The data management unit
storing data of the first object in the first cache area;
storing data of the second object in the second cache area;
It was configured as follows:
Database system.
請求項2に記載のデータベースシステムにおいて、
前記データ管理部は、
前記データベースの操作の命令として、検索クエリを受け付けた場合、前記検索クエリの処理に必要な前記第一のオブジェクトに対応する前記第二のオブジェクトのデータが、前記第二のキャッシュ領域に格納されているか否かを判定し、
前記検索クエリの処理に必要な前記第一のオブジェクトに対応する前記第二のオブジェクトのデータが、前記第二のキャッシュ領域に格納されていない場合、前記オブジェクトストレージから、前記検索クエリの処理に必要な前記第二のオブジェクトを読み出し、読み出した前記第二のオブジェクトを前記第二のキャッシュ領域に格納する、
ように構成された、
データベースシステム。
3. The database system according to claim 2,
The data management unit
when a search query is received as an instruction to operate the database, determining whether data of the second object corresponding to the first object required for processing the search query is stored in the second cache area;
if data of the second object corresponding to the first object necessary for processing the search query is not stored in the second cache area, reading the second object necessary for processing the search query from the object storage, and storing the read second object in the second cache area;
It was configured as follows:
Database system.
請求項2に記載のデータベースシステムにおいて、
前記データ管理部は、
前記第一のオブジェクトに、表形式の前記テーブルの全ての行の全ての列を含む前記第一のデータ領域を格納する、
ように構成された、
データベースシステム。
3. The database system according to claim 2,
The data management unit
storing the first data area including all columns of all rows of the table in a tabular format in the first object;
It was configured as follows:
Database system.
請求項2に記載のデータベースシステムにおいて、
前記データ管理部は、
複数の前記第一のオブジェクトのそれぞれに、表形式の前記テーブルの全ての行のうちの一部の行の全ての列を含むように複数の小領域に分割された複数の前記第一のデータ領域のそれぞれを、格納する、
ように構成された、
データベースシステム。
3. The database system according to claim 2,
The data management unit
storing, in each of the plurality of first objects, each of the plurality of first data areas divided into a plurality of small areas so as to include all columns of a portion of all rows of the table in tabular form;
It was configured as follows:
Database system.
請求項2に記載のデータベースシステムにおいて、
前記計算機は、ストレージ装置を備え、
前記データ管理部は、
前記データベースの操作に必要な前記第一のオブジェクトを前記ストレージ装置に格納し、
前記ストレージ装置に格納された前記第一のオブジェクトの特定のデータを前記第一のキャッシュ領域に格納する、
ように構成された、
データベースシステム。
3. The database system according to claim 2,
The computer includes a storage device,
The data management unit
storing the first object required for operating the database in the storage device;
storing specific data of the first object stored in the storage device in the first cache area;
It was configured as follows:
Database system.
請求項6に記載のデータベースシステムにおいて、
前記データ管理部は、
前記第一のキャッシュ領域に格納する特定のデータの管理をLRUのアルゴリズムに従って行う、
ように構成された、
データベースシステム。
7. The database system according to claim 6,
The data management unit
managing the specific data to be stored in the first cache area according to an LRU algorithm;
It was configured as follows:
Database system.
請求項6に記載のデータベースシステムにおいて、
前記計算機として、一つの主ノードと、一又は複数の副ノードとを含み、
前記主ノードの前記データ管理部及び前記副ノードの前記データ管理部のうちの、前記主ノードの前記データ管理部が、前記第一のオブジェクト及び前記第二のオブジェクトを、前記オブジェクトストレージに格納するように構成され、
前記主ノードの前記データ管理部は、前記データベースの操作の指令として、データ更新のクエリを受け付けた場合、
前記データ更新のクエリに記載された前記データベースの前記テーブルのデータ更新を実行し、更新されたデータが格納された新たな第一のオブジェクトを作成して、前記新たな第一のオブジェクトを前記オブジェクトストレージに格納し、
前記主ノードの前記ストレージ装置に格納されている更新対象となったデータを含む前記第一のオブジェクトを無効化し、
前記主ノードの前記第一のキャッシュ領域に格納されている前記更新対象となったデータを含む前記第一のオブジェクトのデータを無効化し、
前記主ノードは、前記更新対象となったデータを含む前記第一のオブジェクトを特定可能な情報を前記副ノードに通知し、
前記副ノードの前記データ管理部は、
前記副ノードの前記ストレージ装置に格納されている前記更新対象となったデータを含む前記第一のオブジェクトを無効化し
前記副ノードの前記第一のキャッシュ領域に格納されている前記更新対象となった前記第一のオブジェクトのデータを無効化する、
ように構成された、
データベースシステム。
7. The database system according to claim 6,
The computer includes one main node and one or more sub-nodes,
of the data management unit of the main node and the data management unit of the sub node, the data management unit of the main node is configured to store the first object and the second object in the object storage;
When the data management unit of the main node receives a data update query as an instruction to operate the database,
Executing a data update of the table of the database described in the data update query, creating a new first object in which the updated data is stored, and storing the new first object in the object storage;
invalidating the first object including the data to be updated that is stored in the storage device of the main node;
Invalidating data of the first object including the data to be updated that is stored in the first cache area of the main node;
the main node notifies the sub-node of information capable of identifying the first object including the data to be updated;
The data management unit of the secondary node
Invalidating the first object including the data to be updated that is stored in the storage device of the secondary node; and invalidating the data of the first object to be updated that is stored in the first cache area of the secondary node.
It was configured as follows:
Database system.
請求項8に記載のデータベースシステムにおいて、
前記主ノードの前記データ管理部は、
前記更新対象となったデータを含む前記第一のオブジェクトが、前記主ノードの前記ストレージ装置に格納されているか否かを判定し、前記更新対象となったデータが格納された前記第一のオブジェクトが、前記主ノードの前記ストレージ装置に格納されていると判定した場合、前記更新対象となったデータを含む前記第一のオブジェクトを、前記主ノードの前記ストレージ装置から削除する前記無効化を実行するように構成され、
更に、前記主ノードの前記データ管理部は、
前記更新対象となったデータを含む前記第一のオブジェクトのデータが、前記主ノードの前記第一のキャッシュ領域に格納されているか否かを判定し、前記更新対象となったデータを含む前記第一のオブジェクトのデータが、前記主ノードの前記第一のキャッシュ領域に格納されていると判定した場合、前記更新対象となったデータを含む前記第一のオブジェクトのデータを、前記主ノードの前記第一のキャッシュ領域から削除する前記無効化を実行する、
ように構成された、
データベースシステム。
9. The database system according to claim 8,
The data management unit of the main node
is configured to determine whether or not the first object including the data to be updated is stored in the storage device of the main node, and when it is determined that the first object in which the data to be updated is stored is stored in the storage device of the main node, execute the invalidation to delete the first object including the data to be updated from the storage device of the main node;
Furthermore, the data management unit of the main node
determining whether or not the data of the first object including the data to be updated is stored in the first cache area of the main node, and if it is determined that the data of the first object including the data to be updated is stored in the first cache area of the main node, executing the invalidation to delete the data of the first object including the data to be updated from the first cache area of the main node;
It was configured as follows:
Database system.
請求項9に記載のデータベースシステムにおいて、
前記副ノードの前記データ管理部は、
前記主ノードから通知された、前記更新対象となったデータを含む前記第一のオブジェクトが、前記副ノードの前記ストレージ装置に格納されているか否かを判定し、前記更新対象となったデータが格納された前記第一のオブジェクトが、前記副ノードの前記ストレージ装置に格納されていると判定した場合、前記更新対象となったデータを含む前記第一のオブジェクトを、前記副ノードの前記ストレージ装置から削除する前記無効化を実行するように構成され、
更に、前記副ノードの前記データ管理部は、
前記更新対象となったデータを含む前記第一のオブジェクトのデータが、前記副ノードの前記第一のキャッシュ領域に格納されているか否かを判定し、前記更新対象となったデータを含む前記第一のオブジェクトのデータが、前記副ノードの前記第一のキャッシュ領域に格納されていると判定した場合、前記更新対象となったデータを含む前記第一のオブジェクトのデータを、前記副ノードの前記第一のキャッシュ領域から削除する前記無効化を実行する、
ように構成された、
データベースシステム。
10. The database system according to claim 9,
The data management unit of the secondary node
is configured to determine whether or not the first object including the data to be updated and notified from the main node is stored in the storage device of the secondary node, and when it is determined that the first object in which the data to be updated is stored is stored in the storage device of the secondary node, execute the invalidation to delete the first object including the data to be updated from the storage device of the secondary node;
Furthermore, the data management unit of the secondary node
determining whether or not the data of the first object including the data to be updated is stored in the first cache area of the sub-node, and if it is determined that the data of the first object including the data to be updated is stored in the first cache area of the sub-node, executing the invalidation to delete the data of the first object including the data to be updated from the first cache area of the sub-node;
It was configured as follows:
Database system.
請求項6に記載のデータベースシステムにおいて、
前記計算機として、主ノードと、1又は複数の副ノードとを含み、
前記主ノードの前記データ管理部及び前記副ノードの前記データ管理部のうちの、前記主ノードの前記データ管理部が、前記第一のオブジェクト及び前記第二のオブジェクトを、前記オブジェクトストレージに格納するように構成され、
前記主ノードの前記データ管理部は、前記データベースの操作の命令として、検索クエリを受け付けた場合、
前記検索クエリを処理するために必要な前記第一のオブジェクトのリストを作成し、前記リストの一部を前記副ノードの前記データ管理部に通知し、
前記リストのうちの、前記副ノードの前記データ管理部に通知しなかった前記第一のオブジェクトを前記ストレージ装置に格納し、前記ストレージ装置に格納された前記第一のオブジェクトから前記検索クエリの実行に必要なデータを読み出して、前記第一のキャッシュ領域に格納し、
前記第一のキャッシュ領域に格納されたデータを使用して、前記検索クエリの処理を実行する、
ように構成された、
データベースシステム。
7. The database system according to claim 6,
The computers include a main node and one or more sub-nodes,
of the data management unit of the main node and the data management unit of the sub node, the data management unit of the main node is configured to store the first object and the second object in the object storage;
When the data management unit of the main node receives a search query as an instruction to operate the database,
creating a list of the first objects required to process the search query and notifying the data manager of the secondary node of a portion of the list;
storing the first object in the list that has not been notified to the data management unit of the secondary node in the storage device, reading data necessary for executing the search query from the first object stored in the storage device, and storing the data in the first cache area;
performing processing of the search query using data stored in the first cache area;
It was configured as follows:
Database system.
請求項11に記載のデータベースシステムにおいて、
前記副ノードの前記データ管理部は、前記主ノードから前記リストの一部を通知された場合、
前記リストのうちの、前記主ノードから通知された前記第一のオブジェクトを前記ストレージ装置に格納し、前記ストレージ装置に格納された前記第一のオブジェクトから前記検索クエリの実行に必要なデータを読み出して、前記第一のキャッシュ領域に格納し、
前記第一のキャッシュ領域に格納されたデータを使用して、前記検索クエリの処理を実行する、
ように構成された、
データベースシステム。
12. The database system according to claim 11,
When the data management unit of the secondary node is notified of a part of the list from the main node,
storing the first object of the list notified by the main node in the storage device, reading data necessary for executing the search query from the first object stored in the storage device, and storing the data in the first cache area;
performing processing of the search query using data stored in the first cache area;
It was configured as follows:
Database system.
テーブルを含むデータベースが構築されたデータベースシステムにおいて、前記データベースを管理するデータ管理部を含む計算機と、オブジェクトストレージと、を用いたデータ管理方法であって、
前記データ管理部が、
前記データベースの前記テーブルのデータを含む第一のデータ領域と、
前記第一のデータ領域に対応し、前記テーブルのデータの更新に伴って更新される第一の管理データを含む第二のデータ領域と、
が格納された第一のオブジェクトを、前記オブジェクトストレージに格納し、
前記テーブルに関する第二の管理データであって、前記テーブルのデータの更新に伴って更新されない前記第二の管理データを含む第三のデータ領域が格納された第二のオブジェクトを、前記オブジェクトストレージに格納する、
データ管理方法。
A data management method using a computer including a data management unit that manages a database in a database system in which a database including a table is constructed, and an object storage, comprising:
The data management unit,
a first data area containing data of the table of the database;
a second data area corresponding to the first data area and including first management data that is updated in accordance with updates to the data in the table;
storing a first object in the object storage;
storing a second object in the object storage, the second object having a third data area including second management data related to the table, the second management data not being updated in association with an update of the data in the table;
Data management methods.
テーブルを含むデータベースを管理するデータ管理部と、メモリと、を含む計算機と、を備え、
前記データベースを格納するオブジェクトストレージに接続されたデータベースシステムにおいて、
前記データ管理部は、前記データベースのデータを前記メモリの領域上で更新して管理するとともに、前記メモリから前記オブジェクトストレージへの格納及び前記オブジェクトストレージから前記メモリへの読み出しを行い、
前記データベースのデータは、
前記データベースの前記テーブルのデータを含む第一のデータ領域と、前記第一のデータ領域に対応し、前記テーブルのデータの更新に伴って更新される第一の管理データを含む第二のデータ領域と、が格納された第一のオブジェクトと、
前記テーブルに関する第二の管理データであって、前記テーブルのデータの更新に伴って更新されない前記第二の管理データを含む第三のデータ領域が格納された第二のオブジェクトと、
を含み、
前記メモリは、アクセス履歴に基づいてデータを削除するLRU管理を行う第一のキャッシュ領域と、前記LRU管理を行わない第二のキャッシュ領域とを有し、
前記データ管理部は、前記第一のオブジェクトを前記第一のキャッシュ領域で管理し、前記第二のオブジェクトを前記第二のキャッシュ領域で管理する
ことを特徴とするデータベースシステム。
A computer including a data management unit that manages a database including a table and a memory,
In a database system connected to an object storage that stores the database,
the data management unit updates and manages data of the database in an area of the memory, and stores data from the memory to the object storage and reads data from the object storage to the memory;
The data in the database is
a first object in which a first data area including data of the table of the database and a second data area including first management data corresponding to the first data area and updated in accordance with updates to the data of the table are stored;
a second object in which a third data area is stored, the second management data being related to the table, the second management data being not updated in association with an update of the data of the table;
Including,
the memory has a first cache area that performs LRU management for deleting data based on an access history, and a second cache area that does not perform the LRU management;
a data management unit that manages the first object in the first cache area and manages the second object in the second cache area;
JP2022037646A 2022-03-10 2022-03-10 Database system and data management method Active JP7654585B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022037646A JP7654585B2 (en) 2022-03-10 2022-03-10 Database system and data management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022037646A JP7654585B2 (en) 2022-03-10 2022-03-10 Database system and data management method

Publications (2)

Publication Number Publication Date
JP2023132379A JP2023132379A (en) 2023-09-22
JP7654585B2 true JP7654585B2 (en) 2025-04-01

Family

ID=88064979

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022037646A Active JP7654585B2 (en) 2022-03-10 2022-03-10 Database system and data management method

Country Status (1)

Country Link
JP (1) JP7654585B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003263350A (en) 2002-03-07 2003-09-19 Ricoh Co Ltd Database system
JP2016212588A (en) 2015-05-07 2016-12-15 株式会社リコー Information processing apparatus, information processing system and method
JP2021076969A (en) 2019-11-06 2021-05-20 富士通株式会社 Information processing apparatus and information processing program
JP2022126099A (en) 2021-02-18 2022-08-30 富士通株式会社 Information processing program, information processing method, and information processing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003263350A (en) 2002-03-07 2003-09-19 Ricoh Co Ltd Database system
JP2016212588A (en) 2015-05-07 2016-12-15 株式会社リコー Information processing apparatus, information processing system and method
JP2021076969A (en) 2019-11-06 2021-05-20 富士通株式会社 Information processing apparatus and information processing program
JP2022126099A (en) 2021-02-18 2022-08-30 富士通株式会社 Information processing program, information processing method, and information processing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Tan ZHIPENG et al.,"Object Storage Systems Support for Database",2007 International Conference on Convergence Information Technology (ICCIT 2007) [online],IEEE,2007年,pp.1801-1806,DOI: 10.1109/ICCIT.2007.432

Also Published As

Publication number Publication date
JP2023132379A (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN102722449B (en) Key-Value local storage method and system based on solid state disk (SSD)
US11580162B2 (en) Key value append
EP2478442B1 (en) Caching data between a database server and a storage system
US20200364185A1 (en) Method for data replication in a data analysis system
US11099771B2 (en) System and method for early removal of tombstone records in database
US9495398B2 (en) Index for hybrid database
US20140351202A1 (en) Apparatus and method for read optimized bulk data storage
EP2562657B1 (en) Management of update transactions and crash recovery for columnar database
US10909091B1 (en) On-demand data schema modifications
US8832022B2 (en) Transaction processing device, transaction processing method and transaction processing program
US9922086B1 (en) Consistent query of local indexes
US8819074B2 (en) Replacement policy for resource container
WO2025236959A1 (en) Data backup, restoration and query methods and apparatuses for distributed database
CN115469810A (en) Data acquisition method, device, equipment and storage medium
US11016937B2 (en) Updateable distributed file framework
US6571250B1 (en) Method and system for processing queries in a data processing system using index
KR101806394B1 (en) A data processing method having a structure of the cache index specified to the transaction in a mobile environment dbms
US11429311B1 (en) Method and system for managing requests in a distributed system
JP7654585B2 (en) Database system and data management method
US20210406243A1 (en) Non-transitory computer-readable storage medium for storing information processing program, information processing method, and information processing apparatus
US8843708B2 (en) Control block linkage for database converter handling
US9128976B2 (en) Offline restructuring of DEDB databases
US11816088B2 (en) Method and system for managing cross data source data access requests
US20240362192A1 (en) Update method and database update apparatus
Shu Key-Value Stores

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250227

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: 20250311

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250319

R150 Certificate of patent or registration of utility model

Ref document number: 7654585

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150