JP6280006B2 - Database system, database system operating method, and computer program - Google Patents

Database system, database system operating method, and computer program Download PDF

Info

Publication number
JP6280006B2
JP6280006B2 JP2014175242A JP2014175242A JP6280006B2 JP 6280006 B2 JP6280006 B2 JP 6280006B2 JP 2014175242 A JP2014175242 A JP 2014175242A JP 2014175242 A JP2014175242 A JP 2014175242A JP 6280006 B2 JP6280006 B2 JP 6280006B2
Authority
JP
Japan
Prior art keywords
record
database
area
databases
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014175242A
Other languages
Japanese (ja)
Other versions
JP2016051262A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014175242A priority Critical patent/JP6280006B2/en
Publication of JP2016051262A publication Critical patent/JP2016051262A/en
Application granted granted Critical
Publication of JP6280006B2 publication Critical patent/JP6280006B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、階層構造を有する複数のデータベースを備えるデータベースシステムにおいてデータベース間の不整合を検出する技術に関するものである。   The present invention relates to a technique for detecting inconsistencies between databases in a database system including a plurality of databases having a hierarchical structure.

従来のデータベースシステムについて、例えば、特許文献1では、親のデータベースと子のデータベースの間にデータの不整合が存在する場合、その不整合を自動的に検出し、適切に修復する技術を開示している。   Regarding a conventional database system, for example, Patent Document 1 discloses a technique for automatically detecting an inconsistency when a data inconsistency exists between a parent database and a child database and appropriately repairing the inconsistency. ing.

不整合を検出方法は、データベース同士を比較して、レコードの過不足を判断するというものである。   The method for detecting inconsistencies is to compare databases and determine the excess or deficiency of records.

例えば、図7において、「顧客番号」という共通のフィールドを持つため、不整合(左のテーブルでは、顧客番号4、右のテーブルでは、顧客番号5)を検出できる。   For example, in FIG. 7, since there is a common field of “customer number”, inconsistency (customer number 4 in the left table, customer number 5 in the right table) can be detected.

特開2008−234035号公報JP 2008-234035 A

しかし、データベースシステムとしては、階層構造のデータベースを有し、データベース間でレコードどうしをリンク情報で関連づけるものがある。このようなデータベースシステムにおいては、図7の顧客番号のような共通なデータがないので、上記方法では不整合を検出できない。   However, as a database system, there is a database having a hierarchical structure and records are associated with each other by link information between the databases. In such a database system, since there is no common data such as the customer number in FIG. 7, inconsistency cannot be detected by the above method.

本発明は、上記の課題に鑑みてなされたものであり、その目的とするところは、階層構造を有する複数のデータベースを備えるデータベースシステムにおいてデータベース間の不整合を検出する技術を提供することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique for detecting inconsistencies between databases in a database system including a plurality of databases having a hierarchical structure. .

上記の課題を解決するために、第1の本発明は、データベースシステムであって、最上位層に含まれる1つのデータベースを含み且つ階層構造を有する複数のデータベースを備え、前記各データベースは、データを含む1以上のレコードを有し、当該各レコードは下位層のデータベースまたは最上位層のデータベースの1レコードを示すリンク情報を含み、いずれかのデータベースを開始データベースとして当該開始データベースのいずれかのレコードを開始レコードとして、当該データベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索し、該当のレコードがある場合は、該レコードを含むデータベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索するようにしていき、いずれかの検索で該当のレコードがなかった場合、または、前記開始データベースの前記開始レコード以外のレコードが検索で該当した場合は、前記データベース間に不整合があると判定することを特徴とする。 In order to solve the above-described problem, a first aspect of the present invention is a database system, comprising a plurality of databases including one database included in the highest layer and having a hierarchical structure, wherein each database includes data It has one or more records including, the each record looking contains link information indicating a record of the database of the database or the uppermost layer of the lower layer, one of the starting database one database as a starting database When a record is a start record, a record including data is indicated by link information in the record in the lower layer or the highest layer database of the database, and if there is a corresponding record, the database including the record is searched. In the lower-tier or top-tier database, The record indicated by the link information in the database is searched and the record including the data is searched. If there is no corresponding record in any search, or a record other than the start record in the start database is searched. When it corresponds, it is determined that there is an inconsistency between the databases .

例えば、前記開始データベースの前記開始レコードが検索で該当した場合は、前記データベース間に不整合がないと判定する。   For example, when the start record of the start database corresponds to the search, it is determined that there is no inconsistency between the databases.

第2の本発明は、データベースシステムの動作方法であって、前記データベースシステムは、最上位層に含まれる1つのデータベースを含み且つ階層構造を有する複数のデータベースを備え、前記各データベースは、データを含む1以上のレコードを有し、当該各レコードは下位層のデータベースまたは最上位層のデータベースの1レコードを示すリンク情報を含み、前記動作方法は、前記データベースシステムが、いずれかのデータベースを開始データベースとして当該開始データベースのいずれかのレコードを開始レコードとして、当該データベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索し、該当のレコードがある場合は、該レコードを含むデータベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索するようにしていき、いずれかの検索で該当のレコードがなかった場合、または、前記開始データベースの前記開始レコード以外のレコードが検索で該当した場合は、前記データベース間に不整合があると判定することを特徴とする。   The second aspect of the present invention is a method of operating a database system, wherein the database system includes a plurality of databases including one database included in the highest layer and having a hierarchical structure, and each of the databases stores data. Including one or more records, each record including link information indicating one record of a lower layer database or a highest layer database, wherein the database system starts one of the databases If any record in the start database is used as a start record, the record indicated by the link information in the record and including data is searched in the lower layer or the highest layer database of the database, and there is a corresponding record Is the database that contains the record. In the database of the lower layer or the uppermost layer of the database, the record indicated by the link information in the record and including the data is searched. If there is no corresponding record in any search, or the start When a record other than the start record in the database corresponds to the search, it is determined that there is a mismatch between the databases.

例えば、前記開始データベースの前記開始レコードが検索で該当した場合は、前記データベース間に不整合がないと判定する。   For example, when the start record of the start database corresponds to the search, it is determined that there is no inconsistency between the databases.

第3の本発明は、第1の本発明等に係るデータベースシステムとしてコンピュータを機能させるためのコンピュータプログラムであることを特徴とする。   The third aspect of the present invention is a computer program for causing a computer to function as the database system according to the first aspect of the present invention.

本発明によれば、階層構造を有する複数のデータベースを備えるデータベースシステムにおいてデータベース間の不整合を検出できる。   According to the present invention, inconsistencies between databases can be detected in a database system including a plurality of databases having a hierarchical structure.

本実施の形態に係るデータベースシステムの構成とデータ管理を示す図である。It is a figure which shows the structure and data management of the database system which concern on this Embodiment. データベース間に不整合がないと判定される一例(第1整合判定例)を示す図である。It is a figure which shows an example (1st matching determination example) determined with there being no inconsistency between databases. データベース間に不整合がないと判定される一例(第2整合判定例)を示す図である。It is a figure which shows an example (2nd matching determination example) determined with there being no inconsistency between databases. データベース間に不整合がないと判定される一例(第3整合判定例)を示す図である。It is a figure which shows an example (3rd matching determination example) determined with there being no inconsistency between databases. データベース間に不整合があると判定される一例(第1不整合判定例)を示す図である。It is a figure which shows an example (1st inconsistency determination example) determined with inconsistency between databases. データベース間に不整合があると判定される一例(第2不整合判定例)を示す図である。It is a figure which shows an example (2nd inconsistency determination example) determined with there being inconsistency between databases. 従来のデータベースシステムにおけるデータベースの一例を示す図である。It is a figure which shows an example of the database in the conventional database system.

以下、本発明の実施の形態について図面を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本実施の形態に係るデータベースシステムの構成とデータ管理を示す図である。   FIG. 1 is a diagram showing the configuration and data management of the database system according to the present embodiment.

データベースシステム1は、例えば、契約者情報データベースDB#1、基本契約番号情報データベースDB#2、追加契約番号情報データベースDB#3を含む。   The database system 1 includes, for example, a contractor information database DB # 1, a basic contract number information database DB # 2, and an additional contract number information database DB # 3.

データベースシステム1は、階層構造を有し、契約者情報データベースDB#1は最上位層に含まれ、基本契約番号情報データベースDB#2はその下位層に含まれ、追加契約番号情報データベースDB#3はその下位層、つまり、最下位層に含まれる。なお、「下位層」とは「直下の下位層」をいう。   The database system 1 has a hierarchical structure, the contractor information database DB # 1 is included in the highest layer, the basic contract number information database DB # 2 is included in the lower layer, and the additional contract number information database DB # 3. Is included in the lower layer, that is, the lowest layer. The “lower layer” means “the lower layer immediately below”.

データベースは、データを含む1以上のレコードを有し、当該各レコードは下位層のデータベースまたは最上位層のデータベースの1レコードを示すリンク情報を含む。
契約者情報データベースDB#1は、契約IDというデータを含む1以上のレコードを有する。レコードは、基本契約番号情報データベースDB#2において、当該契約IDに対応する契約者のデータを含むレコードを示すリンク情報(DB#2へのリンク情報)を含む。
The database has one or more records including data, and each record includes link information indicating one record of the lower layer database or the uppermost layer database.
The contractor information database DB # 1 has one or more records including data called contract IDs. The record includes link information (link information to DB # 2) indicating a record including contractor data corresponding to the contract ID in the basic contract number information database DB # 2.

基本契約番号情報データベースDB#2は、契約IDに対応する契約者が基本契約で取得した電話番号である基本契約番号というデータを含む1以上のレコードを有する。レコードは、追加契約番号情報データベースDB#3において、当該契約者のデータを含むレコードを示すリンク情報(DB#3へのリンク情報)または、契約者情報データベースDB#1において、当該契約者の契約IDを含むレコードを示すリンク情報(DB#1へのリンク情報)を含む。   The basic contract number information database DB # 2 has one or more records including data called a basic contract number which is a telephone number acquired by the contractor corresponding to the contract ID as a basic contract. The record is the link information (link information to DB # 3) indicating the record including the contractor's data in the additional contract number information database DB # 3 or the contract of the contractor in the contractor information database DB # 1. Link information (link information to DB # 1) indicating a record including an ID is included.

追加契約番号情報データベースDB#3は、契約者が追加で取得した電話番号である追加番号というデータを含む1以上のレコードを有する。レコードは、契約者情報データベースDB#1において、当該契約者の契約IDを含むレコードを示すリンク情報(DB#1へのリンク情報)を含む。   The additional contract number information database DB # 3 has one or more records including data called an additional number which is a telephone number additionally acquired by the contractor. The record includes link information (link information to DB # 1) indicating a record including the contract ID of the contractor in the contractor information database DB # 1.

契約者情報データベースDB#1の領域1001のレコードは、契約ID「00001」とリンク情報「領域2001」を含み、領域1002のレコードは、契約ID「00002」とリンク情報「領域2002」を含む。   The record in the area 1001 of the contractor information database DB # 1 includes the contract ID “00001” and the link information “area 2001”, and the record in the area 1002 includes the contract ID “00002” and the link information “area 2002”.

基本契約番号情報データベースDB#2の領域2001のレコードは、基本契約番号「03−1111−1111」とリンク情報「領域3001」を含み、領域2002のレコードは、基本契約番号「03−1111−1112」とリンク情報「領域3002」を含む。   The record in the area 2001 of the basic contract number information database DB # 2 includes the basic contract number “03-1111-1111” and the link information “area 3001”, and the record in the area 2002 includes the basic contract number “03-1111-1112”. ”And link information“ area 3002 ”.

追加契約番号情報データベースDB#3の領域3001のレコードは、追加番号「03−2222−1111」とリンク情報「領域1001」を含み、領域3002のレコードは、追加番号「03−2222−1112」とリンク情報「領域1002」を含む。   The record in the area 3001 of the additional contract number information database DB # 3 includes the additional number “03-2222-1111” and the link information “area 1001”, and the record in the area 3002 includes the additional number “03-2222-1112”. The link information “area 1002” is included.

データベースシステム1は、データ消失に備え、契約者情報データベースDB#1、基本契約番号情報データベースDB#2、追加契約番号情報データベースDB#3をそれぞれバックアップする。   In preparation for data loss, the database system 1 backs up the contractor information database DB # 1, the basic contract number information database DB # 2, and the additional contract number information database DB # 3.

データベースDB#1から#3までに格納されているデータは、各々のデータのリンク関係が変わらずに保存されているべきである。しかしながら、災害や故障などの意図しない要因によりデータのリンク関係に不整合が生じる場合がある。データベースシステム内のデータに不整合を生ぜしめる一連の動作の例を図1を用いて説明する。   The data stored in the databases DB # 1 to # 3 should be stored without changing the link relationship between the data. However, inconsistencies may occur in data link relationships due to unintended factors such as disasters and failures. An example of a series of operations that cause inconsistency in data in the database system will be described with reference to FIG.

データベースシステム1に格納されているデータに不整合が無い状態から説明を始める。まず、データに不整合が無い状態で各データベースでバックアップを取得したとする。   The description starts from a state where the data stored in the database system 1 is not inconsistent. First, it is assumed that a backup is acquired in each database with no data inconsistency.

その後、例えば、データベースシステム1が、オペレーションシステムOpSから、例えば、契約ID「00001」を含むデータ削除の操作信号を受信する。   Thereafter, for example, the database system 1 receives an operation signal for data deletion including, for example, the contract ID “00001” from the operation system OpS.

これにより、データベースシステム1は、契約者情報データベースDB#1から契約ID「00001」を含むレコードを検索し、基本契約番号情報データベースDB#2からレコード内のリンク情報「領域2001」で示されるレコードを検索し、追加契約番号情報データベースDB#3からレコード内のリンク情報「領域3001」で示されるレコードを検索し、これらレコードからデータを全て削除する。   As a result, the database system 1 searches the contractor information database DB # 1 for a record including the contract ID “00001”, and records from the basic contract number information database DB # 2 as the link information “area 2001” in the record. Is searched, the record indicated by the link information “area 3001” in the record is searched from the additional contract number information database DB # 3, and all data is deleted from these records.

その後、例えば、データベースシステム1が、オペレーションシステムOpSから、契約ID「00003」を含むデータ追加の操作信号を受信する。この操作信号には、例えば、基本契約番号「03−1111−1113」が含まれる。   Thereafter, for example, the database system 1 receives an operation signal for adding data including the contract ID “00003” from the operation system OpS. This operation signal includes, for example, the basic contract number “03-1111-1113”.

データベースシステム1は、例えば、契約者情報データベースDB#1の空き領域1001のレコードに、契約ID「00003」とリンク情報「領域2001」を記憶させ、基本契約番号情報データベースDB#2の空き領域2001のレコードに基本契約番号「03−1111−1113」とリンク情報「領域1001」を記憶させる。   For example, the database system 1 stores the contract ID “00003” and the link information “area 2001” in the record of the free area 1001 of the contractor information database DB # 1, and the free area 2001 of the basic contract number information database DB # 2. The basic contract number “03-1111-1113” and the link information “area 1001” are stored in the record “No.

その後、例えば、次に、データベースシステム1が、オペレーションシステムOpSから、契約ID「00004」を含むデータ追加の操作信号を受信する。この操作信号には、例えば、基本契約番号「03−1111−1114」と追加番号「03−2222−1114」が含まれる。   Thereafter, for example, next, the database system 1 receives an operation signal for adding data including the contract ID “00004” from the operation system OpS. This operation signal includes, for example, a basic contract number “03-1111-1114” and an additional number “03-2222-1114”.

データベースシステム1は、例えば、契約者情報データベースDB#1の空き領域1003のレコードに、契約ID「00004」とリンク情報「領域2003」を記憶させ、基本契約番号情報データベースDB#2の空き領域2003のレコードに基本契約番号「03−1111−1114」とリンク情報「領域3001」を記憶させ、追加契約番号情報データベースDB#3の空き領域3001のレコードに追加番号「03−2222−1114」とリンク情報「1003」を記憶させる。   For example, the database system 1 stores the contract ID “00004” and the link information “area 2003” in the record of the free area 1003 of the contractor information database DB # 1, and the free area 2003 of the basic contract number information database DB # 2. The basic contract number “03-1111-1114” and the link information “area 3001” are stored in the record of “No. Information “1003” is stored.

その後、災害や故障などの要因により追加契約番号情報データベースDB#3のデータが消失したとする。その後、バックアップしたファイルからデータを復旧する。   Thereafter, it is assumed that the data in the additional contract number information database DB # 3 has been lost due to a factor such as a disaster or failure. Then, restore the data from the backed up file.

これにより、追加契約番号情報データベースDB#3の領域3001のレコードは、追加番号「03−2222−1111」とリンク情報「領域1001」を含み、領域3002のレコードは、追加番号「03−2222−1112」とリンク情報「領域1002」を含むこととなる。   Thus, the record in the area 3001 of the additional contract number information database DB # 3 includes the additional number “03-2222-1111” and the link information “area 1001”, and the record in the area 3002 includes the additional number “03-2222- 1112 "and link information" area 1002 ".

ここにおいて、データベースシステム1に格納されているデータが不整合となっている。データベースシステムに格納されているデータに不整合があるかもしれないという状態は、データベースの有用性を大きく損なう。よって、整合しているデータ群と、不整合なデータ群とを判別する手法が必要である。不整合であるデータが判別できれば、そのデータを信頼せず使わないようにしたり、データの修復を試みたりすることができよう。   Here, the data stored in the database system 1 is inconsistent. The situation where the data stored in the database system may be inconsistent greatly diminishes the usefulness of the database. Therefore, a method for discriminating between a matched data group and an inconsistent data group is necessary. If inconsistent data can be determined, it can be used without trust or attempted to repair the data.

不整合を発見する手法を説明する。例として、図1のデータが不整合となった状態に基づいて説明する。   Explain how to find inconsistencies. As an example, a description will be given based on a state in which the data in FIG. 1 is inconsistent.

データベースシステム1は、契約者情報データベースDB#1、基本契約番号情報データベースDB#2、追加契約番号情報データベースDB#3のいずれかを開始データベースとして開始データベースのいずれかのレコードを開始レコードとして、当該データベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索し、該当のレコードがある場合は、該レコードを含むデータベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索するようにしていき、いずれかの検索で該当のレコードがなかった場合、または、開始データベースの開始レコード以外のレコードが検索で該当した場合は、データベース間に不整合があると判定する。   The database system 1 uses one of the contractor information database DB # 1, the basic contract number information database DB # 2, and the additional contract number information database DB # 3 as a start database, and any record in the start database as a start record. When a record indicated by link information in the record and including data is searched in the lower layer or the highest layer database of the database, and there is a corresponding record, the lower layer or the highest layer of the database including the record is searched. The database is searched for the record indicated by the link information in the record and including the data. If there is no corresponding record in any search, or a record other than the start record in the start database is searched. If applicable, It determines that there is an inconsistency between the database.

例えば、データベースシステム1は、データ復旧後、契約者情報データベースDB#1を開始データベースとし、領域1003のレコードを開始レコードとし、まず、当該契約者情報データベースDB#1の下位層の基本契約番号情報データベースDB#2において当該レコード内のリンク情報「領域2003」により示され且つデータを含むレコードを検索する。領域2003のレコードが該当する。   For example, after the data recovery, the database system 1 uses the contractor information database DB # 1 as the start database, the record in the area 1003 as the start record, and first, basic contract number information of the lower layer of the contractor information database DB # 1 In the database DB # 2, a record indicated by the link information “area 2003” in the record and including data is searched. This corresponds to the record in the area 2003.

次に、データベースシステム1は、基本契約番号情報データベースDB#2の下位層の追加契約番号情報データベースDB#3において当該レコード内のリンク情報「領域3001」により示され且つデータを含むレコードを検索する。領域3001のレコードが該当する。   Next, the database system 1 searches the record indicated by the link information “area 3001” in the record and including data in the additional contract number information database DB # 3 in the lower layer of the basic contract number information database DB # 2. . This corresponds to the record in the area 3001.

次に、データベースシステム1は、追加契約番号情報データベースDB#3の下位層がないので、最上位層の契約者情報データベースDB#1において当該レコード内のリンク情報「領域1001」により示され且つデータを含むレコードを検索する。領域1001のレコードが該当するが、開始データベース(契約者情報データベースDB#1)の開始レコード(領域1003のレコード)以外のレコードが検索で該当したので、データベース間に不整合があると判定する。   Next, since there is no lower layer of the additional contract number information database DB # 3, the database system 1 is indicated by the link information “area 1001” in the record and the data in the uppermost contractor information database DB # 1. Search for records containing. Although the record in the area 1001 corresponds, a record other than the start record (record in the area 1003) in the start database (contractor information database DB # 1) corresponds in the search, so it is determined that there is a mismatch between the databases.

一方、データベースシステム1は、開始データベースの開始レコードが検索で該当した場合は、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定する。   On the other hand, when the start record of the start database corresponds to the search, the database system 1 determines that there is no inconsistency between the databases for at least the start record and the corresponding record.

図2は、データベース間に不整合がないと判定される一例(第1整合判定例)を示す図である。   FIG. 2 is a diagram illustrating an example (first matching determination example) in which it is determined that there is no mismatch between databases.

例えば、データベースシステム1は、契約者情報データベースDB#1を開始データベースとし、領域1001のレコードを開始レコードとし、まず、下位層の基本契約番号情報データベースDB#2において当該レコード内のリンク情報「領域2001」により示され且つデータを含むレコードを検索する。領域2001のレコードが該当する。   For example, the database system 1 uses the contractor information database DB # 1 as the start database and the record in the area 1001 as the start record. First, in the basic contract number information database DB # 2 of the lower layer, the link information “area” in the record The record indicated by “2001” and including data is retrieved. The record in the area 2001 corresponds.

次に、データベースシステム1は、下位層の追加契約番号情報データベースDB#3において当該レコード内のリンク情報「領域3001」により示され且つデータを含むレコードを検索する。領域3001のレコードが該当する。   Next, the database system 1 searches the record indicated by the link information “area 3001” in the record and including data in the additional contract number information database DB # 3 of the lower layer. This corresponds to the record in the area 3001.

次に、データベースシステム1は、最上位層の契約者情報データベースDB#1において当該レコード内のリンク情報「領域1001」により示され且つデータを含むレコードを検索する。領域1001のレコードが該当し、このレコードは、開始データベースの開始レコードなので、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定する。   Next, the database system 1 searches for the record indicated by the link information “area 1001” in the record and including data in the uppermost contractor information database DB # 1. The record in the area 1001 corresponds, and this record is the start record of the start database. Therefore, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

なお、開始データベースは、契約者情報データベースDB#1以外でもよい。   The start database may be other than the contractor information database DB # 1.

例えば、データベースシステム1は、基本契約番号情報データベースDB#2を開始データベースとし、領域2001のレコードを開始レコードとし、下位層の追加契約番号情報データベースDB#3において当該レコード内のリンク情報「領域3001」により示され且つデータを含むレコードを検索する。領域3001のレコードが該当する。   For example, the database system 1 uses the basic contract number information database DB # 2 as the start database, the record in the area 2001 as the start record, and the link information “area 3001” in the additional contract number information database DB # 3 in the lower layer. ”And retrieves records containing data. This corresponds to the record in the area 3001.

次に、データベースシステム1は、最上位層の契約者情報データベースDB#1において当該レコード内のリンク情報「領域1001」により示され且つデータを含むレコードを検索する。領域1001のレコードが該当する。   Next, the database system 1 searches for the record indicated by the link information “area 1001” in the record and including data in the uppermost contractor information database DB # 1. This corresponds to the record in the area 1001.

次に、データベースシステム1は、下位層の基本契約番号情報データベースDB#2において当該レコード内のリンク情報「領域2001」により示され且つデータを含むレコードを検索する。領域2001のレコードが該当し、このレコードは、開始データベースの開始レコードなので、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定する。   Next, the database system 1 searches the lower layer basic contract number information database DB # 2 for the record indicated by the link information “area 2001” in the record and including data. The record in the area 2001 corresponds, and this record is the start record of the start database. Therefore, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

追加契約番号情報データベースDB#3を開始データベースとし、同様に判定してもよい。   The additional contract number information database DB # 3 may be used as the start database, and the determination may be made in the same manner.

図3は、データベース間に不整合がないと判定される一例(第2整合判定例)を示す図である。   FIG. 3 is a diagram illustrating an example (second matching determination example) in which it is determined that there is no mismatch between databases.

第1整合判定例では3回目の検索で開始レコードが検索されたが、第2整合判定例では2回目の検索で開始レコードが検索される。   In the first match determination example, the start record is searched in the third search. In the second match determination example, the start record is searched in the second search.

例えば、データベースシステム1は、契約者情報データベースDB#1を開始データベースとし、領域1001のレコードを開始レコードとし、まず、下位層の基本契約番号情報データベースDB#2において当該レコード内のリンク情報「領域2001」により示され且つデータを含むレコードを検索する。領域2001のレコードが該当する。   For example, the database system 1 uses the contractor information database DB # 1 as the start database and the record in the area 1001 as the start record. First, in the basic contract number information database DB # 2 of the lower layer, the link information “area” in the record The record indicated by “2001” and including data is retrieved. The record in the area 2001 corresponds.

次に、データベースシステム1は、最上位層の契約者情報データベースDB#1において当該レコード内のリンク情報「領域1001」により示され且つデータを含むレコードを検索する。領域1001のレコードが該当し、このレコードは、開始データベースの開始レコードなので、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定する。   Next, the database system 1 searches for the record indicated by the link information “area 1001” in the record and including data in the uppermost contractor information database DB # 1. The record in the area 1001 corresponds, and this record is the start record of the start database. Therefore, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

なお、基本契約番号情報データベースDB#2を開始データベースとし、同様に判定してもよい。   The basic contract number information database DB # 2 may be used as the start database, and the determination may be made in the same manner.

図4は、データベース間に不整合がないと判定される一例(第3整合判定例)を示す図である。第3整合判定例は、リンク先のレコードが複数ある例である。   FIG. 4 is a diagram illustrating an example (third matching determination example) in which it is determined that there is no mismatch between databases. The third matching determination example is an example in which there are a plurality of linked records.

例えば、データベースシステム1は、契約者情報データベースDB#1を開始データベースとし、領域1001のレコードを開始レコードとし、まず、下位層の基本契約番号情報データベースDB#2において当該レコード内のリンク情報「領域2001」により示され且つデータを含むレコードを検索する。領域2001のレコードが該当する。   For example, the database system 1 uses the contractor information database DB # 1 as the start database and the record in the area 1001 as the start record. First, in the basic contract number information database DB # 2 of the lower layer, the link information “area” in the record The record indicated by “2001” and including data is retrieved. The record in the area 2001 corresponds.

次に、データベースシステム1は、下位層の追加契約番号情報データベースDB#3において当該レコード内のリンク情報「領域3001」、「領域3002」、「領域3003」のそれぞれにつき、リンク情報により示され且つデータを含むレコードを検索する。領域3001、領域3002、領域3003の3レコードが該当する。   Next, the database system 1 is indicated by link information for each of the link information “area 3001”, “area 3002”, and “area 3003” in the record in the additional contract number information database DB # 3 of the lower layer and Search for records that contain data. Three records, an area 3001, an area 3002, and an area 3003, are applicable.

次に、データベースシステム1は、領域3001のレコードについては、最上位層の契約者情報データベースDB#1において当該レコード内のリンク情報「領域1001」により示され且つデータを含むレコードを検索する。領域1001のレコードが該当し、このレコードは、開始データベースの開始レコードなので、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定する。   Next, the database system 1 searches the record in the area 3001 for the record indicated by the link information “area 1001” in the record and including data in the contractor information database DB # 1 of the highest layer. The record in the area 1001 corresponds, and this record is the start record of the start database. Therefore, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

同様にデータベースシステム1は、領域3002のレコードについては、最上位層の契約者情報データベースDB#1において当該レコード内のリンク情報「領域1001」により示され且つデータを含むレコードを検索する。領域1001のレコードが該当し、このレコードは、開始データベースの開始レコードなので、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定する。   Similarly, for the record in the area 3002, the database system 1 searches for the record indicated by the link information “area 1001” in the record in the uppermost contractor information database DB # 1 and including data. The record in the area 1001 corresponds, and this record is the start record of the start database. Therefore, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

同様にデータベースシステム1は、領域3003のレコードについては、最上位層の契約者情報データベースDB#1において当該レコード内のリンク情報「領域1001」により示され且つデータを含むレコードを検索する。領域1001のレコードが該当し、このレコードは、開始データベースの開始レコードなので、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定する。   Similarly, for the record in the area 3003, the database system 1 searches the record indicated by the link information “area 1001” in the record and including data in the uppermost contractor information database DB # 1. The record in the area 1001 corresponds, and this record is the start record of the start database. Therefore, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

なお、基本契約番号情報データベースDB#2、追加契約番号情報データベースDB#3を開始データベースとし、同様に判定してもよい。   The basic contract number information database DB # 2 and the additional contract number information database DB # 3 may be used as the start database, and the same determination may be made.

図5は、データベース間に不整合があると判定される一例(第1不整合判定例)を示す図である。   FIG. 5 is a diagram illustrating an example (first inconsistency determination example) in which it is determined that there is an inconsistency between databases.

例えば、データベースシステム1は、契約者情報データベースDB#1を開始データベースとし、領域1002のレコードを開始レコードとし、まず、下位層の基本契約番号情報データベースDB#2において当該レコード内のリンク情報「領域2003」により示され且つデータを含むレコードを検索する。領域2003のレコードが該当する。   For example, the database system 1 uses the contractor information database DB # 1 as the start database and the record in the area 1002 as the start record. First, in the basic contract number information database DB # 2 of the lower layer, the link information “area” in the record Search for a record indicated by “2003” and containing data. This corresponds to the record in the area 2003.

次に、データベースシステム1は、下位層の追加契約番号情報データベースDB#3において当該レコード内のリンク情報「領域3060」により示され且つデータを含むレコードを検索する。ここでは、該当のレコードがない。   Next, the database system 1 searches the record indicated by the link information “area 3060” in the record and including data in the additional contract number information database DB # 3 of the lower layer. Here, there is no corresponding record.

よって、データベースシステム1は、データベース間に不整合があると判定する。   Therefore, the database system 1 determines that there is a mismatch between the databases.

図6は、データベース間に不整合があると判定される一例(第2不整合判定例)を示す図である。   FIG. 6 is a diagram illustrating an example (second mismatch determination example) in which it is determined that there is a mismatch between databases.

例えば、契約者情報データベースDB#1を開始データベースとし、領域1001のレコードを開始レコードとした場合は、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定される。   For example, when the contractor information database DB # 1 is the start database and the record in the area 1001 is the start record, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

また、契約者情報データベースDB#1を開始データベースとし、領域1002のレコードを開始レコードとした場合も、少なくとも開始レコードと該当のレコードについては、データベース間に不整合がないと判定される。   Further, even when the contractor information database DB # 1 is the start database and the record in the area 1002 is the start record, it is determined that there is no inconsistency between the databases for at least the start record and the corresponding record.

しかし、契約者情報データベースDB#1を開始データベースとし、領域1003のレコードを開始レコードとした場合は、最初の検索で該当のレコードがないので、データベース間に不整合があると判定される。   However, if the contractor information database DB # 1 is the start database and the record in the area 1003 is the start record, there is no corresponding record in the first search, so it is determined that there is a mismatch between the databases.

追加契約番号情報データベースDB#3を開始データベースとし、領域3003のレコードを開始レコードとした場合であっても、2回目の検索で該当のレコードがないので、データベース間に不整合があると判定される。   Even if the additional contract number information database DB # 3 is the start database and the record in the area 3003 is the start record, there is no corresponding record in the second search, so it is determined that there is a mismatch between the databases. The

また、基本契約番号情報データベースDB#2を開始データベースとし、領域2003のレコードを開始レコードとした場合も、最初の検索で該当のレコードがないので、データベース間に不整合があると判定される。   Even when the basic contract number information database DB # 2 is the start database and the record in the area 2003 is the start record, it is determined that there is a mismatch between the databases because there is no corresponding record in the first search.

以上のように、本実施の形態に係るデータベースシステム1によれば、最上位層に含まれる1つのデータベース(DB#1)を含み且つ階層構造を有する複数のデータベース(DB#1、DB#2、DB#3)を備え、各データベースは、データを含む1以上のレコードを有し、当該各レコードは下位層のデータベースまたは最上位層のデータベースの1レコードを示すリンク情報を含むので、上記の判定により、データベース間の整合、不整合を判定できる。   As described above, according to the database system 1 according to the present embodiment, a plurality of databases (DB # 1, DB # 2) including one database (DB # 1) included in the highest layer and having a hierarchical structure. DB # 3), and each database has one or more records including data, and each record includes link information indicating one record of the lower layer database or the uppermost layer database. By the determination, it is possible to determine consistency or inconsistency between databases.

また、いずれかのデータベースを開始データベースとして当該開始データベースのいずれかのレコードを開始レコードとして、当該データベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索し、該当のレコードがある場合は、該レコードを含むデータベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索するようにしていき、いずれかの検索で該当のレコードがなかった場合、または、開始データベースの開始レコード以外のレコードが検索で該当した場合は、データベース間に不整合があると判定するので、データベース間の不整合を検出できる。   In addition, any database is a start database, any record of the start database is a start record, and a record that includes data and is indicated by link information in the record in the lower layer or the highest layer database of the database. If there is a corresponding record, search for the record indicated by the link information in the record and including the data in the database of the lower layer or the highest layer of the database including the record. If there is no corresponding record in the search, or if a record other than the start record in the start database is found in the search, it is determined that there is an inconsistency between the databases, so that an inconsistency between the databases can be detected.

また、開始データベースの開始レコードが検索で該当した場合は、データベース間に不整合がないと判定するので、データベース間に不整合がないことを検出できる。   Further, when the start record of the start database corresponds to the search, it is determined that there is no inconsistency between the databases, so it can be detected that there is no inconsistency between the databases.

なお、本実施の形態に係るデータベースシステム1としてコンピュータを機能させるためのコンピュータプログラムは、半導体メモリ、磁気ディスク、光ディスク、光磁気ディスク、磁気テープなどのコンピュータ読み取り可能な記録媒体に記録でき、また、インターネットなどの通信網を介して伝送させて、広く流通させることができる。   The computer program for causing the computer to function as the database system 1 according to the present embodiment can be recorded on a computer-readable recording medium such as a semiconductor memory, a magnetic disk, an optical disk, a magneto-optical disk, or a magnetic tape. It can be widely distributed by being transmitted via a communication network such as the Internet.

1…データベースシステム
DB#1…契約者情報データベース
DB#2…基本契約番号情報データベース
DB#3…追加番号情報データベース
OpS…オペレーションシステム
DESCRIPTION OF SYMBOLS 1 ... Database system DB # 1 ... Contractor information database DB # 2 ... Basic contract number information database DB # 3 ... Additional number information database OpS ... Operation system

Claims (5)

データベースシステムであって、
最上位層に含まれる1つのデータベースを含み且つ階層構造を有する複数のデータベースを備え、前記各データベースは、データを含む1以上のレコードを有し、当該各レコードは下位層のデータベースまたは最上位層のデータベースの1レコードを示すリンク情報を含み、
いずれかのデータベースを開始データベースとして当該開始データベースのいずれかのレコードを開始レコードとして、当該データベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索し、該当のレコードがある場合は、該レコードを含むデータベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索するようにしていき、いずれかの検索で該当のレコードがなかった場合、または、前記開始データベースの前記開始レコード以外のレコードが検索で該当した場合は、前記データベース間に不整合があると判定する
ことを特徴とするデータベースシステム。
A database system,
A plurality of databases including one database included in the highest layer and having a hierarchical structure, wherein each database includes one or more records including data, and each of the records is a lower layer database or a highest layer only contains the link information indicating the one record of database,
Using any database as the start database and any record in the start database as the start record, search for a record that includes data and is indicated by the link information in the record in the database of the lower layer or the highest layer of the database. If there is a corresponding record, the database containing the record is searched for the record indicated by the link information in the lower layer or the uppermost layer of the database containing the record and containing the data. In the database system, if there is no corresponding record, or if a record other than the start record in the start database corresponds in the search, it is determined that there is a mismatch between the databases.
請求項1記載のデータベースシステムにおいて、
前記開始データベースの前記開始レコードが検索で該当した場合は、前記データベース間に不整合がないと判定することを特徴とするデータベースシステム。
The database system according to claim 1 , wherein
When the start record of the start database corresponds to the search, it is determined that there is no inconsistency between the databases.
データベースシステムの動作方法であって、
前記データベースシステムは、
最上位層に含まれる1つのデータベースを含み且つ階層構造を有する複数のデータベースを備え、前記各データベースは、データを含む1以上のレコードを有し、当該各レコードは下位層のデータベースまたは最上位層のデータベースの1レコードを示すリンク情報を含み、
前記動作方法は、
前記データベースシステムが、いずれかのデータベースを開始データベースとして当該開始データベースのいずれかのレコードを開始レコードとして、当該データベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索し、該当のレコードがある場合は、該レコードを含むデータベースの下位層または最上位層のデータベースにおいて当該レコード内のリンク情報により示され且つデータを含むレコードを検索するようにしていき、いずれかの検索で該当のレコードがなかった場合、または、前記開始データベースの前記開始レコード以外のレコードが検索で該当した場合は、前記データベース間に不整合があると判定することを特徴とするデータベースシステムの動作方法。
A method of operating a database system,
The database system includes:
A plurality of databases including one database included in the highest layer and having a hierarchical structure, wherein each database includes one or more records including data, and each of the records is a lower layer database or a highest layer Including link information indicating one record in the database of
The operation method is as follows:
The database system uses any database as a start database and any record in the start database as a start record, and the data indicated by the link information in the record in the lower layer or the highest layer database of the database If a record including the record is found, and there is a corresponding record, the record including the data indicated by the link information in the record is searched in the database of the lower layer or the highest layer of the database including the record. If there is no corresponding record in any search, or if a record other than the start record in the start database is found in the search, it is determined that there is a mismatch between the databases. Database system Create method.
請求項3記載のデータベースシステムの動作方法において、
前記開始データベースの前記開始レコードが検索で該当した場合は、前記データベース間に不整合がないと判定することを特徴とするデータベースシステムの動作方法。
The operation method of the database system according to claim 3 ,
When the start record of the start database corresponds to the search, it is determined that there is no inconsistency between the databases.
請求項1または2記載のデータベースシステムとしてコンピュータを機能させるためのコンピュータプログラム。 A computer program for causing a computer to function as the database system according to claim 1 .
JP2014175242A 2014-08-29 2014-08-29 Database system, database system operating method, and computer program Active JP6280006B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014175242A JP6280006B2 (en) 2014-08-29 2014-08-29 Database system, database system operating method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014175242A JP6280006B2 (en) 2014-08-29 2014-08-29 Database system, database system operating method, and computer program

Publications (2)

Publication Number Publication Date
JP2016051262A JP2016051262A (en) 2016-04-11
JP6280006B2 true JP6280006B2 (en) 2018-02-14

Family

ID=55658734

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014175242A Active JP6280006B2 (en) 2014-08-29 2014-08-29 Database system, database system operating method, and computer program

Country Status (1)

Country Link
JP (1) JP6280006B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6185569B1 (en) * 1998-06-29 2001-02-06 Microsoft Corporation Linked data structure integrity verification system which verifies actual node information with expected node information stored in a table
JP4754007B2 (en) * 2009-04-24 2011-08-24 インターナショナル・ビジネス・マシーンズ・コーポレーション Information processing apparatus, information processing method, program, and recording medium
WO2011077858A1 (en) * 2009-12-25 2011-06-30 インターナショナル・ビジネス・マシーンズ・コーポレーション System, method and program for checking consistency of pointers in hierarchical database

Also Published As

Publication number Publication date
JP2016051262A (en) 2016-04-11

Similar Documents

Publication Publication Date Title
CN106570086B (en) Data migration system and data migration method
US10089148B1 (en) Method and apparatus for policy-based replication
JP5337916B1 (en) Information processing system
US11157369B2 (en) Backing up and recovering a database
US9760453B2 (en) Two-tier failover service for data disaster recovery
US8332442B1 (en) Automated restoration of links when restoring individual directory service objects
US20160092570A1 (en) Sharing Configuration Information for Searches in Data Intake and Query Systems
US20190018738A1 (en) Method for performing replication control in a storage system with aid of characteristic information of snapshot, and associated apparatus
US7974949B2 (en) Computer system and automatic data backup method
US8712966B1 (en) Backup and recovery of distributed storage areas
WO2016082156A1 (en) Metadata recovery method and apparatus
US9348841B2 (en) Transaction processing method and system
JP6440773B2 (en) Data replication method and apparatus
US20150006485A1 (en) High Scalability Data Management Techniques for Representing, Editing, and Accessing Data
WO2016086695A1 (en) Multipath device naming method, device, host and communication system
US20080010515A1 (en) Per file dirty region logging
JP6450865B2 (en) Aggregate large amounts of time data from many overlapping sources
US20160026536A1 (en) Recovery path selection during database restore
US9880776B1 (en) Content-driven data protection method for multiple storage devices
US7801859B1 (en) Tracking filesystem backups
JP6280006B2 (en) Database system, database system operating method, and computer program
US11175849B2 (en) Systems and methods for defining replication of data
CN115114258A (en) Data copying method and device, electronic equipment and computer storage medium
US10379777B2 (en) Method for performing replication control in storage system with aid of relationship tree within database, and associated apparatus
CN104220982A (en) Transaction processing method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160916

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170704

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170814

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180118

R150 Certificate of patent or registration of utility model

Ref document number: 6280006

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150