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
JP4326303B2 - Database migration apparatus and program thereof - Google Patents
[go: Go Back, main page]

JP4326303B2 - Database migration apparatus and program thereof - Google Patents

Database migration apparatus and program thereof Download PDF

Info

Publication number
JP4326303B2
JP4326303B2 JP2003373853A JP2003373853A JP4326303B2 JP 4326303 B2 JP4326303 B2 JP 4326303B2 JP 2003373853 A JP2003373853 A JP 2003373853A JP 2003373853 A JP2003373853 A JP 2003373853A JP 4326303 B2 JP4326303 B2 JP 4326303B2
Authority
JP
Japan
Prior art keywords
information
database
index
data group
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.)
Expired - Fee Related
Application number
JP2003373853A
Other languages
Japanese (ja)
Other versions
JP2005141280A (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.)
Creo Co Ltd
Original Assignee
Creo Co 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 Creo Co Ltd filed Critical Creo Co Ltd
Priority to JP2003373853A priority Critical patent/JP4326303B2/en
Publication of JP2005141280A publication Critical patent/JP2005141280A/en
Application granted granted Critical
Publication of JP4326303B2 publication Critical patent/JP4326303B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、例えば、異なるデータベース管理システム間におけるデータベースの移行を行うデータベース移行装置等に関する。   The present invention relates to a database migration device that migrates a database between different database management systems, for example.

従来、異なるデータベース管理システム間におけるデータベースの移行は、以下の処理を行っていた。最初に、移行元のデータベース(以下、「DB」とする。)に格納されている1以上のデータを、カンマで区切り、ファイルにそのデータを記録する。例えば、1レコード内のデータをカンマで区切って1行に並べてファイルに記録する、いわゆるCSVフォーマットがある。次に、移行先のDBに、当該CSVフォーマットで記録されたデータを格納する。ここで、移行元のDBから移行先のDBへ移行されるデータは、テーブル構造を定義するテーブル定義情報のデータを含まないものであった。ここで「テーブル定義情報」とは、例えば、RDBの場合、フィールドを構成するデータの属性値、データ型、バイト長等を示す情報である。なお、「テーブル定義情報」とは、スキーマ情報とも言う。次に、ユーザは、移行先のDB上で、新たに、データベースのテーブル構造を手入力で定義していた(非特許文献1参照)。
株式会社ソフトウエア・パートナー[平成15年9月22日検索]インターネット<URL:http://www.sp−inc.co.jp/product.htm?para=DC>
Conventionally, database migration between different database management systems has been performed as follows. First, one or more data stored in a migration source database (hereinafter referred to as “DB”) is separated by commas, and the data is recorded in a file. For example, there is a so-called CSV format in which data in one record is separated into commas and arranged in one line and recorded in a file. Next, the data recorded in the CSV format is stored in the migration destination DB. Here, the data migrated from the migration source DB to the migration destination DB does not include the data of the table definition information that defines the table structure. Here, “table definition information” is information indicating the attribute value, data type, byte length, and the like of data constituting a field in the case of RDB, for example. The “table definition information” is also called schema information. Next, the user has newly defined the table structure of the database manually on the migration destination DB (see Non-Patent Document 1).
Software Partner Co., Ltd. [Search September 22, 2003] Internet <URL: http: // www. sp-inc. co. jp / product. htm? para = DC>

従来のデータベース管理システム(DBMS)間のデータベース移行は、上記のような煩雑な処理を必要とし、さらに、移行先のDBMS上で、新たにテーブル構造を定義することは、大変手間のかかるものであった。本発明のデータベース移行装置等は、かかる問題を解決するためになされたものであり、DBMS間のデータベース移行で、煩雑な処理をなくし、移行するデータベースを指定する等の簡単な処理でデータベース移行を行えるようにし、さらに、移行先のDBMS上で、テーブル構造を手入力で定義しなくても良いようにすることを目的としている。   Database migration between conventional database management systems (DBMS) requires the above complicated processing, and it is very time-consuming to define a new table structure on the migration destination DBMS. there were. The database migration apparatus and the like of the present invention are made to solve such a problem. Database migration between DBMSs eliminates complicated processing and performs database migration by simple processing such as designating a database to be migrated. In addition, the object of the present invention is to make it possible not to manually define the table structure on the migration destination DBMS.

本発明のデータベース移行装置は、第一データベース管理システムにより定義された1以上のデータベースのデータベース構造に関する情報である第一データベース構造情報を取得する第一データベース構造情報取得部と、1以上のデータベースのレコードを構成するデータ群を取得するデータ群取得部と、第二データベース管理システムにおいて、第一データベース構造情報に基づいて1以上のデータベース構造を定義するデータベース構造定義部と、データ群取得部が取得したデータ群を、データベース構造定義部が定義したデータベース構造に挿入するデータ挿入部を具備することを特徴としている。   The database migration apparatus of the present invention includes a first database structure information acquisition unit that acquires first database structure information that is information related to a database structure of one or more databases defined by the first database management system, and one or more databases. A data group acquisition unit that acquires a data group constituting a record, a database structure definition unit that defines one or more database structures based on the first database structure information, and a data group acquisition unit in the second database management system And a data insertion unit for inserting the data group into the database structure defined by the database structure definition unit.

この構成により、データベースの移行処理を簡単に行え、さらに、移行先のDBMS上で、手入力で、テーブル構造を定義しなくても良い。かかるテーブル構造を定義するための手入力する手間をなくし、また、データベースを移行する処理の作業時間は短縮される。よって、DB管理者の作業を軽減できる等の効果がある。   With this configuration, the database migration process can be performed easily, and the table structure does not have to be manually defined on the migration destination DBMS. There is no need for manual input for defining such a table structure, and the work time for the process of migrating the database is shortened. Therefore, there is an effect that the work of the DB administrator can be reduced.

他の本発明のデータベース移行装置は、第一データベース構造情報が、1以上のデータベースのインデックスに関する情報であるインデックス情報を有し、1以上のデータベースのインデックス情報を取得するインデックス情報取得部と、インデックス情報取得部が取得したインデックス情報に基づいて、データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築するインデックス構築部を、さらに具備することを特徴としている。   In another database migration apparatus of the present invention, the first database structure information includes index information that is information related to indexes of one or more databases, an index information acquisition unit that acquires index information of one or more databases, and an index An index construction unit for constructing indexes for all or part of the data group inserted by the data insertion unit based on the index information acquired by the information acquisition unit is further provided.

この構成により、移行元のDBMSで構築されていたインデックス情報を、移行先のDBMSにも移行できる。よって、移行先のDBMS上で、手入力で、インデックス情報を構築しなくても良い。かかる構築するための手入力する手間をなくすことができ、よって、DB管理者の作業を軽減できる等の効果がある。   With this configuration, the index information constructed in the migration source DBMS can be migrated to the migration destination DBMS. Therefore, it is not necessary to construct the index information manually on the migration destination DBMS. There is an effect that it is possible to eliminate the trouble of manual input for the construction, thereby reducing the work of the DB administrator.

他の本発明のデータベース移行装置は、インデックス情報が示すインデックスの構造と、インデックス構築部が構築するインデックスの構造が異なることを特徴としている。   Another database migration apparatus according to the present invention is characterized in that the structure of the index indicated by the index information is different from the structure of the index constructed by the index construction unit.

この構成により、移行元のDBMSと移行先のDBMSのインデックスの構造が異なっていても、移行元のインデックス情報に基づいて、移行先のDBMSのインデックスの構造仕様に適合して、インデックスを構築できる。例えば、移行元のインデックスがハッシュ構造のインデックス、また移行先のインデックスがBtree構造のインデックスである場合に、移行先のハッシュ構造のインデックからインデックス情報を取得し、当該取得したインデックス情報に基づいて、Btree構造のインデックスを構築できる。つまり、移行先のDBMSの仕様に適合したDBが構築できる。また、移行元のDBMS上では構築されていないインデックス情報を、移行先のDBMS上に構築できる。よって、移行先のDBMS上で、移行元のDBMS上で構築されているインデックス情報とは、別の構造を有するインデックス情報を、手入力で構築しなくてもよくなる。かかる構築するために要する手間はなくなり、DBMS管理者の作業を軽減できる等の効果がある。   With this configuration, even if the structure of the index of the migration source DBMS and that of the migration destination DBMS are different, the index can be constructed based on the index information of the migration source and conforming to the structure specification of the index of the migration destination DBMS. . For example, when the migration source index is a hash structure index and the migration destination index is a Btree structure index, index information is acquired from the migration destination hash structure index, and based on the acquired index information, An index having a Btree structure can be constructed. That is, a DB conforming to the specifications of the migration destination DBMS can be constructed. Further, index information that is not constructed on the migration source DBMS can be constructed on the migration destination DBMS. Therefore, it is not necessary to manually construct index information having a different structure from the index information constructed on the migration source DBMS on the migration destination DBMS. There is no need for such construction, and there is an effect that the work of the DBMS administrator can be reduced.

他の本発明のデータベース移行装置は、第一データベース管理システムの第一データベース構造情報を取得する命令を示す情報である第一データベース構造取得命令情報と、データ群を取得する命令を示す情報であるデータ群取得命令情報と、第二データベース管理システムにおいてデータベース構造を定義する命令を示す情報である第二データベース構造定義命令情報と、データベース構造定義部が定義したデータベース構造にデータ群を挿入する命令を示す情報であるデータ群挿入命令情報を保持しているデータベース操作情報保持部をさらに具備し、第一データベース構造情報取得部は、第一データベース構造取得命令情報に基づいて、第一データベース構造情報を取得し、データ群取得部は、データ群取得命令情報に基づいて、1以上のデータベースのレコードを構成するデータ群を取得し、データベース構造定義部は、第二データベース構造定義命令情報と第一データベース構造情報に基づいて1以上のデータベース構造を定義し、データ挿入部は、データ群挿入命令情報に基づいて、データ群取得部が取得したデータ群を、データベース構造定義部が定義したデータベース構造に挿入することを特徴としている。   Another database migration apparatus of the present invention is first database structure acquisition command information which is information indicating a command for acquiring first database structure information of the first database management system, and information indicating a command for acquiring a data group. Data group acquisition instruction information, second database structure definition instruction information indicating information for defining a database structure in the second database management system, and an instruction for inserting a data group into the database structure defined by the database structure definition unit A database operation information holding unit that holds data group insertion instruction information that is information indicating the first database structure information acquisition unit based on the first database structure acquisition command information; The data group acquisition unit acquires one or more data groups based on the data group acquisition command information. The database structure definition unit defines one or more database structures based on the second database structure definition command information and the first database structure information, and the data insertion unit Based on the group insertion command information, the data group acquired by the data group acquiring unit is inserted into the database structure defined by the database structure defining unit.

この構成により、種々のDBMS間で、DBの移行ができる。よって、各々のDBMS管理システムが採用しているデータ構造、データベース言語等を気にすることなく、DBMS間でDBの移行を行うことができる。   With this configuration, DBs can be migrated between various DBMSs. Therefore, DBs can be migrated between DBMSs without worrying about the data structure, database language, etc. adopted by each DBMS management system.

他の本発明のデータベース移行装置は、第一データベース管理システムの第一データベース構造情報を取得する命令を示す情報である第一データベース構造取得命令情報と、データ群を取得する命令を示す情報であるデータ群取得命令情報と、第二データベース管理システムにおいてデータベース構造を定義する命令を示す情報である第二データベース構造定義命令情報と、データベース構造定義部が定義したデータベース構造にデータ群を挿入する命令を示す情報であるデータ群挿入命令情報と、1以上のデータベースのインデックス情報を取得する命令を示す情報であるインデックス情報取得命令情報と、データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築する命令を示す情報であるインデックス構築命令情報を保持しているデータベース操作情報保持部をさらに具備し、第一データベース構造情報取得部は、第一データベース構造取得命令情報に基づいて、第一データベース構造情報を取得し、データ群取得部は、データ群取得命令情報に基づいて、1以上のデータベースのレコードを構成するデータ群を取得し、データベース構造定義部は、第二データベース構造定義命令情報と第一データベース構造情報に基づいて1以上のデータベース構造を定義し、データ挿入部は、データ群挿入命令情報に基づいて、データ群取得部が取得したデータ群を、データベース構造定義部が定義したデータベース構造に挿入し、インデックス情報取得部は、インデックス情報取得命令情報に基づいて、1以上のデータベースのインデックス情報を取得し、インデックス構築部は、インデックス構築命令情報とインデックス情報に基づいて、データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築することを特徴としている。
この構成により、種々のDBMS間で、DBの移行ができる。また、種々のDBMS間で、インデックスを構築できる。
Another database migration apparatus of the present invention is first database structure acquisition command information which is information indicating a command for acquiring first database structure information of the first database management system, and information indicating a command for acquiring a data group. Data group acquisition instruction information, second database structure definition instruction information indicating information for defining a database structure in the second database management system, and an instruction for inserting a data group into the database structure defined by the database structure definition unit Data group insertion instruction information which is information indicating, index information acquisition instruction information which is information indicating an instruction for acquiring index information of one or more databases, and an index for all or part of the data group inserted by the data insertion unit Index building instruction information that is information indicating the instruction to be built Is further provided with a database operation information holding unit, the first database structure information acquisition unit acquires the first database structure information based on the first database structure acquisition command information, the data group acquisition unit, A data group constituting one or more database records is acquired based on the data group acquisition command information, and the database structure definition unit is configured to acquire one or more databases based on the second database structure definition command information and the first database structure information. Based on the data group insertion instruction information, the data insertion unit inserts the data group acquired by the data group acquisition unit into the database structure defined by the database structure definition unit, and the index information acquisition unit Based on the information acquisition command information, acquire index information of one or more databases, Box construction unit, based on the index built command information and the index information, is characterized in that to construct an index for all or part of the data group data insertion unit is inserted.
With this configuration, DBs can be migrated between various DBMSs. An index can be constructed between various DBMSs.

本発明によるデータベース移行装置等によれば、異なるDBMS間で自動的にデータベースの移行ができる。   According to the database migration apparatus and the like according to the present invention, a database can be automatically migrated between different DBMSs.

以下に、本発明の実施の形態について、図面を用いて詳細に説明する。なお、本実施の形態において、同一の符号を用いた構成要素やフローチャートのステップなどは、同じ機能を果たすので、一度説明したものについて説明を省略する場合がある。   Embodiments of the present invention will be described below in detail with reference to the drawings. Note that in this embodiment, components using the same reference numerals and steps in the flowcharts perform the same function, and thus description of what has been described once may be omitted.

(実施の形態1)
本実施の形態において、データベース移行装置が、異なるDBMS間で、データベースの移行を自動的にすることについて、以下に説明する。
図1は、本実施の形態におけるデータベース移行装置100の構成を示すブロック図である。データベース移行装置100は、入力受付部101、第一データベース管理システム102、第一データベース構造情報取得部103、データ群取得部104、データベース構造定義部105、データ挿入部106、第二データベース管理システム107を有する。第一データベース管理システム102は、第一データベース格納部1021を有する。第二データベース管理システム107は、命令実行部1071、第二データベース格納部1072を有する。
(Embodiment 1)
The following describes how the database migration apparatus automatically migrates a database between different DBMSs in the present embodiment.
FIG. 1 is a block diagram showing the configuration of the database migration apparatus 100 in the present embodiment. The database migration apparatus 100 includes an input reception unit 101, a first database management system 102, a first database structure information acquisition unit 103, a data group acquisition unit 104, a database structure definition unit 105, a data insertion unit 106, and a second database management system 107. Have The first database management system 102 has a first database storage unit 1021. The second database management system 107 includes an instruction execution unit 1071 and a second database storage unit 1072.

なお、データベース移行装置100は、通常の電子計算機が有するCPU、メインメモリ、記録媒体(例えば、ROM、EPROM等)等のハードウエア資源、および周辺装置(例えば、キーボード、マウス等の入力デバイス、ディスプレイ等の出力デバイス等)を具備する(図示しない)。以下、他の実施の形態においても同様である。   The database migration apparatus 100 includes a CPU, a main memory, a hardware resource such as a recording medium (for example, ROM, EPROM, etc.), and peripheral devices (for example, an input device such as a keyboard and a mouse, a display) Etc.) (not shown). The same applies to other embodiments below.

入力受付部101は、アプリケーションの起動の指示の入力を受け付ける。また、入力受付部101は、データベースを移行する指示の入力を受け付ける。「データベースを移行する指示」とは、例えば、移行元のDBMSと移行先のDBMSを指定する指示である。入力受付部101は、テンキーやキーボード等の入力手段のデバイスドライバーや、アプリケーションの表示画面の制御ソフトウェア等で実現され得る。なお、入力手段は、テンキーやキーボードやマウスやアプリケーションの表示画面によるもの等、何でも良い。   The input receiving unit 101 receives an input of an application activation instruction. Further, the input receiving unit 101 receives an input of an instruction to migrate the database. The “instruction to migrate the database” is, for example, an instruction to specify the migration source DBMS and the migration destination DBMS. The input receiving unit 101 can be realized by a device driver of an input unit such as a numeric keypad or a keyboard, control software for an application display screen, or the like. The input means may be anything such as a numeric keypad, a keyboard, a mouse, or an application display screen.

第一データベース管理システム102は、データベースを格納している記録媒体と、そのデータベースを処理するソフトウェア等を有して実現されうる。「データベース」とは、データを大量に蓄積し整理して、コンピュータが処理しやすい形にしたファイル、または、その集合をいう。データベースには、例えば、網型データベース、階層型データベース、RDB、オブジェクト指向型データベース等がある。   The first database management system 102 can be realized by including a recording medium storing a database, software for processing the database, and the like. A “database” refers to a file or a set of files that are stored and organized in large quantities so that the computer can easily process them. Examples of the database include a network database, a hierarchical database, an RDB, and an object-oriented database.

第一データベース格納部1021は、データベースを格納している。第一データベース格納部1021は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも良い。   The first database storage unit 1021 stores a database. The first database storage unit 1021 is preferably a non-volatile recording medium, but may be a volatile recording medium.

第一データベース構造情報取得部103は、第一データベース管理システム102により定義された1以上のデータベースのデータベース構造に関する情報である第一データベース構造情報を取得する。なお、第一データベース構造情報取得部103は、移行することを指示されたデータベースの第一データベース構造情報を取得する。「第一データベース構造情報」とは、例えば、テーブル定義情報等の情報である。「テーブル定義情報」とは、例えば、RDBの場合、テーブル名、テーブルのフィールドのフィールド名、データ型、バイト長等の情報である。なお、フィールドは複数であっても良い。第一データベース構造情報取得部103は、通常、MPUやメモリ等から実現され得る。「取得する」ための処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The first database structure information acquisition unit 103 acquires first database structure information that is information related to the database structure of one or more databases defined by the first database management system 102. The first database structure information acquisition unit 103 acquires the first database structure information of the database instructed to migrate. “First database structure information” is information such as table definition information, for example. The “table definition information” is, for example, information such as a table name, a field name of a table field, a data type, and a byte length in the case of RDB. There may be a plurality of fields. The first database structure information acquisition unit 103 can be usually realized by an MPU, a memory, or the like. The processing procedure for “acquiring” is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

データ群取得部104は、1以上のデータベースのすべてのレコードを構成するデータ(データ群)を取得する。なお、データ群取得部104は、移行することを指示されたデータベースのデータ群を取得する。データ群取得部104は、データ群を取得する場合に、データをカンマで区切るCSVフォーマットで取得してもよく、その他の形式(例えば、DIFフォーマット、SYLKフォーマット等)で取得しても良い。データ群取得部104は、通常、MPUやメモリ等から実現され得る。「取得する」ための処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The data group acquisition unit 104 acquires data (data group) constituting all the records of one or more databases. The data group acquisition unit 104 acquires the data group of the database instructed to migrate. When acquiring a data group, the data group acquisition unit 104 may acquire the data in a CSV format in which data is separated by commas, or may acquire the data group in another format (for example, DIF format, SYLK format, etc.). The data group acquisition unit 104 can usually be realized by an MPU, a memory, or the like. The processing procedure for “acquiring” is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

データベース構造定義部105は、第二データベース管理システム107において、第一データベース構造情報に基づいて、1以上のデータベース構造を定義する。「第一データベース構造情報に基づいて、1以上のデータベース構造を定義する」とは、データベース構造(スキーマ)を定義する命令を構成することである。かかる処理の詳細は、後述する。データベース構造定義部105は、通常、MPUやメモリ等から実現され得る。「定義する」ための処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The database structure definition unit 105 defines one or more database structures based on the first database structure information in the second database management system 107. “Defining one or more database structures based on the first database structure information” means configuring an instruction for defining a database structure (schema). Details of this processing will be described later. The database structure definition unit 105 can usually be realized by an MPU, a memory, or the like. The processing procedure for “defining” is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

データ挿入部106は、データ群取得部104が取得したデータ群を、データベース構造定義部105が定義したデータベース構造に挿入する内容の命令を構成する。かかる処理の具体的方法は、後述する。データ挿入部106は、通常、MPUやメモリ等から実現され得る。「挿入する」ための処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。
第二データベース管理システム107は、データベースを格納している記録媒体と、そのデータベースを処理するソフトウェア等を有して実現されうる。
The data insertion unit 106 constitutes an instruction with a content for inserting the data group acquired by the data group acquisition unit 104 into the database structure defined by the database structure definition unit 105. A specific method of such processing will be described later. The data insertion unit 106 can be usually realized by an MPU, a memory, or the like. The processing procedure for “inserting” is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).
The second database management system 107 can be realized by including a recording medium storing a database, software for processing the database, and the like.

命令実行部1071は、データベース構造定義部105が構成したデータベース構造を定義する命令を実行する。当該実行により、1以上のデータベース構造が構成される。また、命令実行部1071は、データ挿入部106が構成したデータを挿入する命令を実行する。当該実行により、データ群取得部104が取得したデータ群は、当該構成されたデータベース構造に挿入される。   The instruction execution unit 1071 executes an instruction for defining the database structure configured by the database structure definition unit 105. The execution constitutes one or more database structures. In addition, the instruction execution unit 1071 executes an instruction for inserting the data configured by the data insertion unit 106. By this execution, the data group acquired by the data group acquisition unit 104 is inserted into the configured database structure.

第二データベース格納部1072は、命令実行部1071が命令を実行した結果得られたデータベースを格納している。「蓄積する」とは、一時蓄積を含む概念である。第二データベース格納部1072は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも良い。
以下、本実施の形態におけるデータベース移行装置100の動作について図2のフローチャートを用いて説明する。
The second database storage unit 1072 stores a database obtained as a result of the instruction execution unit 1071 executing the instruction. “Accumulating” is a concept including temporary accumulation. The second database storage unit 1072 is preferably a non-volatile recording medium, but may be a volatile recording medium.
Hereinafter, the operation of the database migration apparatus 100 according to the present embodiment will be described with reference to the flowchart of FIG.

(ステップS201)入力受付部101は、入力を受け付けたか否かを判断する。入力受付部101は、当該入力を受けた場合、ステップS202に行き、そうでない場合、ステップS201に戻る。   (Step S201) The input receiving unit 101 determines whether an input has been received. When receiving the input, the input reception unit 101 goes to step S202, and otherwise returns to step S201.

(ステップS202)入力受付部101は、アプリケーションを起動する指示の入力を受け付けたか否かを判断する。入力受付部101は、当該入力を受けた場合、ステップS203に行き、そうでない場合、ステップS204に行く。「アプリケーションを起動する指示の入力」とは、例えば、アプリケーションのアイコンをクリックすること等である。   (Step S202) The input receiving unit 101 determines whether or not an input of an instruction for starting an application has been received. When receiving the input, the input receiving unit 101 goes to step S203, and if not, goes to step S204. “Inputting an instruction to start an application” means, for example, clicking an application icon.

(ステップS203)データベース移行装置100は、アプリケーションを起動する。画面構成表示手段(図示せず)は、初期画面を構成し、ディスプレイに、当該構成された初期画面を表示する。ステップS201に戻る。   (Step S203) The database migration apparatus 100 starts an application. A screen configuration display means (not shown) configures an initial screen, and displays the configured initial screen on the display. The process returns to step S201.

(ステップS204)入力受付部104は、ステップS201で受け付けられた指示の入力が、データベースを移行する指示の入力か否かを判断する。入力受付部104は、データベースを移行する指示の入力を受け付けた場合、ステップS205に行き、そうでない場合、ステップS211に行く。「データベースを移行する指示」は、例えば、移行元のDBMSと移行先のDBMSを指示することである。   (Step S204) The input receiving unit 104 determines whether or not the input of the instruction received in step S201 is an input of an instruction to move to the database. The input receiving unit 104 goes to step S205 when receiving an input of an instruction to migrate the database, and goes to step S211 otherwise. “Instruction to migrate database” is, for example, instructing a migration source DBMS and a migration destination DBMS.

(ステップS205)第一データベース構造情報取得部103は、ステップS204で指示された、移行元の第一データベース格納部1021から、データベース構造情報を取得する。ここで、指示されたデータベースが1である場合は、第一データベース構造情報取得部103は、指示されたデータベースのデータベース構造情報を取得する。また、指示されたデータベースが複数である場合は、第一データベース構造情報取得部103は、指示された複数のデータベースのデータベース構造情報を取得する。
(ステップS206)データ群取得部104は、ステップS204で指示された、移行元の第一データベース格納部1021から、データ群を取得する。
(Step S205) The first database structure information acquisition unit 103 acquires the database structure information from the migration source first database storage unit 1021 specified in step S204. If the specified database is 1, the first database structure information acquisition unit 103 acquires database structure information of the specified database. When there are a plurality of designated databases, the first database structure information acquisition unit 103 acquires database structure information of the designated databases.
(Step S206) The data group acquisition unit 104 acquires a data group from the migration source first database storage unit 1021 instructed in step S204.

(ステップS207)データベース構造定義部105は、ステップS205で取得したデータベース構造情報に基づいて、データベース構造を定義する命令を構成する。   (Step S207) The database structure definition unit 105 configures a command for defining the database structure based on the database structure information acquired in step S205.

(ステップS208)命令実行部1071は、ステップS207で構成されたデータベース構造定義の命令を実行する。実行の結果、データベース構造が構成される。構成されたデータベース構造は、第二データベース格納部1072に格納される。   (Step S208) The instruction execution unit 1071 executes the database structure definition instruction configured in step S207. As a result of execution, a database structure is constructed. The configured database structure is stored in the second database storage unit 1072.

(ステップS209)データ挿入部106は、ステップS206で取得したデータ群を、ステップS208で構成したデータベース構造に、挿入する命令を構成する。   (Step S209) The data insertion unit 106 configures an instruction to insert the data group acquired in step S206 into the database structure configured in step S208.

(ステップS210)命令実行部1071は、ステップS209で構成された「挿入する命令」を実行する。ステップS208で構成したデータベース構造にデータ群が挿入され、データベースが構成される。構成されたデータベースは、第二データベース格納部1072に格納される。なお、DBの表が複数の表を含むDBMSの場合、複数の表を取得し、当該複数の表に基づいて、1つのDBを構成してもよく、複数の表毎にDBを構成してもよい。   (Step S210) The instruction execution unit 1071 executes the “instruction to be inserted” configured in step S209. A data group is inserted into the database structure configured in step S208 to configure a database. The configured database is stored in the second database storage unit 1072. In addition, when the DB table is a DBMS including a plurality of tables, a plurality of tables may be acquired, and one DB may be configured based on the plurality of tables, or a DB may be configured for each of the plurality of tables. Also good.

(ステップS211)入力受付部101は、動作を終了する指示の入力を受け付けたか否かを判断する。当該入力を受け付けた場合、終了し、そうでない場合、ステップS201に戻る。「動作を終了する指示」とは、例えば、データベース移行装置100が有する終了ボタン等の押下による指示等である。   (Step S211) The input receiving unit 101 determines whether or not an input of an instruction to end the operation has been received. If the input is accepted, the process ends. If not, the process returns to step S201. The “instruction to end the operation” is, for example, an instruction by pressing an end button or the like that the database migration apparatus 100 has.

以下、本実施の形態におけるデータベース移行装置の具体的な動作について説明する。
以下に、データベースを移行する指示の入力に関する処理について説明する。図3は、データベース移行装置100のディスプレイの表示例を示す図である。図3において、アプリケーション「ABCプログラム」の初期画面が表示されている。なお、「ABCプログラム」とは、データベース移行装置100の動作を制御するアプリケーションソフトである。メニューボタン「DBMS」が押下されると、データベース管理システムを示すマークが、図3に示すようにウインドウに表示される。次に、移行元DBMSのウインドウ内から、移行元DBMSとして「DBMS01」を指定する。また、移行先のウインドウ内から、移行先DBMSとして「DBMS11」を指定する。「指定」とは、例えば、「DBMS01」または「DBMS11」の部分をマウスで左クリックし、図3に示すように、網掛け表示等の強調表示にして指定する等である。なお、指定方法は、上記に限定されず、その他の指定方法で指定しても良い。
The specific operation of the database migration apparatus in this embodiment will be described below.
In the following, processing related to input of an instruction to migrate a database will be described. FIG. 3 is a diagram illustrating a display example of the display of the database migration apparatus 100. In FIG. 3, an initial screen of the application “ABC program” is displayed. The “ABC program” is application software that controls the operation of the database migration apparatus 100. When the menu button “DBMS” is pressed, a mark indicating the database management system is displayed in the window as shown in FIG. Next, “DBMS01” is designated as the migration source DBMS from within the migration source DBMS window. Further, “DBMS11” is designated as the migration destination DBMS from the migration destination window. “Specify” means, for example, left-clicking on the part of “DBMS01” or “DBMS11” with a mouse and specifying it by highlighting such as shaded display as shown in FIG. The designation method is not limited to the above, and other designation methods may be used.

次に、指定された「DBMS01」または「DBMS11」は、図4に示すウインドウに表示される。図4において、移行元DBMS01のウインドウ内には、「DBMS01」を構成する1以上のデータベースが表示される。また、移行先DBMS11のウインドウ内には、「DBMS11」を構成する1以上のデータベースが表示される。次に、「DBMS01」のファイルから、移行するデータベースを選択する。今、「人事管理DB」が選択された場合、移行先DBMS11のウインドウ内に、新規データベースが作成される(図4において、長方形の枠内に斜線を引いて示されている)。データベースを作成する命令は、SQLで記述すると、例えば、「CREATE DATABASE 人事管理;」等である。   Next, the designated “DBMS01” or “DBMS11” is displayed in the window shown in FIG. In FIG. 4, one or more databases constituting “DBMS01” are displayed in the window of the migration source DBMS01. One or more databases constituting “DBMS11” are displayed in the window of the migration destination DBMS11. Next, the database to be migrated is selected from the file “DBMS01”. Now, when “HR management DB” is selected, a new database is created in the window of the migration destination DBMS 11 (in FIG. 4, it is shown with diagonal lines in a rectangular frame). The command for creating the database is described in SQL, for example, “CREATE DATABASE HR management”.

「選択する方法」は、例えば、「人事管理DB」の部分をマウスで左クリックし、図4に示すように、網掛け表示して強調し、「選択ボタン」をクリックする等である。なお、「選択する方法」は、上記に限定されず、その他の方法で選択しても良い。ファイル名称は、別途の処理で入力してもよく、「DBMS01」と同じ名称の「人事管理DB」を自動的に指定するものでも良い。   The “selection method” is, for example, left-clicking on the “HR management DB” portion with a mouse, highlighting by shading as shown in FIG. 4, and clicking the “select button”. The “selecting method” is not limited to the above, and may be selected by other methods. The file name may be input by a separate process, or may automatically specify “HR management DB” having the same name as “DBMS01”.

なお、本実施の形態において、DBMS「DBMS01」のデータベースから「人事管理DB」を選択して、DBMS「DBMS11」に移行するものだったが、DBMS「DBMS01」の全データベースを、DBMS「DBMS11」に移行しても良く、1以上のデータベースを選択して、DBMS「DBMS11」に移行しても良い。   In the present embodiment, the “HR management DB” is selected from the database of the DBMS “DBMS01” and is transferred to the DBMS “DBMS11”. However, all the databases of the DBMS “DBMS01” are transferred to the DBMS “DBMS11”. Or one or more databases may be selected and transferred to the DBMS “DBMS11”.

次に、指定されたデータベースを移行する処理について説明する。「実行」ボタンをクリックすると、指定されたデータベースの移行を開始する。図5は、「実行」ボタンがクリックされ、データベース「人事管理DB」が移行中であることを示す図である。図6は、データベース「人事管理DB」のデータ例を示す図である。図6において、データベース「人事管理DB」のデータは、RDBで構成されている。フィールドは、「社員番号」、「氏名」、「住所」等を有する。「ID」は、DBMSが表管理のために設ける、システム用のフィールドである。図7は、データベース「人事管理DB」のデータベース構造情報の例を示す図である。図7において、データベース構造情報は、属性名、データ型、バイト長を有している。第一データベース構造情報取得部103は、図7に示す「人事管理DB」のデータのデータベース構造情報を取得する。次に、データ群取得部104は、レコード単位でデータをカンマで区切るCSVフォーマットで、「人事管理DB」のデータ群を取得する。図8は、データ群の情報の例を示す図である。次に、データベース構造定義部105は、第一データベース構造情報取得部103が取得したデータベース構造情報(図7参照)に基づいて、SQLでデータベース構造を定義する命令を構成する(図示せず)。かかる命令は、SQLで記述すると、例えば、「CREATE TABLE 人事管理テーブル (社員番号 INT,氏名 CHAR(18),住所 CHAR(50));」等である。当該SQL文によって、3つのフィールド(社員番号、氏名、住所)を持った表が作成される。なお、SQLで定義することに限定せず、SQL以外で定義してもよいことはいうまでもない。次に、命令実行部1071は、当該構成されたデータベース構造を定義する命令を実行する。実行結果、構成されたデータベース構造の例を図9に示す。次に、データ群挿入部106は、取得されたデータ群(図8参照)を、構成されたデータベース構造(図9参照)に挿入する命令を構成する。当該命令は、SQLで記述すると、例えば、「INSERT INTO 人事管理テーブル SELECT * FROM 人事管理DB」等である。当該SQL文によって、人事管理テーブルに、人事管理DBのデータの全てが挿入される。命令実行部1071は、当該命令を実行する。図10は、命令実行の結果、構成されたデータベースの例を示す図である。当該構成されたデータベースは、第二データベース格納部1072に格納される。図11は、表示画面の表示例を示す図である。図11において、「完了」とは、データベースの移行が完了したことを意味する。   Next, processing for migrating a specified database will be described. Clicking the “Execute” button starts migration of the specified database. FIG. 5 is a diagram illustrating that the “execution” button is clicked and the database “HR management DB” is being migrated. FIG. 6 is a diagram illustrating a data example of the database “HR management DB”. In FIG. 6, the data of the database “HR management DB” is composed of RDB. The field includes “employee number”, “name”, “address”, and the like. “ID” is a system field provided by the DBMS for table management. FIG. 7 is a diagram illustrating an example of database structure information of the database “HR management DB”. In FIG. 7, the database structure information has an attribute name, a data type, and a byte length. The first database structure information acquisition unit 103 acquires the database structure information of the “HR management DB” data shown in FIG. Next, the data group acquisition unit 104 acquires the data group of the “HR management DB” in a CSV format in which data is separated by commas in record units. FIG. 8 is a diagram illustrating an example of data group information. Next, the database structure definition unit 105 configures a command for defining the database structure in SQL (not shown) based on the database structure information (see FIG. 7) acquired by the first database structure information acquisition unit 103. Such an instruction is described in SQL, for example, “CREATE TABLE personnel management table (employee number INT, name CHAR (18), address CHAR (50))”. A table having three fields (employee number, name, and address) is created by the SQL statement. Needless to say, the definition is not limited to SQL, but may be defined outside SQL. Next, the instruction execution unit 1071 executes an instruction that defines the configured database structure. An example of the database structure constructed as a result of the execution is shown in FIG. Next, the data group insertion unit 106 configures an instruction to insert the acquired data group (see FIG. 8) into the configured database structure (see FIG. 9). The command is described in SQL, for example, “INSERT INTO HR management table SELECT * FROM HR management DB”. With the SQL statement, all the data of the personnel management DB is inserted into the personnel management table. The instruction execution unit 1071 executes the instruction. FIG. 10 is a diagram illustrating an example of a database configured as a result of instruction execution. The configured database is stored in the second database storage unit 1072. FIG. 11 is a diagram illustrating a display example of the display screen. In FIG. 11, “completed” means that the database migration is completed.

なお、本実施の形態において、データベース移行装置100は、第一データベース管理システム101と第二データベース管理システム107を有する構成であったが、データベース移行装置100は、第一データベース管理システム101または/および第二データベース管理システム107を有しない構成でも良い。かかる場合、データベース移行装置400は、送受信部401を、さらに具備する。送受信部401は、第一データベース構造情報取得部103が構成したデータベース構造情報を取得する命令を送信し、当該命令に基づいて、第一データベース格納部1021からデータベース構造情報を受信する。また、送受信部401は、データ群取得部104が構成したデータ群を取得する命令を送信し、当該命令に基づいて、第一データベース格納部1021からデータ群を受信する。また、送受信部401は、データベース構造定義部105が定義したデータベース構造定義の情報を送信する。また、送受信部401は、データ挿入部106が構成したデータ群をデータベース構造に挿入する命令を送信する。当該命令には、データ群が含まれる。また、第一データベース管理システム500は、第一送受信部501をさらに具備する。第一送受信部501は、データベース構造情報を取得する命令を受信し、当該命令に基づいて、第一データベース格納部1021からデータベース構造情報を取得し、送信する。また、第一送受信部501は、データ群を取得する命令を受信し、当該命令に基づいて、第一データベース格納部1021からデータ群を取得し、送信する。また、第二データベース管理システム600は、第二受信部601をさらに具備する。第二受信部601は、データベース構造定義部105が定義したデータベース構造定義の情報を受信する。また、第二受信部601は、データ挿入部106が構成したデータ群をデータベース構造に挿入する命令を受信する。図12は、データベース移行装置400、第一データベース管理システム500および第二データベース管理システム500の構成の例を示すブロック図である。データベース移行装置400、第一データベース管理システム500および第二データベース管理システム600は、各々、ネットワークを介して接続されている。なお、第一データベース管理システム500および第二データベース管理システム600は、通常の電子計算機が有するCPU、メインメモリ、記録媒体(例えば、ROM、EPROM等)等のハードウエア資源、および周辺装置(例えば、キーボード、マウス等の入力デバイス、ディスプレイ等の出力デバイス等)を具備する(図示しない)。図13は、データベース移行装置400、第一データベース管理システム500および第二データベース管理システム600の外観の例を示す図である。   In the present embodiment, the database migration apparatus 100 is configured to include the first database management system 101 and the second database management system 107. However, the database migration apparatus 100 may be the first database management system 101 or / and / or A configuration without the second database management system 107 is also possible. In such a case, the database migration apparatus 400 further includes a transmission / reception unit 401. The transmission / reception unit 401 transmits a command for acquiring the database structure information configured by the first database structure information acquisition unit 103, and receives the database structure information from the first database storage unit 1021 based on the command. In addition, the transmission / reception unit 401 transmits a command for acquiring the data group configured by the data group acquisition unit 104, and receives the data group from the first database storage unit 1021 based on the command. In addition, the transmission / reception unit 401 transmits information on the database structure definition defined by the database structure definition unit 105. In addition, the transmission / reception unit 401 transmits an instruction to insert the data group formed by the data insertion unit 106 into the database structure. The instruction includes a data group. The first database management system 500 further includes a first transmission / reception unit 501. The first transmission / reception unit 501 receives a command for acquiring database structure information, acquires database structure information from the first database storage unit 1021 based on the command, and transmits the database structure information. Also, the first transmission / reception unit 501 receives a command for acquiring a data group, acquires the data group from the first database storage unit 1021 based on the command, and transmits the data group. The second database management system 600 further includes a second receiving unit 601. The second receiving unit 601 receives the database structure definition information defined by the database structure defining unit 105. The second receiving unit 601 receives a command for inserting the data group formed by the data inserting unit 106 into the database structure. FIG. 12 is a block diagram showing an example of the configuration of the database migration device 400, the first database management system 500, and the second database management system 500. The database migration device 400, the first database management system 500, and the second database management system 600 are each connected via a network. The first database management system 500 and the second database management system 600 include a CPU, a main memory, a hardware resource such as a recording medium (for example, ROM, EPROM, etc.) and a peripheral device (for example, a normal computer). (Input devices such as a keyboard and a mouse, output devices such as a display) (not shown). FIG. 13 is a diagram showing an example of the appearance of the database migration device 400, the first database management system 500, and the second database management system 600.

以上、本実施の形態によれば、データベースの移行処理を簡単に行え、さらに、移行先のDBMS上で、手入力で、テーブル構造を定義しなくても良い。かかるテーブル構造を定義するための手入力する時間は必要なくなり、DB管理者のDBメンテナンス時間等を短縮できる。   As described above, according to the present embodiment, the database migration process can be easily performed, and the table structure does not need to be manually defined on the migration destination DBMS. The manual input time for defining such a table structure is not necessary, and the DB maintenance time of the DB administrator can be shortened.

さらに、本実施の形態において説明したデータベース移行装置100の動作について、ソフトウェアで実現し、当該ソフトウェアを例えば、サーバ上に置いて、ソフトウェアダウンロードにより当該ソフトウェアを配布しても良い。さらにソフトウェアをCD−ROM等の記録媒体に記録して流布しても良い。このことは、すべての他の実施の形態においても同様である。なお、本実施の形態における動作をソフトウェアで実現した場合のプログラムは、以下のようになる。コンピュータに、第一データベース管理システムにより定義された1以上のデータベースのデータベース構造に関する情報である第一データベース構造情報を取得する第一データベース構造情報取得ステップと、1以上のデータベースのレコードを構成するデータ群を取得するデータ群取得ステップと、第二データベース管理システムにおいて、第一データベース構造情報に基づいて1以上のデータベース構造を定義するデータベース構造定義ステップと、データ群取得ステップで取得したデータ群を、データベース構造定義ステップで定義したデータベース構造に挿入するデータ挿入ステップとを実行させるためのプログラムである。   Furthermore, the operation of the database migration apparatus 100 described in the present embodiment may be realized by software, the software may be placed on, for example, a server, and the software may be distributed by software download. Further, the software may be recorded on a recording medium such as a CD-ROM and distributed. This is the same in all other embodiments. The program when the operation in the present embodiment is realized by software is as follows. First database structure information acquisition step for acquiring first database structure information, which is information related to the database structure of one or more databases defined by the first database management system, and data constituting one or more database records A data group acquisition step for acquiring a group; a database structure definition step for defining one or more database structures based on the first database structure information in the second database management system; and a data group acquired in the data group acquisition step. This is a program for executing a data insertion step to be inserted into the database structure defined in the database structure definition step.

(実施の形態2)
本実施の形態において、データベース移行装置が、異なるDBMS間で、インデックスに関する情報を移行することについて、以下に説明する。
図14は、本実施の形態におけるデータベース移行装置200の構成を示すブロック図である。データベース移行装置200は、入力受付部101、第一データベース管理システム102、第一データベース構造情報取得部103、データ群取得部104、データベース構造定義部105、データ挿入部106、第二データベース管理システム107、インデックス情報取得部201、インデックス構築部202を有する。第一データベース管理システム102は、第一データベース格納部1021を有する。第二データベース管理システム107は、命令実行部1071、第二データベース格納部1072を有する。
(Embodiment 2)
In the present embodiment, the following describes how the database migration apparatus migrates information about indexes between different DBMSs.
FIG. 14 is a block diagram showing a configuration of the database migration apparatus 200 in the present embodiment. The database migration apparatus 200 includes an input reception unit 101, a first database management system 102, a first database structure information acquisition unit 103, a data group acquisition unit 104, a database structure definition unit 105, a data insertion unit 106, and a second database management system 107. The index information acquisition unit 201 and the index construction unit 202 are included. The first database management system 102 has a first database storage unit 1021. The second database management system 107 includes an instruction execution unit 1071 and a second database storage unit 1072.

インデックス情報取得部201は、データベース構造情報から、1以上のデータベースのインデックス情報を取得する。データベース構造情報は、1以上のデータベースのインデックスに関する情報であるインデックス情報を有している。「インデックス情報」とは、データベースのインデックスに関する情報であり、例えば、インデックスに用いられる属性(通常、検索キーとなる属性)に立てられたフラグ、インデックス対象の属性の名称等の情報である。「インデックス」とは、レコードやデータの格納されている番地を、キーをもとに探すための表をいい、例えば、ハッシュ法に基づいたハッシュテーブル、ソートされたデータ群、Btree構造のデータ群等がある。インデックス情報取得部201は、通常、MPUやメモリ等から実現され得る。「取得する」ための処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The index information acquisition unit 201 acquires index information of one or more databases from the database structure information. The database structure information includes index information that is information related to one or more database indexes. The “index information” is information related to the index of the database, for example, information such as a flag set for an attribute used for the index (usually an attribute serving as a search key), an attribute name to be indexed, and the like. “Index” refers to a table for searching for addresses where records and data are stored based on keys. For example, a hash table based on a hash method, a sorted data group, and a data group of a Btree structure Etc. The index information acquisition unit 201 can usually be realized by an MPU, a memory, or the like. The processing procedure for “acquiring” is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

インデックス構築部201は、インデックス情報取得部108が取得したインデックス情報に基づいて、データ挿入部106が挿入したデータ群の全部または一部に対するインデックスを構築する。また、インデックス構築部201は、インデックス情報が示すインデックスの構造とは異なるインデックスを構築しても良い。インデックス構築部201は、通常、MPUやメモリ等から実現され得る。「構築する」ための処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。   The index construction unit 201 constructs an index for all or part of the data group inserted by the data insertion unit 106 based on the index information acquired by the index information acquisition unit 108. Further, the index construction unit 201 may construct an index different from the index structure indicated by the index information. The index construction unit 201 can be usually realized by an MPU, a memory, or the like. The processing procedure for “building” is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

以下、本実施の形態におけるデータベース移行装置200の動作について図15のフローチャートを用いて説明する。なお、同じステップ番号は、図2と同様であるから説明を省略する。   Hereinafter, the operation of the database migration apparatus 200 in the present embodiment will be described with reference to the flowchart of FIG. The same step numbers are the same as those in FIG.

(ステップS1501)インデックス情報取得部201は、ステップS205で取得したデータベース構造情報から、データベースのインデックス情報を取得する。取得されるインデックス情報は、2以上のインデックス情報であっても良い。   (Step S1501) The index information acquisition unit 201 acquires database index information from the database structure information acquired in step S205. The acquired index information may be two or more pieces of index information.

(ステップS1502)インデックス構築部201は、ステップS1501で取得したインデックス情報に基づいて、データ挿入部106が挿入したデータ群の全部または一部に対するインデックスを構築する命令を構成する。なお、インデックス情報が示すインデックスの構造と異なるインデックスを構築する命令を構成しても良い。   (Step S1502) The index construction unit 201 configures an instruction to construct an index for all or part of the data group inserted by the data insertion unit 106, based on the index information acquired in step S1501. An instruction for constructing an index different from the index structure indicated by the index information may be configured.

(ステップS1503)命令実行部1071は、ステップS1502で構成した「インデックスを構築する命令」を実行する。実行された結果、インデックスが構築される。構築されるインデックスは、移行元である第一データベース管理システム102が有していたインデックスであってもよく、移行元の第一データベース管理システム102が有していないインデックスであってもよい。ステップS201に戻る。   (Step S1503) The instruction execution unit 1071 executes the “instruction to build an index” configured in step S1502. As a result of execution, an index is constructed. The constructed index may be an index that the first database management system 102 that is the migration source has, or an index that the migration source first database management system 102 does not have. The process returns to step S201.

以下、本実施の形態におけるデータベース移行装置200の具体的な動作について説明する。データベース構造情報は、インデックス情報を有している。図16は、インデックス情報を有するデータベース構造情報のデータ例を示す図である。図16において、「INDEX」のフラグ「1」は、「社員番号」がインデックスされた属性(検索キーの属性)であることを意味している。図17、図18は、インデックスの表構造の例を示す図である。図17において、インデックスの表構造は、1列にソートされた社員番号のデータで構成されている。属性値でソートされ、データは「属性値」と「レコードID」の組である。なお、「社員番号のデータ」とは、例えば、図6で示す「人事管理DB」の社員番号のデータである。また、図18において、インデックスの表は、ハッシュテーブルで構成されている。ハッシュテーブルの各バケツにあるデータは、「属性値」と「レコードID」の組である。   Hereinafter, a specific operation of the database migration apparatus 200 in the present embodiment will be described. The database structure information has index information. FIG. 16 is a diagram illustrating a data example of database structure information having index information. In FIG. 16, a flag “1” of “INDEX” means that “employee number” is an indexed attribute (search key attribute). 17 and 18 are diagrams showing examples of table structures of indexes. In FIG. 17, the table structure of the index is composed of employee number data sorted in one column. Sorted by attribute value, the data is a set of “attribute value” and “record ID”. The “employee number data” is, for example, employee number data in the “HR management DB” shown in FIG. In FIG. 18, the index table is configured by a hash table. The data in each bucket of the hash table is a set of “attribute value” and “record ID”.

以下に、インデックスを構築する処理について説明する。なお、データベースを移行する指示の入力に関する処理、指定されたデータベースを移行する処理は、実施の形態1と同様であるため説明は省略する。   Below, the process which builds an index is demonstrated. Note that the processing relating to the input of the instruction to migrate the database and the processing of migrating the designated database are the same as those in the first embodiment, and thus description thereof is omitted.

インデックス情報取得部201は、第一データベース構造情報取得部103が取得したデータベース構造情報から、インデックス情報を取得する。次に、インデックス構築部202は、当該取得されたインデックス情報に基づいて、インデックスを構築する命令を構成する。当該構成されたインデックスを構築する命令は、例えば、SQLの場合、「CREATE INDEX idx1 ON 人事管理テーブル(社員番号)」等である。当該SQL文の意味は、「人事管理テーブル」表の「社員番号」列のインデックスを「idx1」という名前で構築することを意味している。「インデックス情報に基づいてインデックスを構築する」とは、取得されたインデックス情報が示すインデックスと同一のインデックスを構築すること、または/および、取得されたインデックス情報が示すインデックスと異なるインデックスを構築することである。インデックス構築部202は、インデックスを構築する命令を、例えば、SQLで記述して構成しても良く、他のデータベース言語等で構成しても良い(図示しない)。次に、命令実行部1071は、当該インデックスを構築する命令を実行する。実行した結果、インデックスが構築される(図17、図18参照)。当該構築されたインデックスは、第二データベース格納部1072に格納される。当該構築されたインデックスは、移行元のDBMSが有していたインデックスと同じ構造である。インデックス構築部202は、取得されたインデックス情報が示すインデックスと異なる構造のインデックスを構築できる。例えば、図19に示すインデックスを構築する。図19において、インデックスは、Btree構造のインデックスであることを示す。なお、インデックス構築部202は、Btree構造のインデックスを構築するものに限らず、他の構造のインデックスを構築するものでも良いことは言うまでもない。   The index information acquisition unit 201 acquires index information from the database structure information acquired by the first database structure information acquisition unit 103. Next, the index construction unit 202 configures an instruction to construct an index based on the acquired index information. The command for constructing the configured index is, for example, “CREATE INDEX idx1 ON personnel management table (employee number)” in the case of SQL. The meaning of the SQL sentence means that the index of the “employee number” column in the “HR management table” table is constructed with the name “idx1”. “Building an index based on index information” means building the same index as the index indicated by the acquired index information or / and building an index different from the index indicated by the acquired index information It is. The index construction unit 202 may be configured by describing an instruction for constructing an index in, for example, SQL, or may be configured by another database language or the like (not shown). Next, the instruction execution unit 1071 executes an instruction for constructing the index. As a result of execution, an index is constructed (see FIGS. 17 and 18). The constructed index is stored in the second database storage unit 1072. The constructed index has the same structure as the index that the migration source DBMS had. The index construction unit 202 can construct an index having a structure different from the index indicated by the acquired index information. For example, the index shown in FIG. 19 is constructed. In FIG. 19, the index indicates that the index has a Btree structure. Needless to say, the index construction unit 202 is not limited to constructing an index having a Btree structure, but may construct an index having another structure.

以上、本実施の形態によれば、移行元のDBMSで構築されていたインデックス情報を、移行先のDBMSにも移行できる。さらに、移行元のDBMSと移行先のDBMSで、インデックスの構造が異なる場合であっても、移行元のDBMSのインデックス情報に基づいて、移行先のインデックスの構造に適合して、インデックスを構築できる。例えば、移行元のDBには、ハッシュ構造のインデックスしかなく、移行先のDBには、Btree構造のインデックスしかない場合において、ハッシュ構造のインデックスの情報から、Btree構造のインデックスを構築できる。   As described above, according to the present embodiment, the index information constructed in the migration source DBMS can be migrated to the migration destination DBMS. Furthermore, even if the index structure of the migration source DBMS and that of the migration destination DBMS are different, an index can be constructed based on the index information of the migration source DBMS and adapted to the structure of the migration destination index. . For example, when the migration source DB has only a hash structure index and the migration destination DB has only a Btree structure index, an index of the Btree structure can be constructed from the hash structure index information.

さらに、本実施の形態における動作をソフトウェアで実現した場合のプログラムは、以下のようになる。コンピュータに、第一データベース管理システムにより定義された1以上のデータベースのデータベース構造に関する情報である第一データベース構造情報を取得する第一データベース構造情報取得ステップと、1以上のデータベースのレコードを構成するデータ群を取得するデータ群取得ステップと、第二データベース管理システムにおいて、第一データベース構造情報に基づいて1以上のデータベース構造を定義するデータベース構造定義ステップと、データ群取得ステップで取得したデータ群を、データベース構造定義ステップで定義したデータベース構造に挿入するデータ挿入ステップと1以上のデータベースのインデックスに関する情報であるインデックス情報を取得するインデックス情報取得ステップと、インデックス情報取得ステップで取得したインデックス情報に基づいて、データ挿入ステップで挿入したデータ群の全部または一部に対するインデックスを構築するインデックス構築ステップを実行させるためのプログラムである。   Furthermore, the program when the operation in the present embodiment is realized by software is as follows. First database structure information acquisition step for acquiring first database structure information, which is information related to the database structure of one or more databases defined by the first database management system, and data constituting one or more database records A data group acquisition step for acquiring a group, a database structure definition step for defining one or more database structures based on the first database structure information in the second database management system, and a data group acquired in the data group acquisition step, A data insertion step for inserting into the database structure defined in the database structure definition step, an index information acquisition step for acquiring index information that is information relating to one or more database indexes, and index information acquisition Based on the index information obtained in step a program for executing the index construction step of constructing an index to any or all of the inserted data group by the data insertion step.

また、コンピュータに、第一データベース管理システムにより定義された1以上のデータベースのインデックスに関する情報であるインデックス情報を取得するインデックス情報取得ステップと、第二データベース管理システムにおいて、インデックス情報取得ステップで取得したインデックス情報に基づいて、データ挿入ステップで挿入したデータ群の全部または一部に対するインデックスを構築するインデックス構築ステップを実行させるためのプログラムである。   Also, an index information acquisition step for acquiring index information, which is information relating to an index of one or more databases defined by the first database management system, on the computer, and an index acquired in the index information acquisition step in the second database management system This is a program for executing an index construction step for constructing indexes for all or part of the data group inserted in the data insertion step based on the information.

なお、本実施の形態において、データベース移行装置200は、第一データベース管理システム101と第二データベース管理システム107を有する構成であったが、データベース移行装置200は、第一データベース管理システム101または/および第二データベース管理システム107を有しない構成でも良い(図12参照)。かかる場合、実施の形態1と同様に、データベース移行装置100は、送受信部を具備する。送受信部は、実施の形態1で説明した処理以外に、送受信部は、インデックス構築部202が構成したインデックスを構築する命令を送信する。当該命令には、インデックス情報が含まれていても良い。また、第二データベース管理システムは、受信部をさらに具備する。受信部は、インデックス構築部202が構成したインデックスを構築する命令を受信する。   In the present embodiment, the database migration apparatus 200 has a configuration including the first database management system 101 and the second database management system 107. However, the database migration apparatus 200 may be the first database management system 101 or / and / or A configuration without the second database management system 107 may be used (see FIG. 12). In such a case, the database migration apparatus 100 includes a transmission / reception unit as in the first embodiment. In addition to the processing described in the first embodiment, the transmission / reception unit transmits a command for constructing the index configured by the index construction unit 202. The instruction may include index information. The second database management system further includes a receiving unit. The receiving unit receives an instruction to build an index configured by the index building unit 202.

(実施の形態3)
本実施の形態において、データベース移行装置が、データベース操作情報保持部301が保持している情報に基づいて、異なるDBMS間でデータベースの移行をする、また、異なるDBMS間で、インデックスに関する情報を移行することについて、以下に説明する。
(Embodiment 3)
In the present embodiment, the database migration device migrates a database between different DBMSs based on information held by the database operation information holding unit 301, and migrates information related to indexes between different DBMSs. This will be described below.

図20は、本実施の形態におけるデータベース移行装置300の構成を示すブロック図である。データベース移行装置300は、入力受付部101、第一データベース管理システム102、第一データベース構造情報取得部103、データ群取得部104、データベース構造定義部105、データ挿入部106、第二データベース管理システム107、インデックス情報取得部201、インデックス構築部202、データベース操作情報保持部301を有する。第一データベース管理システム102は、第一データベース格納部1021を有する。第二データベース管理システム107は、命令実行部1071、第二データベース格納部1072を有する。   FIG. 20 is a block diagram showing a configuration of the database migration apparatus 300 in the present embodiment. The database migration apparatus 300 includes an input reception unit 101, a first database management system 102, a first database structure information acquisition unit 103, a data group acquisition unit 104, a database structure definition unit 105, a data insertion unit 106, and a second database management system 107. An index information acquisition unit 201, an index construction unit 202, and a database operation information holding unit 301. The first database management system 102 has a first database storage unit 1021. The second database management system 107 includes an instruction execution unit 1071 and a second database storage unit 1072.

データベース操作情報保持部301は、第一データベース管理システムの第一データベース構造情報を取得する命令を示す情報である第一データベース構造取得命令情報と、データ群を取得する命令を示す情報であるデータ群取得命令情報と、第二データベース管理システムにおいてデータベース構造を定義する命令を示す情報である第二データベース構造定義命令情報と、データベース構造定義部が定義したデータベース構造にデータ群を挿入する命令を示す情報であるデータ群挿入命令情報と、1以上のデータベースのインデックス情報を取得する命令を示す情報であるインデックス情報取得命令情報と、データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築する命令を示す情報であるインデックス構築命令情報を保持している。データベース操作情報保持部301は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも良い。
以下、本実施の形態におけるデータベース移行装置300の動作について図21のフローチャートを用いて説明する。
The database operation information holding unit 301 includes first database structure acquisition command information that is information indicating a command for acquiring first database structure information of the first database management system, and data group that is information indicating a command for acquiring a data group. Acquisition command information, second database structure definition command information that is a command that defines a database structure in the second database management system, and information that indicates a command to insert a data group into the database structure defined by the database structure definition unit Data group insertion instruction information, index information acquisition instruction information indicating information for acquiring one or more database index information, and an index for all or part of the data group inserted by the data insertion unit Index building instruction information, which is information indicating the instruction It holds. The database operation information holding unit 301 is preferably a non-volatile recording medium, but may be a volatile recording medium.
Hereinafter, the operation of the database migration apparatus 300 in the present embodiment will be described with reference to the flowchart of FIG.

(ステップS2101)第一データベース構造情報取得部103は、データベース操作情報保持部301から、第一データベース構造取得命令情報を取得する。「第一データベース構造取得命令情報を取得する」とは、移行元である第一データベース管理システムが採用しているインターフェイスであって、第一データベース構造情報を取得するインターフェースを取り出すことを意味している。 (ステップS2102)第一データベース構造情報取得部103は、ステップS2102で取得した第一データベース構造取得命令情報に基づいて、指示された、移行元の第一データベース格納部1021から、データベース構造情報を取得する。「第一データベース構造取得命令情報に基づいて取得する」とは、第一データベース構造取得命令を実行し、その命令実行の結果である、第一データベース構造情報を取得することを意味している。   (Step S2101) The first database structure information acquisition unit 103 acquires first database structure acquisition command information from the database operation information holding unit 301. “Obtain first database structure acquisition command information” means that the interface adopted by the first database management system that is the migration source is taken out, and the interface for acquiring the first database structure information is taken out. Yes. (Step S2102) The first database structure information acquisition unit 103 acquires database structure information from the instructed first database storage unit 1021 based on the first database structure acquisition command information acquired in step S2102. To do. “Acquire based on the first database structure acquisition command information” means that the first database structure acquisition command is executed and the first database structure information, which is a result of the command execution, is acquired.

(ステップS2103)データ群取得部104は、データベース操作情報保持部301から、データ群取得命令情報を取得する。「データ群取得命令情報を取得する」とは、移行元であるデータベース管理システムが採用しているインターフェイスであって、データ群取得命令情報を取得するインターフェイスを取り出すことを意味している。   (Step S2103) The data group acquisition unit 104 acquires data group acquisition command information from the database operation information holding unit 301. “Obtain data group acquisition command information” means to take out an interface that is adopted by the database management system that is the migration source and that acquires the data group acquisition command information.

(ステップS2104)データ群取得部104は、ステップS2103で取得した、データ群取得命令情報に基づいて、移行元の第一データベース格納部1021から、データ群を取得する。「データ群取得命令情報に基づいて取得する」とは、データ群取得命令を実行し、その命令実行の結果である、データ群を取得することを意味している。   (Step S2104) The data group acquisition unit 104 acquires a data group from the migration source first database storage unit 1021 based on the data group acquisition command information acquired in step S2103. “Acquire based on data group acquisition command information” means to execute a data group acquisition command and acquire a data group as a result of the command execution.

(ステップS2105)データベース構造定義部105は、データベース操作情報保持部301から、第二データベース構造定義命令情報を取得する。「第二データベース構造定義命令情報を取得する」とは、移行先である第二データベース管理システムが採用しているインターフェイスであって、第二データベース構造定義命令を取得するインターフェイスを取り出すことを意味している。   (Step S 2105) The database structure definition unit 105 acquires second database structure definition command information from the database operation information holding unit 301. “Obtain the second database structure definition command information” means that the interface used by the second database management system, which is the migration destination, is taken out and acquires the second database structure definition command. ing.

(ステップS2106)データベース構造定義部105は、ステップS2106で取得した第二データベース構造定義命令情報に基づいて、データベース構造を定義する。「第二データベース構造定義命令情報に基づいて、データベース構造を定義する」とは、第二データベース構造定義命令を実行することを、命令実行部1072に指示することである。   (Step S2106) The database structure definition unit 105 defines a database structure based on the second database structure definition command information acquired in step S2106. “Defining the database structure based on the second database structure definition instruction information” is to instruct the instruction execution unit 1072 to execute the second database structure definition instruction.

(ステップS2107)命令実行部1071は、ステップS1906で指示した第二データベース構造定義命令を実行する。その命令実行の結果、データベース構造が構成される。   (Step S2107) The instruction execution unit 1071 executes the second database structure definition instruction specified in step S1906. As a result of the instruction execution, a database structure is constructed.

(ステップS2108)データ挿入部106は、データベース操作情報保持部301から、データ挿入命令情報を取得する。「データ挿入命令情報を取得する」とは、移行先であるデータベース管理システムが採用しているインターフェイスであって、データ挿入命令を取得するインターフェイスを取り出すことを意味している。   (Step S 2108) The data insertion unit 106 acquires data insertion command information from the database operation information holding unit 301. “Obtain data insertion instruction information” means to take out an interface that is adopted by the database management system that is the migration destination and that acquires the data insertion instruction.

(ステップS2109)データ挿入部106は、ステップS2108で取得したデータ挿入命令情報に基づいて、データ群を、ステップS2107で構成したデータベース構造に、挿入する。「データ挿入命令情報に基づいて、データベース構造に挿入する」とは、データ挿入命令を実行することを、命令実行部1072に指示することである。   (Step S2109) The data insertion unit 106 inserts the data group into the database structure configured in step S2107 based on the data insertion instruction information acquired in step S2108. “Inserting into the database structure based on the data insertion instruction information” is to instruct the instruction execution unit 1072 to execute the data insertion instruction.

(ステップS2110)命令実行部1071は、ステップS2109で指示したデータ挿入命令を実行する。その命令実行の結果、データベース構造にデータ群が挿入され、データベースが構成される。   (Step S2110) The instruction execution unit 1071 executes the data insertion instruction instructed in step S2109. As a result of the execution of the instruction, a data group is inserted into the database structure, and the database is configured.

(ステップS2111)インデックス情報取得部201は、データベース操作情報保持部301から、インデックス情報取得命令情報を取得する。「インデックス情報取得命令情報を取得する」とは、移行元であるデータベース管理システムが採用しているインターフェイスであって、インデックス情報取得命令情報を取得するインターフェイスを取り出すことを意味している。   (Step S2111) The index information acquisition unit 201 acquires index information acquisition command information from the database operation information holding unit 301. “Acquire index information acquisition command information” means to take out an interface that is adopted by the database management system that is the migration source and that acquires the index information acquisition command information.

(ステップS2112)インデックス情報取得部201は、ステップS2111で取得したインデックス情報取得命令情報に基づいて、データベース構造情報から、インデックス情報を取得する。「インデックス情報取得命令情報に基づいて取得する」とは、インデックス情報取得命令を実行し、その命令実行の結果である、インデックス情報を取得することを意味している。なお、取得されるインデックス情報は、1以上のインデックス情報であっても良い。   (Step S2112) The index information acquisition unit 201 acquires index information from the database structure information based on the index information acquisition command information acquired in step S2111. “Acquiring based on index information acquisition command information” means executing an index information acquisition command and acquiring index information that is a result of the command execution. Note that the acquired index information may be one or more pieces of index information.

(ステップS2113)インデックス構築部201は、データベース操作情報保持部301から、インデックス構築命令情報を取得する。「インデックス構築命令情報を取得する」とは、移行先であるデータベース管理システムが採用しているインターフェイスであって、インデックス構築命令情報を取得するインターフェイスを取り出すことを意味している。   (Step S2113) The index construction unit 201 acquires index construction command information from the database operation information holding unit 301. “Obtain index construction instruction information” means to take out an interface that is adopted by the database management system that is the migration destination and that obtains index construction instruction information.

(ステップS2114)インデックス構築部201は、ステップS2113で取得したインデックス構築命令情報に基づいて、データ挿入部106が挿入したデータ群の全部または一部に対するインデックスを構築する。なお、インデックス情報が示すインデックスの構造と異なるインデックスを構築しても良い。「インデックス構築命令情報に基づいて、データ挿入部106が挿入したデータ群の全部または一部に対するインデックスを構築する」とは、インデックス構築命令を実行することを、命令実行部1072に指示することである。   (Step S2114) The index construction unit 201 constructs an index for all or part of the data group inserted by the data insertion unit 106 based on the index construction instruction information acquired in step S2113. An index different from the index structure indicated by the index information may be constructed. “Building an index for all or part of the data group inserted by the data insertion unit 106 based on the index construction command information” is to instruct the command execution unit 1072 to execute the index construction command. is there.

(ステップS2115)命令実行部1071は、ステップS2114で指示した「インデックス構築命令」を実行する。実行された結果、インデックスが構築される。ステップS201に戻る。   (Step S2115) The instruction execution unit 1071 executes the “index construction instruction” instructed in step S2114. As a result of execution, an index is constructed. The process returns to step S201.

以下、本実施の形態におけるデータベース移行装置300の具体的な動作について説明する。図22は、データベース操作情報保持部301が有する情報の例を示す図である。図22において、「DBMS」とは、データベース管理システムを意味し、「DBMS1」、「DBMS2」、「DBMS3」は、各々異なるデータベース管理システムである。また、「DBMS1」、「DBMS2」、「DBMS3」は、各々異なるデータベース言語を用いている。   Hereinafter, a specific operation of the database migration apparatus 300 in this embodiment will be described. FIG. 22 is a diagram illustrating an example of information included in the database operation information holding unit 301. In FIG. 22, “DBMS” means a database management system, and “DBMS1”, “DBMS2”, and “DBMS3” are different database management systems. “DBMS1”, “DBMS2”, and “DBMS3” use different database languages.

以下に、データベース構造情報を取得する処理について説明する。なお、データベースを移行する指示の入力に関する処理は、実施の形態1と同様であるため説明は省略する。まず、第一データベース構造情報取得部103は、第一データベース構造取得命令情報を、データベース操作情報保持部301から取得する。かかる「取得する」場合、指定された移行元のDBMSを記述するデータベース言語を判定して、該当する第一データベース構造取得命令情報を取得してもよく、指定されたデータベースの保存形式(例えば、データベースを格納しているファイルの拡張子等)からデータベース言語を判定して、該当する第一データベース構造取得命令情報を取得してもよい。図22において、第一データベース構造取得命令情報は、例えば、「DBMS1」の場合、「tablename[]=get tabele();attribute[]=get schema(tablename);」である。移行元である第一データベース管理システム102のデータベース言語が、例えば、「DBMS1」のデータベース言語と同じであれば、第一データベース構造情報取得部103は、「tablename[]=get tabele();attribute[]=get schema(tablename);」を取得する。移行元である第一データベース管理システム102のデータベース言語が、例えば、「DBMS1」のデータベース言語と異なり、「DBMS2」または「DBMS3」と同じであれば、第一データベース構造情報取得部103は、「DBMS2」または「DBMS3」のいずれかのデータベース言語で記述された命令を取得する。次に、第一データベース構造情報取得部103は、例えば、取得された「tablename[]=get tabele();attribute[]=get schema(tablename);」を実行する。当該命令の意味は、以下である。「tabele()」で示されるテーブルの名称を取得し、「tablename[]」とする。そして、「tablename」のテーブル構造「schema(tablename)」を取得し、「attribute[]」とする。当該実行の結果、第一データベース構造情報取得部103は、第一データベース構造情報を取得する(図7参照)。なお、データベースに複数の表がある場合、当該命令は、複数回繰り返され、複数の表のテーブル構造が取得される。   Below, the process which acquires database structure information is demonstrated. Note that the processing related to the input of the instruction to migrate the database is the same as that in the first embodiment, and thus the description thereof is omitted. First, the first database structure information acquisition unit 103 acquires first database structure acquisition command information from the database operation information holding unit 301. In such “acquisition”, the database language describing the designated migration source DBMS may be determined to obtain the corresponding first database structure acquisition command information, and the designated database storage format (for example, The database language may be determined based on the extension of the file storing the database, and the corresponding first database structure acquisition command information may be acquired. In FIG. 22, the first database structure acquisition command information is, for example, “tablename [] = get table (); attribute [] = get schema (tablename);” for “DBMS1”. If the database language of the first database management system 102 that is the migration source is the same as the database language of “DBMS1,” for example, the first database structure information acquisition unit 103 sets “tablename [] = get table (); [] = Get schema (tablename); If the database language of the first database management system 102 that is the migration source is the same as “DBMS2” or “DBMS3”, for example, unlike the database language of “DBMS1,” the first database structure information acquisition unit 103 “ The command described in the database language “DBMS2” or “DBMS3” is acquired. Next, the first database structure information acquisition unit 103 executes, for example, the acquired “tablename [] = get table (); attribute [] = get schema (tablename);”. The meaning of the instruction is as follows. The name of the table indicated by “table ()” is acquired and set as “tablename []”. Then, the table structure “scheme (tablename)” of “tablename” is acquired and set as “attribute []”. As a result of the execution, the first database structure information acquisition unit 103 acquires first database structure information (see FIG. 7). When there are a plurality of tables in the database, the command is repeated a plurality of times, and the table structures of the plurality of tables are acquired.

以下に、データ群を取得する処理について説明する。移行元である第一データベース管理システム102のデータベース言語が、例えば、「DBMS1」のデータベース言語と同じであれば、データ群取得部104は、「record[]=get record(tablename);」を取得する。移行元である第一データベース管理システム102のデータベース言語が、例えば、「DBMS1」のデータベース言語と異なり、「DBMS2」または「DBMS3」と同じであれば、データ群取得部104は、「DBMS2」または「DBMS3」のいずれかのデータベース言語で記述された命令を取得する。次に、データ群取得部104は、例えば、取得された「record[]=get record(tablename);」を実行する。当該命令の意味は以下である。「tablename」で示される表のレコードのデータである「record(tablename)」を取得し、「record[]」とする。当該実行の結果、データ群取得部104は、データ群を取得する(図8参照)。   Below, the process which acquires a data group is demonstrated. For example, if the database language of the first database management system 102 that is the migration source is the same as the database language of “DBMS1,” the data group acquisition unit 104 acquires “record [] = get record (tablename);”. To do. If the database language of the first database management system 102 that is the migration source is the same as “DBMS2” or “DBMS3”, for example, unlike the database language of “DBMS1,” the data group acquisition unit 104 selects “DBMS2” or “DBMS2”. An instruction described in any database language of “DBMS3” is acquired. Next, the data group acquisition unit 104 executes, for example, the acquired “record [] = get record (tablename);”. The meaning of the instruction is as follows. “Record (tablename)”, which is data of the record in the table indicated by “tablename”, is acquired and set as “record []”. As a result of the execution, the data group acquisition unit 104 acquires a data group (see FIG. 8).

以下に、移行先の第二データベース管理システム107に、データベース構造を構成する処理について説明する。移行先である第二データベース管理システム107のデータベース言語が、例えば、「DBMS3」のデータベース言語と同じであれば、データベース構造定義部105は、「CREATE TABLE tabele_name1(column1 type1 column2 type2 ・・・);」を取得する。移行先である第二データベース管理システム107のデータベース言語が、例えば、「DBMS3」のデータベース言語と異なり、「DBMS1」または「DBMS2」と同じであれば、データベース構造定義部105は、「DBMS1」または「DBMS2」のいずれかのデータベース言語で記述された命令を取得する。次に、データベース構造定義部105は、取得した「CREATE TABLE tabele_name1(column1 type1 column2 type2 ・・・);」である第二データベース構造定義命令を実行することを、命令実行部1071に指示する。次に、命令実行部1071は、第二データベース構造定義命令の「CREATE TABLE tabele_name1(column1 type1 column2 type2 ・・・);」を実行する。当該命令の意味は以下である。「table_name1」という名称の表のテーブル構造を作成する。フィールドは、「column1 type1 column2 type2 ・・・」で定義される。「column」は、フィールドの名称を示す。「type」は、データ型を示す。「column1 type1 column2 type2 ・・・」は、「attribute[]」が有する情報と同一である。命令実行の結果、データベース構造が構成される(図9参照)。   In the following, the process of configuring the database structure in the migration destination second database management system 107 will be described. If the database language of the second database management system 107 that is the migration destination is the same as the database language of “DBMS3”, for example, the database structure definition unit 105 will create “CREATE TABLE table_name1 (column1 type1 column2 type2...); Is obtained. If the database language of the second database management system 107 that is the migration destination is the same as “DBMS1” or “DBMS2”, for example, different from the database language of “DBMS3”, the database structure definition unit 105 selects “DBMS1” or “DBMS1”. An instruction described in any database language of “DBMS2” is acquired. Next, the database structure definition unit 105 instructs the instruction execution unit 1071 to execute the acquired second database structure definition command “CREATE TABLE table_name1 (column1 type1 column2 type2...);”. Next, the instruction execution unit 1071 executes a second database structure definition instruction “CREATE TABLE table_name1 (column1 type1 column2 type2...);”. The meaning of the instruction is as follows. A table structure of a table named “table_name1” is created. The field is defined by “column1 type1 column2 type2...”. “Column” indicates the name of the field. “Type” indicates a data type. “Column1 type1 column2 type2...” Is the same as the information included in “attribute []”. As a result of instruction execution, a database structure is constructed (see FIG. 9).

以下に、移行先の第二データベース管理システム107に、データベースを構成する処理について説明する。移行先である第二データベース管理システム107のデータベース言語が、例えば、「DBMS3」のデータベース言語と同じであれば、データ挿入部106は、「INSERT INTO table_name1 SELECT * FROM table_name;」を取得する。今、「table_name」は、「record[]」である。移行先である第二データベース管理システム107のデータベース言語が、例えば、「DBMS3」のデータベース言語と異なり、「DBMS1」または「DBMS2」と同じであれば、データ挿入部106は、「DBMS1」または「DBMS2」のいずれかのデータベース言語で記述された命令を取得する。次に、データ挿入部106は、取得した「INSERT INTO table_name1 SELECT * FROM record[];」であるデータ挿入命令を実行することを、命令実行部1071に指示する。次に、命令実行部1071は、データ挿入命令の「INSERT INTO table_name1 SELECT * FROM record[];」を実行する。当該命令の意味は以下である。「record[]」で示される全てのデータを取得する。そして、「table_name1」で示される表に、当該データの全てを挿入する。命令実行の結果、データベースが構成される(図10参照)。   In the following, a process of configuring a database in the migration destination second database management system 107 will be described. For example, if the database language of the second database management system 107 that is the migration destination is the same as the database language of “DBMS3”, the data insertion unit 106 acquires “INSERT INTO table_name1 SELECT * FROM table_name;”. Now, “table_name” is “record []”. If the database language of the second database management system 107 that is the migration destination is the same as “DBMS1” or “DBMS2”, for example, unlike the database language of “DBMS3”, the data insertion unit 106 selects “DBMS1” or “DBMS1”. The command described in any database language of “DBMS2” is acquired. Next, the data insertion unit 106 instructs the instruction execution unit 1071 to execute the acquired data insertion instruction “INSERT INTO table_name1 SELECT * FROM record [];”. Next, the instruction execution unit 1071 executes the data insertion instruction “INSERT INTO table_name1 SELECT * FROM record [];”. The meaning of the instruction is as follows. All data indicated by “record []” is acquired. Then, all of the data is inserted into the table indicated by “table_name1”. As a result of the instruction execution, a database is constructed (see FIG. 10).

以下に、インデックス情報を取得する処理について説明する。移行元である第一データベース管理システム102のデータベース言語が、例えば、「DBMS1」のデータベース言語と同じであれば、インデックス情報取得部201は、「attributename[]=get index(tablename)」を取得する。移行元である第一データベース管理システム102のデータベース言語が、例えば、「DBMS1」のデータベース言語と異なり、「DBMS2」または「DBMS3」と同じであれば、インデックス情報取得部201は、「DBMS2」または「DBMS3」のいずれかのデータベース言語で記述された命令を取得する。次に、インデックス情報取得部201は、例えば、取得された「attributename[]=get index(tablename)」を実行する。当該命令の意味は以下である。「tablename」で示される表のインデックスの情報を取得し、当該インデックスの情報を「attributename[]」とする。当該実行の結果、インデックス情報取得部201は、インデックス情報を、データベース構造情報から取得する(図16参照)。   Below, the process which acquires index information is demonstrated. If the database language of the first database management system 102 that is the migration source is the same as the database language of “DBMS1,” for example, the index information acquisition unit 201 acquires “attributename [] = get index (tablename)”. . If the database language of the first database management system 102 that is the migration source is the same as “DBMS2” or “DBMS3”, for example, unlike the database language of “DBMS1”, the index information acquisition unit 201 sets “DBMS2” or “DBMS2” An instruction described in any database language of “DBMS3” is acquired. Next, the index information acquisition unit 201 executes, for example, the acquired “attributename [] = get index (tablename)”. The meaning of the instruction is as follows. Information on the index of the table indicated by “tablename” is acquired, and the information on the index is set to “attributename []”. As a result of the execution, the index information acquisition unit 201 acquires index information from the database structure information (see FIG. 16).

以下に、移行先の第二データベース管理システム107に、インデックスを構築する処理について説明する。移行先である第二データベース管理システム107のデータベース言語が、例えば、「DBMS3」のデータベース言語と同じであれば、インデックス構築部202は、「CREATE INDEX index_name ON table_name1(column_name);」を取得する。今、「column_name」は、「attributename[]」である。移行先である第二データベース管理システム107のデータベース言語が、例えば、「DBMS3」のデータベース言語と異なり、「DBMS1」または「DBMS2」と同じであれば、インデックス構築部202は、「DBMS1」または「DBMS2」のいずれかのデータベース言語で記述された命令を取得する。次に、インデックス構築部201は、取得した「CREATE INDEX index_name ON table_name1(attributename[]);」であるインデックス情報を実行することを、命令実行部1071に指示する。次に、命令実行部1071は、インデックス構築命令の「CREATE INDEX index_name ON table_name1(attributename[]);」を実行する。当該命令の意味は以下である。「table_name1」の表に、「index_name」で示されるインデックスを作成する。命令実行の結果、インデックスが作成され、構築される(図17、図18、図19参照)。   Hereinafter, a process for constructing an index in the second database management system 107 at the migration destination will be described. If the database language of the second database management system 107 that is the migration destination is the same as the database language of “DBMS3”, for example, the index construction unit 202 acquires “CREATE INDEX index_name ON table_name1 (column_name);”. Now, “column_name” is “attributename []”. If the database language of the second database management system 107 that is the migration destination is the same as “DBMS1” or “DBMS2”, for example, different from the database language of “DBMS3”, the index construction unit 202 selects “DBMS1” or “DBMS1”. The command described in any database language of “DBMS2” is acquired. Next, the index construction unit 201 instructs the instruction execution unit 1071 to execute the acquired index information “CREATE INDEX index_name ON table_name1 (attributename []);”. Next, the instruction execution unit 1071 executes an index construction instruction “CREATE INDEX index_name ON table_name1 (attributename []);”. The meaning of the instruction is as follows. An index indicated by “index_name” is created in the table of “table_name1”. As a result of the instruction execution, an index is created and constructed (see FIGS. 17, 18, and 19).

なお、本実施の形態において、データベース操作情報保持部301は、第一データベース構造取得命令情報と、データ群取得命令情報と第二データベース構造定義命令情報と、データ群挿入命令情報と、インデックス情報取得命令情報と、インデックス構築命令情報を有して構成されるものだったが、データベース操作情報保持部301は、インデックス情報取得命令情報と、インデックス構築命令情報を有さない構成であっても良い。かかる場合、データベース移行装置300は、インデックス情報取得部201、インデックス構築部202を具備しない構成でも良い。
以上、本実施の形態によれば、種々のDBMS間で、DBの移行ができる。また、種々のDBMS間で、インデックスを構築できる。
In the present embodiment, the database operation information holding unit 301 acquires first database structure acquisition command information, data group acquisition command information, second database structure definition command information, data group insertion command information, and index information acquisition. The database operation information holding unit 301 may be configured not to have the index information acquisition command information and the index construction command information. In such a case, the database migration apparatus 300 may be configured not to include the index information acquisition unit 201 and the index construction unit 202.
As described above, according to the present embodiment, DBs can be migrated between various DBMSs. An index can be constructed between various DBMSs.

さらに、本実施の形態における動作をソフトウェアで実現した場合のプログラムは、以下のようになる。コンピュータに、第一データベース管理システムの第一データベース構造情報を取得する命令を示す情報である第一データベース構造取得命令情報に基づいて、第一データベース構造情報を取得する第一データベース構造情報取得ステップと、データ群を取得する命令を示す情報であるデータ群取得命令情報に基づいて、1以上のデータベースのレコードを構成するデータ群を取得するデータ群取得ステップと、第二データベース管理システムにおいてデータベース構造を定義する命令を示す情報である第二データベース構造定義命令情報に基づいて、1以上のデータベース構造を定義するデータベース構造定義ステップと、データベース構造定義ステップで定義したデータベース構造にデータ群を挿入する命令を示す情報であるデータ群挿入命令情報に基づいて、データ群取得ステップで取得したデータ群を、データベース構造定義ステップで定義したデータベース構造に挿入するデータ挿入ステップとを実行させるためのプログラムである。   Furthermore, the program when the operation in the present embodiment is realized by software is as follows. A first database structure information acquiring step for acquiring first database structure information based on first database structure acquisition command information, which is information indicating a command for acquiring first database structure information of the first database management system in a computer; A data group acquisition step for acquiring a data group constituting one or more database records based on data group acquisition command information, which is information indicating a command for acquiring a data group, and a database structure in the second database management system A database structure definition step for defining one or more database structures based on the second database structure definition command information indicating information to be defined, and an instruction for inserting a data group into the database structure defined in the database structure definition step Data group insertion which is information to show Based on the instruction information, a program for executing the acquired data group in the data group acquiring step and the data insertion step of inserting the database structure defined in the database structure definition step.

また、コンピュータに、第一データベース管理システムの第一データベース構造情報を取得する命令を示す情報である第一データベース構造取得命令情報に基づいて、第一データベース構造情報を取得する第一データベース構造情報取得ステップと、データ群を取得する命令を示す情報であるデータ群取得命令情報に基づいて、1以上のデータベースのレコードを構成するデータ群を取得するデータ群取得ステップと、第二データベース管理システムにおいてデータベース構造を定義する命令を示す情報である第二データベース構造定義命令情報と第一データベース構造情報に基づいて1以上のデータベース構造を定義するデータベース構造定義ステップと、データベース構造定義ステップで定義したデータベース構造にデータ群を挿入する命令を示す情報であるデータ群挿入命令情報に基づいて、データ群取得ステップで取得したデータ群を、データベース構造定義ステップで定義したデータベース構造に挿入するデータ挿入ステップと、1以上のデータベースのインデックス情報を取得する命令を示す情報であるインデックス情報取得命令情報に基づいて、1以上のデータベースのインデックス情報を取得するインデックス情報取得ステップと、データ挿入ステップで挿入したデータ群の全部または一部に対するインデックスを構築する命令を示す情報であるインデックス構築命令情報とインデックス情報に基づいて、データ挿入ステップで挿入したデータ群の全部または一部に対するインデックスを構築するインデックス構築ステップを実行させるためのプログラムである。   Also, the first database structure information acquisition for acquiring the first database structure information based on the first database structure acquisition command information which is information indicating the command for acquiring the first database structure information of the first database management system in the computer A data group acquisition step for acquiring a data group constituting a record of one or more databases based on a step, data group acquisition command information which is information indicating a command for acquiring the data group, and a database in the second database management system A database structure definition step for defining one or more database structures based on the second database structure definition command information, which is information indicating instructions for defining the structure, and the first database structure information, and the database structure defined in the database structure definition step. Insert data group A data insertion step for inserting the data group acquired in the data group acquisition step into the database structure defined in the database structure definition step based on data group insertion instruction information which is information indicating an instruction, and index information of one or more databases An index information acquisition step for acquiring index information of one or more databases based on index information acquisition command information that is information indicating an instruction for acquiring data, and an index for all or part of the data group inserted in the data insertion step This is a program for executing an index construction step for constructing indexes for all or a part of the data group inserted in the data insertion step based on index construction instruction information and index information which are information indicating construction instructions.

以上のように、本発明は、データベースの移行処理を簡単に行え、さらに、移行先のDBMS上で、手入力で、テーブル構造を定義しなくても良い。また、かかるテーブル構造を定義するための手入力する時間は必要なくなり、DB管理者のDBメンテナンス時間等を短縮できる等の効果を有し、例えば、異なるDBMS間におけるデータベースの移行を処理するデータ移行装置等に有用である。   As described above, according to the present invention, database migration processing can be easily performed, and the table structure need not be manually defined on the migration destination DBMS. In addition, there is no need for manual input time for defining such a table structure, which has the effect of shortening the DB maintenance time of the DB administrator, for example, data migration for processing database migration between different DBMSs. Useful for devices and the like.

実施の形態1におけるデータベース移行装置100の構成を示すブロック図Block diagram showing the configuration of the database migration apparatus 100 according to the first embodiment 実施の形態1におけるデータベース移行装置100の動作を示すフローチャートThe flowchart which shows operation | movement of the database transfer apparatus 100 in Embodiment 1. 実施の形態1におけるデータベース移行装置100のディスプレイの表示例を示す図The figure which shows the example of a display of the database migration apparatus 100 in Embodiment 1. 実施の形態1におけるデータベース移行装置100のディスプレイの表示例を示す図The figure which shows the example of a display of the database migration apparatus 100 in Embodiment 1. 実施の形態1におけるデータベース移行装置100のディスプレイの表示例を示す図The figure which shows the example of a display of the database migration apparatus 100 in Embodiment 1. 実施の形態1における「人事管理DB」のデータ例を示す図The figure which shows the example of data of "HR management DB" in Embodiment 1. 実施の形態1における「人事管理DB」のデータのデータベース構造情報の例を示す図The figure which shows the example of the database structure information of the data of "HR management DB" in Embodiment 1 実施の形態1におけるデータ群の情報の例を示す図The figure which shows the example of the information of the data group in Embodiment 1 実施の形態1におけるデータベース構造の例を示す図The figure which shows the example of the database structure in Embodiment 1 実施の形態1におけるデータベースの例を示す図The figure which shows the example of the database in Embodiment 1 実施の形態1における表示画面の表示例を示す図FIG. 6 shows a display example of a display screen in the first embodiment. 実施の形態1におけるデータベース移行装置、第一データベース管理システムおよび第二データベース管理システムの構成を示すブロック図The block diagram which shows the structure of the database transfer apparatus in Embodiment 1, a 1st database management system, and a 2nd database management system 実施の形態1におけるデータベース移行装置、第一データベース管理システムおよび第二データベース管理システムの外観の例を示す図The figure which shows the example of the external appearance of the database transfer apparatus in Embodiment 1, a 1st database management system, and a 2nd database management system 実施の形態2におけるデータベース移行装置200の構成を示すブロック図Block diagram showing the configuration of the database migration apparatus 200 in the second embodiment 実施の形態2におけるデータベース移行装置200の動作を示すフローチャートThe flowchart which shows operation | movement of the database transfer apparatus 200 in Embodiment 2. 実施の形態2におけるデータベース構造情報のデータ例を示す図The figure which shows the example of data of the database structure information in Embodiment 2 実施の形態2におけるインデックスの例を示す図The figure which shows the example of the index in Embodiment 2. 実施の形態2におけるインデックスの例を示す図The figure which shows the example of the index in Embodiment 2. 実施の形態2におけるインデックスの例を示す図The figure which shows the example of the index in Embodiment 2. 実施の形態3におけるデータベース移行装置300の構成を示すブロック図Block diagram showing the configuration of the database migration apparatus 300 according to the third embodiment 実施の形態3におけるデータベース移行装置300の動作を示すフローチャートThe flowchart which shows operation | movement of the database transfer apparatus 300 in Embodiment 3. 実施の形態3におけるデータベース操作情報保持部301が有する情報の例を示す図The figure which shows the example of the information which the database operation information holding | maintenance part 301 in Embodiment 3 has

符号の説明Explanation of symbols

100、200、300、400 データベース移行装置
101 入力受付部
102、500 第一データベース管理システム
1021 第一データベース格納部
103 第一データベース構造情報取得部
104 データ群取得部
105 データベース構造定義部
106 データ挿入部
107、600 第二データベース管理システム
1071 命令実行部
1071 第二データベース格納部
201 インデックス情報取得部
202 インデックス構築部
301 データベース操作情報保持部
401 送受信部
501 第一送受信部
601 第二受信部

100, 200, 300, 400 Database migration device 101 Input accepting unit 102, 500 First database management system 1021 First database storage unit 103 First database structure information acquisition unit 104 Data group acquisition unit 105 Database structure definition unit 106 Data insertion unit 107, 600 Second database management system 1071 Instruction execution unit 1071 Second database storage unit 201 Index information acquisition unit 202 Index construction unit 301 Database operation information holding unit 401 Transmission / reception unit 501 First transmission / reception unit 601 Second reception unit

Claims (9)

第一データベース管理システムにより定義された1以上のデータベースのデータベース構造に関する情報であり、前記1以上のデータベースのインデックスされる属性を特定する情報を含むインデックス情報を有する情報である第一データベース構造情報を取得する第一データベース構造情報取得部と、
前記1以上のデータベースのレコードを構成するデータ群を取得するデータ群取得部と、
第二データベース管理システムにおいて、前記第一データベース構造情報に基づいて、1以上のデータベース構造を定義するデータベース構造定義部と、
前記データ群取得部が取得したデータ群を、前記データベース構造定義部が定義したデータベース構造に挿入するデータ挿入部と、
前記1以上のデータベースのインデックス情報を取得するインデックス情報取得部と、
前記インデックス情報取得部が取得したインデックス情報に含まれる、インデックスされる属性を特定する情報により特定される属性をキーとして、前記データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築するインデックス構築部とを具備するデータベース移行装置。
Ri Information der about the database structure of one or more database defined by the first database management system, the one or more first database structure Ru information der with index information including information specifying the attributes to be indexed in the database A first database structure information acquisition unit for acquiring information;
A data group acquisition unit for acquiring a data group constituting a record of the one or more databases;
In the second database management system, a database structure definition unit that defines one or more database structures based on the first database structure information;
A data insertion unit for inserting the data group acquired by the data group acquisition unit into the database structure defined by the database structure definition unit ;
An index information acquisition unit for acquiring index information of the one or more databases;
The index for all or part of the data group inserted by the data insertion unit is constructed using the attribute specified by the information specifying the attribute to be indexed included in the index information acquired by the index information acquisition unit as a key. A database migration apparatus comprising an index construction unit .
前記インデックス構築部は、The index building unit
前記インデックス情報取得部が取得したインデックス情報に含まれる、インデックスされる属性を特定する情報により特定される属性をキーとする、インデックスを構築する命令を構成し、An instruction for constructing an index is configured with the attribute specified by the information specifying the attribute to be indexed included in the index information acquired by the index information acquisition unit as a key,
前記第二データベース管理システムが有する命令実行部が、前記インデックスを構築する命令を実行することにより、前記第二データベース管理システムの第二データベース格納部にインデックスが蓄積される請求項1記載のデータベース移行装置。The database migration according to claim 1, wherein an index is accumulated in a second database storage unit of the second database management system by an instruction execution unit included in the second database management system executing an instruction to construct the index. apparatus.
前記インデックス情報は、インデックスされる属性を特定する情報とインデックスの構造を示す情報とを有し、
前記インデックス情報が示すインデックスの構造と、前記インデックス構築部が構築するインデックスの構造が異なる請求項1または請求項2記載のデータベース移行装置。
The index information includes information for specifying an attribute to be indexed and information indicating a structure of the index,
The database migration apparatus according to claim 1 or 2 , wherein an index structure indicated by the index information is different from an index structure constructed by the index construction unit.
前記インデックス情報が示すインデックスの構造、および前記インデックス構築部が構築するインデックスの構造は、The structure of the index indicated by the index information and the structure of the index constructed by the index construction unit are:
前記インデックスされる属性を特定する情報により特定される属性をキーとして、ソートされている複数の属性値を有するインデックスの構造、または、The structure of an index having a plurality of attribute values sorted with the attribute specified by the information specifying the indexed attribute as a key, or
前記インデックスされる属性を特定する情報により特定される属性をキーとしたハッシュ構造のインデックスの構造、または、An index structure of a hash structure with the attribute specified by the information specifying the indexed attribute as a key, or
前記インデックスされる属性を特定する情報により特定される属性をキーとしたBtree構造である請求項1から請求項3いずれか記載のデータベース移行装置。4. The database migration apparatus according to claim 1, wherein the database migration apparatus has a Btree structure with an attribute specified by information specifying the indexed attribute as a key.
前記第一データベース管理システムの第一データベース構造情報を取得する命令を示す情報である第一データベース構造取得命令情報と、前記データ群を取得する命令を示す情報であるデータ群取得命令情報と、第二データベース管理システムにおいてデータベース構造を定義する命令を示す情報である第二データベース構造定義命令情報と、前記データベース構造定義部が定義したデータベース構造に前記データ群を挿入する命令を示す情報であるデータ群挿入命令情報と、前記1以上のデータベースのインデックス情報を取得する命令を示す情報であるインデックス情報取得命令情報と、前記データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築する命令を示す情報であるインデックス構築命令情報を保持しているデータベース操作情報保持部をさらに具備し、
前記第一データベース構造情報取得部は、
前記第一データベース構造取得命令情報に基づいて、第一データベース構造情報を取得し、
前記データ群取得部は、
前記データ群取得命令情報に基づいて、前記1以上のデータベースのレコードを構成するデータ群を取得し、
前記データベース構造定義部は、
前記第二データベース構造定義命令情報と前記第一データベース構造情報に基づいて1以上のデータベース構造を定義し、
前記データ挿入部は、
前記データ群挿入命令情報に基づいて、前記データ群取得部が取得したデータ群を、前記データベース構造定義部が定義したデータベース構造に挿入し、
前記インデックス情報取得部は、
前記インデックス情報取得命令情報に基づいて、前記1以上のデータベースのインデックス情報を取得し、
前記インデックス構築部は、
前記インデックス構築命令情報と前記インデックス情報を用いて、当該インデックス情報に含まれる、インデックスされる属性を特定する情報により特定される属性をキーとして、前記データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築する請求項1から請求項4いずれか記載のデータベース移行装置。
First database structure acquisition command information which is information indicating a command for acquiring first database structure information of the first database management system; data group acquisition command information which is information indicating a command for acquiring the data group; A second database structure definition command information which is information indicating a command for defining a database structure in the two database management system, and a data group which is information indicating a command for inserting the data group into the database structure defined by the database structure definition unit Insertion instruction information, index information acquisition instruction information indicating information for acquiring index information of the one or more databases, and an instruction for constructing an index for all or part of the data group inserted by the data insertion unit Holding index building instruction information which is the information to show Further comprising a database operation information holding section that,
The first database structure information acquisition unit
Based on the first database structure acquisition command information, obtain first database structure information,
The data group acquisition unit
Based on the data group acquisition command information, acquiring a data group constituting a record of the one or more databases,
The database structure definition unit includes:
Defining one or more database structures based on the second database structure definition instruction information and the first database structure information;
The data insertion unit is
Based on the data group insertion instruction information, the data group acquired by the data group acquisition unit is inserted into the database structure defined by the database structure definition unit,
The index information acquisition unit
Based on the index information acquisition command information, acquiring index information of the one or more databases,
The index building unit
Using the index construction command information and the index information, all or one of the data groups inserted by the data insertion unit using the attribute specified by the information specifying the attribute to be indexed included in the index information as a key. The database migration apparatus according to claim 1, wherein an index for a section is constructed.
コンピュータに、
第一データベース管理システムにより定義された1以上のデータベースのデータベース構造に関する情報である第一データベース構造情報を取得する第一データベース構造情報取得ステップと、
前記1以上のデータベースのレコードを構成するデータ群を取得するデータ群取得ステップと、
前記第一データベース構造情報に基づいて1以上のデータベース構造を定義するデータベース構造定義ステップと、
前記データ群取得ステップで取得したデータ群を、前記データベース構造定義ステップで定義したデータベース構造に挿入するデータ挿入ステップと、
前記1以上のデータベースのインデックス情報を取得するインデックス情報取得ステップと、
前記インデックス情報取得ステップで取得されたインデックス情報に含まれる、インデックスされる属性を特定する情報により特定される属性をキーとして、前記データ挿入ステップで挿入されたデータ群の全部または一部に対するインデックスを構築するインデックス構築ステップとを実行させるためのプログラム。
On the computer,
A first database structure information acquisition step for acquiring first database structure information that is information related to a database structure of one or more databases defined by the first database management system;
A data group acquisition step of acquiring a data group constituting a record of the one or more databases;
A database structure defining step for defining one or more database structures based on the first database structure information;
A data insertion step of inserting the data group acquired in the data group acquisition step into the database structure defined in the database structure definition step;
An index information acquisition step of acquiring index information of the one or more databases;
Indexes for all or part of the data group inserted in the data insertion step are used with the attribute specified by the information specifying the attribute to be indexed included in the index information acquired in the index information acquisition step as a key. A program for executing an index construction step for construction .
前記インデックス構築ステップにおいて、In the index building step,
前記インデックス情報取得ステップで取得されたインデックス情報に含まれる、インデックスされる属性を特定する情報により特定される属性をキーとする、インデックスを構築する命令を構成し、An instruction for constructing an index is configured with the attribute specified by the information specifying the attribute to be indexed included in the index information acquired in the index information acquisition step as a key,
前記第二データベース管理システムが有する命令実行ステップにおいて、In the instruction execution step of the second database management system,
前記インデックスを構築する命令を実行することにより、前記第二データベース管理システムの第二データベース格納部にインデックスが蓄積される請求項6記載のプログラム。The program according to claim 6, wherein an index is accumulated in a second database storage unit of the second database management system by executing an instruction for constructing the index.
前記インデックス情報は、インデックスされる属性を特定する情報とインデックスの構造を示す情報とを有し、The index information includes information for specifying an attribute to be indexed and information indicating a structure of the index,
前記インデックス情報が示すインデックスの構造と、前記インデックス構築部が構築するインデックスの構造が異なる請求項6または請求項7記載のプログラム。The program according to claim 6 or 7, wherein an index structure indicated by the index information is different from an index structure constructed by the index construction unit.
記憶媒体に、On the storage medium,
前記第一データベース管理システムの第一データベース構造情報を取得する命令を示す情報である第一データベース構造取得命令情報と、前記データ群を取得する命令を示す情報であるデータ群取得命令情報と、第二データベース管理システムにおいてデータベース構造を定義する命令を示す情報である第二データベース構造定義命令情報と、前記データベース構造定義部が定義したデータベース構造に前記データ群を挿入する命令を示す情報であるデータ群挿入命令情報と、前記1以上のデータベースのインデックス情報を取得する命令を示す情報であるインデックス情報取得命令情報と、前記データ挿入部が挿入したデータ群の全部または一部に対するインデックスを構築する命令を示す情報であるインデックス構築命令情報を保持しており、First database structure acquisition command information which is information indicating a command for acquiring first database structure information of the first database management system; data group acquisition command information which is information indicating a command for acquiring the data group; A second database structure definition command information which is information indicating a command for defining a database structure in the two database management system, and a data group which is information indicating a command for inserting the data group into the database structure defined by the database structure definition unit Insertion instruction information, index information acquisition instruction information indicating information for acquiring index information of the one or more databases, and an instruction for constructing an index for all or part of the data group inserted by the data insertion unit Holding index building instruction information which is the information to show Ri,
前記第一データベース構造情報取得ステップにおいて、In the first database structure information acquisition step,
前記第一データベース構造取得命令情報に基づいて、第一データベース構造情報を取得し、Based on the first database structure acquisition command information, obtain first database structure information,
前記データ群取得ステップにおいて、In the data group acquisition step,
前記データ群取得命令情報に基づいて、前記1以上のデータベースのレコードを構成するデータ群を取得し、Based on the data group acquisition command information, acquiring a data group constituting a record of the one or more databases,
前記データベース構造定義ステップにおいて、In the database structure defining step,
前記第二データベース構造定義命令情報と前記第一データベース構造情報に基づいて1以上のデータベース構造を定義し、Defining one or more database structures based on the second database structure definition instruction information and the first database structure information;
前記データ挿入ステップにおいて、In the data insertion step,
前記データ群挿入命令情報に基づいて、前記データ群取得ステップにおいて取得されたデータ群を、前記データベース構造定義ステップにおいて定義されたデータベース構造に挿入し、Based on the data group insertion instruction information, the data group acquired in the data group acquisition step is inserted into the database structure defined in the database structure definition step,
前記インデックス情報取得ステップにおいて、In the index information acquisition step,
前記インデックス情報取得命令情報に基づいて、前記1以上のデータベースのインデックス情報を取得し、Based on the index information acquisition command information, acquiring index information of the one or more databases,
前記インデックス構築ステップにおいて、In the index building step,
前記インデックス構築命令情報と前記インデックス情報を用いて、当該インデックス情報に含まれる、インデックスされる属性を特定する情報により特定される属性をキーとして、前記データ挿入ステップで挿入されたデータ群の全部または一部に対するインデックスを構築する請求項6から請求項8いずれか記載のプログラム。Using the index construction command information and the index information, all of the data group inserted in the data insertion step using the attribute specified by the information specifying the attribute to be indexed included in the index information as a key, or 9. The program according to claim 6, wherein an index for a part is constructed.
JP2003373853A 2003-11-04 2003-11-04 Database migration apparatus and program thereof Expired - Fee Related JP4326303B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003373853A JP4326303B2 (en) 2003-11-04 2003-11-04 Database migration apparatus and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003373853A JP4326303B2 (en) 2003-11-04 2003-11-04 Database migration apparatus and program thereof

Publications (2)

Publication Number Publication Date
JP2005141280A JP2005141280A (en) 2005-06-02
JP4326303B2 true JP4326303B2 (en) 2009-09-02

Family

ID=34685754

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003373853A Expired - Fee Related JP4326303B2 (en) 2003-11-04 2003-11-04 Database migration apparatus and program thereof

Country Status (1)

Country Link
JP (1) JP4326303B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011070369A (en) * 2009-09-25 2011-04-07 Toshiba Corp Device and method for integrating database
JP5677004B2 (en) * 2010-09-30 2015-02-25 株式会社荏原製作所 Polishing apparatus and method
US10726002B1 (en) * 2019-08-19 2020-07-28 DLT Global Inc. Relational data management and organization using DLT
CN116670665B (en) * 2020-09-18 2026-04-14 株式会社亚美究 Method and system for screening and handing over organization data during enterprise segmentation

Also Published As

Publication number Publication date
JP2005141280A (en) 2005-06-02

Similar Documents

Publication Publication Date Title
US9342908B2 (en) Information retrieval and presentation methods and systems
CN102483765B (en) File search system and program
Witten et al. Power to the people: end-user building of digital library collections
US9262417B2 (en) Document management server and document management method
WO2009036500A1 (en) Layout manager
JPH1115767A (en) Server information providing device and computer readable recording medium recording server information providing program
US20190251128A1 (en) Techniques for Managing Persistent Document Collections
Witten et al. Greenstone: open‐source digital library software with end‐user collection building
CN113515564B (en) Data access method, device, equipment and storage medium based on J2EE
JP5539127B2 (en) Document management system, search specification method, program
CN103886085A (en) Universal method for transforming cross report form through columns
JP4326303B2 (en) Database migration apparatus and program thereof
JP6643807B2 (en) Document management client device and document management method
CN107862028B (en) Method for establishing standard academic model, server and storage medium
US20190034650A1 (en) Systems and methods for editing,storing,sharing and displaying digital notes
JP5979895B2 (en) Document management system, computer program, and document management method
JP5458480B2 (en) Inquiry screen generation device for tagged document data inquiry processing system
JP6313987B2 (en) File management program, file management method, and file management system
CN101944123A (en) Simulated batch configuration document management method oriented to semiconductor manufacturing equipment function
WO2020116014A1 (en) Document creation assistance system
JP2011013922A (en) Information processing apparatus, control method, and program
JP2006072705A (en) Document search device and method
CN114968926A (en) A data management method, device, equipment and storage medium
JP3708893B2 (en) Knowledge information collecting system and knowledge information collecting method
JP2011070369A (en) Device and method for integrating database

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061027

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090319

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090508

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090609

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4326303

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140619

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees