JP2013037490A - Information processor, data acquisition method, data acquisition program, and recording medium - Google Patents

Information processor, data acquisition method, data acquisition program, and recording medium Download PDF

Info

Publication number
JP2013037490A
JP2013037490A JP2011172189A JP2011172189A JP2013037490A JP 2013037490 A JP2013037490 A JP 2013037490A JP 2011172189 A JP2011172189 A JP 2011172189A JP 2011172189 A JP2011172189 A JP 2011172189A JP 2013037490 A JP2013037490 A JP 2013037490A
Authority
JP
Japan
Prior art keywords
data
data acquisition
database
original
key information
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.)
Granted
Application number
JP2011172189A
Other languages
Japanese (ja)
Other versions
JP5814039B2 (en
Inventor
Nana Inaoka
奈々 稲岡
Takahiro Ushida
貴啓 牛田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Systems Ltd
Original Assignee
Hitachi Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Systems Ltd filed Critical Hitachi Systems Ltd
Priority to JP2011172189A priority Critical patent/JP5814039B2/en
Publication of JP2013037490A publication Critical patent/JP2013037490A/en
Application granted granted Critical
Publication of JP5814039B2 publication Critical patent/JP5814039B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an information processor for easily acquiring necessary data without increasing loads on a database of a production environment.SOLUTION: The information processor for moving data stored to a first database to a second database, includes: a storage part for storing an inter-table dependency table for associating an original table including original data to be moved with an associated table, and a dependency table between table columns for associating the original table with associated data included in the associated table or key information; an input reception part for receiving input of key information; a data acquisition part for acquiring data of the original table from the first database on the basis of the key information; and an associated data acquisition part for identifying a corresponding associated table on the basis of the original table and acquiring associated data on the basis of the associated table and the original table; and a data insertion part for inserting data of the original table and the associated data in the second database.

Description

本発明は、データベースに記憶されているデータを取得することが可能な情報処理装置、データ取得方法、データ取得プログラム、及び記録媒体に関するものである。   The present invention relates to an information processing apparatus capable of acquiring data stored in a database, a data acquisition method, a data acquisition program, and a recording medium.

一般に、顧客からの依頼に応じて本番データの調査を行う場合、あるいはシステムの本番環境で発生した事故事象を、テスト環境、疑似環境、検査環境で再現させる場合、本番環境にあるデータベースから、その調査のための様々なデータを取得し、取得したデータをテスト環境、疑似環境、検査環境に移動させる必要がある場合が多い。従来の方法としては、例えば、本番環境にあるデータベースのバックアップを取得してリストアする方法、本番環境にあるデータベースをエクスポートしてインポートするユーティリティを使用する方法、あるいはクエリツールを使用してデータを取得する方法などがある。また、特許文献1に開示されているように、ETL(Extract Transform Load)ツールを用いて、データベースから必要となるデータを抽出して加工する方法などがある。   Generally, when investigating production data in response to a request from a customer, or when reproducing an accident event that occurred in the production environment of a system in a test environment, simulated environment, or inspection environment, In many cases, it is necessary to acquire various data for investigation and move the acquired data to a test environment, a pseudo environment, or an inspection environment. Conventional methods include, for example, taking a backup of a database in a production environment and restoring it, using a utility that exports and imports a database in a production environment, or obtaining data using a query tool. There are ways to do it. Further, as disclosed in Patent Document 1, there is a method of extracting and processing necessary data from a database using an ETL (Extract Transform Load) tool.

特表2009−509271号公報Special table 2009-509271 gazette

前述した従来技術により、本番環境にあるデータベースから調査対象となるデータを取得し、挿入するという処理を行うことは可能である。しかし、データベースのバックアップを取得し、その後リストアする方法では、本番環境のシステムに大きな負荷がかかる上、取り出したいデータ以外のデータも取得することになる。例えば、エクスポート・インポートユーティリティでは、バックアップのリストア同様、データベースに大きな負荷がかかり、取り出したいデータ以外も取得することになり、不必要にデータベースに負荷がかかってしまう。また、クエリツールでは、利用者が自らSQL(Structured Query Language)文を作成するため、テーブルの構造を理解した上で使用する必要があり、容易に必要なデータを取得できない。また、上述した特許文献に示されている技術では、本番環境にあるデータベースから必要となるデータを抽出して加工するため、データベースへのアクセスが多く発生し、データベースに負荷がかかってしまう。   With the above-described conventional technology, it is possible to perform processing of acquiring and inserting data to be investigated from a database in a production environment. However, in the method of acquiring a backup of the database and then restoring it, a heavy load is applied to the system in the production environment, and data other than the data to be extracted is also acquired. For example, in the export / import utility, as with backup restoration, a large load is applied to the database, and data other than the data to be retrieved is acquired, and the database is unnecessarily burdened. In the query tool, since the user creates a SQL (Structured Query Language) statement by himself, it is necessary to use the table after understanding the structure of the table, and the necessary data cannot be easily acquired. Further, in the technique disclosed in the above-described patent document, necessary data is extracted from the database in the production environment and processed, so that many accesses to the database occur and a load is imposed on the database.

本発明は、上記に鑑みてなされたものであって、本番環境のデータベースにかかる負荷を増大させることなく、容易に必要なデータを取得することが可能な情報処理装置、データ取得方法、データ取得プログラム、及び記録媒体を提供することを目的とする。   The present invention has been made in view of the above, and an information processing apparatus, a data acquisition method, and a data acquisition that can easily acquire necessary data without increasing a load on a database in a production environment It is an object to provide a program and a recording medium.

上述した目的を達成するために、本発明にかかる情報処理装置は、第1のデータベースに記憶されているデータを、前記第1のデータベースとは異なる第2のデータベースに移動させる処理を行う情報処理装置であって、移動対象となる元データを含む元テーブルと、前記元テーブルに関連する関連テーブルとを対応付けたテーブル間依存関連表と、前記元テーブルと前記関連テーブルに含まれる関連データまたは前記第1のデータベースに記憶されているデータを移動させるためのキー情報とを対応付けたテーブル列間依存関連表とを記憶する記憶部と、前記キー情報の入力を受け付ける入力受付部と、前記入力受付部が受け付けたキー情報と、前記テーブル列間依存関係表に含まれるキー情報とに基づいて、前記入力受付部が受け付けたキー情報に直接関係する前記元テーブルのデータを前記第1のデータベースから取得するデータ取得部と、前記データ取得部が取得した前記元テーブルと、前記テーブル間依存関係表に記憶された元テーブルとに基づいて、前記元テーブルに対応する前記関連テーブルを特定し、特定した前記関連テーブルと、前記データ取得部が取得したデータを有した前記元テーブルとに基づいて、前記テーブル列間依存関係表に含まれる前記関連データを取得する関連データ取得部と、前記データ取得部が取得した前記元テーブルのデータと、前記関連データ取得部が取得した前記関連データとを前記第2のデータベースに挿入するデータ挿入部と、を備えることを特徴とする。   In order to achieve the above-described object, an information processing apparatus according to the present invention performs information processing for performing processing for moving data stored in a first database to a second database different from the first database. A table, an inter-table dependency relation table in which an original table including original data to be moved is associated with a related table related to the original table, and related data included in the original table and the related table, or A storage unit that stores a table-column dependency relation table that associates key information for moving data stored in the first database; an input reception unit that receives input of the key information; and Based on the key information received by the input receiving unit and the key information included in the inter-table dependency relation table, the input receiving unit has received A data acquisition unit for acquiring data of the original table directly related to information from the first database, the original table acquired by the data acquisition unit, and an original table stored in the inter-table dependency relationship table; Based on the table, the related table corresponding to the original table is identified, and the table-column dependency relationship table is determined based on the identified related table and the original table having the data acquired by the data acquisition unit. The related data acquisition unit for acquiring the related data included in the data, the data of the original table acquired by the data acquisition unit, and the related data acquired by the related data acquisition unit are inserted into the second database And a data insertion unit.

また、本発明は、上記情報処理装置で行われるデータ取得方法、データ取得プログラム、及び記録媒体である。   The present invention also provides a data acquisition method, a data acquisition program, and a recording medium performed by the information processing apparatus.

本発明によれば、本番環境のデータベースにかかる負荷を増大させることなく、容易に必要なデータを取得することが可能な情報処理装置、データ取得方法、データ取得プログラム、及び記録媒体を提供することができる。   According to the present invention, it is possible to provide an information processing apparatus, a data acquisition method, a data acquisition program, and a recording medium that can easily acquire necessary data without increasing the load on a production environment database. Can do.

本実施の形態における情報処理装置が行うデータ取得方法の処理の概要を示す図である。It is a figure which shows the outline | summary of a process of the data acquisition method which the information processing apparatus in this Embodiment performs. 情報処理装置の機能的な構成の例を示す図である。It is a figure which shows the example of a functional structure of information processing apparatus. テーブル間依存関係表の具体的な例を示す図である。It is a figure which shows the specific example of a dependency table between tables. テーブル列間依存関係表の具体的な例を示す図である。It is a figure which shows the specific example of the dependency table between table columns. 情報処理装置で行われるデータ取得処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the data acquisition process performed with information processing apparatus. 情報処理装置で行われるデータ取得処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the data acquisition process performed with information processing apparatus. 情報処理装置で行われるデータ取得処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the data acquisition process performed with information processing apparatus. キー情報が入力されてから関連するテーブルのデータを取得するまでの概念図である。It is a conceptual diagram until it acquires the data of the related table after key information is input.

以下に添付図面を参照して、この発明にかかる情報処理装置、データ取得方法、データ取得プログラム、及び記録媒体の実施の形態を詳細に説明する。   Exemplary embodiments of an information processing apparatus, a data acquisition method, a data acquisition program, and a recording medium according to the present invention will be described below in detail with reference to the accompanying drawings.

図1Aは、本実施の形態における情報処理装置100が行うデータ取得方法の処理の概要を示す図である。図1に示すように、情報処理装置100は、本番環境データベースからの取得対象となるデータである入力キー情報1〜入力キー情報nが入力されると、その入力キー情報をキーとして、あらかじめ定められたテーブル間依存関係表およびテーブル列間依存関係表(いずれも後述)を参照し、本番環境データベースから入力キー情報を有したデータを取得するためのSQL(Structured Query Language)文を生成する。   FIG. 1A is a diagram illustrating an outline of processing of a data acquisition method performed by the information processing apparatus 100 according to the present embodiment. As shown in FIG. 1, when input key information 1 to input key information n, which are data to be acquired from the production environment database, are input, the information processing apparatus 100 determines in advance using the input key information as a key. An SQL (Structured Query Language) statement for acquiring data having input key information from the production environment database is generated by referring to the inter-table dependency relationship table and the inter-table column dependency relationship table (both described later).

そして、情報処理装置100は、生成したSQL文が重複していないかチェックした上でそのSQL文を実行し、本番環境データベースに記憶されている入力キー情報を有したテーブルのデータを取得し、取得したデータをテスト環境データベースや擬似環境データベース、あるいは検査環境データベース等の本番環境とは異なる環境にあるデータベースに挿入するためのSQL文を生成して実行する。このような流れの処理を行うことによって、入力キー情報に関係する必要なデータのみを取得することができるようになっている。なお、入力キー情報とは、取得対象となるデータが個人情報に関連するデータである場合には、例えば、氏名や住所、あるいは年齢、性別等、個人情報を構成する種々の情報である。   Then, the information processing apparatus 100 executes the SQL statement after checking whether or not the generated SQL statement is duplicated, and acquires the data of the table having the input key information stored in the production environment database, An SQL statement for inserting the acquired data into a database in an environment different from the production environment such as a test environment database, a pseudo environment database, or an inspection environment database is generated and executed. By performing such a process, only necessary data related to the input key information can be acquired. In addition, input key information is various information which comprises personal information, such as a name, an address, age, sex, etc., when the data used as acquisition object are data relevant to personal information, for example.

情報処理装置100は、例えば、サーバやPC(Personal Computer)である。図1Bは、情報処理装置100の機能的な構成の例を示す図である。図1Bに示すように、情報処理装置100は、機能的には、記憶部101と、データ取得部102と、関連データ取得部103と、データ挿入部104と、入力受付部105とを含んで構成されている。なお、情報処理装置100は、本番環境データベース、テスト環境データベースや擬似環境データベース、あるいは検査環境データベース等との間で、LAN(Local Area Network)やWAN(Wide Area Network)等のネットワークによって接続されているものとする。   The information processing apparatus 100 is, for example, a server or a PC (Personal Computer). FIG. 1B is a diagram illustrating an example of a functional configuration of the information processing apparatus 100. As illustrated in FIG. 1B, the information processing apparatus 100 functionally includes a storage unit 101, a data acquisition unit 102, a related data acquisition unit 103, a data insertion unit 104, and an input reception unit 105. It is configured. The information processing apparatus 100 is connected to a production environment database, a test environment database, a pseudo environment database, an inspection environment database, or the like through a network such as a LAN (Local Area Network) or a WAN (Wide Area Network). It shall be.

記憶部101は、例えば、HDD(Hard Disk Drive)等の記憶装置であり、テーブル間依存関係表およびテーブル列間依存関係表を記憶する。   The storage unit 101 is a storage device such as an HDD (Hard Disk Drive), for example, and stores an inter-table dependency relationship table and an inter-table dependency relationship table.

図2は、テーブル間依存関係表の具体的な例を示す図である。図2に示すように、テーブル間依存関係表は、入力キー情報を有したテーブル(元テーブル)と、その元テーブルに関連するテーブル(関連テーブル)とが対応付けて記憶されている。図2では、例えば、元テーブル「A」は、他のテーブルとは関連性がないため関連テーブルを有していないことを示している。また、元テーブル「B」は、他のテーブル「H」、「I」、「J」、「K」、「L」との間で関連性を有していることを示している。ここで、テーブルの関連性とは、例えば、あるテーブルが有している項目と同じ項目を他のテーブルが有している場合、その他のテーブルはあるテーブルとが関連性を有していることを意味するほか、あるテーブルが有している項目を用いて所定の算式によって導かれる値を他のテーブルの一つの項目として有している場合にも、これらのテーブルは関連性を有しているものとする。このようなテーブル間の関連性が、図2に示したテーブル間依存関係表にあらかじめ登録されている。   FIG. 2 is a diagram illustrating a specific example of the inter-table dependency relationship table. As shown in FIG. 2, the inter-table dependency relationship table stores a table (original table) having input key information and a table (related table) related to the original table in association with each other. In FIG. 2, for example, the original table “A” has no association table with other tables, indicating that it does not have an association table. Further, the original table “B” indicates that there is a relationship with the other tables “H”, “I”, “J”, “K”, and “L”. Here, the relationship between tables is that, for example, when another table has the same items as the items that a certain table has, the other tables are related to a certain table. In addition, if a table has a value derived from a given formula as an item in another table, these tables are also related. It shall be. Such relationships between the tables are registered in advance in the inter-table dependency relationship table shown in FIG.

後述するように、関連データ取得部103は、例えば、入力キー情報より取得したテーブルの中に、テーブル「A」とテーブル「B」が含まれていた場合、テーブル「A」、テーブル「B」に関連するテーブル情報を得るため、テーブルの関連する関連テーブル1の列を参照し、値が存在しないため、関連するテーブルが存在しないと判定する。次に、関連データ取得部103は、テーブル「B」の関連する関連テーブル1の列を参照し、テーブル「H」が登録されているため、関連するテーブルとしてテーブル名「H」を保持する。さらに、関連データ取得部103は、これと同様に、関連する関連テーブル2の列を参照し、テーブル「I」が登録されているため、テーブル名「I」を保持する。このように、関連データ取得部103は、テーブル間の依存関係表を参照し、テーブル名の情報を保持する。   As will be described later, for example, when the table acquired from the input key information includes the table “A” and the table “B”, the related data acquisition unit 103 sets the table “A” and the table “B”. In order to obtain the table information related to the table, the column of the related table 1 related to the table is referred to, and since there is no value, it is determined that there is no related table. Next, the related data acquisition unit 103 refers to the column of the related table 1 related to the table “B”, and since the table “H” is registered, the related data acquisition unit 103 holds the table name “H” as the related table. Further, similarly, the related data acquisition unit 103 refers to the column of the related table 2 and stores the table name “I” because the table “I” is registered. As described above, the related data acquisition unit 103 refers to the dependency table between tables and holds information on the table name.

図3は、テーブル列間依存関係表の具体的な例を示す図である。図3に示すように、テーブル列間依存関係表は、あるテーブル(現テーブル)と、現テーブルが有している項目(現テーブル項目)と、現テーブルが参照するテーブル(参照テーブル)と、参照テーブルが有している項目(参照テーブル項目)とが対応付けて記憶されている。図3では、例えば、現テーブル「H」が有している現テーブル項目のうち、1カラム目の項目(col1)は、参照テーブル「B」が有している2カラム目の項目(col2)を参照してその値が設定されていることを示している。また、元テーブル「A」が有している元テーブル項目のうち、1カラム目の項目(col1)は、あらかじめ設定された参照テーブルおよび参照テーブル項目がなく、入力受付部105が受け付けた入力キー情報1が参照テーブル項目として設定されることを示している。このように、テーブル列間の関連性が、図3に示したテーブル列間依存関係表にあらかじめ登録されている。続いて、図1Bに戻り、データ取得部102について説明する。   FIG. 3 is a diagram showing a specific example of the inter-table column dependency relationship table. As shown in FIG. 3, the inter-table column dependency relationship table includes a certain table (current table), items that the current table has (current table items), a table that is referenced by the current table (reference table), Items stored in the reference table (reference table items) are stored in association with each other. In FIG. 3, for example, among the current table items of the current table “H”, the first column item (col1) is the second column item (col2) of the reference table “B”. Indicates that the value is set. Also, among the original table items of the original table “A”, the first column item (col1) has no preset reference table and reference table item, and the input key received by the input receiving unit 105. Information 1 is set as a reference table item. In this way, the relationship between the table columns is registered in advance in the inter-table column dependency table shown in FIG. Next, returning to FIG. 1B, the data acquisition unit 102 will be described.

後述するように、データ取得部102は、例えば、テーブル「B」の2列目(col2)は、テーブル「H」の1列目(col1)を参照していることを示している。データ取得部102は、この情報を使用し、入力したキー情報から得られたデータにさらに関連するデータを抜き出すことが可能となる。なお、参照するテーブルが「Null」である場合、どのテーブルの列からも参照されないことを示している。図2に示したテーブル間依存関係表と図3に示したテーブル列間依存関連表を使用することで、入力キー情報に関連するデータを取得することが可能となる。   As will be described later, for example, the data acquisition unit 102 indicates that the second column (col2) of the table “B” refers to the first column (col1) of the table “H”. Using this information, the data acquisition unit 102 can extract data further related to the data obtained from the input key information. When the table to be referred to is “Null”, it indicates that the table is not referenced from any column of the table. By using the inter-table dependency relationship table shown in FIG. 2 and the inter-column dependency relationship table shown in FIG. 3, it is possible to acquire data related to the input key information.

データ取得部102は、後述する入力受付部105が受け付けた入力キー情報(例えば、入力キー情報1〜入力キー情報n)をもとに、本番環境データベースが有するテーブルからデータを取得するSQL文を作成して実行するものである。データ取得部102は、入力されたキー情報から直接アクセス可能なテーブルを参照し、入力キー情報により指定されたデータを抜き出している。このデータ取得部102が行う具体的な処理についてはフローチャートを用いて後述する。   The data acquisition unit 102 generates an SQL statement for acquiring data from a table of the production environment database based on input key information (for example, input key information 1 to input key information n) received by the input reception unit 105 described later. Create and execute. The data acquisition unit 102 refers to a table that can be directly accessed from the input key information, and extracts data specified by the input key information. Specific processing performed by the data acquisition unit 102 will be described later using a flowchart.

関連データ取得部103は、データ取得部102が抜き出したデータを有するテーブルとの間で関連性のあるテーブルから、関連性のあるデータを取得するものである。関連データ取得部103は、データ取得部102が作成したSQL文に、関連性のあるテーブルからデータを取得するためのSQL文を追加して、再度SQL文を実行している。この関連データ取得部103が行う具体的な処理についてはフローチャートを用いて後述する。   The related data acquisition unit 103 acquires related data from a table that is related to the table having the data extracted by the data acquisition unit 102. The related data acquisition unit 103 adds an SQL statement for acquiring data from a related table to the SQL statement created by the data acquisition unit 102, and executes the SQL statement again. Specific processing performed by the related data acquisition unit 103 will be described later with reference to a flowchart.

データ挿入部104は、データ取得部102および関連データ取得部103が作成したSQL文を用いて、テスト環境データベースや擬似環境データベース、あるいは検査環境データベース等にデータを挿入するものである。データ挿入部104は、データ取得部102および関連データ取得部103が作成したSQL文を用いて、挿入用のSQL文を生成して実行することにより、データ取得部102および関連データ取得部103が取得したデータをテスト環境データベースや擬似環境データベース、あるいは検査環境データベース等にデータを挿入する。このデータ挿入部104が行う具体的な処理についてはフローチャートを用いて後述する。   The data insertion unit 104 inserts data into a test environment database, a pseudo environment database, a test environment database, or the like using the SQL statement created by the data acquisition unit 102 and the related data acquisition unit 103. The data insertion unit 104 uses the SQL statements created by the data acquisition unit 102 and the related data acquisition unit 103 to generate and execute an SQL statement for insertion so that the data acquisition unit 102 and the related data acquisition unit 103 The acquired data is inserted into a test environment database, a pseudo environment database, or an inspection environment database. Specific processing performed by the data insertion unit 104 will be described later with reference to a flowchart.

入力受付部105は、例えば、キーボードやマウス等の入力装置であり、上述した入力キー情報の入力を受け付ける。   The input reception unit 105 is an input device such as a keyboard or a mouse, for example, and receives input of the above-described input key information.

なお、情報処理装置100が有する各部は、データ取得部102、関連データ取得部103、およびデータ挿入部104の各機能を実現するためのプログラムにより実行される。これらのプログラムは、例えば、上述した各部を含むモジュール構成となっており、実際のハードウェアとしては、CPU等の制御部がHDD等の記録装置からこれらのプログラムを読み出して実行することにより、上記各部が主記憶装置上にロードされ、データ取得部102、関連データ取得部103、およびデータ挿入部104の各部が主記憶装置上に生成されるようになっている。   Each unit included in the information processing apparatus 100 is executed by a program for realizing the functions of the data acquisition unit 102, the related data acquisition unit 103, and the data insertion unit 104. These programs have, for example, a module configuration including the above-described units. As actual hardware, a control unit such as a CPU reads out and executes these programs from a recording device such as an HDD, Each unit is loaded on the main storage device, and the data acquisition unit 102, the related data acquisition unit 103, and the data insertion unit 104 are generated on the main storage device.

また、上述したプログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disc)等のコンピュータで読み取り可能な記録媒体に記録されて提供することも可能である。さらに、これらのプログラムを、ネットワーク経由でダウンロードさせて提供または配布するように構成してもよい。続いて、情報処理装置100で行われる入力されたキー情報から関連するデータの取得と挿入するまでの処理(データ取得処理)について説明する。   The above-mentioned program is recorded in a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, and a DVD (Digital Versatile Disc) as a file in an installable or executable format. Can also be provided. Furthermore, these programs may be configured to be provided or distributed by being downloaded via a network. Next, a process (data acquisition process) from the input key information performed by the information processing apparatus 100 to the acquisition and insertion of related data will be described.

図4A〜Cは、情報処理装置100で行われるデータ取得処理の処理手順を示すフローチャートである。図4Aに示すように、情報処理装置100は、まず、入力受付部105が入力キー情報の入力を受け付けると(ステップS401)、データ取得部102は、図3に示したテーブル列間依存関係表の参照テーブルが「null」であるデータ、すなわちそのキー情報から直接アクセス可能なテーブルからデータを抜き出すための処理(ステップS402〜S411)を行う。   4A to 4C are flowcharts illustrating a processing procedure of data acquisition processing performed by the information processing apparatus 100. As illustrated in FIG. 4A, in the information processing apparatus 100, first, when the input reception unit 105 receives input of input key information (step S401), the data acquisition unit 102 displays the inter-table-column dependency relationship table illustrated in FIG. The processing for extracting data from the data whose reference table is “null”, that is, the table directly accessible from the key information (steps S402 to S411).

具体的には、データ取得部102は、図3に示したテーブル列間依存関係表の元テーブルをキーとしてグループ化し(ステップS402)、そのグループ化した現テーブルのレコードの総数を取得する(ステップS403)。図3に示した例では、データ取得部102は、現テーブルA〜Sまでの合計19個の元テーブルごとにグループ化する。   Specifically, the data acquisition unit 102 groups the original table of the inter-column dependency table shown in FIG. 3 as a key (step S402), and acquires the total number of records in the grouped current table (step S402). S403). In the example illustrated in FIG. 3, the data acquisition unit 102 groups the total 19 original tables from the current table A to S.

そして、データ取得部102は、グループ化した現テーブルの行数をカウントするための整数Mを「M=1」と定義し(ステップS404)、その整数Mの値がステップS403で取得したレコードの総数よりも大きいか否か、すなわちグループ化した全ての現テーブルについて、以降の処理が終了したか否かを判定する(ステップS405)。例えば、図3では、現テーブルA〜Sまでのテーブルの総数は19であるため、データ取得部102は、これらの全ての現テーブルについての処理が終了するまで、上述した整数Mをカウントアップさせ、ステップS406〜S411までの処理を繰り返し行う。   Then, the data acquisition unit 102 defines an integer M for counting the number of rows in the grouped current table as “M = 1” (step S404), and the value of the integer M is the value of the record acquired in step S403. It is determined whether or not it is greater than the total number, that is, whether or not the subsequent processing has been completed for all grouped current tables (step S405). For example, in FIG. 3, since the total number of tables from the current table A to S is 19, the data acquisition unit 102 increments the integer M described above until the processing for all these current tables is completed. The processes from step S406 to S411 are repeated.

データ取得部102は、整数Mの値がステップS403で取得したレコードの総数よりも大きくないと判定した場合(ステップS405;No)、グループ化したテーブルからM行目のテーブル名を取得する(ステップS406)。そして、データ取得部102は、図3に示したテーブル列間依存関係表を参照し、ステップS406で取得したM行目のテーブル名、かつそのテーブル名に対応する参照テーブルが「null」であるレコードを取得する(ステップS407)。   If the data acquisition unit 102 determines that the value of the integer M is not larger than the total number of records acquired in step S403 (step S405; No), the data acquisition unit 102 acquires the table name of the Mth row from the grouped table (step S405). S406). Then, the data acquisition unit 102 refers to the inter-column dependency relation table shown in FIG. 3, and the table name of the Mth row acquired in step S406 and the reference table corresponding to the table name is “null”. A record is acquired (step S407).

図3に示した例では、整数M=1である場合、現テーブルは「A」となり、現テーブル「A」に対応する参照テーブルは「null」であるため、データ取得部102は、そのレコードを取得する。また、整数M=8である場合、現テーブルは「H」となり、現テーブル「H」に対応する参照テーブルは「B」であるため、データ取得部102は、そのレコードは取得せずに次の処理に進むこととなる。このように、ステップS407において、データ取得部102は、現テーブルに対応する参照テーブルが「null」である場合、すなわちその現テーブルに関連性のある参照テーブルがなく、入力キー情報に直接関係する現テーブルが含まれるレコードを、図3に示したテーブル列間依存関係表の中から取得する。   In the example shown in FIG. 3, when the integer M = 1, the current table is “A”, and the reference table corresponding to the current table “A” is “null”. To get. When the integer M = 8, the current table is “H”, and the reference table corresponding to the current table “H” is “B”. Therefore, the data acquisition unit 102 does not acquire the record and The process will proceed. Thus, in step S407, the data acquisition unit 102 directly relates to the input key information when the reference table corresponding to the current table is “null”, that is, there is no reference table related to the current table. A record including the current table is obtained from the inter-column dependency table shown in FIG.

その後、データ取得部102は、ステップS407において取得したレコードがあるか否かを判定し(ステップS408)、ステップS407において取得したレコードがあると判定した場合(ステップS408;Yes)、そのレコードに含まれる入力キー情報をキーとして、元テーブルからデータを取得するためのSQL文を生成する(ステップS409)。   Thereafter, the data acquisition unit 102 determines whether or not there is a record acquired in step S407 (step S408). If it is determined that there is a record acquired in step S407 (step S408; Yes), the data acquisition unit 102 includes the record acquired in step S407. Using the input key information to be generated as a key, an SQL sentence for acquiring data from the original table is generated (step S409).

例えば、図3では、ステップS407において取得したレコードが元テーブル「A」を含むレコードである場合、データ取得部102は、入力キー情報1をキーとして元テーブル「A」からデータを取得するためのSQL文を生成する。なお、以下では入力キー情報1をキーとして元テーブル「A」が有する全てのデータを取得する前提で説明しているが、例えば、その元テーブル「A」に対応する現テーブル項目のデータ(例えば、col1)のみを取得するSQL文を生成することとしてもよい。   For example, in FIG. 3, when the record acquired in step S407 is a record including the original table “A”, the data acquisition unit 102 acquires data from the original table “A” using the input key information 1 as a key. Generate an SQL statement. In the following description, it is assumed that all data of the original table “A” is acquired using the input key information 1 as a key. For example, data of the current table item corresponding to the original table “A” (for example, , Col1) may be generated as an SQL statement.

そして、データ取得部102は、生成したSQL文をバッチファイルに書き込み(ステップS410)、整数Mの値に1を加算すると(ステップS411)、ステップS405に戻って、以降の処理(ステップS406〜S411)を繰り返し行う。なお、ステップS408において、データ取得部102は、ステップS407において取得したレコードがないと判定した場合(ステップS408;No)、何もせずにそのままステップS411に進む。   And the data acquisition part 102 writes the produced | generated SQL sentence in a batch file (step S410), adds 1 to the value of the integer M (step S411), returns to step S405, and performs subsequent processing (steps S406-S411). ) Repeatedly. In step S408, when the data acquisition unit 102 determines that there is no record acquired in step S407 (step S408; No), the data acquisition unit 102 proceeds to step S411 without doing anything.

データ取得部102は、ステップS405において、整数Mの値がステップS403で取得したレコードの総数よりも大きいと判定した場合、すなわちグループ化した全ての元テーブルについて、以降の処理が終了したと判定した場合(ステップS405;Yes)、整数Mの値を「1」にリセットする(ステップS412)。このステップS412の処理が終了すると、入力キー情報から直接アクセス可能なテーブルからデータを抜き出すための処理が終了する。   If the data acquisition unit 102 determines in step S405 that the value of the integer M is greater than the total number of records acquired in step S403, that is, determines that the subsequent processing has been completed for all grouped original tables. In the case (step S405; Yes), the value of the integer M is reset to “1” (step S412). When the process in step S412 is completed, the process for extracting data from the directly accessible table from the input key information is completed.

続いて、関連データ取得部103は、ステップS406の場合と同様に、グループ化したテーブルからM行目のテーブル名を取得する(ステップS413)。このステップS413〜S426までの処理は、元テーブルに関連性のあるテーブルからデータを取得するための処理である。例えば、ステップS412において整数M=1にリセットされた直後の場合、関連データ取得部103は、テーブル名「A」を取得する。   Subsequently, as in the case of step S406, the related data acquisition unit 103 acquires the table name of the Mth row from the grouped table (step S413). The processing from step S413 to S426 is processing for acquiring data from a table related to the original table. For example, immediately after being reset to integer M = 1 in step S <b> 412, the related data acquisition unit 103 acquires the table name “A”.

関連データ取得部103は、図2に示したテーブル間依存関係表を参照してステップS413で取得したテーブル名があるか否かを判定し(ステップS414)、ステップS413で取得したテーブル名があると判定した場合(ステップS414;Yes)、図2に示したテーブル間依存関係表の列数をカウントするための整数NをN=2(すなわち関連テーブル1の列)と定義する(ステップS415)。   The related data acquisition unit 103 determines whether there is a table name acquired in step S413 with reference to the inter-table dependency relationship table shown in FIG. 2 (step S414), and there is the table name acquired in step S413. (Step S414; Yes), the integer N for counting the number of columns in the inter-table dependency relationship table shown in FIG. 2 is defined as N = 2 (that is, the column of the related table 1) (step S415). .

そして、関連データ取得部103は、図2に示したテーブル間依存関係表にアクセスしてステップS413で取得した元テーブルのテーブル名を含む行を参照し、そのN列目のテーブル名を取得する(ステップS416)。図2では、例えば、ステップS413で取得したテーブル名が「B」(すなわち、整数M=2)である場合、関連データ取得部103は、元テーブルのテーブル名「B」を含む行を参照し、2列目である関連テーブル1の列のテーブル名「H」を取得する。   Then, the related data acquisition unit 103 accesses the inter-table dependency relationship table shown in FIG. 2, refers to the row including the table name of the original table acquired in step S413, and acquires the table name of the Nth column. (Step S416). In FIG. 2, for example, when the table name acquired in step S413 is “B” (that is, integer M = 2), the related data acquisition unit 103 refers to the row including the table name “B” of the original table. The table name “H” of the column of the related table 1 which is the second column is acquired.

関連データ取得部103は、ステップS416で取得したテーブル名があるか否かを判定し(ステップS417)、ステップS416で取得したテーブル名がないと判定した場合(ステップS417;No)、整数Mの値に1を加算して(ステップS418)、ステップS413に戻り、以降の処理を繰り返し行う。図2に示した例では、関連データ取得部103は、元テーブルのテーブル名「A」を含む行を参照した場合、2列目である関連テーブル1の列のテーブル名を取得しようとするが、元テーブル「A」に関連するテーブルが登録されていないため、整数M=1の値に1を加算してM=2としてステップS413に戻って以降の処理を繰り返し行う。   The related data acquisition unit 103 determines whether there is a table name acquired in step S416 (step S417), and determines that there is no table name acquired in step S416 (step S417; No), the integer M 1 is added to the value (step S418), the process returns to step S413, and the subsequent processing is repeated. In the example illustrated in FIG. 2, when the related data acquisition unit 103 refers to the row including the table name “A” of the original table, the related data acquisition unit 103 attempts to acquire the table name of the column of the related table 1 that is the second column. Since the table related to the original table “A” is not registered, 1 is added to the value of the integer M = 1 to set M = 2, the process returns to step S413, and the subsequent processing is repeated.

一方、関連データ取得部103は、ステップS416で取得したテーブル名があると判定した場合(ステップS417;Yes)、ステップS410で書き込んだバッチファイルを参照し、FROM句がステップS413で取得したテーブル名(例えば、テーブル名「B」)であるSQL文を取得し(ステップS419)、取得したSQL文を実行する(ステップS420)。   On the other hand, if the related data acquisition unit 103 determines that there is a table name acquired in step S416 (step S417; Yes), the batch phrase written in step S410 is referred to, and the FROM phrase is the table name acquired in step S413. The SQL statement (for example, table name “B”) is acquired (step S419), and the acquired SQL statement is executed (step S420).

そして、関連データ取得部103は、図3に示したテーブル列間依存関係表にアクセスし、参照テーブルがステップS413で取得したテーブル名であり、かつ現テーブルがステップS416で取得したテーブル名であるレコードを取得する(ステップS421)。例えば、図3では、ステップS413で取得したテーブル名が「B」であり、かつステップS416で取得したテーブル名が「H」である場合には、図3に示したテーブル列間依存関係表の中の12行目に相当するレコードを取得する。   Then, the related data acquisition unit 103 accesses the inter-column dependency relation table shown in FIG. 3, the reference table is the table name acquired in step S413, and the current table is the table name acquired in step S416. A record is acquired (step S421). For example, in FIG. 3, if the table name acquired in step S413 is “B” and the table name acquired in step S416 is “H”, the table column dependency table shown in FIG. A record corresponding to the 12th line is acquired.

関連データ取得部103は、ステップS421で取得したレコードの中から参照テーブル項目に記載されている列情報を取得する(ステップS422)。図3に示した例では、関連データ取得部103は、テーブル列間依存関係表の中の12行目のレコードの中に含まれる参照テーブル項目の列情報「col2」を取得する。   The related data acquisition unit 103 acquires column information described in the reference table item from the records acquired in step S421 (step S422). In the example illustrated in FIG. 3, the related data acquisition unit 103 acquires the column information “col2” of the reference table item included in the record of the 12th row in the inter-column dependency relationship table.

そして、関連データ取得部103は、ステップS420で実行したSQL文の結果、取得したテーブルのうち、ステップS422で取得した列のデータのみを取得する(ステップS423)。例えば、関連データ取得部103は、ステップS420において取得したテーブルが「B」である場合、参照テーブル項目「col2」の列のデータを取得する。   And the related data acquisition part 103 acquires only the data of the column acquired by step S422 among the acquired tables as a result of the SQL sentence performed by step S420 (step S423). For example, when the table acquired in step S420 is “B”, the related data acquisition unit 103 acquires data in the column of the reference table item “col2”.

関連データ取得部103は、ステップS423で取得したデータを取得するためのSQL文を生成し(ステップS424)、ステップS410においてデータ取得部102が作成したバッチファイルに、生成したSQL文を書き込む(ステップS425)。例えば、関連データ取得部103は、ステップS420において取得したテーブルが「B」である場合、参照テーブル項目「col2」の列のデータを取得するためのSQL文を生成し、上述したバッチファイルに、そのSQL文を書き込む。   The related data acquisition unit 103 generates an SQL statement for acquiring the data acquired in step S423 (step S424), and writes the generated SQL statement in the batch file created by the data acquisition unit 102 in step S410 (step S424). S425). For example, when the table acquired in step S420 is “B”, the related data acquisition unit 103 generates an SQL statement for acquiring the data of the column of the reference table item “col2”, and stores it in the batch file described above. Write the SQL statement.

その後、関連データ取得部103は、整数Mに1を加算し(ステップS426)、ステップS416に戻って以降の処理を繰り返し、ステップS414において、ステップS413で取得したテーブル名がない、すなわち全てのテーブル名について処理が終了したと判定した場合(ステップS414;No)、データ挿入部104は、それまでに生成されたバッチファイルに書き込まれたSQL文が重複して記載されていないかチェックする(ステップS427)。   Thereafter, the related data acquisition unit 103 adds 1 to the integer M (step S426), returns to step S416, and repeats the subsequent processing. In step S414, there is no table name acquired in step S413, that is, all tables. When it is determined that the processing has been completed for the name (step S414; No), the data insertion unit 104 checks whether the SQL sentence written in the batch file generated so far is described in duplicate (step S41). S427).

データ挿入部104は、重複するSQL文があると判定した場合(ステップS427;Yes)、そのSQL文のうちの重複したSQL文を削除する(ステップS428)。一方、データ挿入部104は、重複するSQL文がないと判定した場合(ステップS427;No)、何もせずにそのまま次の処理に移る。   If it is determined that there is a duplicate SQL sentence (step S427; Yes), the data insertion unit 104 deletes the duplicate SQL sentence from the SQL sentence (step S428). On the other hand, if the data insertion unit 104 determines that there is no duplicate SQL sentence (step S427; No), the data insertion unit 104 proceeds to the next processing without doing anything.

そして、データ挿入部104は、重複したSQL文の有無をチェックした後のそれぞれのSQL文を実行させるためのSQL文を生成し(ステップS429)、テスト環境データベースや擬似環境データベース、あるいは検査環境データベース等にデータを挿入する(ステップS430)。このステップS430の処理が終了すると、図4A〜Cに示したデータ取得処理の全ての処理が終了する。   Then, the data insertion unit 104 generates an SQL statement for executing each SQL statement after checking for the presence or absence of the duplicate SQL statement (step S429), and generates a test environment database, a pseudo environment database, or an inspection environment database. The data is inserted into the data etc. (step S430). When the process of step S430 ends, all the data acquisition processes shown in FIGS.

そして、上述した各処理が実行されることにより、入力キー情報に関連するデータだけでなく、その入力キー情報に関連するデータを取得することができる。図5は、キー情報が入力されてから関連するテーブルのデータを取得するまでの概念図である。図5に示すように、例えば、図4に示したステップS401〜S430までの処理において、入力キー情報1〜入力キー情報6をキーとして入力キー情報1〜入力キー情報6を含む元テーブルのデータを取得するためのSQL文を作成し、テーブル「A」〜「G」の中からこれらの入力キー情報に関連するデータを取得するためのSQL文を生成する。その後、さらにテーブル「B」に関連するテーブル「H」からテーブル「L」までのデータを取得するためのSQL文を生成する。次に、これと同様に、テーブル「C」に関連するテーブル「M」からテーブル「P」のデータを取得するためのSQL文を生成し、さらに、テーブル「K」に関連するテーブル「Q」からテーブル「S」のデータを取得するためのSQL文を生成する。このようにして、入力されたキー情報に関連するデータを取得することができる。   And by performing each process mentioned above, not only the data relevant to input key information but the data relevant to the input key information can be acquired. FIG. 5 is a conceptual diagram from the input of key information to the acquisition of related table data. As shown in FIG. 5, for example, in the processing from step S <b> 401 to S <b> 430 shown in FIG. 4, the original table data including the input key information 1 to the input key information 6 using the input key information 1 to the input key information 6 as keys. Is generated, and an SQL statement for acquiring data related to the input key information is generated from the tables “A” to “G”. Thereafter, an SQL statement for acquiring data from the table “H” to the table “L” related to the table “B” is generated. Next, similarly, an SQL statement for acquiring the data of the table “P” from the table “M” related to the table “C” is generated, and further, the table “Q” related to the table “K” is generated. SQL statements for acquiring the data of the table “S” are generated. In this way, data related to the input key information can be acquired.

このように、本番環境データベースに記憶されているデータを、本番環境データベースとは異なるテスト環境データベースや擬似環境データベース、あるいは検査環境データベース等に移動させる処理を行う情報処理装置100において、記憶部101が、移動対象となる元データを含む元テーブルと、元テーブルに関連する関連テーブルとを対応付けたテーブル間依存関連表と、元テーブル(現テーブル)と関連テーブルに含まれる関連データまたは本番環境データベースに記憶されているデータを移動させるためのキー情報とを対応付けたテーブル列間依存関連表とを記憶し、入力受付部105が、キー情報の入力を受け付け、データ取得部102が、入力受付部105が受け付けたキー情報と、テーブル列間依存関係表に含まれるキー情報とに基づいて、入力受付部105が受け付けたキー情報に直接関係する元テーブルのデータを本番環境データベースから取得し、関連データ取得部103が、データ取得部102が取得した元テーブルと、テーブル間依存関係表に記憶された元テーブルとに基づいて、元テーブルに対応する関連テーブルを特定し、特定した関連テーブルと、データ取得部102が取得したデータを有した元テーブルとに基づいて、テーブル列間依存関係表に含まれる関連データを取得し、データ挿入部104が、データ取得部102が取得した元テーブルのデータと、関連データ取得部103が取得した関連データとを本番環境データベースとは異なるテスト環境データベースや擬似環境データベース、あるいは検査環境データベース等に挿入するので、本番環境のデータベースにかかる負荷を増大させることなく、容易に必要なデータを取得することが可能となる。具体的には、本番環境にかかる負荷を最小限に抑え、本番環境と異なるデータベースに一括移動することが可能となる。   As described above, in the information processing apparatus 100 that performs processing for moving the data stored in the production environment database to a test environment database, a pseudo environment database, or an inspection environment database different from the production environment database, the storage unit 101 includes: , An inter-table dependency related table in which an original table including original data to be moved and a related table related to the original table are associated, and related data or production environment database included in the original table (current table) and the related table And the inter-table dependency relation table associated with the key information for moving the data stored in the table, the input reception unit 105 receives the input of the key information, and the data acquisition unit 102 receives the input Key information received by the unit 105 and keys included in the inter-table column dependency relationship table Based on the information, the data of the original table directly related to the key information received by the input receiving unit 105 is acquired from the production environment database, and the related data acquiring unit 103 acquires the original table and the table acquired by the data acquiring unit 102 Based on the original table stored in the inter-dependency relationship table, the related table corresponding to the original table is identified, and based on the identified related table and the original table having the data acquired by the data acquisition unit 102, The related data included in the inter-column dependency table is acquired, and the data insertion unit 104 determines the original environment data acquired by the data acquisition unit 102 and the related data acquired by the related data acquisition unit 103 as the production environment database. Is inserted into a different test environment database, simulated environment database, inspection environment database, etc. Without increasing the load on the database of the production, it is possible to obtain easily the necessary data. Specifically, it is possible to minimize the load on the production environment and move to a database different from the production environment.

また、あらかじめどのテーブルがどのテーブルを参照しているかを定義しているテーブル間依存関係表と、どのテーブルの列がどのテーブルの列を参照しているかを定義しているテーブル列間依存関連表を作成し、これらの表の情報と与えられたキー情報から、テーブルごとに関連するデータを取得するSQL文を生成し、実行することで関連するデータを一括取得し、テーブルごとにデータを取得するSQL文を使用するため、複雑なテーブルの結合処理を行わず、データベースへの負荷を最小限に抑えることができ、データベースにかかる負荷を増大させることなく、必要なデータを一括で移動することが可能となる。   Further, in advance what the table dependency relationship table between table that defines whether the reference to which table, depending association table between table columns that define whether the reference to the columns of which table columns in which tables Create a SQL statement that acquires the relevant data for each table from the information of these tables and the given key information, and execute to collect the relevant data at once, and acquire the data for each table Since the SQL statement is used, it is possible to minimize the load on the database without performing complicated table join processing, and to move necessary data at once without increasing the load on the database. Is possible.

なお、本発明は、上記実施の形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化することができる。例えば、入力キー情報や関連するテーブルの数が多く処理負荷が大きい場合には、情報処理装置が有する複数の機能を物理的に2以上のサーバに分ける等、実施の形態に示される全構成要素からいくつかの構成要素を変更したり、構成要素を適宜組み合わせても良い。   It should be noted that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. For example, when the number of input key information and related tables is large and the processing load is large, all the components shown in the embodiment, such as physically dividing a plurality of functions of the information processing apparatus into two or more servers Some of the constituent elements may be changed or the constituent elements may be appropriately combined.

100 情報処理装置
101 記憶部
102 データ取得部
103 関連データ取得部
104 データ挿入部
105 入力受付部。
100 Information processing apparatus 101 Storage unit 102 Data acquisition unit 103 Related data acquisition unit 104 Data insertion unit 105 Input reception unit

Claims (9)

第1のデータベースに記憶されているデータを、前記第1のデータベースとは異なる第2のデータベースに移動させる処理を行う情報処理装置であって、
移動対象となる元データを含む元テーブルと、前記元テーブルに関連する関連テーブルとを対応付けたテーブル間依存関連表と、前記元テーブルと前記関連テーブルに含まれる関連データまたは前記第1のデータベースに記憶されているデータを移動させるためのキー情報とを対応付けたテーブル列間依存関連表とを記憶する記憶部と、
前記キー情報の入力を受け付ける入力受付部と、
前記入力受付部が受け付けたキー情報と、前記テーブル列間依存関係表に含まれるキー情報とに基づいて、前記入力受付部が受け付けたキー情報に直接関係する前記元テーブルのデータを前記第1のデータベースから取得するデータ取得部と、
前記データ取得部が取得した前記元テーブルと、前記テーブル間依存関係表に記憶された元テーブルとに基づいて、前記元テーブルに対応する前記関連テーブルを特定し、特定した前記関連テーブルと、前記データ取得部が取得したデータを有した前記元テーブルとに基づいて、前記テーブル列間依存関係表に含まれる前記関連データを取得する関連データ取得部と、
前記データ取得部が取得した前記元テーブルのデータと、前記関連データ取得部が取得した前記関連データとを前記第2のデータベースに挿入するデータ挿入部と、
を備えることを特徴とする情報処理装置。
An information processing apparatus for performing processing for moving data stored in a first database to a second database different from the first database,
An inter-table dependency relation table in which an original table including original data to be moved is associated with a related table related to the original table, related data included in the original table and the related table, or the first database. A storage unit that stores a table-column dependency relation table that associates key information for moving data stored in the table, and
An input receiving unit for receiving input of the key information;
Based on the key information received by the input receiving unit and the key information included in the inter-table-column dependency relationship table, the data of the original table directly related to the key information received by the input receiving unit is stored in the first table. A data acquisition unit to acquire from the database of
Based on the original table acquired by the data acquisition unit and the original table stored in the inter-table dependency relationship table, the related table corresponding to the original table is specified, the specified related table, Based on the original table having the data acquired by the data acquisition unit, a related data acquisition unit that acquires the related data included in the inter-table column dependency relationship table;
A data insertion unit for inserting the data of the original table acquired by the data acquisition unit and the related data acquired by the related data acquisition unit into the second database;
An information processing apparatus comprising:
前記テーブル列間依存関係表は、さらに前記元テーブルに含まれる元データを対応付けて記憶し、
前記データ取得部は、前記入力受付部が受け付けたキー情報と、前記テーブル列間依存関係表に含まれるキー情報とに基づいて、前記入力受付部が受け付けたキー情報に直接関係する前記元テーブルが有する元データを前記第1のデータベースから取得する、
ことを特徴とする請求項1に記載の情報処理装置。
The inter-table column dependency relationship table further stores the original data included in the original table in association with each other,
The data acquisition unit includes the original table directly related to the key information received by the input receiving unit based on the key information received by the input receiving unit and the key information included in the inter-table column dependency relationship table. Obtaining the original data of the first database;
The information processing apparatus according to claim 1.
前記データ取得部は、前記入力受付部が受け付けたキー情報に直接関係する前記元テーブルのデータを前記第1のデータベースから取得して前記第2のデータベースに挿入するためのSQL(Structured Query Language)を生成し、
前記関連データ取得部は、特定した前記関連テーブルと、前記データ取得部が取得したデータを有した前記元テーブルとに基づいて、前記テーブル列間依存関係表に含まれる前記関連データを取得して前記第2のデータベースに挿入するためのSQLを生成する、
ことを特徴とする請求項1または2に記載の情報処理装置。
The data acquisition unit acquires SQL (Structured Query Language) for acquiring the original table data directly related to the key information received by the input reception unit from the first database and inserting it into the second database. Produces
The related data acquisition unit acquires the related data included in the inter-table column dependency relationship table based on the specified related table and the original table having the data acquired by the data acquisition unit. Generating SQL for insertion into the second database;
The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus.
前記データ取得部および前記関連データ取得部は、作成した前記SQLを所定のバッチファイルに書き込んで実行する、
ことを特徴とする請求項3に記載の情報処理装置。
The data acquisition unit and the related data acquisition unit write and execute the created SQL in a predetermined batch file,
The information processing apparatus according to claim 3.
前記データ取得部及び前記関連データ取得部は、同一のバッチファイル前記SQLを書き込む、
ことを特徴とする請求項4に記載の情報処理装置。
The data acquisition unit and the related data acquisition unit write the same batch file SQL.
The information processing apparatus according to claim 4.
前記データ挿入部は、前記バッチファイルに書き込まれたSQLが重複しているか否かをチェックした上で、前記データ取得部が取得した前記元テーブルのデータと、前記関連データ取得部が取得した前記関連データとを前記第2のデータベースに挿入する、
ことを特徴とする請求項5に記載の情報処理装置。
The data insertion unit checks whether or not the SQL written in the batch file is duplicated, and then the data of the original table acquired by the data acquisition unit and the data acquired by the related data acquisition unit Inserting relevant data into the second database;
The information processing apparatus according to claim 5.
第1のデータベースに記憶されているデータを、前記第1のデータベースとは異なる第2のデータベースに移動させる処理を行う情報処理装置で行われるデータ取得方法であって、
前記第1のデータベースに記憶されているデータを移動させるためのキー情報の入力を受け付ける入力受付ステップと、
前記入力受付ステップにおいて受け付けたキー情報と、移動対象となる元データを含む元テーブルと、前記元テーブルに関連する関連テーブルに含まれる関連データまたは前記第1のデータベースに記憶されているデータを移動させるためのキー情報とを対応付けたテーブル列間依存関係表に含まれるキー情報とに基づいて、前記入力受付部が受け付けたキー情報に直接関係する前記元テーブルのデータを前記第1のデータベースから取得するデータ取得ステップと、
前記データ取得ステップにおいて取得した前記元テーブルと、前記元テーブルと前記関連テーブルとを対応付けたテーブル間依存関連表に記憶された元テーブルとに基づいて、前記元テーブルに対応する前記関連テーブルを特定し、特定した前記関連テーブルと、前記データ取得部が取得したデータを有した前記元テーブルとに基づいて、前記テーブル列間依存関係表に含まれる前記関連データを取得する関連データ取得ステップと、
前記データ取得ステップにおいて取得した前記元テーブルのデータと、前記関連データ取得ステップにおいて取得した前記関連データとを前記第2のデータベースに挿入するデータ挿入ステップと、
を含むことを特徴とするデータ取得方法。
A data acquisition method performed by an information processing apparatus that performs processing for moving data stored in a first database to a second database different from the first database,
An input receiving step for receiving input of key information for moving data stored in the first database;
Move the key information received in the input receiving step, the original table including the original data to be moved, the related data included in the related table related to the original table, or the data stored in the first database Data of the original table directly related to the key information received by the input receiving unit based on the key information included in the inter-table column dependency relationship table in which the key information is associated with the first database. A data acquisition step to acquire from
Based on the original table acquired in the data acquisition step and the original table stored in the inter-table dependency relation table in which the original table and the related table are associated with each other, the related table corresponding to the original table is A related data acquisition step of acquiring the related data included in the inter-table column dependency relationship table based on the specified related table specified and the original table having the data acquired by the data acquisition unit; ,
A data insertion step of inserting the data of the original table acquired in the data acquisition step and the related data acquired in the related data acquisition step into the second database;
The data acquisition method characterized by including.
コンピュータに、
第1のデータベースに記憶されているデータを、前記第1のデータベースとは異なる第2のデータベースに移動させるためのキー情報の入力を受け付ける入力受付ステップと、
前記入力受付ステップにおいて受け付けたキー情報と、移動対象となる元データを含む元テーブルと、前記元テーブルに関連する関連テーブルに含まれる関連データまたは前記第1のデータベースに記憶されているデータを移動させるためのキー情報とを対応付けたテーブル列間依存関係表に含まれるキー情報とに基づいて、前記入力受付部が受け付けたキー情報に直接関係する前記元テーブルのデータを前記第1のデータベースから取得するデータ取得ステップと、
前記データ取得ステップにおいて取得した前記元テーブルと、前記元テーブルと前記関連テーブルとを対応付けたテーブル間依存関連表に記憶された元テーブルとに基づいて、前記元テーブルに対応する前記関連テーブルを特定し、特定した前記関連テーブルと、前記データ取得部が取得したデータを有した前記元テーブルとに基づいて、前記テーブル列間依存関係表に含まれる前記関連データを取得する関連データ取得ステップと、
前記データ取得ステップにおいて取得した前記元テーブルのデータと、前記関連データ取得ステップにおいて取得した前記関連データとを前記第2のデータベースに挿入するデータ挿入ステップと、
を実行させることを特徴とするデータ取得プログラム。
On the computer,
An input receiving step for receiving input of key information for moving data stored in the first database to a second database different from the first database;
Move the key information received in the input receiving step, the original table including the original data to be moved, the related data included in the related table related to the original table, or the data stored in the first database Data of the original table directly related to the key information received by the input receiving unit based on the key information included in the inter-table column dependency relationship table in which the key information is associated with the first database. A data acquisition step to acquire from
Based on the original table acquired in the data acquisition step and the original table stored in the inter-table dependency relation table in which the original table and the related table are associated with each other, the related table corresponding to the original table is A related data acquisition step of acquiring the related data included in the inter-table column dependency relationship table based on the specified related table specified and the original table having the data acquired by the data acquisition unit; ,
A data insertion step of inserting the data of the original table acquired in the data acquisition step and the related data acquired in the related data acquisition step into the second database;
A data acquisition program for executing
請求項8に記載されたデータ取得プログラムを格納したコンピュータの読み取り可能な記録媒体。   A computer-readable recording medium storing the data acquisition program according to claim 8.
JP2011172189A 2011-08-05 2011-08-05 Information processing apparatus, data acquisition method, data acquisition program, and recording medium Expired - Fee Related JP5814039B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011172189A JP5814039B2 (en) 2011-08-05 2011-08-05 Information processing apparatus, data acquisition method, data acquisition program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011172189A JP5814039B2 (en) 2011-08-05 2011-08-05 Information processing apparatus, data acquisition method, data acquisition program, and recording medium

Publications (2)

Publication Number Publication Date
JP2013037490A true JP2013037490A (en) 2013-02-21
JP5814039B2 JP5814039B2 (en) 2015-11-17

Family

ID=47887061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011172189A Expired - Fee Related JP5814039B2 (en) 2011-08-05 2011-08-05 Information processing apparatus, data acquisition method, data acquisition program, and recording medium

Country Status (1)

Country Link
JP (1) JP5814039B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342658A (en) * 2021-06-11 2021-09-03 上海中通吉网络技术有限公司 Test data batch generation method
JP7387116B2 (en) 2020-01-06 2023-11-28 アーミク カンパニー,リミテッド Data archiving methods and systems to minimize costs when transmitting and querying data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023618A1 (en) * 2001-07-26 2003-01-30 Orbits David A. System and method for reliably replicating data
US20050076070A1 (en) * 2003-10-02 2005-04-07 Shougo Mikami Method, apparatus, and computer readable medium for managing replication of back-up object
JP2006215868A (en) * 2005-02-04 2006-08-17 Internatl Business Mach Corp <Ibm> Backup generation device, recovery processor, backup generation method, recovery processing method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023618A1 (en) * 2001-07-26 2003-01-30 Orbits David A. System and method for reliably replicating data
US20050076070A1 (en) * 2003-10-02 2005-04-07 Shougo Mikami Method, apparatus, and computer readable medium for managing replication of back-up object
JP2006215868A (en) * 2005-02-04 2006-08-17 Internatl Business Mach Corp <Ibm> Backup generation device, recovery processor, backup generation method, recovery processing method and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7387116B2 (en) 2020-01-06 2023-11-28 アーミク カンパニー,リミテッド Data archiving methods and systems to minimize costs when transmitting and querying data
CN113342658A (en) * 2021-06-11 2021-09-03 上海中通吉网络技术有限公司 Test data batch generation method

Also Published As

Publication number Publication date
JP5814039B2 (en) 2015-11-17

Similar Documents

Publication Publication Date Title
Li Transforming relational database into HBase: A case study
US9075839B2 (en) Method, apparatus and database system for restoring tenant data in a multi-tenant environment
US10437853B2 (en) Tracking data replication and discrepancies in incremental data audits
US9639542B2 (en) Dynamic mapping of extensible datasets to relational database schemas
US8495080B2 (en) Initializing a multi-tenant database
CN104899295B (en) A kind of heterogeneous data source data relation analysis method
US20120215815A1 (en) Test data generation and scale up for database testing using unique common factor sequencing
US20170270153A1 (en) Real-time incremental data audits
CN111046036A (en) Data synchronization method, device, system and storage medium
JP2022133401A (en) Relevance score calculation system, method, and program
US20160041859A1 (en) Synchronization testing of active clustered servers
JP2016157290A (en) Document search apparatus, document search method, and document search program
JP5814039B2 (en) Information processing apparatus, data acquisition method, data acquisition program, and recording medium
EP2904520B1 (en) Reference data segmentation from single to multiple tables
JP2009169689A (en) Data classification method and data processing apparatus
CN111176887A (en) MySQL misoperation rollback method, equipment and system
Döhmen et al. Gitschemas: A dataset for automating relational data preparation tasks
JP6245571B2 (en) Data structure, data generation apparatus, method and program thereof
Makanju et al. Storage and retrieval of system log events using a structured schema based on message type transformation
JP2010170438A (en) Document management system
JP2018081403A (en) Incident management system, incident management method and computer program
CN112507200A (en) Method and apparatus for synchronizing data into search engine
JP2007004447A (en) Database system test program
JP2000132435A (en) Data consistency processor between different kind of data base management systems
Giatsoglou et al. Dynamic code generation for cultural content management

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20130701

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140801

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150312

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150324

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150422

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150623

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150710

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150917

R150 Certificate of patent or registration of utility model

Ref document number: 5814039

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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