JP6157004B2 - Virtual database system management apparatus, management method, and management program - Google Patents
Virtual database system management apparatus, management method, and management program Download PDFInfo
- Publication number
- JP6157004B2 JP6157004B2 JP2014057080A JP2014057080A JP6157004B2 JP 6157004 B2 JP6157004 B2 JP 6157004B2 JP 2014057080 A JP2014057080 A JP 2014057080A JP 2014057080 A JP2014057080 A JP 2014057080A JP 6157004 B2 JP6157004 B2 JP 6157004B2
- Authority
- JP
- Japan
- Prior art keywords
- database
- data
- management table
- management
- database system
- 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.)
- Expired - Fee Related
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、少なくとも部分的に 同一データを保有可能とする複数のデータベースシステムが存在する環境において、データベースシステムを選択する場合に、ユーザの過去の問合せ内容に応じてデータの配置を最適化することで効率的な処理を実行する仮想データベースシステム管理装置、管理方法及び管理プログラムに関する。 The present invention optimizes the data arrangement in accordance with the user's past inquiry contents when selecting a database system in an environment where there are a plurality of database systems capable of holding at least partially the same data. The present invention relates to a virtual database system management apparatus, a management method, and a management program that execute efficient processing.
従来、データベースアクセスの負荷を分散させて処理能力向上を図るため、データベースシステム管理装置において、同一データを含むデータベースを複数用意することが行われていた。
例えば、負荷分散装置を導入し、ユーザからのデータベースコネクション確立時において、順番に或いはデータベースの負荷の少ない順に、データベースが選択され接続されることが行われている。この場合、データベースコネクション確立時に、接続するデータベースが決定されてしまうため、ユーザからの問合せ内容に応じてデータベースを選択することはできない。
Conventionally, in order to improve the processing capability by distributing the load of database access, a plurality of databases including the same data have been prepared in the database system management apparatus.
For example, when a load distribution device is introduced and a database connection is established from a user, the databases are selected and connected in order or in order of decreasing database load. In this case, since the database to be connected is determined when the database connection is established, the database cannot be selected according to the contents of the query from the user.
一方、複数のデータベースが存在する環境で、それらを統一的に扱う手法がいくつか提案されている。
例えば、特許文献1では、複数のデータベースが存在する環境において、ユーザの求める情報を含む複数データベースを検索できるようにする検索方法が提案されている。しかし、特許文献1に記載の手法では、同じ内容のデータベースが存在することを仮定していないため、データベースを選択可能な状況においてデータベース選択をすることができない。
On the other hand, in the environment where a plurality of databases exist, several methods for handling them in a unified manner have been proposed.
For example, Patent Literature 1 proposes a search method that enables a plurality of databases including information requested by a user to be searched in an environment where a plurality of databases exist. However, the method described in Patent Document 1 does not assume that a database having the same content exists, and therefore cannot select a database in a situation where the database can be selected.
また、特許文献2には、複数のデータベース内に同じ名称のテーブルが存在する場合が記述されているが、同じ名称のテーブルであっても内容が同じとは限らず、予め優先順位を設定して選択する方式であるため、ユーザの問合せ内容に応じたデータベースを選択することができない。 Patent Document 2 describes a case where tables having the same name exist in a plurality of databases. However, even if a table has the same name, the contents are not necessarily the same, and priorities are set in advance. Therefore, it is not possible to select a database according to the contents of the user's inquiry.
また、データベースシステムの構成について、データベースそのものとデータベースを管理するデータベースマネジメントシステム(DBMS)の集合体と考えると、1つのデータベースを複数のデータベースマネジメントシステム(DBMS)で共有し、結果として同一データを保有する複数のデータベースシステムが存在することになる場合も想定される。 In addition, when considering the database system configuration as a collection of the database itself and the database management system (DBMS) that manages the database, one database is shared by multiple database management systems (DBMS), and as a result, the same data is retained. It is also assumed that there will be a plurality of database systems.
同一データを有するデータベースシステムが複数存在し、かつ各データベースシステムにおいて問合せ処理を実行する各DBMSのクエリ処理エンジンに特徴があり、ユーザの問合せ内容に応じてデータベースシステム(クエリ処理エンジン)を選択したい場合に、上述した従来技術では対応することができなかった。 When there are multiple database systems that have the same data and the query processing engine of each DBMS that executes query processing in each database system is unique, and you want to select the database system (query processing engine) according to the user's query content In addition, the above-described prior art cannot cope with this.
そこで本発明者は、複数のデータベースシステムが存在する環境において、論理的にデータベース、テーブルを定義し、それらに対し、各データベースシステムにおける複数のDBMS、データベース、テーブル、範囲条件の組を割り当てる手段と、利用者の問合せ内容に応じて複数の組の中から1つを選択して処理を進める手段を備えた仮想データベースシステム管理装置を提案するに至った(特許文献3)。
この装置によれば、同一データを含む複数のデータベースシステムが存在する環境において、データベースシステムを選択し問合せ処理を実行することが可能となる。
Therefore, the inventor logically defines databases and tables in an environment where a plurality of database systems exist, and assigns a set of a plurality of DBMSs, databases, tables, and range conditions in each database system to them. As a result, a virtual database system management apparatus having means for selecting one of a plurality of sets according to the contents of a user's inquiry and advancing the process has been proposed (Patent Document 3).
According to this apparatus, it is possible to select a database system and execute a query process in an environment where a plurality of database systems including the same data exist.
しかしながら上述した装置によれば、ユーザの問合せ内容に応じてデータベースシステムを選択して問合せ内容を実行可能とするが、ユーザからの問合せ内容を効率よく処理するために、どのデータを重複して複数のデータベースシステムに配置すべきかに関して言及されていない。 However, according to the apparatus described above, the database system can be selected according to the user's inquiry content and the inquiry content can be executed. However, in order to efficiently process the inquiry content from the user, which data is duplicated There is no mention of what to put in the database system.
本発明は上記実情に鑑みて提案されたもので、複数のデータベースシステムが存在する環境において、問合せ処理の効率化を図るために、重複して持つべきデータ、及びそのデータを配置するデータベースシステムを選定可能とした仮想データベースシステム管理装置、管理方法及び管理プログラムを提供することを目的としている。 The present invention has been proposed in view of the above circumstances, and in an environment where there are a plurality of database systems, in order to improve the efficiency of query processing, the data to be duplicated and a database system for arranging the data are provided. It is an object to provide a virtual database system management apparatus, a management method, and a management program that can be selected.
上記目的を達成するため本発明(請求項1)は、少なくとも部分的に同一のデータをデータベースに保有可能とする複数のデータベースシステムが接続され、ユーザシステムからのアクセスに応じてデータが出力されるデータベースシステム管理装置において、次の構成を含むことを特徴としている。
前記データベースに関連付けたエントリ番号を管理する物理データベース管理テーブル。
前記ユーザシステムからのアクセス対象となる論理データベース情報を定義し、前記物理データベース管理テーブルのデータに対して、対応する前記各エントリ番号を紐付けて管理する論理データベース管理テーブル。
各データベースシステムにおける処理の優先度、リソース容量、リソース利用率を管理するデータベースシステム情報テーブル。
前記ユーザシステムからの問合せに対して、アクセス対象の論理データベース情報を抽出し、前記論理データベース管理テーブル及び前記物理データベース管理テーブルより対応する物理データベース情報の組を取得し、取得した物理データベース情報の組が複数存在する場合に、問合せ内容に応じて1つの組を選択するデータベース選択部。
前記問合せ内容の実行計画及び実行結果を取得し実行履歴管理テーブルを作成して管理する実行履歴管理部。
前記実行履歴管理部及び前記データベースシステム情報テーブルが管理する情報を用いて重複して持つべきデータ(データ再配置候補)及び該データを配置するべきデータベースシステムを決定するデータ配置決定部。
前記データ配置決定部の決定に従って前記データベースシステムに対してデータの作成又は移動を指示し、前記論理データベース管理テーブル及び前記物理データベース管理テーブルの情報を更新するデータ配置実行部。
To achieve the above object, the present invention (Claim 1) is connected to a plurality of database systems capable of holding at least partially the same data in a database, and outputs data in response to access from a user system. The database system management apparatus includes the following configuration.
A physical database management table for managing entry numbers associated with the database.
A logical database management table that defines logical database information to be accessed from the user system and manages the data in the physical database management table in association with the corresponding entry numbers.
A database system information table for managing processing priorities, resource capacities, and resource utilization rates in each database system.
In response to the query from the user system, the logical database information to be accessed is extracted, the corresponding set of physical database information is acquired from the logical database management table and the physical database management table, and the acquired set of physical database information A database selection unit that selects one set according to the content of an inquiry when there are a plurality of items.
An execution history management unit that acquires an execution plan and an execution result of the inquiry content and creates and manages an execution history management table.
A data placement determination unit that determines data to be duplicated (data rearrangement candidates) and a database system in which the data is to be placed by using information managed by the execution history management unit and the database system information table.
A data placement execution unit that instructs the database system to create or move data according to the determination of the data placement determination unit, and updates information in the logical database management table and the physical database management table.
請求項2は、請求項1の仮想データベースシステム管理装置において、
前記実行履歴管理テーブルは、前記各問合せ内容が実行されるテーブルのリンク先の情報を有し、
前記実行履歴管理部は、前記実行履歴管理テーブルの前記リンク先に記された物理データベースの各テーブルに対するデータベースアクセス管理テーブルを作成し、
前記データベースアクセス管理テーブルは、対象テーブルにて実行された各問合せ内容に対して参照された複数カラムが記録され、
前記データ配置決定部は、各テーブルに対して利用頻度の高いカラム条件を抽出して前記重複して持つべきデータ(データ再配置候補)を決定することを特徴としている。
Claim 2 is the virtual database system management apparatus according to claim 1,
The execution history management table has information on a link destination of a table in which each inquiry content is executed,
The execution history management unit creates a database access management table for each table of the physical database described in the link destination of the execution history management table,
In the database access management table, a plurality of columns referred to for each inquiry executed in the target table are recorded,
The data arrangement determining unit is characterized by extracting column conditions that are frequently used for each table and determining the data (data relocation candidates) that should be duplicated.
本発明の仮想データベースシステム管理方法(請求項3)は、同一のデータをデータベースに保有可能とする複数のデータベースシステムが接続され、ユーザシステムからのアクセスに応じてデータが出力される環境において、
前記ユーザシステムからのアクセス対象となる論理データベース情報を定義する論理データベース管理テーブルと、前記論理データベース情報に対し前記複数のデータベースシステムにおける1つあるいは複数のデータベースマネジメントシステム(DBMS)、データベース・テーブルの組を割り当てる物理データベース管理テーブルとを作成する管理テーブル作成手順と、
前記ユーザシステムからの問合せ内容の実行計画と実行結果を取得して実行履歴管理テーブルとして管理する実行履歴管理手順と、
各データベースシステムのリソース利用情報を取得して管理するデータベースシステム管理手順と、
前記実行履歴管理テーブルが管理する情報及び前記リソース利用情報を用いて重複して持つべきデータ(データ再配置候補)及び該データを配置するべきデータベースシステムを決定するデータ配置決定手順と、
前記決定に従って前記データベースシステムに対してデータの作成又は移動の指示を出し、前記論理データベース管理テーブル及び物理データベース管理テーブルの情報を更新する更新手順と、
により実行することを特徴としている。
In the virtual database system management method of the present invention (claim 3), in an environment in which a plurality of database systems capable of holding the same data in a database are connected and data is output in response to access from a user system,
Logical database management table defining logical database information to be accessed from the user system, one or a plurality of database management systems (DBMS) in the plurality of database systems, and a set of database tables for the logical database information A management table creation procedure for creating a physical database management table to which
An execution history management procedure for acquiring an execution plan and execution results of the query content from the user system and managing them as an execution history management table;
Database system management procedure for acquiring and managing resource usage information of each database system,
A data arrangement determination procedure for determining data to be duplicated using the information managed by the execution history management table and the resource usage information (data relocation candidates) and a database system in which the data is to be arranged;
An update procedure for instructing the database system to create or move data according to the determination, and updating information in the logical database management table and physical database management table;
It is characterized by performing by.
請求項4は、請求項3の仮想データベースシステム管理方法において、
前記実行履歴管理テーブルは、前記各問合せ内容が実行されるテーブルのリンク先の情報を有し、
前記実行履歴管理手順は、前記実行履歴管理テーブルの前記リンク先に記された物理データベースの各テーブルに対するデータベースアクセス管理テーブルを作成し、
前記データベースアクセス管理テーブルは、対象テーブルにて実行された各問合せ内容に対して参照された複数カラムが記録され、
前記データ配置決定手順は、各テーブルに対して利用頻度の高いカラム条件を抽出して前記重複して持つべきデータ(データ再配置候補)を決定する
ことを特徴としている。
Claim 4 is the virtual database system management method of claim 3,
The execution history management table has information on a link destination of a table in which each inquiry content is executed,
The execution history management procedure creates a database access management table for each table of the physical database described in the link destination of the execution history management table,
In the database access management table, a plurality of columns referred to for each inquiry executed in the target table are recorded,
The data arrangement determination procedure is characterized by extracting column conditions that are frequently used for each table and determining the data that should be duplicated (data relocation candidates).
請求項5は、仮想データベースシステム管理プログラムであって、請求項3又は請求項4に記載の仮想データベースシステム管理方法の各手順をコンピュータにより実行可能としたことを特徴としている。 A fifth aspect of the present invention is a virtual database system management program, characterized in that each procedure of the virtual database system management method according to the third or fourth aspect can be executed by a computer.
本発明によれば、データベースシステムが複数存在し、ユーザの問合せ内容に応じてデータベースシステムを選択して処理を実行する場合において、問合せ文の実行計画と実行結果については実行履歴管理テーブルで、データベースシステムにおける処理の優先度、リソース容量、リソース利用率(データベースシステムのリソース利用情報)についてはデータベースシステム情報テーブルでそれぞれ管理する。
そして、これらの情報から重複して持つべきデータ(データ再配置候補)及びデータを配置するべきデータベースシステムを判断して、各データベースシステムに対してデータ作成の指示を出すとともに、仮想データベースシステム管理装置のデータベース管理部に対して、論理データベース管理テーブル及び物理データベース管理テーブルの情報を更新する。
その結果、新たな問合せ文の入力に対して、データベース選択部においてより適切な物理データベースの選択を可能とすることができる。
According to the present invention, when there are a plurality of database systems, and the database system is selected according to the contents of the user's query and the process is executed, the execution plan and execution result of the query statement are stored in the execution history management table. The processing priority, resource capacity, and resource usage rate (resource usage information of the database system) in the system are managed in the database system information table.
Then, from these pieces of information, the data to be duplicated (data relocation candidate) and the database system to which the data is to be determined are determined, data creation instructions are issued to each database system, and the virtual database system management device The information of the logical database management table and the physical database management table is updated with respect to the database management unit.
As a result, it is possible to select a more appropriate physical database in the database selection unit for the input of a new query statement.
本発明の仮想データベースシステム管理装置の実施形態の一例について、図面を参照して説明する。
仮想データベースシステム管理装置は、同一データを保有する複数のデータベースシステムが存在する環境において、ユーザの問合せ内容に応じてデータベースシステムを選択して問合せ内容を実行可能とするシステムであり、仮想データベースシステム管理プログラムが格納された記録媒体やインターネットを介してソフトウエアのダウンロードによりインストールすることで、コンピュータ上に構築されている。
An example of an embodiment of a virtual database system management apparatus of the present invention will be described with reference to the drawings.
The virtual database system management device is a system that enables execution of query contents by selecting a database system in accordance with a user query content in an environment where a plurality of database systems having the same data exist. It is constructed on a computer by installing it by downloading software via a recording medium storing the program or the Internet.
仮想データベースシステム管理装置が構築されるコンピュータは、オペレーティングシステム(OS)を含む基本プログラムや各種の基本デバイスが記憶されたROMと、各種のプログラムやデータが記憶されるハードディスクドライブ装置(HDD)と、CD−ROMやDVD等の記憶媒体からプログラムやデータを読み出すメディアドライブ装置と、プログラムを実行するCPUと、このCPUにワークエリアを提供するRAMと、入出力インターフェース(I/F)を介して接続されたディスプレイ、キーボードおよびマウス等のポインティングデバイスと、外部装置と通信するパラレル/シリアルI/Fとを主要部分とする一般的な構成を備えている。
本実施形態の仮想データベースシステム管理装置では、仮想データベースシステム管理プログラムがシリアル/パラレルI/Fから入力、またはメディアドライブ装置で読み取られてHDDに予め記憶される。仮想データベースシステム管理プログラムは記憶媒体に記憶され、メディアドライブ装置で読み取られてHDDにインストールされる。
The computer in which the virtual database system management apparatus is constructed includes a ROM that stores a basic program including an operating system (OS) and various basic devices, a hard disk drive (HDD) that stores various programs and data, A media drive device that reads programs and data from a storage medium such as a CD-ROM or DVD, a CPU that executes the programs, a RAM that provides a work area for the CPU, and an input / output interface (I / F) A general configuration mainly includes a pointing device such as a display, a keyboard and a mouse, and a parallel / serial I / F communicating with an external device.
In the virtual database system management apparatus of this embodiment, a virtual database system management program is input from a serial / parallel I / F or read by a media drive device and stored in the HDD in advance. The virtual database system management program is stored in a storage medium, read by the media drive device, and installed in the HDD.
コンピュータ上に構築された仮想データベースシステム管理装置は、複数のデータベースシステムが存在する環境において、ユーザからのアクセス対象となる論理データベース情報(データベース、テーブル)を定義し、それらに対し、各データベースシステムにおける1つあるいは複数のDBMS、データベース、テーブル、範囲条件の組を割り当てる。
そして、論理データベース情報に対して複数の組を割り当てた場合に、ユーザから問合せ内容に応じて、複数の組の中から1つを選択して処理を実行するよう管理することで、同一データを含む複数のデータベースシステムが存在する環境において、データベースシステムを選択し、ユーザからの問合せ処理に適したデータの選択を可能とするものである。
A virtual database system management apparatus constructed on a computer defines logical database information (database, table) to be accessed by a user in an environment where a plurality of database systems exist, and Assign one or more DBMS, database, table, and range condition pairs.
Then, when a plurality of sets are assigned to the logical database information, the same data can be managed by selecting one of the plurality of sets and executing the process according to the inquiry content from the user. In an environment in which a plurality of database systems are included, a database system is selected, and data suitable for query processing from a user can be selected.
以下、仮想データベースシステム管理装置10の構成について、図1のブロック図を参照して説明する。
仮想データベースシステム管理装置10は、複数のデータベースシステム20と接続されるデータベースインタフェース部11と、データベースインタフェース部11を介して各データベースシステム20の情報を取得し管理するデータベース管理部12と、ユーザシステム1との入出力を行うユーザインタフェース部13と、ユーザシステム1から入力された問合せ文を解析する問合せ入力解析部14と、問合せ文の実行計画を生成する実行計画生成部15と、データベースインタフェース部11を介して問合せ文を実行し結果をユーザシステム1へ出力する問合せ実行部16とを備えて構成されている。
Hereinafter, the configuration of the virtual database system management apparatus 10 will be described with reference to the block diagram of FIG.
The virtual database system management apparatus 10 includes a database interface unit 11 connected to a plurality of database systems 20, a database management unit 12 that acquires and manages information of each database system 20 through the database interface unit 11, and a user system 1. A user interface unit 13 that performs input / output to / from the user, a query input analysis unit 14 that analyzes a query statement input from the user system 1, an execution plan generation unit 15 that generates an execution plan of the query statement, and a database interface unit 11 And a query execution unit 16 that executes a query statement and outputs the result to the user system 1.
データベース管理部12は、論理的に定義された論理データベース情報(データベース、テーブル等)を管理する論理データベース管理テーブル12aと、データベース・テーブル等の組を管理する物理データベース管理テーブル12bを備えることで、各データベースシステム20の情報を管理している。論理データベース管理テーブル12a及び物理データベース管理テーブル12bにおけるデータ間の紐付けについては、後述する。
また、データベース管理部12は、各データベースシステムにおける処理の優先度、リソース容量、リソース利用率(データベースシステムのリソース利用情報)を管理するデータベースシステム情報テーブル12cを備えている。データベースシステム情報テーブル12cは、データベースインタフェース部11を介して各データベースシステム20のリソース利用情報を取得する。
The database management unit 12 includes a logical database management table 12a for managing logically defined logical database information (database, table, etc.) and a physical database management table 12b for managing a set of database tables, etc. Information of each database system 20 is managed. The association between data in the logical database management table 12a and the physical database management table 12b will be described later.
In addition, the database management unit 12 includes a database system information table 12c that manages processing priority, resource capacity, and resource usage rate (resource usage information of the database system) in each database system. The database system information table 12 c acquires resource usage information of each database system 20 via the database interface unit 11.
問合せ入力解析部14は、ユーザインタフェース部13を介して入力された問合せ文の講文を解析し、解析結果を実行計画生成部15へ入力する。 The query input analysis unit 14 analyzes the lecture of the query sentence input via the user interface unit 13 and inputs the analysis result to the execution plan generation unit 15.
実行計画生成部15は、データベース管理部12より問合せ文の問合せ入力解析部14での解析結果に対応するデータベース情報を取得し、問合せ文を実行するデータベースシステム20を選択するデータベース選択部15aを備え、選択したデータベースシステム20に対して問合せ文の実行計画を生成する。
すなわち、データベース選択部15aは、問合せ文に応じて1つのデータベースシステム20を選択するに際して、予め定義したルールとの適合評価を行うルール評価部を備えている。そして、ルール評価部での適合結果に基づいて、データベースシステム20が選択される。
問合せ実行部16は、実行計画生成部15にて生成された実行計画を実行し、実行結果についてユーザインタフェース部13を介してユーザシステム1へ出力する。
The execution plan generation unit 15 includes a database selection unit 15a that acquires database information corresponding to the analysis result of the query input analysis unit 14 from the database management unit 12 and selects the database system 20 that executes the query statement. Then, an execution plan of a query statement is generated for the selected database system 20.
That is, the database selection unit 15a includes a rule evaluation unit that performs conformity evaluation with a predefined rule when selecting one database system 20 according to a query. Then, the database system 20 is selected based on the matching result in the rule evaluation unit.
The query execution unit 16 executes the execution plan generated by the execution plan generation unit 15 and outputs the execution result to the user system 1 via the user interface unit 13.
また、本発明の仮想データベースシステム管理装置10では、データベースシステム20が複数存在する場合に、どのデータを重複して複数のデータベースシステム20に配置すべきかを判断し、配置の変更を実行するために、実行履歴管理部17と、データ配置決定部18と、データ配置実行部19とを備えている。
実行履歴管理部17は、実行計画生成部15からの問合せ文の実行計画、問合せ実行部16からの問合せ文の実行結果を取得する実行履歴管理テーブル17aと、各問合せ文に対する物理データを管理するデータベースアクセス管理テーブル17bを備えている。実行履歴管理テーブル17a及びデータベースアクセス管理テーブル17bについての詳細説明は後述する。
Further, in the virtual database system management apparatus 10 of the present invention, when there are a plurality of database systems 20, in order to determine which data should be duplicated and arranged in the plurality of database systems 20, and to change the arrangement , An execution history management unit 17, a data arrangement determination unit 18, and a data arrangement execution unit 19.
The execution history management unit 17 manages an execution history management table 17a that acquires an execution plan of a query statement from the execution plan generation unit 15, an execution result of the query statement from the query execution unit 16, and physical data for each query statement. A database access management table 17b is provided. Details of the execution history management table 17a and the database access management table 17b will be described later.
データ配置決定部18は、データベース管理部12及び実行履歴管理部17が管理する情報を用いて重複して持つべきデータ及びそのデータを配置するべきデータベースシステム20を決定する。
データ配置実行部19は、データ配置決定部18の決定に従ってデータベースインタフェース部11を通じて各データベースシステム20に対してデータ作成又は移動の指示を出し、かつデータベース管理部12が管理する論理データベース管理テーブル12a及び物理データベース管理テーブル12bの情報を更新する。
The data arrangement determining unit 18 uses the information managed by the database management unit 12 and the execution history management unit 17 to determine the data that should be duplicated and the database system 20 in which the data is to be arranged.
The data placement execution unit 19 issues an instruction to create or move data to each database system 20 through the database interface unit 11 according to the determination of the data placement determination unit 18, and the logical database management table 12 a managed by the database management unit 12 and Information in the physical database management table 12b is updated.
先ず、仮想データベースシステム管理装置10により、少なくとも部分的に同一データを有するデータベースシステム20が複数存在する場合に、ユーザの問合せ内容に応じてデータベースシステム20を選択し処理を実行するように複数のデータベースシステム20を管理する手順について、図1〜図5を参照して説明する。
仮想データベースシステム管理装置10には、複数のデータベースシステム20a,20bが接続され、ユーザシステム1からのアクセスに応じてデータが出力される。各データベースシステム20a,20bは、各種のデータが格納されたデータベース21と、データベース21を管理するデータベースマネジメントシステム(以下、DBMSと称する)22を備え、同一のデータがデータベース21に保有される環境となっている。
各データベースシステム20は、例えば、大容量に適したもの、アクセス時間が速いもの等、異なる性質を有するものを使用しても良い。
First, when there are a plurality of database systems 20 having at least a part of the same data by the virtual database system management apparatus 10, a plurality of databases are selected so that the database system 20 is selected according to the content of the user's inquiry and the process is executed. A procedure for managing the system 20 will be described with reference to FIGS.
A plurality of database systems 20 a and 20 b are connected to the virtual database system management apparatus 10, and data is output in response to access from the user system 1. Each database system 20a, 20b includes a database 21 in which various data are stored, and a database management system (hereinafter referred to as DBMS) 22 that manages the database 21, and the environment in which the same data is held in the database 21. It has become.
Each database system 20 may use, for example, those having different properties such as those suitable for a large capacity and those having a fast access time.
より具体的には、データベースシステム20aは、データベースマネジメントシステム(DBMS1)22とデータベース(DB1)21から構成され、DB1には2つテーブルTBL1とTBL2が定義されている。
同様にデータベースシステム20bは、データベースマネジメントシステム(DBMS2)22とデータベース(DB1)21から構成され、DB1には2つテーブルTBL1とTBL2が定義されている。データベースシステム20aとデータベースシステム20bのデータベース(DB1)21は、内容が同一と仮定する。この例では、2つのデータベース(DB1)21が同一と仮定しているが、必ずしも完全同一である必要はなく、部分的に同一データを持つ場合でも適用可能とすることができる。
More specifically, the database system 20a includes a database management system (DBMS1) 22 and a database (DB1) 21, and two tables TBL1 and TBL2 are defined in DB1.
Similarly, the database system 20b includes a database management system (DBMS2) 22 and a database (DB1) 21, and two tables TBL1 and TBL2 are defined in DB1. It is assumed that the contents of the database (DB1) 21 of the database system 20a and the database system 20b are the same. In this example, it is assumed that the two databases (DB1) 21 are the same. However, the two databases (DB1) 21 do not necessarily have to be completely the same, and can be applied even when partially having the same data.
仮想データベースシステム管理装置10に、この2つのデータベースシステム20a,20bが接続されると、データベース管理部12が各データベースシステム20a,20bからデータベース情報を取得し、図3に示すように、エントリ番号(P1〜P4)、DBMS(DBMS1かDBMS2)、データベース(DB1)、テーブル(TBL1かTBL2)、範囲条件の組を物理データベース管理テーブル12bとして管理する(管理テーブル作成手順)。
なお、必ずしも各データベースシステム20からデータを取得する必要はなく、例えば人手で物理データベース管理テーブルを作成してもよい。
When the two database systems 20a and 20b are connected to the virtual database system management apparatus 10, the database management unit 12 acquires database information from each of the database systems 20a and 20b, and, as shown in FIG. P1-P4), a DBMS (DBMS1 or DBMS2), a database (DB1), a table (TBL1 or TBL2), and a range condition group are managed as a physical database management table 12b (management table creation procedure).
Note that it is not always necessary to acquire data from each database system 20, and for example, a physical database management table may be created manually.
範囲条件とは、データベースシステム20において、エントリ番号に対応するテーブルのデータの有効範囲を定める条件を指定するものである。
図3の例では、データベースシステム20bのTBL1に対して、「日時」の属性があるとして、「日時」の値が「2013年1月」以降であるデータが有効であることを示している。
The range condition is used to specify a condition for determining an effective range of data in the table corresponding to the entry number in the database system 20.
In the example of FIG. 3, it is indicated that data having a “date and time” value of “January 2013” or later is valid assuming that there is an attribute of “date and time” for TBL1 of the database system 20b.
また、図4に示すように、ユーザシステム1からアクセス対象となる論理データベース情報(データベース、テーブル)を論理データベース管理テーブル12aと定義して管理する(管理テーブル作成手順)。
論理データベース管理テーブル12aには、物理データベース管理テーブルのデータに対して、対応する各エントリ番号を紐付けて管理する情報としてリンク項目が設定されている。
図2〜図4に示した例の場合、物理データベース管理テーブルのエントリ番号P1とエントリ番号P3、エントリ番号P2とエントリ番号P4は、それぞれ部分あるいは全体として同じ内容を持つことから、論理データベースとしてVDB1/VTBL1、VDB2/VTBL2を定義して、物理データベースと対応付けている。
Also, as shown in FIG. 4, logical database information (database, table) to be accessed from the user system 1 is defined and managed as a logical database management table 12a (management table creation procedure).
In the logical database management table 12a, link items are set as information for managing the data of the physical database management table in association with the corresponding entry numbers.
In the example shown in FIGS. 2 to 4, the entry number P1 and entry number P3 and the entry number P2 and entry number P4 in the physical database management table have the same contents as a part or the whole, so that VDB1 is used as a logical database. / VTBL1 and VDB2 / VTBL2 are defined and associated with the physical database.
ユーザシステム1から、ユーザインタフェース部13を通じて問合せ文が入力されると、問合せ入力解析部14による構文確認が行われ、解析結果は実行計画生成部15に入力される。 When a query statement is input from the user system 1 through the user interface unit 13, the syntax is checked by the query input analysis unit 14, and the analysis result is input to the execution plan generation unit 15.
次に、実行計画生成部15による実行計画生成処理により、問合せ対象のデータベース/テーブルを抽出し、データベース選択部15aにより、図5に示す手順によって問合せ文を実行するデータベースシステムを特定する(データベース選択手順)。
すなわち、データベース選択部15aは、実行計画生成部15より問合せ内容を取得し、問合せ内容に含まれるデータベースおよびテーブルの組を抽出する(ステップ61)。
Next, the database / table to be queried is extracted by the execution plan generation process by the execution plan generation unit 15, and the database system that executes the query statement by the procedure shown in FIG. 5 is specified by the database selection unit 15a (database selection). procedure).
That is, the database selection unit 15a acquires the query content from the execution plan generation unit 15, and extracts a database and table set included in the query content (step 61).
データベース選択部15aは、抽出したデータベースおよびテーブルの組を入力としてデータベース管理部12を呼び出す(ステップ62)。
データベース管理部12は、論理データベース管理テーブル12aより、取得したデータベースおよびテーブルの組に該当するエントリ番号を検索し、リンク項目に記載のエントリ番号を物理データベース管理テーブル12bより検索して、DBMS、データベース、テーブル、範囲条件の組を1つあるいは複数取得し、データベース選択部15aへ出力する(ステップ63)。
The database selection unit 15a calls the database management unit 12 with the extracted database and table set as input (step 62).
The database management unit 12 searches the logical database management table 12a for the entry number corresponding to the acquired database and table set, searches the physical database management table 12b for the entry number described in the link item, One or a plurality of sets of tables and range conditions are acquired and output to the database selection unit 15a (step 63).
データベース選択部15aでは、入力の組あたりの結果の組の個数が1つであるか複数であるかを判断する(ステップ64)。
データベース選択部15aにて、問合せ内容に含まれる検索条件も考慮し、問合せ内容の実行対象となる1組を選択する(ステップ65)。
The database selection unit 15a determines whether the number of result sets per input set is one or more (step 64).
The database selection unit 15a selects a set of query contents to be executed in consideration of the search condition included in the query contents (step 65).
データベース選択部15aでは、実行計画生成部15より取得したデータベースおよびテーブルの組(論理データベース)に対し、検索/選択したDBMS、データベース、テーブルの組(物理データベース)を対応させ、実行計画生成部15へ出力する(ステップ66)。
実行計画生成部15では、取得した情報を元に問合せ文に対する実行計画を生成して問合せ実行部16へ入力する。
問合せ実行部16では、実行計画に基づきデータベースインタフェース部11を介して問合せ文が実行され(処理手順)、最終的に実行結果がユーザシステム1に対して出力される。
In the database selection unit 15a, the database / table combination (logical database) acquired from the execution plan generation unit 15 is associated with the searched / selected DBMS, database, and table combination (physical database), and the execution plan generation unit 15 (Step 66).
The execution plan generation unit 15 generates an execution plan for the query statement based on the acquired information and inputs the execution plan to the query execution unit 16.
In the query execution unit 16, a query statement is executed via the database interface unit 11 based on the execution plan (processing procedure), and finally the execution result is output to the user system 1.
以上の手順が実行されることで、データベース選択部15aでは、問合せ文の内容を参照し、問合せ文に対応したデータベースシステムを選択することができる。
例えば、更新系の問合せはデータベースシステム20a(データベースシステム1)、参照系の問合せはデータベースシステム20b(データベースシステム2)とするよう予め設定することができる。また、各データベースシステム20の容量やアクセス速度等が異なる場合に、問合せ内容に適した容量やアクセス速度等を考慮することで、例えば、TBL1への問合せはデータベースシステム20a(データベースシステム1)、それ以外の問合せはデータベースシステム20b(データベースシステム2)と予め設定することもできる。
By executing the above procedure, the database selection unit 15a can select the database system corresponding to the query statement by referring to the contents of the query statement.
For example, the update system query can be preset to be the database system 20a (database system 1), and the reference query can be set to the database system 20b (database system 2). Further, when the capacity, access speed, etc. of each database system 20 are different, considering the capacity, access speed, etc. suitable for the query contents, for example, the query to TBL1 is the database system 20a (database system 1), Queries other than can be preset with the database system 20b (database system 2).
例えば、図2〜図4の例において、問合せ文の対象テーブルがVTBL1であった場合、論理データベース管理テーブル12aより、P1とP3にリンクされることがわかるため、物理データベース管理テーブル12bより検索して、P1とP3に該当する情報の組がデータベース選択部15aへ返される。データベース選択部15aでは、問合せ内容に応じてP1あるいはP3を選択するが、例えば、問合せ文の条件が、「日時≧2013年1月」に適合し、かつDBMS2の方が処理能力が高いような場合にはP3を選択する、というように動作する。 For example, in the example of FIGS. 2 to 4, when the target table of the query statement is VTBL1, it is found from the logical database management table 12a that it is linked to P1 and P3. Thus, a set of information corresponding to P1 and P3 is returned to the database selection unit 15a. The database selection unit 15a selects P1 or P3 according to the contents of the inquiry. For example, the condition of the inquiry sentence is suitable for “date and time ≧ January 2013”, and DBMS2 has higher processing capability. In such a case, P3 is selected.
また、データベース選択部15aに、問合せ文の内容についてのコスト評価を行うコスト評価部を設け、このコスト評価部で算出した値に基づいてデータベースシステム20を選択するようにしても良い。コスト評価部では、例えば、問合せ入力解析部14の解析結果に基づいて評価値を算出する。 Further, the database selection unit 15a may be provided with a cost evaluation unit that performs cost evaluation on the contents of the inquiry sentence, and the database system 20 may be selected based on the value calculated by the cost evaluation unit. For example, the cost evaluation unit calculates an evaluation value based on the analysis result of the inquiry input analysis unit 14.
データベース選択部15aによって特定されたデータベース情報に従って、実行計画生成部15にて実行計画及び各データベースシステム20に合わせた問合せ文を生成し、問合せ実行部16にてデータベースインタフェース部11を介して問合せ文が実行され、最終的に実行結果がユーザシステム1に対して出力される。 In accordance with the database information specified by the database selection unit 15a, the execution plan generation unit 15 generates an execution plan and a query statement suitable for each database system 20, and the query execution unit 16 sends the query statement via the database interface unit 11. Is executed, and the execution result is finally output to the user system 1.
次に、本発明の特徴的な構成である、ユーザからの問合せ内容を効率よく処理するために、データベースシステム20が複数存在する場合に、どのデータを重複して複数のデータベースシステム20に配置すべきかの管理に関して、図6に示す仮想データベースシステム管理装置10のデータベースシステムA,データベースシステムBを例に、図1における実行履歴管理部17、データ配置決定部18、データ配置実行部19の機能について説明する。 Next, in order to efficiently process the inquiry contents from the user, which is a characteristic configuration of the present invention, when there are a plurality of database systems 20, which data should be duplicated and placed in the plurality of database systems 20. Regarding the management of the kimono, the functions of the execution history management unit 17, the data arrangement determination unit 18, and the data arrangement execution unit 19 in FIG. 1 are exemplified with the database system A and the database system B of the virtual database system management apparatus 10 shown in FIG. explain.
図6の仮想データベースシステム管理装置(例1)においては、図7及び図8に示すように、物理データベースとしてDBMS−A.DB1.TBL1が存在し、論理データベースVDB1.VTBL1にリンク(リンク先P1)されている。 図7の物理データベース管理テーブルは、前記した図3に相当するものであり、エントリ番号(この例の場合、P1のみ)、DBMS(この例の場合、DBMS−A)、データベース(DB1)、テーブル(TBL1)、範囲条件の組が管理されている。図8の論理データベース管理テーブルは、前記した図4に相当するものであり、リンク先P1が示されている。 In the virtual database system management apparatus (example 1) of FIG. 6, as shown in FIGS. 7 and 8, DBMS-A. DB1. TBL1 exists and the logical database VDB1. Linked to VTBL1 (link destination P1). The physical database management table of FIG. 7 corresponds to FIG. 3 described above, and includes an entry number (only P1 in this example), a DBMS (in this example, DBMS-A), a database (DB1), and a table. (TBL1), a set of range conditions is managed. The logical database management table in FIG. 8 corresponds to FIG. 4 described above, and shows a link destination P1.
また、データベース管理部12のデータベースシステム情報テーブル12cでは、図9に示すように、各データベースシステム20(データベースシステムA、データベースシステムB)の処理における優先度、リソース容量、リソース利用率が管理されている。優先度は、どちらのデータベースシステム20を優先するのかを設定するものである。容量は、データベースシステム20に記録される容量値である。利用率は、各データベースシステム20における利用状況の指標であり、%で示される。
この例の場合、データベースシステムBについては、容量が小さく(1TB)処理速度が速いデータベースとし、データベースシステムAについては、容量が大きい(100TB)データベースを使用し、例えば利用率が90%になるまでは、データベースシステムBに優先的にデータが登録されるようになっている。
以下、データベースシステムAに物理データとして存在するTBL1について、処理速度が速いデータベースシステムBに再配置(コピー)する管理手順について説明する。
Further, as shown in FIG. 9, the database system information table 12c of the database management unit 12 manages the priority, resource capacity, and resource utilization rate in the processing of each database system 20 (database system A, database system B). Yes. The priority sets which database system 20 has priority. The capacity is a capacity value recorded in the database system 20. The utilization rate is an index of the utilization status in each database system 20, and is indicated by%.
In this example, the database system B is a database having a small capacity (1 TB) and a high processing speed, and the database system A is a database having a large capacity (100 TB), for example, until the utilization rate reaches 90%. Are preferentially registered in the database system B.
Hereinafter, a management procedure for rearranging (copying) TBL1 existing as physical data in the database system A to the database system B having a high processing speed will be described.
実行履歴管理部17では、問合せ実行部16より実行した問合せ文(クエリ)の実行計画(どのクエリをどのデータベースで処理するかなど)と実行結果(処理時間、処理件数、データ量など)の情報を取得し、実行履歴管理テーブル17aに記録する。
ユーザからの問合せ文は、各データベースシステム20にて実行されるサブ問合せ文に変換され、各データシステム20に対するサブ問合せ文実行をステージ1、それらの結果に基づいてユーザに対して問合せ文の処理を実行するステージ2に分けて、図10に示すような実行履歴管理テーブルに記録される。すなわち、各問合せ文をステージ1とステージ2に分け、使用したデータベース、使用したテーブル、リンク先に関する情報、ステージ1とステージ2のそれぞれの実行結果が記録される。
ステージ1の実行結果は各データベースシステム20における各サブ問合せ文の実行結果(α1,β1,γ1,δ1,ε1)となり、ステージ2の実行結果は問合せ文全体の実行結果(α2,β2,γ2,δ2,ε2)となる。
In the execution history management unit 17, information on an execution plan (which query is processed in which database) and an execution result (processing time, processing number, data amount, etc.) of the query statement (query) executed by the query execution unit 16. Is recorded in the execution history management table 17a.
The query sentence from the user is converted into a sub-query sentence to be executed in each database system 20, the sub-query sentence execution for each data system 20 is stage 1, and the query sentence is processed for the user based on the result. Are recorded in an execution history management table as shown in FIG. That is, each query statement is divided into stage 1 and stage 2, and the database used, the table used, information about the link destination, and the execution results of stage 1 and stage 2 are recorded.
The execution result of stage 1 is the execution result (α1, β1, γ1, δ1, ε1) of each subquery statement in each database system 20, and the execution result of stage 2 is the execution result of the entire query statement (α2, β2, γ2, δ2, ε2).
また、実行履歴管理部17では、実行履歴管理テーブルのリンクに記された物理データベース管理テーブルの各テーブルに対して、データベースアクセス管理テーブル17bを作成する。すなわち、データベースアクセス管理テーブルは、物理テーブルの種類の数だけ作成される。
データベースアクセス管理テーブルは、図11に示すように、対象テーブルにて実行された各サブ問合せ文に対して、複数カラム(COL1〜5)から参照されたカラムを記録する。図11では、各カラムに対して参照部分がカラム全体を示すチェックを付しているが、参照部分がカラム全体ではなく一部に限られる場合はチェックでなくその範囲(例えば、2014年1月)を記録するようにしてもよい。
Further, the execution history management unit 17 creates a database access management table 17b for each table of the physical database management table described in the link of the execution history management table. That is, as many database access management tables as the number of physical table types are created.
As shown in FIG. 11, the database access management table records columns referred to from a plurality of columns (COL1 to COL5) for each subquery executed in the target table. In FIG. 11, for each column, a check indicating that the reference portion indicates the entire column is added. However, when the reference portion is limited to a part rather than the entire column, not the check but the range (for example, January 2014). ) May be recorded.
次に、データ配置決定部18における処理について、図12を参照して説明する。
実行履歴管理部17の実行履歴管理テーブル17aより、問合せ文におけるステージ2の実行結果(処理時間等)が一定以上の問合せ文Qiを抽出する(ステップ81)。
各問合せ文Qiにおいて、サブ問合せ文の対象物理テーブルの組を抽出し、重複排除したものをSjとする。各Sjに対して、データベースアクセス管理テーブルより、対応するQiのレコードを抽出したテーブルTjを生成する(ステップ82)。
各テーブルTjに対して、利用頻度の高いカラム条件Cjを抽出しデータ再配置候補とする(ステップ83)。
各Cjに対して、データベースシステム情報テーブルを参照し、優先度及びリソース情報から再配置先のデータベースDBMSj.DBjを決定し、{Cj,DBMSj.DBj}を出力する。
再配置先のデータベースが決定できない場合は、処理をスキップする(ステップ84)。
Next, processing in the data arrangement determining unit 18 will be described with reference to FIG.
From the execution history management table 17a of the execution history management unit 17, a query statement Qi whose stage 2 execution result (processing time, etc.) in the query statement exceeds a certain level is extracted (step 81).
In each query sentence Qi, a set of target physical tables of the sub-query sentence is extracted, and the deduplicated one is Sj. For each Sj, a table Tj is generated by extracting the corresponding Qi record from the database access management table (step 82).
For each table Tj, a column condition Cj having a high usage frequency is extracted and set as a data rearrangement candidate (step 83).
For each Cj, the database system information table is referenced, and the relocation destination database DBMSj. DBj is determined and {Cj, DBMSj. DBj} is output.
If the relocation destination database cannot be determined, the process is skipped (step 84).
データ配置決定部18における処理の具体例について、図10の例で説明する。
図10の例において、問合せ文について、実行結果(処理時間など)の条件は全て満たすと仮定すると、問合せ文としてQ1〜Q5が抽出される。
これらの問合せ文Q1〜Q5のサブ問合せ文の対象物理テーブルは全てP1であるため、重複排除するとS1={P1}となる。P1に対して、図11のデータベースアクセス管理テーブルより対象レコードを抽出すると、T1は図11のテーブルと同様となる。
A specific example of processing in the data arrangement determining unit 18 will be described with reference to the example of FIG.
In the example of FIG. 10, assuming that all conditions of the execution result (processing time, etc.) are satisfied for the query statement, Q1 to Q5 are extracted as the query statements.
Since all the target physical tables of the sub-query statements of these query statements Q1 to Q5 are P1, when deduplication is performed, S1 = {P1}. When target records are extracted from the database access management table of FIG. 11 for P1, T1 becomes the same as the table of FIG.
T1において、利用頻度の高いカラム条件(例えば、5つのサブ問合せ文に対して4つ以上のサブ問合せ文で参照されたカラム)を考えると、この例の場合、COL1,COL2,COL3が該当するため、{DBMS−A.DB1.TBL1.COL1,DBMS−A.DB1.TBL1.COL2,DBMS−A.DB1.TBL1.COL3 }をデータ再配置候補とする。 Considering column conditions that are frequently used in T1 (for example, columns referenced by four or more subquery statements for five subquery statements), in this example, COL1, COL2, and COL3 are applicable. Therefore, {DBMS-A. DB1. TBL1. COL1, DBMS-A. DB1. TBL1. COL2, DBMS-A. DB1. TBL1. Let COL3} be a data relocation candidate.
図9のデータベースシステム情報テーブルを参照すると、データベースシステムAよりデータベースシステムBの方が優先度が高く、データをデータベースシステムBに配置した方が処理効率が向上することが期待できるため、データベースシステムBの空きリソースを確認した上で問題なければ、データベースシステムB(DBMS−B.DB1)を配置先と決定し、{{DBMS−A.DB1.TBL1.COL1,DBMS−A.DB1.TBL1.COL2,DBMS−A.DB1.TBL1.COL3 },DBMS−B.DB1}を出力する。 Referring to the database system information table of FIG. 9, the database system B has a higher priority than the database system A, and it can be expected that the processing efficiency is improved when the data is arranged in the database system B. If there is no problem after checking the free resources of the database, the database system B (DBMS-B.DB1) is determined as the placement destination, and {{DBMS-A. DB1. TBL1. COL1, DBMS-A. DB1. TBL1. COL2, DBMS-A. DB1. TBL1. COL3}, DBMS-B. DB1} is output.
データ配置実行部19における処理について、図13を参照して説明する。
データ配置決定部18からの入力の各{Cj,DBMSj.DBj}について、データベースインタフェース部11を通じて、Cjの範囲のデータをDBMSj.DBjに複製あるいは移動する(ステップ91)。
データベース管理部12を通じて、物理データベース管理テーブル12b及び論理データベース管理テーブル12aを更新する(ステップ92)。
Processing in the data arrangement execution unit 19 will be described with reference to FIG.
Each {Cj, DBMSj. DBj}, the data in the range of Cj is sent to DBMSj. Duplicate or move to DBj (step 91).
The physical database management table 12b and the logical database management table 12a are updated through the database management unit 12 (step 92).
図6〜図11の例の場合、データ配置決定部18からの入力は{ {DBMS−A.DB1.TBL1.COL1,DBMS−A.DB1.TBL1.COL2,DBMS−A.DB1.TBL1.COL3 },DBMS−B.DB1 }となるので、DBMS−A.DB1.TBL1よりカラムCOL1,COL2,COL3を抽出して、DBMS−B.DB1にTBL1としてデータを複製する。 6 to 11, the input from the data arrangement determining unit 18 is {{DBMS-A. DB1. TBL1. COL1, DBMS-A. DB1. TBL1. COL2, DBMS-A. DB1. TBL1. COL3}, DBMS-B. DB1}, DBMS-A. DB1. Columns COL1, COL2, and COL3 are extracted from TBL1, and DBMS-B. Data is replicated to DB1 as TBL1.
その結果として、図14に示すように、TBL1のデータはデータベースシステムA及びデータベースシステムBに存在することとなり、物理データベース管理テーブル及び論理データベース管理テーブルは、それぞれ図15及び図16のように更新される。すなわち、物理データベース管理テーブル(図15)では、エントリ番号P2としてDBMS−Bにおいて、DB1,TBL1,範囲条件カラムCOL1,COL2,COL3のデータが作成され、論理データベース管理テーブル(図16)では、リンク先にP2が加えられる。
これにより、VTBL1に対する問合せ文は、P1あるいはP2を選択して処理することが可能となり、利用頻度の高いカラムCOL1,COL2,COL3へのアクセスは、P2で紐づけられたより処理能力の高いデータベースシステムBでの処理が可能となるので、処理効率が改善される。
なお、VTBL1に対する問合せ文におけるカラムCOL4へのアクセスは、P2の選択で処理できないので、P1を選択してデータベースシステムAで処理される。
As a result, as shown in FIG. 14, the data of TBL1 exists in the database system A and the database system B, and the physical database management table and the logical database management table are updated as shown in FIGS. 15 and 16, respectively. The That is, in the physical database management table (FIG. 15), data of DB1, TBL1, range condition columns COL1, COL2, COL3 are created in DBMS-B as entry number P2, and in the logical database management table (FIG. 16), a link P2 is added first.
As a result, the query statement for VTBL1 can be processed by selecting P1 or P2. Access to the frequently used columns COL1, COL2, and COL3 is a database system having a higher processing capacity than that associated with P2. Since processing in B becomes possible, processing efficiency is improved.
Since access to the column COL4 in the query statement for VTBL1 cannot be processed by selecting P2, P1 is selected and processed by the database system A.
複製対象がテーブル全体の場合は、必ずしも元データを保持する必要はないので、データベースの容量確保のため複製後に元データを削除することもできる。この場合、それに応じて物理データベース管理テーブル及び論理データベース管理テーブルも更新される。 When the replication target is the entire table, it is not always necessary to retain the original data. Therefore, the original data can be deleted after the replication in order to secure the capacity of the database. In this case, the physical database management table and the logical database management table are also updated accordingly.
続いて、仮想データベースシステム管理装置10に対する物理データの配置に関して、より複雑な例(例2)について、図17〜図27を参照して説明する。
この例では、物理データベースとしてDBMS−A.DB1.TBL1(エントリ番号P1)及びDBMS−B.DB1.TBL2(エントリ番号P2)が存在し、それぞれ論理データベースVDB1.VTBL1及びVDB1.VTBL2にリンクされているものとする(図17、図18、図19)。
また、データベース管理部12のデータベースシステム情報テーブル12cでは、図20に示すように、各データベースシステム20(データベースシステムA、データベースシステムB)の処理における優先度、リソース容量、リソース利用率が管理されている。この例では、データベースシステムA(容量100TB)とデータベースシステムB(容量50TB)は容量に差があるが、優先度は同じ(MEDIUM)に設定されている。
Subsequently, a more complicated example (example 2) regarding the arrangement of physical data with respect to the virtual database system management apparatus 10 will be described with reference to FIGS. 17 to 27.
In this example, DBMS-A. DB1. TBL1 (entry number P1) and DBMS-B. DB1. TBL2 (entry number P2) exists, and logical databases VDB1. VTBL1 and VDB1. Assume that it is linked to VTBL2 (FIGS. 17, 18, and 19).
Further, in the database system information table 12c of the database management unit 12, as shown in FIG. 20, the priority, resource capacity, and resource utilization rate in the processing of each database system 20 (database system A, database system B) are managed. Yes. In this example, the database system A (capacity 100 TB) and the database system B (capacity 50 TB) are different in capacity, but the priority is set to the same (MEDIAUM).
データ配置決定部18において、前述の例と同様、実行結果の条件は全て満たすと仮定すると、図21の実行履歴管理テーブルより、問合せ文Q1〜Q5が抽出される。問合せ文Q1〜Q5は、2種類のサブ問合せ文Q1A〜Q5AとQ1B〜Q5Bを有し、これらのサブ問合せ文の対象物理テーブルは全て{P1,P2}であるため、S1={P1,P2}となる。すなわち、サブ問合せ文Q1A〜Q5Aに対するデータベースアクセス管理テーブル(P1)は図22のようになり、サブ問合せ文Q1B〜Q5Bに対するデータベースアクセス管理テーブル(P2)は図23のようになる。
S1に対して、図22及び図23のデータベースアクセス管理テーブルより対象レコードを抽出すると、テーブルT1は図24に示す通りとなる。
Assuming that all conditions of the execution result are satisfied in the data arrangement determining unit 18 as in the above example, the query statements Q1 to Q5 are extracted from the execution history management table of FIG. The query statements Q1 to Q5 have two types of subquery statements Q1A to Q5A and Q1B to Q5B. Since the target physical tables of these subquery statements are all {P1, P2}, S1 = {P1, P2 }. That is, the database access management table (P1) for the sub-query statements Q1A to Q5A is as shown in FIG. 22, and the database access management table (P2) for the sub-query statements Q1B to Q5B is as shown in FIG.
When the target record is extracted from the database access management table of FIGS. 22 and 23 for S1, the table T1 becomes as shown in FIG.
T1において、利用頻度の高いカラム条件(例えば、5つのサブ問合せ文に対して4つ以上のサブ問合せ文で参照されたカラム)を考えると、DBMS−A.DB1.TBL1のCOL1,COL2,COL3、DBMS−B.DB1.TBL2のCOL1,COL2が該当するため、{DBMS−A.DB1.TBL1.COL1,DBMS−A.DB1.TBL1.COL2,DBMS−A.DB1.TBL1.COL3,DBMS−B.DB1.TBL2.COL1,DBMS−B.DB1.TBL2.COL2}がデータ再配置候補となる。
カラム条件が複数のデータベースシステム(DBMS−A.DB1,DBMS−B.DB1)に分散していることから、1つのデータベースシステムにデータを集約することにより処理効率の向上が期待できる。
Considering column conditions that are frequently used in T1 (for example, columns referred to by four or more subquery statements for five subquery statements), DBMS-A. DB1. TBL1 COL1, COL2, COL3, DBMS-B. DB1. Since COL1 and COL2 of TBL2 are applicable, {DBMS-A. DB1. TBL1. COL1, DBMS-A. DB1. TBL1. COL2, DBMS-A. DB1. TBL1. COL3, DBMS-B. DB1. TBL2. COL1, DBMS-B. DB1. TBL2. COL2} is a data relocation candidate.
Since column conditions are distributed in a plurality of database systems (DBMS-A.DB1, DBMS-B.DB1), it is possible to expect improvement in processing efficiency by consolidating data in one database system.
データベースシステム情報テーブルの情報に基づいて、集約すべきデータベースシステムを選択し、空きリソースを確認した上で、データの再配置先を決定する。
この例の場合、図20のデータベースシステム情報テーブルにおいて2つのデータベースシステムの優先度に差がないことから、データ量で判断し、DBMS−B.DB1.TBL2のカラム条件のデータをDBMS−A.DB1に複製することとし、{{DBMS−B.DB1.TBL2.COL1,DBMS−B.DB1.TBL2.COL2},DBMS−A.DB1}を出力する。
Based on the information in the database system information table, a database system to be aggregated is selected, a free resource is confirmed, and a data relocation destination is determined.
In the case of this example, there is no difference in priority between the two database systems in the database system information table of FIG. DB1. Data on column conditions of TBL2 is DBMS-A. Suppose that it replicates in DB1, {{DBMS-B. DB1. TBL2. COL1, DBMS-B. DB1. TBL2. COL2}, DBMS-A. DB1} is output.
次に、データ配置実行部19において、データの複製と物理データベース管理テーブル及び論理データベース管理テーブルの更新が行われ、再配置後の仮想データベースシステム管理装置のモデル図は、図25に示すように、データベースシステムAにTBL2が複製された構成となる。
再配置後の物理データベース管理テーブル(図26)では、エントリ番号P3として、DBMS−Aにおいて、DB1,TBL2,範囲条件カラムCOL1,COL2のデータが作成され、再配置後の論理データベース管理テーブル(図27)では、VTBL2のリンク先にP3が加えられる。
Next, in the data placement execution unit 19, data replication and update of the physical database management table and logical database management table are performed, and the model diagram of the virtual database system management device after the rearrangement is as shown in FIG. The database system A has a configuration in which TBL2 is replicated.
In the physical database management table after relocation (FIG. 26), data of DB1, TBL2, and range condition columns COL1, COL2 are created in DBMS-A as entry number P3. In 27), P3 is added to the link destination of VTBL2.
上述した仮想データベースシステム管理装置10によれば、複数のデータベースシステム20が存在する環境において、ユーザの問合せ内容に応じてデータベースシステム20を選択して処理を実行するに際して、実行履歴管理部17におけるユーザの過去の問合せ内容とその処理結果を基に、データ配置決定部18において、重複して持つべきデータ(データ再配置候補)とそのデータを配置すべきデータベースシステム20を選択決定し、データ配置実行部19でデータ再配置を実行することが可能となる。
これにより、処理能力の異なる複数のデータベースシステム20をより効率良く利用することができるとともに、複数のデータベースシステム20に分散したデータに対する問合せ実行時に、処理のオーバーヘッドを解消して実行時間が大幅に短縮されることが期待できる。
According to the virtual database system management apparatus 10 described above, in the environment where a plurality of database systems 20 exist, when the database system 20 is selected according to the user's inquiry content and the process is executed, the user in the execution history management unit 17 The data arrangement determination unit 18 selects and determines the data to be duplicated (data relocation candidate) and the database system 20 to which the data is to be arranged based on the past inquiry contents and the processing result of the data, and executes the data arrangement Data relocation can be executed by the unit 19.
As a result, a plurality of database systems 20 having different processing capacities can be used more efficiently, and processing time is greatly reduced by executing processing queries on data distributed to the plurality of database systems 20, thereby significantly reducing the execution time. Can be expected.
したがって、複数のデータベースシステム20が存在する環境において、どのデータがどこのデータベースシステム20に保持されていたとしても、ユーザの使い方に応じてデータの配置が最適化されるため、利用者やシステム管理者のデータベースシステム管理に関する負荷が軽減され、利便性を向上させることができる。 Accordingly, in an environment where a plurality of database systems 20 exist, the data arrangement is optimized according to the user's usage, regardless of which data is stored in which database system 20, so that the user and system management The user's burden on database system management is reduced, and convenience can be improved.
1…ユーザシステム、 10…仮想データベースシステム管理装置、 11…データベースインタフェース部、 12…データベース管理部、 12a…論理データベース管理テーブル、 12b…物理データベース管理テーブル、 12c…データベースシステム情報テーブル、 13…ユーザインタフェース部、 14…問合せ入力解析部、 15…実行計画生成部、 15a…データベース選択部、 16…問合せ実行部、 17…実行履歴管理部、 17a…実行履歴管理テーブル、 17b…データベースアクセス管理テーブル、 18…データ配置決定部、 19…データ配置実行部、 20…データベースシステム、 21…データベース、 22…データベースマネジメントシステム(DBMS)。 DESCRIPTION OF SYMBOLS 1 ... User system, 10 ... Virtual database system management apparatus, 11 ... Database interface part, 12 ... Database management part, 12a ... Logical database management table, 12b ... Physical database management table, 12c ... Database system information table, 13 ... User interface , 14 ... Query input analysis unit, 15 ... Execution plan generation unit, 15a ... Database selection unit, 16 ... Query execution unit, 17 ... Execution history management unit, 17a ... Execution history management table, 17b ... Database access management table, 18 ... Data arrangement determination unit, 19 ... Data arrangement execution unit, 20 ... Database system, 21 ... Database, 22 ... Database management system (DBMS).
Claims (5)
前記データベースに関連付けたエントリ番号を管理する物理データベース管理テーブルと、
前記ユーザシステムからのアクセス対象となる論理データベース情報を定義し、前記物理データベース管理テーブルのデータに対して、対応する前記各エントリ番号を紐付けて管理する論理データベース管理テーブルと、
各データベースシステムにおける処理の優先度、リソース容量、リソース利用率を管理するデータベースシステム情報テーブルと、
前記ユーザシステムからの問合せに対して、アクセス対象の論理データベース情報を抽出し、前記論理データベース管理テーブル及び前記物理データベース管理テーブルより対応する物理データベース情報の組を取得し、取得した物理データベース情報の組が複数存在する場合に、問合せ内容に応じて1つの組を選択するデータベース選択部と、
前記問合せ内容の実行計画及び実行結果を取得し実行履歴管理テーブルを作成して管理する実行履歴管理部と、
前記実行履歴管理部及び前記データベースシステム情報テーブルが管理する情報を用いて重複して持つべきデータ(データ再配置候補)及び該データを配置するべきデータベースシステムを決定するデータ配置決定部と、
前記データ配置決定部の決定に従って前記データベースシステムに対してデータの作成又は移動を指示し、前記論理データベース管理テーブル及び前記物理データベース管理テーブルの情報を更新するデータ配置実行部と、
を備えたことを特徴とする仮想データベースシステム管理装置。 In a database system management apparatus in which a plurality of database systems capable of holding at least partially the same data in a database are connected, and data is output in response to access from a user system,
A physical database management table for managing entry numbers associated with the database;
A logical database management table that defines logical database information to be accessed from the user system and manages the data of the physical database management table in association with the corresponding entry numbers;
A database system information table for managing processing priority, resource capacity, and resource utilization in each database system;
In response to the query from the user system, the logical database information to be accessed is extracted, the corresponding set of physical database information is acquired from the logical database management table and the physical database management table, and the acquired set of physical database information A database selection unit that selects one set according to the content of the query,
An execution history management unit that acquires an execution plan and execution result of the inquiry content and creates and manages an execution history management table;
A data placement determination unit for determining data to be duplicated (data rearrangement candidates) using the information managed by the execution history management unit and the database system information table, and a database system in which the data is to be placed;
A data placement execution unit that instructs the database system to create or move data according to the determination of the data placement determination unit, and updates information of the logical database management table and the physical database management table;
A virtual database system management apparatus comprising:
前記実行履歴管理部は、前記実行履歴管理テーブルの前記リンク先に記された物理データベースの各テーブルに対するデータベースアクセス管理テーブルを作成し、
前記データベースアクセス管理テーブルは、対象テーブルにて実行された各問合せ内容に対して参照された複数カラムが記録され、
前記データ配置決定部は、各テーブルに対して利用頻度の高いカラム条件を抽出して前記重複して持つべきデータ(データ再配置候補)を決定する
請求項1に記載の仮想データベースシステム管理装置。 The execution history management table has information on a link destination of a table in which each inquiry content is executed,
The execution history management unit creates a database access management table for each table of the physical database described in the link destination of the execution history management table,
In the database access management table, a plurality of columns referred to for each inquiry executed in the target table are recorded,
The virtual database system management apparatus according to claim 1, wherein the data arrangement determining unit determines column data (data relocation candidates) that should be duplicated by extracting column conditions that are frequently used for each table.
前記ユーザシステムからのアクセス対象となる論理データベース情報を定義する論理データベース管理テーブルと、前記論理データベース情報に対し前記複数のデータベースシステムにおける1つあるいは複数のデータベースマネジメントシステム(DBMS)、データベース・テーブルの組を割り当てる物理データベース管理テーブルとを作成する管理テーブル作成手順と、
前記ユーザシステムからの問合せ内容の実行計画と実行結果を取得して実行履歴管理テーブルとして管理する実行履歴管理手順と、
各データベースシステムのリソース利用情報を取得して管理するデータベースシステム管理手順と、
前記実行履歴管理テーブルが管理する情報及び前記リソース利用情報を用いて重複して持つべきデータ(データ再配置候補)及び該データを配置するべきデータベースシステムを決定するデータ配置決定手順と、
前記決定に従って前記データベースシステムに対してデータの作成又は移動の指示を出し、前記論理データベース管理テーブル及び物理データベース管理テーブルの情報を更新する更新手順と、
により実行することを特徴とする仮想データベースシステム管理方法。 In an environment where multiple database systems that allow the same data to be stored in a database are connected and data is output in response to access from a user system,
Logical database management table defining logical database information to be accessed from the user system, one or a plurality of database management systems (DBMS) in the plurality of database systems, and a set of database tables for the logical database information A management table creation procedure for creating a physical database management table to which
An execution history management procedure for acquiring an execution plan and execution results of the query content from the user system and managing them as an execution history management table;
Database system management procedure for acquiring and managing resource usage information of each database system,
A data arrangement determination procedure for determining data to be duplicated using the information managed by the execution history management table and the resource usage information (data relocation candidates) and a database system in which the data is to be arranged;
An update procedure for instructing the database system to create or move data according to the determination, and updating information in the logical database management table and physical database management table;
The virtual database system management method characterized by performing by this.
前記実行履歴管理手順は、前記実行履歴管理テーブルの前記リンク先に記された物理データベースの各テーブルに対するデータベースアクセス管理テーブルを作成し、
前記データベースアクセス管理テーブルは、対象テーブルにて実行された各問合せ内容に対して参照された複数カラムが記録され、
前記データ配置決定手順は、各テーブルに対して利用頻度の高いカラム条件を抽出して前記重複して持つべきデータ(データ再配置候補)を決定する
請求項3に記載の仮想データベースシステム管理方法。 The execution history management table has information on a link destination of a table in which each inquiry content is executed,
The execution history management procedure creates a database access management table for each table of the physical database described in the link destination of the execution history management table,
In the database access management table, a plurality of columns referred to for each inquiry executed in the target table are recorded,
The virtual database system management method according to claim 3, wherein the data arrangement determination procedure determines column data (data relocation candidates) that should be duplicated by extracting column conditions that are frequently used for each table.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014057080A JP6157004B2 (en) | 2014-03-19 | 2014-03-19 | Virtual database system management apparatus, management method, and management program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014057080A JP6157004B2 (en) | 2014-03-19 | 2014-03-19 | Virtual database system management apparatus, management method, and management program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015179449A JP2015179449A (en) | 2015-10-08 |
| JP6157004B2 true JP6157004B2 (en) | 2017-07-05 |
Family
ID=54263430
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014057080A Expired - Fee Related JP6157004B2 (en) | 2014-03-19 | 2014-03-19 | Virtual database system management apparatus, management method, and management program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6157004B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018005822A (en) * | 2016-07-08 | 2018-01-11 | Kddi株式会社 | Virtual database system management device, management method and management program |
| JP6674871B2 (en) * | 2016-09-08 | 2020-04-01 | 日本電信電話株式会社 | Heterogeneous database management device, method and program |
| US10162721B2 (en) | 2016-11-28 | 2018-12-25 | Sap Se | Workload shifting in a database system using hint-based routing |
| JP6744272B2 (en) * | 2017-09-28 | 2020-08-19 | Kddi株式会社 | Migration management device and migration management method |
| JP2020024483A (en) * | 2018-08-06 | 2020-02-13 | 京セラドキュメントソリューションズ株式会社 | Data management system and data management program |
| DE112023006147T5 (en) * | 2023-06-15 | 2026-02-26 | Mitsubishi Electric Corporation | DATA MODEL OPTIMIZATION SYSTEM, DATA MODEL OPTIMIZATION METHOD AND DATA MODEL OPTIMIZATION PROGRAM |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02231676A (en) * | 1989-03-06 | 1990-09-13 | Toshiba Corp | Distributed data base system |
| JPH10312331A (en) * | 1997-05-14 | 1998-11-24 | Hitachi Ltd | Database dynamic access method |
| JP4445783B2 (en) * | 2003-12-09 | 2010-04-07 | 株式会社日立製作所 | File management apparatus and computer system using file management apparatus |
| US20050125456A1 (en) * | 2003-12-09 | 2005-06-09 | Junichi Hara | File migration method based on access history |
| CN103577407B (en) * | 2012-07-19 | 2016-10-12 | 国际商业机器公司 | Querying method and inquiry unit for distributed data base |
| JP2015045995A (en) * | 2013-08-28 | 2015-03-12 | Kddi株式会社 | Virtual database system management device, management method and management program |
-
2014
- 2014-03-19 JP JP2014057080A patent/JP6157004B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2015179449A (en) | 2015-10-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12287760B2 (en) | Data pruning based on metadata | |
| JP7130600B2 (en) | Implementing semi-structured data as first-class database elements | |
| JP6157004B2 (en) | Virtual database system management apparatus, management method, and management program | |
| JP6964384B2 (en) | Methods, programs, and systems for the automatic discovery of relationships between fields in a mixed heterogeneous data source environment. | |
| US11030196B2 (en) | Method and apparatus for processing join query | |
| CN104903894A (en) | System and method for distributed database query engine | |
| CN101866358A (en) | A multi-dimensional interval query method and system | |
| CN107783985A (en) | A kind of distributed networks database query method, apparatus and management system | |
| EP2981908A1 (en) | Query integration across databases and file systems | |
| US9984082B2 (en) | Index suspension prior to database update | |
| US11269954B2 (en) | Data searching method of database, apparatus and computer program for the same | |
| CN105989015B (en) | Database capacity expansion method and device and method and device for accessing database | |
| CN104823185A (en) | Systems and methods for interest-driven data sharing in interest-driven business intelligence systems | |
| US20170270149A1 (en) | Database systems with re-ordered replicas and methods of accessing and backing up databases | |
| JP6204753B2 (en) | Distributed query processing apparatus, processing method, and processing program | |
| JP6376947B2 (en) | Virtual database system management apparatus, management method, and management program | |
| JP6393193B2 (en) | Data virtualization apparatus and large-scale data processing program | |
| JP7274293B2 (en) | Information processing device, information processing method and program | |
| CN103353891B (en) | Data base management system and its data processing method | |
| US10572483B2 (en) | Aggregate projection | |
| JP2015045995A (en) | Virtual database system management device, management method and management program | |
| JP6523823B2 (en) | Virtual database system management apparatus, management method and management program | |
| JP7211255B2 (en) | Search processing program, search processing method and information processing device | |
| Nevarez | Indexing |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160729 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20160822 |
|
| 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: 20170531 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170531 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170605 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6157004 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |