JPH113263A - Replica database matching device and replica database matching method - Google Patents
Replica database matching device and replica database matching methodInfo
- Publication number
- JPH113263A JPH113263A JP9154920A JP15492097A JPH113263A JP H113263 A JPH113263 A JP H113263A JP 9154920 A JP9154920 A JP 9154920A JP 15492097 A JP15492097 A JP 15492097A JP H113263 A JPH113263 A JP H113263A
- Authority
- JP
- Japan
- Prior art keywords
- information
- site
- database
- reflection
- replication
- 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.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
(57)【要約】
【課題】 複数のデータベースシステムでデータの更新
が行われても、複製データベースシステムのデータの整
合性を保証する複製データベース整合装置と複製データ
ベース整合方式を提供する。
【解決手段】 自サイトのデータベース更新時に、収集
される更新後情報に更新情報の整合性を調査するために
使用する情報を持つヘッダ情報を付加して自サイトの反
映情報を作成し、自サイトの反映情報を自サイトの専用
ファイルに格納すると同時に、自サイトの反映情報を他
サイトに転送し、他サイトの反映情報を他サイトから受
信したときに、該他サイトの反映情報を自サイトの専用
ファイルに格納し、自サイトの専用ファイル内の反映情
報の整合性を調査し、整合性を保つために必要な反映情
報を選択し、該整合性を保つために必要な反映情報によ
り自サイトのデータベースの更新を行う。
(57) [Summary] [PROBLEMS] To provide a replication database consistency device and a replication database consistency method that guarantee data consistency of a replication database system even when data is updated in a plurality of database systems. SOLUTION: When updating a database of a self-site, a reflection information of the self-site is created by adding header information having information used for checking the consistency of the update information to collected post-update information, At the same time, the reflection information of the own site is transferred to another site, and when the reflection information of the other site is received from the other site, the reflection information of the other site is stored in the own file. Store the information in a dedicated file, check the consistency of the reflection information in the dedicated file of the own site, select the reflection information necessary to maintain the consistency, and use the reflection information necessary to maintain the consistency. Update the database.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、複製データベース
システムにおける複製データベース整合装置、複製デー
タベース整合方法及びそれらに使われる記録媒体に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a replication database matching device, a replication database matching method, and a recording medium used in the same in a replication database system.
【0002】[0002]
【従来の技術】従来の複製データベースシステムは、あ
るサイトにあるマスター・データベースの複製を別のサ
イトに作り、マスター・データベースと複製との整合性
が維持されるように運用されるシステムである。2. Description of the Related Art A conventional replica database system is a system in which a replica of a master database at a site is created at another site so that consistency between the master database and the replica is maintained.
【0003】従来の複製データベースシステムではマス
ター・データベースと複製との整合性を維持するため
に、例えば定期的にマスター・データベースの更新内容
がマスター・データベースのあるサイトから複製のある
サイトに通信回路を経由して送られ、その更新内容によ
って複製が更新されている。In a conventional duplicate database system, in order to maintain consistency between the master database and the replica, for example, a communication circuit is periodically updated from a site having the master database to a site having the replica. Via the Internet and the copy has been updated with the updated content.
【0004】例えば本支店のある会社においては、本社
がマスター・データベースのあるサイトとして選ばれ、
支店が複製のあるサイトとして選ばれる。この場合、支
店で例えば顧客のデータベースをアクセスする度に通信
回路を経由して本社のマスター・データベースにアクセ
スする必要が無くなり、アクセスタイムが短縮された
り、通信費用を少なく抑えられるなどのメリットが生じ
るので一般に普及している。For example, in a company with a head office, the head office is selected as a site having a master database,
A branch is selected as the site with the replica. In this case, there is no need to access the master database at the head office via the communication circuit every time the customer database is accessed at the branch, for example, resulting in advantages such as reduced access time and reduced communication costs. It is so popular.
【0005】ところで、特開平8−77053号公報に
記載の複製データベース反映装置及び複製データベース
反映方法では、複製元データベース(マスター・データ
ベース)でデータベース更新後に得られた更新後データ
に付加情報を加えて反映情報を作成し、複製先データベ
ース(複製)に反映情報を転送し、その反映情報から直
接複製先データベースへの反映処理を行うことにより、
低負荷で物理構造の異なるデータベース間の複製処理を
おこなうことを可能にしている。In the replica database reflecting device and replica database reflecting method described in Japanese Patent Application Laid-Open No. 8-77053, additional information is added to updated data obtained after updating a database in a source database (master database). By creating reflection information, transferring the reflection information to the replication destination database (replication), and performing reflection processing directly from the reflection information to the replication destination database,
It enables low-load replication between databases with different physical structures.
【0006】[0006]
【発明が解決しようとする課題】しかしながら、従来の
複製データベースシステムは、マスター・データベース
は1つであり、その内容を他サイトの複製に反映させれ
ばよいという思想で設計されていたので、複数のデータ
ベースをマスター・データベースとその複製に分類する
という従来の基本的な構成から進んで、複数のデータベ
ースを均等なものとして扱おうとした場合、即ち、どの
データベースにおいてもデータの更新をする場合には、
従来の複製を更新する方法(複製データベース反映方
法)を相互のデータベースに施していると、同時に複数
のデータベースの同一のテーブルの同一のレコードを異
なった値で更新した場合、それぞれの反映情報が複製先
データベース装置に転送され、互いに相手の反映情報に
よって変更されてしまう可能性があった。However, the conventional replica database system has been designed based on the idea that the number of master databases is one and that the content of the master database should be reflected on the replica of another site. If we proceed from the conventional basic structure of classifying databases into a master database and its replicas and try to treat multiple databases as equivalent, that is, if we want to update data in any database, ,
When the conventional replication update method (replication database reflection method) is applied to each database, if the same record of the same table in multiple databases is updated with different values at the same time, each reflection information is copied There is a possibility that the data is transferred to the destination database device and changed by the reflection information of each other.
【0007】例えば、図5を参照して説明すると、2つ
のデータベースシステム(データベースシステムA(符
号501)及びデータベースシステムB(符号50
2))より構成される複製データベースシステムのある
テーブルのあるレコード(505a及び505b)のあ
る項目に文字列“SUN”が格納されていたとする。デ
ータベースシステムA(符号501)でこの項目値を
“MON”(符号507)に更新し、データベースシス
テムB(符号502)で同時にこの項目値を“TUE”
(符号508)に更新した場合、各々のデータベースシ
ステムにある複製データベース反映装置(503及び5
04)は、他方の複製データベース反映装置(504及
び503)にそれぞれ“MON”、“TUE”を反映情
報として転送し、複製データベース反映装置(504及
び503)がその反映情報を元にしてデータ更新を行
う。そのため、それぞれのデータベースシステムで、こ
の項目の値が“TUE”、“MON”に変更されてしま
い、複製データベースシステム間でデータの矛盾が発生
し整合性が保たれない。For example, referring to FIG. 5, two database systems (database system A (reference numeral 501) and database system B (reference numeral 50)
Assume that a character string "SUN" is stored in a certain item of a certain record (505a and 505b) of a certain table in the duplicate database system composed of 2)). The database system A (501) updates this item value to "MON" (507), and the database system B (502) simultaneously updates this item value to "TUE".
(508), the replica database reflecting devices (503 and 5) in each database system
04) transfers “MON” and “TUE” as reflection information to the other replication database reflection devices (504 and 503), respectively, and the replication database reflection device (504 and 503) updates the data based on the reflection information. I do. Therefore, the value of this item is changed to "TUE" or "MON" in each database system, and data inconsistency occurs between the duplicate database systems, and the consistency cannot be maintained.
【0008】そこで本発明は、複製データベースシステ
ムにおいて、複数のデータベースシステムでデータの更
新が行われても、複数のデータベースシステムのデータ
の整合性を保証する複製データベース整合装置及び複製
データベース整合方式を提供することを目的とする。Accordingly, the present invention provides a replication database consistency device and a replication database consistency method that guarantee data consistency in a plurality of database systems even when data is updated in the plurality of database systems in a replication database system. The purpose is to do.
【0009】[0009]
【課題を解決するための手段】本発明による複製データ
ベース整合装置は、各サイトでデータベース更新が行わ
れる複製データベースシステムで使用される複製データ
ベース整合装置において、データベース更新時に収集さ
れる更新後情報に更新情報の整合性を調査するために使
用する情報を持つヘッダ情報を付加した反映情報の集合
である複製更新履歴情報ファイルと、自サイトのデータ
ベース更新時に、前記更新後情報に前記ヘッダ情報を付
加して自サイトの前記反映情報を作成し、前記自サイト
の反映情報を前記自サイトの前記複製更新履歴情報ファ
イルに格納すると同時に、前記自サイトの反映情報を他
サイトに転送し、他サイトの前記反映情報を他サイトか
ら受信したときに、該他サイトの反映情報を前記自サイ
トの複製更新履歴情報ファイルに格納する反映情報複製
装置と、前記自サイトの前記複製更新履歴情報ファイル
内の前記反映情報の整合性を調査し、整合性を保つため
に必要な反映情報を選択し、該整合性を保つために必要
な反映情報により前記自サイトのデータベースの更新を
行う反映情報反映装置とを備えることを特徴とする。SUMMARY OF THE INVENTION A replicated database coordinator according to the present invention is a replica database coordinator used in a replicated database system in which a database is updated at each site. A replication update history information file, which is a set of reflection information to which header information having information used to check information consistency is added, and the header information is added to the updated information when updating the database of the own site. The reflection information of the own site is created, and the reflection information of the own site is stored in the replication update history information file of the own site, and the reflection information of the own site is transferred to another site. When the reflection information is received from another site, the reflection information of the other site is copied to the replication update history of the own site. The consistency of the reflection information replication device stored in the replication information history file and the reflection information in the replication update history information file of the own site, and selecting the reflection information necessary to maintain the consistency; And a reflection information reflection device that updates the database of the own site with reflection information necessary to maintain the information.
【0010】また、本発明による複製データベース整合
装置は、前記ヘッダ情報が、更新時間、発生システム
名、レコード番号、項目、更新前データ、更新後データ
であることを特徴とする。[0010] The duplicate database matching device according to the present invention is characterized in that the header information is an update time, a generation system name, a record number, an item, pre-update data, and post-update data.
【0011】本発明による複製データベース整合方法
は、各サイトでデータベース更新が行われる複製データ
ベースシステムで使用される複製データベース整合方法
において、自サイトのデータベース更新時に、収集され
る更新後情報に更新情報の整合性を調査するために使用
する情報を持つヘッダ情報を付加して自サイトの反映情
報を作成し、前記自サイトの反映情報を前記自サイトの
複製更新履歴情報ファイルに格納すると同時に、前記自
サイトの反映情報を他サイトに転送する手順と、他サイ
トの前記反映情報を他サイトから受信したときに、該他
サイトの反映情報を前記自サイトの複製更新履歴情報フ
ァイルに格納する手順と、前記自サイトの前記複製更新
履歴情報ファイル内の前記反映情報の整合性を調査し、
整合性を保つために必要な反映情報を選択し、該整合性
を保つために必要な反映情報により前記自サイトのデー
タベースの更新を行う手順とを有することを特徴とす
る。[0011] The replication database consistency method according to the present invention is a replication database consistency method used in a replication database system in which a database is updated at each site. The reflection information of the own site is created by adding header information having information used for checking the consistency, and the reflection information of the own site is stored in the replication update history information file of the own site. A step of transferring the reflection information of the site to another site, and a step of storing the reflection information of the other site in the replication update history information file of the own site when the reflection information of the other site is received from the other site; Investigate the consistency of the reflection information in the replication update history information file of the own site,
Selecting the reflection information necessary for maintaining the consistency and updating the database of the own site with the reflection information necessary for maintaining the consistency.
【0012】また、本発明による複製データベース整合
方法は、前記ヘッダ情報が、更新時間、発生システム
名、レコード番号、項目、更新前データ、更新後データ
であることを特徴とする。Further, in the replication database matching method according to the present invention, the header information is an update time, a generation system name, a record number, an item, pre-update data, and post-update data.
【0013】本発明による記録媒体は、上記の複製デー
タベース整合方法をコンピュータに実行させるためのプ
ログラムを記録したことを特徴とする。[0013] A recording medium according to the present invention is characterized by recording a program for causing a computer to execute the above-mentioned duplicate database matching method.
【0014】また、本発明による記録媒体は、データベ
ース更新時に収集される更新後情報に更新情報の整合性
を調査するために使用する情報を持つヘッダ情報を付加
した反映情報の集合である複製更新履歴情報ファイルを
記録したことを特徴とする。Further, the recording medium according to the present invention is a copy update set which is a set of reflection information obtained by adding header information having information used for checking the consistency of update information to updated information collected at the time of updating a database. A history information file is recorded.
【0015】更に、本発明による記録媒体は、前記ヘッ
ダ情報が、更新時間、発生システム名、レコード番号、
項目、更新前データ、更新後データであることを特徴と
する。Further, in the recording medium according to the present invention, the header information includes an update time, a generation system name, a record number,
It is characterized by items, pre-update data, and post-update data.
【0016】[0016]
【発明の実施の形態】次に本発明の一実施形態を図を参
照して説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, an embodiment of the present invention will be described with reference to the drawings.
【0017】図1は、本実施形態による複製データベー
ス整合装置を含む複製データベースシステムの全体構成
図である。データベースシステムA(符号120)は、
あるサイトにあるデータベースシステムであり、データ
ベースシステムB(符号121)は、別のサイトにある
データベースシステムである。本発明の複製データベー
ス整合装置は、反映情報複製装置(101及び102)
と反映情報反映装置103と複製更新履歴情報ファイル
(104及び105)から構成される。FIG. 1 is an overall configuration diagram of a replication database system including a replication database matching device according to the present embodiment. The database system A (reference numeral 120)
The database system is at a certain site, and the database system B (reference numeral 121) is a database system at another site. The replication database matching device of the present invention is a reflection information replication device (101 and 102)
And the reflection information reflection device 103 and the copy update history information files (104 and 105).
【0018】反映情報複製装置101は、データベース
(DB)111の更新後に得られ更新履歴情報ファイル
112に記録される更新後情報113に、更新時間、発
生システム名、レコード番号、項目、更新前データ、更
新後データで構成されるヘッダ情報を付加した反映情報
106を作成し、複製更新履歴情報ファイル104に格
納する機能を有する。The reflected information copying apparatus 101 stores, in the updated information 113 obtained after updating the database (DB) 111 and recorded in the update history information file 112, an update time, a generated system name, a record number, an item, and data before update. And a function of creating reflection information 106 to which header information composed of updated data is added and storing the reflection information 106 in the copy update history information file 104.
【0019】反映情報複製装置(101及び102)
は、複製更新履歴情報ファイル(104及び105)の
反映情報(106及び107)をデータベースシステム
間で複製する機能を有する。但し、図1では、反映情報
複製装置101から反映情報複製装置102に向かう方
向の複写のみ図示している。Reflection information copying device (101 and 102)
Has a function of copying the reflection information (106 and 107) of the copy update history information file (104 and 105) between database systems. However, FIG. 1 illustrates only copying in the direction from the reflection information duplication device 101 to the reflection information duplication device 102.
【0020】また、反映情報反映装置103は、複製更
新履歴情報ファイル105の反映情報107のデータを
調べて更新履歴に矛盾が無いかを調査する機能を有す
る。また、矛盾を解消するために必要であれば、他デー
タベースシステム120から転送された反映情報107
で、自データベースシステム121のデータベース11
4の更新を実行する機能を有する。Further, the reflection information reflection device 103 has a function of checking the data of the reflection information 107 of the copy update history information file 105 to check whether there is any inconsistency in the update history. If necessary to resolve the inconsistency, the reflection information 107 transferred from the other database system 120 may be used.
The database 11 of the own database system 121
4 has a function of executing the update.
【0021】次に、本実施形態の動作について図2を参
照して詳細に説明する。Next, the operation of the present embodiment will be described in detail with reference to FIG.
【0022】アプリケーション122がデータベース1
11の更新を実行する(S201)とデータベースマネ
ジメントシステム(DBMS)110は、データベース
更新後にリカバリ用の更新後情報113を更新履歴情報
ファイル112に出力する(S202)。ここで、複製
データベース整合装置の反映情報複製装置101は、リ
カバリ用の更新履歴情報ファイル112の更新後情報1
13から反映情報106を作成し、反映情報ファイル
(複製履歴情報ファイル)104に格納する(S20
3)。次に、チェックポイントをみて反映情報を複写先
に転送する必要があるかどうかを判断する(S20
4)。チェックポイントは反映情報が新たに作成された
ときにセットされ、反映情報の転送が完了した場合や、
転送する必要が無くなった場合にリセットされるもので
ある。反映情報複製装置101は、転送するべき反映情
報106を複製先の複製データベース整合装置の反映情
報複製装置102に転送する(S205)。The application 122 is the database 1
11 (S201), the database management system (DBMS) 110 outputs post-update information 113 for recovery to the update history information file 112 after updating the database (S202). Here, the reflection information duplication device 101 of the duplication database coordination device updates the post-update information 1 of the update history information file 112 for recovery.
13, the reflection information 106 is created and stored in the reflection information file (replication history information file) 104 (S20).
3). Next, it is determined whether the reflection information needs to be transferred to the copy destination by checking the checkpoint (S20).
4). Checkpoints are set when new reflection information is created, and when the transfer of reflection information is completed,
It is reset when it is no longer necessary to transfer. The reflection information duplication device 101 transfers the reflection information 106 to be transferred to the reflection information duplication device 102 of the duplication destination database matching device (S205).
【0023】複製先データベースシステム121の複製
データベース整合装置の反映情報複製装置102は、転
送された反映情報を受信し(S206)、複製更新履歴
情報ファイル105に格納する(マージする)(S20
7)。反映情報反映装置103は、複製更新履歴情報フ
ァイル105中の反映情報107の整合性を調査する
(S208)。反映情報反映装置103は、整合性の調
査結果で矛盾が検出されなかった反映情報107を取得
して、矛盾が有ったためにリカバリする反映情報107
を作成する(S209)。反映情報反映装置103は、
データベース114に反映させるべき反映情報107か
らデータベースの更新を実施する(S210)。この場
合、反映情報反映装置103は、このデータベース更新
時に発生する更新後情報からの反映情報の作成は行わな
い。これは新たに整合性チェックの動作を引き起こすの
を防止するためである。The reflection information replication device 102 of the replication database matching device of the replication destination database system 121 receives the transferred reflection information (S206) and stores (merges) it in the replication update history information file 105 (S20).
7). The reflection information reflection device 103 checks the consistency of the reflection information 107 in the copy update history information file 105 (S208). The reflection information reflection device 103 acquires the reflection information 107 in which no inconsistency was detected in the result of the consistency check, and recovers the reflection information 107 due to the inconsistency.
Is created (S209). The reflection information reflection device 103
The database is updated from the reflection information 107 to be reflected in the database 114 (S210). In this case, the reflection information reflection device 103 does not create the reflection information from the post-update information generated when the database is updated. This is to prevent a new consistency check operation from occurring.
【0024】なお、説明のために、もととなるデータ更
新をデータベースシステム120で行い、これに応じ
て、データベースシステム121のデータを更新すると
して説明をしてきたが、実際には、もととなるデータ更
新とそれを反映したデータ更新は相互に行われ、実際の
各々のデータベースシステムの構成は、データベースシ
ステム120とデータベースシステム121の構成要素
を合わせたものになる。For the sake of explanation, it has been described that the original data is updated in the database system 120 and the data in the database system 121 is updated accordingly. This data update and the data update reflecting the data update are mutually performed, and the actual configuration of each database system is a combination of the components of the database system 120 and the database system 121.
【0025】[0025]
【実施例】次に本発明の実施例について図面を参照して
説明する。Next, an embodiment of the present invention will be described with reference to the drawings.
【0026】図3を参照するとデータベースシステムA
(符号301)には、“曜日”項目の値が“SUN”で
あるレコード番号が001のレコード303aが存在
し、また、同じレコード303bがデータベースシステ
ムB(符号302)にも存在する。Referring to FIG. 3, database system A
At (reference numeral 301), there is a record 303a having a record number of 001 whose value of the "day of the week" item is "SUN", and the same record 303b also exists in the database system B (reference numeral 302).
【0027】ここで、データベースシステムA(符号3
01)のレコード番号が001のレコード303aの
“曜日”項目が“MON”(312)に変更された場
合、データベースシステムA(符号301)の反映情報
複製装置306が、複製更新履歴情報ファイル305に
反映情報001(符号310)を作成する。データベー
スシステムA(符号301)の反映情報複製装置306
は、複製更新履歴情報ファイル310の複製をデータベ
ースシステムB(符号302)で行うために、追加され
た反映情報001(符号310)をデータベースシステ
ムB(符号302)の反映情報複製装置307に転送す
る。Here, the database system A (reference numeral 3)
When the “day” item of the record 303a whose record number is “001” is changed to “MON” (312), the reflection information duplication device 306 of the database system A (reference numeral 301) The reflection information 001 (reference numeral 310) is created. Reflection information duplication device 306 of database system A (reference numeral 301)
Transfers the added reflection information 001 (reference numeral 310) to the reflection information replication device 307 of the database system B (reference numeral 302) in order to copy the replication update history information file 310 in the database system B (reference numeral 302). .
【0028】データベースシステムB(符号302)の
反映情報複製装置307は、反映情報001(符号31
0b)を受信し、複製更新履歴情報ファイル308に格
納する。データベースシステムB(符号302)の反映
情報反映装置315は、追加された反映情報310cと
既存の反映情報に矛盾が発生していないかを調査する。
反映情報の調査は、更新時間順に各項目について変更前
データと変更後データの整合性を調査することで行う。
図では、反映情報000(符号309)で“曜日”項目
が“SAT”から“SUN”に変更され、反映情報00
1(符号310)で“SUN”から“MON”に変更さ
れているので変更に連続性があり矛盾は検出されない。
反映情報の整合性調査が正常で終了した場合、データベ
ースシステムB(符号302)の反映情報反映装置31
5は、複製更新履歴情報ファイル308から反映情報0
01(符号310c)を取得し、データベースシステム
B(符号302)のレコード番号が001のレコード3
03bの“曜日”項目を“SUN”から“MON”に変
更する。The reflection information duplication device 307 of the database system B (reference numeral 302) transmits the reflection information 001 (reference numeral 31).
0b) is received and stored in the copy update history information file 308. The reflection information reflection device 315 of the database system B (reference numeral 302) examines whether the added reflection information 310c and the existing reflection information are inconsistent.
The reflection information is checked by checking the consistency between the data before change and the data after change for each item in the order of the update time.
In the figure, in the reflection information 000 (reference numeral 309), the item “day of the week” is changed from “SAT” to “SUN”, and the reflection information 00
Since 1 is changed from “SUN” to “MON” at 310 (code 310), the change has continuity and no inconsistency is detected.
When the consistency check of the reflection information is completed normally, the reflection information reflection device 31 of the database system B (reference numeral 302).
5 is the reflection information 0 from the copy update history information file 308.
01 (reference numeral 310c), and the record 3 of which the record number of the database system B (reference number
The "day of the week" item of 03b is changed from "SUN" to "MON".
【0029】図4は、反映情報のすれ違いが発生した場
合の処理装置の動作及び処理方法を説明する図である。
データベースシステムA(符号301)とデータベース
システムB(符号302)のレコード番号が001のレ
コード(303a及び303b)の曜日の項目には、初
期の値として“SUN”が設定されている。ここで、デ
ータベースシステムA(符号301)のレコード番号が
001のレコード(303a)の曜日が“MON”(3
12)に更新される。同時にデータベースシステムB
(符号302)のレコード番号が001のレコード(3
03b)の曜日が“TUE”(313)に更新される。
データベースシステムA(符号301)の反映情報複製
装置306とデータベースシステムB(符号302)の
反映情報複製装置307は、それぞれ反映情報001
(符号310a)と反映情報002(符号311a)を
作成する。次にデータベースシステムA(符号301)
の反映情報複製装置306は、反映情報001(符号3
10a)をデータベースシステムB(符号302)の反
映情報複製装置307に、同様に、データベースシステ
ムB(符号302)の反映情報複製装置307は、反映
情報002(符号311a)をデータベースシステムA
(符号301)の反映情報複製装置306に転送する。
両方の反映情報複製装置(306及び307)は、相手
側から受信した反映情報を複製更新履歴情報ファイル
(305及び308)に格納する。FIG. 4 is a diagram for explaining the operation and processing method of the processing device when the reflection information passes each other.
“SUN” is set as an initial value in the item of the day of the week in the records (303a and 303b) with the record number 001 of the database system A (reference numeral 301) and the database system B (reference numeral 302). Here, the day of the record (303a) having the record number 001 of the database system A (reference numeral 301) is “MON” (3
12) is updated. At the same time, database system B
The record with the record number of (001) (001) (001)
The day of the week 03b) is updated to “TUE” (313).
The reflection information duplication device 306 of the database system A (reference numeral 301) and the reflection information duplication device 307 of the database system B (reference numeral 302) respectively include the reflection information 001.
(Reference numeral 310a) and reflection information 002 (reference numeral 311a). Next, the database system A (reference numeral 301)
The reflection information duplication device 306 transmits the reflection information 001 (reference numeral 3).
10a) to the reflection information duplication device 307 of the database system B (reference numeral 302), and similarly, the reflection information duplication device 307 of the database system B (reference numeral 302) transmits the reflection information 002 (reference numeral 311a) to the database system A.
It is transferred to the reflection information duplication device 306 (reference numeral 301).
Both reflection information copying devices (306 and 307) store the reflection information received from the other party in the replication update history information files (305 and 308).
【0030】次に反映情報反映装置(314及び31
5)が複製更新履歴情報ファイル(305及び308)
の整合性を調査する。この場合、反映情報001(符号
310)で“曜日”項目の更新後データが“MON”に
更新されているにも関わらず、反映情報002(符号3
11)の更新前データは、”MON”ではなく“SU
N”になっているので、矛盾が発生している。Next, the reflection information reflection devices (314 and 31)
5) Copy update history information files (305 and 308)
Investigate the integrity of In this case, although the updated data of the “day of the week” item is updated to “MON” in the reflection information 001 (reference numeral 310), the reflection information 002 (reference numeral 3) is used.
The data before update of 11) is not “MON” but “SU”.
N ", a contradiction has occurred.
【0031】データベースシステムA(符号301)の
反映情報反映装置314は、反映情報001(符号31
0)と反映情報002(符号311)が同時に発生した
ものであると判断し、レコード001の“曜日”項目を
適切な値に修正する。適切な値を選択する方法として、
“最後に更新した値を有効にする”方法や“最初に更新
した値を有効にする”などを選択することができる。こ
こでは、“最後に更新した値を有効にする”方法を採用
している。そのため、データベースシステムA(符号3
01)の反映情報反映装置314は、反映情報002
(符号311)の反映処理を実施してレコード番号が0
01のレコード(符号303a)の曜日を”TUE”に
する。The reflection information reflection device 314 of the database system A (reference numeral 301) receives the reflection information 001 (reference numeral 31).
0) and the reflection information 002 (reference numeral 311) are determined to have occurred at the same time, and the “day of the week” item of the record 001 is corrected to an appropriate value. As a way to choose the right value,
It is possible to select a “validate last updated value” method, “validate first updated value”, and the like. Here, a method of “validating the last updated value” is adopted. Therefore, the database system A (reference numeral 3)
01) is applied to the reflection information 002.
(311) is reflected and the record number is 0
The day of the record 01 (reference numeral 303a) is set to “TUE”.
【0032】データベースシステムB(符号302)の
反映情報反映装置315も同様な矛盾を検出するが、反
映情報002(符号311)が有効で有るために反映処
理は行わない。The reflection information reflection device 315 of the database system B (reference numeral 302) detects the same inconsistency, but does not perform the reflection processing because the reflection information 002 (reference numeral 311) is valid.
【0033】[0033]
【発明の効果】以上説明したように本発明によれば、各
データベースシステムで取得された複製更新履歴情報フ
ァイルをマージし、そのファイル内の反映情報の整合性
チェックを実施する事により、どのデータベースシステ
ムのデータも同一の状態に保てるから、複製データベー
スシステムにおけるデータの一意性が完全に保証され
る。As described above, according to the present invention, any database can be obtained by merging the copy update history information files acquired by each database system and checking the consistency of the reflection information in the files. Since the data of the system can be kept in the same state, the uniqueness of the data in the duplicate database system is completely guaranteed.
【図1】本発明の複製データベースシステムの構成図で
ある。FIG. 1 is a configuration diagram of a replication database system of the present invention.
【図2】本発明の動作シーケンスフローである。FIG. 2 is an operation sequence flow of the present invention.
【図3】本発明の実施例である。FIG. 3 is an embodiment of the present invention.
【図4】本発明の実施例である。FIG. 4 is an embodiment of the present invention.
【図5】従来の複製データベース反映装置を含む複製デ
ータベースシステムの構成図である。FIG. 5 is a configuration diagram of a replication database system including a conventional replication database reflection device.
101、102 反映情報複製装置 103 反映情報反映装置 104、105 複製更新履歴情報ファイル 106、107 反映情報 110、113 データベースマネジメントシステム
(DBMS) 111、114 データベース(DB) 112 更新履歴情報ファイル 113 更新後情報 120、121 データベースシステム101, 102 Reflected information copying device 103 Reflected information reflecting device 104, 105 Replication update history information file 106, 107 Reflected information 110, 113 Database management system (DBMS) 111, 114 Database (DB) 112 Update history information file 113 Updated information 120, 121 Database system
Claims (7)
複製データベースシステムで使用される複製データベー
ス整合装置において、 データベース更新時に収集される更新後情報に更新情報
の整合性を調査するために使用する情報を持つヘッダ情
報を付加した反映情報の集合である複製更新履歴情報フ
ァイルと、 自サイトのデータベース更新時に、前記更新後情報に前
記ヘッダ情報を付加して自サイトの前記反映情報を作成
し、前記自サイトの反映情報を前記自サイトの前記複製
更新履歴情報ファイルに格納すると同時に、前記自サイ
トの反映情報を他サイトに転送し、他サイトの前記反映
情報を他サイトから受信したときに、該他サイトの反映
情報を前記自サイトの複製更新履歴情報ファイルに格納
する反映情報複製装置と、 前記自サイトの前記複製更新履歴情報ファイル内の前記
反映情報の整合性を調査し、整合性を保つために必要な
反映情報を選択し、該整合性を保つために必要な反映情
報により前記自サイトのデータベースの更新を行う反映
情報反映装置とを備えることを特徴とする複製データベ
ース整合装置。In a replication database coordinator used in a replication database system in which a database is updated at each site, information used for checking the consistency of the update information is included in updated information collected at the time of updating the database. A replication update history information file that is a set of reflection information to which the own header information is added; and, when updating the database of the own site, creating the reflection information of the own site by adding the header information to the post-update information. When the reflection information of the site is stored in the replication update history information file of the own site, the reflection information of the own site is transferred to another site, and when the reflection information of the other site is received from another site, the other A reflection information replication device that stores the reflection information of the site in the replication update history information file of the own site; Investigating the consistency of the reflection information in the replication update history information file, selecting the reflection information necessary for maintaining the consistency, and using the reflection information necessary for maintaining the consistency, the database of the own site. And a reflection information reflecting device for updating the replication database.
テム名、レコード番号、項目、更新前データ、更新後デ
ータであることを特徴とする請求項1に記載の複製デー
タベース整合装置。2. The replication database matching device according to claim 1, wherein the header information is an update time, a generation system name, a record number, an item, pre-update data, and post-update data.
複製データベースシステムで使用される複製データベー
ス整合方法において、 自サイトのデータベース更新時に、収集される更新後情
報に更新情報の整合性を調査するために使用する情報を
持つヘッダ情報を付加して自サイトの反映情報を作成
し、前記自サイトの反映情報を前記自サイトの複製更新
履歴情報ファイルに格納すると同時に、前記自サイトの
反映情報を他サイトに転送する手順と、 他サイトの前記反映情報を他サイトから受信したとき
に、該他サイトの反映情報を前記自サイトの複製更新履
歴情報ファイルに格納する手順と、 前記自サイトの前記複製更新履歴情報ファイル内の前記
反映情報の整合性を調査し、整合性を保つために必要な
反映情報を選択し、該整合性を保つために必要な反映情
報により前記自サイトのデータベースの更新を行う手順
とを有することを特徴とする複製データベース整合方
法。3. A replication database consistency method used in a replication database system in which a database is updated at each site, in order to investigate the consistency of the updated information in the updated information collected when the database of the own site is updated. Attach header information having information to be used to create reflection information of the own site, store the reflection information of the own site in the replication update history information file of the own site, and simultaneously copy the reflection information of the own site to another site. Transferring the reflection information of the other site to the replication update history information file of the own site when receiving the reflection information of the other site from the other site; and Investigate the consistency of the reflection information in the history information file, select the reflection information necessary to maintain the consistency, and maintain the consistency Updating the database of the own site with the reflection information necessary for the operation.
テム名、レコード番号、項目、更新前データ、更新後デ
ータであることを特徴とする請求項3に記載の複製デー
タベース整合方法。4. The replication database matching method according to claim 3, wherein the header information is an update time, a generation system name, a record number, an item, pre-update data, and post-update data.
ス整合方法をコンピュータに実行させるためのプログラ
ムを記録したことを特徴とする記録媒体。5. A recording medium recording a program for causing a computer to execute the replication database matching method according to claim 3 or 4.
情報に更新情報の整合性を調査するために使用する情報
を持つヘッダ情報を付加した反映情報の集合である複製
更新履歴情報ファイルを記録したことを特徴とする記録
媒体。6. A copy update history information file which is a set of reflection information obtained by adding header information having information used for checking consistency of update information to updated information collected at the time of updating a database. Recording medium characterized by the above-mentioned.
テム名、レコード番号、項目、更新前データ、更新後デ
ータであることを特徴とする記録媒体。7. The recording medium according to claim 1, wherein the header information is an update time, a generation system name, a record number, an item, pre-update data, and post-update data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9154920A JPH113263A (en) | 1997-06-12 | 1997-06-12 | Replica database matching device and replica database matching method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9154920A JPH113263A (en) | 1997-06-12 | 1997-06-12 | Replica database matching device and replica database matching method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH113263A true JPH113263A (en) | 1999-01-06 |
Family
ID=15594850
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP9154920A Pending JPH113263A (en) | 1997-06-12 | 1997-06-12 | Replica database matching device and replica database matching method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH113263A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009080707A (en) * | 2007-09-27 | 2009-04-16 | Jfe Steel Kk | Database synchronous update processing method, database synchronous update processing system, database synchronous update processing program, product allocation method |
| JP2015153372A (en) * | 2014-02-19 | 2015-08-24 | 日本電信電話株式会社 | Database system and data update method |
-
1997
- 1997-06-12 JP JP9154920A patent/JPH113263A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009080707A (en) * | 2007-09-27 | 2009-04-16 | Jfe Steel Kk | Database synchronous update processing method, database synchronous update processing system, database synchronous update processing program, product allocation method |
| JP2015153372A (en) * | 2014-02-19 | 2015-08-24 | 日本電信電話株式会社 | Database system and data update method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Pu et al. | Regeneration of replicated objects: A technique and its Eden implementation | |
| Herlihy | Dynamic quorum adjustment for partitioned data | |
| US6529917B1 (en) | System and method of synchronizing replicated data | |
| US5675802A (en) | Version control system for geographically distributed software development | |
| EP1618504B1 (en) | System and method for a consistency check of a database backup | |
| CA2933790C (en) | Apparatus and method for creating a real time database replica | |
| US7383293B2 (en) | Database backup system using data and user-defined routines replicators for maintaining a copy of database on a secondary server | |
| US8046327B2 (en) | Partially replicated distributed database with multiple levels of remote clients | |
| US7149759B2 (en) | Method and system for detecting conflicts in replicated data in a database network | |
| EP0663641A1 (en) | Summary catalogs | |
| KR100280221B1 (en) | Optimization of Memory Space in Databases | |
| US7487385B2 (en) | Apparatus and method for recovering destroyed data volumes | |
| US20100169289A1 (en) | Two Phase Commit With Grid Elements | |
| EP1035482A2 (en) | Remote file version reconciliation using hash codes | |
| US7631020B1 (en) | Method and system of generating a proxy for a database | |
| US12373419B1 (en) | Method for comparing rows of subsets of two database tables without regard to an original order of rows and columns in either database table | |
| CN116414848A (en) | Method, device and computer equipment for verifying consistency of database master and backup replication | |
| Shapiro et al. | CPCMS: A Configuration Management System Based on Cryptographic Names. | |
| JPH1153239A (en) | Database rollback processing method and recording medium recording the procedure of the rollback processing method | |
| US8452823B2 (en) | Method for coordinating relationships between multiple physical entities | |
| JP2001229062A (en) | Distributed file management method | |
| Pâris | Using Volatile Witnesses to Extend the Applicability of Available Copy Protocols. | |
| Shaposhnikov | Algorithms for efficient transaction management and consistent queries in client-server semantic object-oriented parallel databases | |
| Hu | Exploiting laziness for improving performance in data replication management | |
| JPH04162154A (en) | Design data control system |