JP2000003300A - Automatic duplicating device for data base, its method, system therefor and storage medium - Google Patents

Automatic duplicating device for data base, its method, system therefor and storage medium

Info

Publication number
JP2000003300A
JP2000003300A JP10179769A JP17976998A JP2000003300A JP 2000003300 A JP2000003300 A JP 2000003300A JP 10179769 A JP10179769 A JP 10179769A JP 17976998 A JP17976998 A JP 17976998A JP 2000003300 A JP2000003300 A JP 2000003300A
Authority
JP
Japan
Prior art keywords
update
database
computer
updating
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.)
Pending
Application number
JP10179769A
Other languages
Japanese (ja)
Inventor
Akihiro Ueno
明広 上野
Hironobu Odakawa
博信 小田川
Maki Kaminagakura
まき 神長倉
Atsushi Ogawa
淳 小川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP10179769A priority Critical patent/JP2000003300A/en
Publication of JP2000003300A publication Critical patent/JP2000003300A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To mutually copy the updating data without carrying on the copying processes among plural data bases by preparing a means which updates a copying data base contained in a slave machine based on the updating data which are distributed by a distribution means of a master machine. SOLUTION: A data base of every computer (a master machine 13 and slave machines 14 to n) consists of a data updating exclusive table TA, i.e., a data updating exclusive data base and a copy table TB, i.e., a copying data base. Then the machine 13 updates its own table TA and the tables TB based on its own inputted updating data and also updates its own table TB based on the updating data which are transferred from the machines 14 to n. Furthermore, the machine 13 distributes the updating data transferred from the machines 14 to n to all machines 14 to n.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ネットワーク上の
複数のコンピュータによりそれぞれ管理されているデー
タべースのデータ内容を同一にするためのデータの自動
複製技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an automatic data duplication technique for making data contents of a database managed by a plurality of computers on a network identical.

【0002】[0002]

【従来の技術】従来、ネットワーク上の複数のコンピュ
ータによりそれぞれ管理されているデータべースのデー
タ内容を同一にするためのデータ自動複製技術として、
一方通行のデータ複製方法が実現されているが、双方向
のデータ複製技術は実現されていなかった。
2. Description of the Related Art Conventionally, as an automatic data duplication technique for making data contents of a database managed by a plurality of computers on a network the same,
Although a one-way data replication method has been realized, a bidirectional data replication technology has not been realized.

【0003】この一方通行のデータ複製方法は、データ
ベースを更新する必要がある場合は、例えば、マスタ側
のコンピュータ上のデータベースを更新し、その更新デ
ータをマスタ側のコンピュータから全てのスレーブ側の
コンピュータに自動的に転送してデータ複製を行うもの
であり、スレーブ側のコンピュータからはデータ更新を
行えないものであった。
In this one-way data replication method, when it is necessary to update the database, for example, the database on the master computer is updated, and the updated data is transmitted from the master computer to all slave computers. In this case, data is automatically transferred and data is copied, and data cannot be updated from a slave computer.

【0004】また、データベースを更新する必要がある
場合は、例えば、スレーブ側のコンピュータ上のデータ
ベースを更新し、その更新データをスレーブ側のコンピ
ュータからマスタ側のコンピュータに自動的に転送して
データ複製を行うものであり、マスタ側のコンピュータ
からはデータ更新を行えないものであった。
When it is necessary to update the database, for example, the database on the slave computer is updated, and the updated data is automatically transferred from the slave computer to the master computer to copy the data. And the data cannot be updated from the master computer.

【0005】[0005]

【発明が解決しようとする課題】しかし、このような一
方通行でのデータベース複製方法を使用して、各コンピ
ュータ上のデータベース間で相互に自動的に複製し合う
ようにした場合、以下のような事態が発生することが予
想される。
However, when such a one-way database replication method is used to automatically replicate each other between databases on each computer, the following problem occurs. It is expected that things will happen.

【0006】例えば、コンピュータA上のデータベース
DaとコンピュータB上のデータベースDbとが存在す
る簡略なシステムで、相互に自動的に複製し合う例で考
察してみる。このシステムにおいて、コンピュータA上
のデータベースDaがデータ更新(データの追加、修
正、削除等)されたとすると、この更新データに基づい
てコンピュータB上のデータベースDbが更新されるこ
とにより、複写処理が行われる。このように、コンピュ
ータB上で複写処理(データ更新)がなされると、この
コンピュータB上の複写処理に係るデータ、すなわち、
現在のコンピュータA上のデータベースDaの内容と同
一のデータに基づいてコンピュータA上のデータベース
Daが更新される。
For example, consider a simple system in which a database Da on a computer A and a database Db on a computer B exist, and an example in which they are automatically copied to each other. In this system, if the database Da on the computer A is updated (addition, correction, deletion, etc. of data), the database Db on the computer B is updated based on the updated data, so that the copying process is performed. Will be As described above, when the copy processing (data update) is performed on the computer B, data related to the copy processing on the computer B, that is,
The database Da on the computer A is updated based on the same data as the contents of the database Da on the current computer A.

【0007】そして、それ以降も同様の複写処理(複製
処理)がコンピュータAとコンピュータBとの間で行わ
れる。このように、データベースの更新が1度なされる
と、その更新データの複製処理が、複数のデータベース
間で永久に継続される。
[0007] Thereafter, a similar copying process (copying process) is performed between the computer A and the computer B. As described above, once the database is updated, the process of copying the updated data is permanently continued between the plurality of databases.

【0008】本発明は、このような背景の下になされた
もので、その課題は、データベースの更新データの複製
処理が複数のデータベース間で永久に継続されるのを回
避しつつ、複数のデータベース間でデータベースの更新
データを相互に複製し合えるようにすることにある。
SUMMARY OF THE INVENTION The present invention has been made in view of such a background, and an object of the present invention is to prevent a plurality of databases from replicating update data of the databases while avoiding the processing to be permanently continued between the plurality of databases. An object of the present invention is to make it possible to mutually replicate database update data between databases.

【0009】[0009]

【課題を解決するための手段】上記課題を解決するた
め、本発明は、ネットワーク上の各コンピュータにより
各々管理されるデータベース間で相互に複写を行うデー
タベースの自動複製装置であって、前記コンピュータ
は、各々データ更新専用の更新用データベースと、複写
専用の複写用データベースとを備え、前記コンピュータ
のうちのマスタコンピュータは、該マスタコンピュータ
から入力された更新データに基づいて、該マスタコンピ
ュータ内の更新用データベースと複写用データベースと
を更新する第1の更新手段と、他のスレーブコンピュー
タから転送されてきた更新データに基づいて前記マスタ
コンピュータ内の複写用データベースを更新する第2の
更新手段と、前記他のスレーブコンピュータから転送さ
れてきた更新データを前記ネットワーク上の全てのスレ
ーブコンピュータに配信する配信手段とを備え、前記ス
レーブコンピュータは、前記スレーブコンピュータから
入力された更新データに基づいて、前記スレーブコンピ
ュータ内の更新用データベースを更新する第3の更新手
段と、前記スレーブコンピュータから入力された更新デ
ータを前記マスタコンピュータに転送する転送手段と、
前記マスタコンピュータの配信手段により配信された更
新データに基づいて前記スレーブコンピュータ内の複写
用データベースを更新する第4の更新手段とを備えてい
る。
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention relates to an automatic database duplication apparatus for mutually duplicating databases managed by computers on a network. An update database dedicated to data update, and a copy database dedicated to copying, wherein the master computer of the computers is configured to update the data in the master computer based on update data input from the master computer. First updating means for updating a database and a copying database; second updating means for updating a copying database in the master computer based on update data transferred from another slave computer; Update data transferred from the slave computer Distribution means for distributing to all slave computers on the network, wherein the slave computer updates an update database in the slave computer based on update data input from the slave computer. Means, transfer means for transferring update data input from the slave computer to the master computer,
And a fourth updating unit for updating a copy database in the slave computer based on the update data distributed by the distribution unit of the master computer.

【0010】また、本発明は、ネットワーク上の各コン
ピュータにより各々管理されるデータベース間で相互に
複写を行うデータベースの自動複製方法であって、前記
コンピュータは、各々データ更新専用の更新用データベ
ースと、複写専用の複写用データベースとを備え、前記
コンピュータのうちのマスタコンピュータは、該マスタ
コンピュータから入力された更新データに基づいて、該
マスタコンピュータ内の更新用データベースと複写用デ
ータベースとを更新する第1の更新工程と、他のスレー
ブコンピュータから転送されてきた更新データに基づい
て前記マスタコンピュータ内の複写用データベースを更
新する第2の更新工程と、前記他のスレーブコンピュー
タから転送されてきた更新データを前記ネットワーク上
の全てのスレーブコンピュータに配信する配信工程とを
備え、前記スレーブコンピュータは、前記スレーブコン
ピュータから入力された更新データに基づいて、前記ス
レーブコンピュータ内の更新用データベースを更新する
第3の更新工程と、前記スレーブコンピュータから入力
された更新データを前記マスタコンピュータに転送する
転送工程と、前記マスタコンピュータの配信工程により
配信された更新データに基づいて前記スレーブコンピュ
ータ内の複写用データベースを更新する第4の更新工程
とを備えている。
The present invention also relates to a method of automatically duplicating a database for mutually duplicating a database managed by each computer on a network, the computer comprising: an update database dedicated to data update; A copying database dedicated to copying, wherein a master computer of the computers updates the updating database and the copying database in the master computer based on update data input from the master computer. Update step, a second update step of updating a copy database in the master computer based on update data transferred from another slave computer, and updating the transfer data transferred from the other slave computer. All slaves on the network A distribution step of distributing the data to a computer, wherein the slave computer updates the update database in the slave computer based on update data input from the slave computer; and A transfer step of transferring the input update data to the master computer; and a fourth update step of updating a copy database in the slave computer based on the update data distributed by the distribution step of the master computer. ing.

【0011】また、本発明は、ネットワーク上の各コン
ピュータにより各々管理されるデータベース間で相互に
複写を行うデータベースの自動複製システムであって、
前記コンピュータは、各々データ更新専用の更新用デー
タベースと、複写専用の複写用データベースとを備え、
前記コンピュータのうちのマスタコンピュータは、該マ
スタコンピュータから入力された更新データに基づい
て、該マスタコンピュータ内の更新用データベースと複
写用データベースとを更新する第1の更新手段と、他の
スレーブコンピュータから転送されてきた更新データに
基づいて前記マスタコンピュータ内の複写用データベー
スを更新する第2の更新手段と、前記他のスレーブコン
ピュータから転送されてきた更新データを前記ネットワ
ーク上の全てのスレーブコンピュータに配信する配信手
段とを備え、前記スレーブコンピュータは、前記スレー
ブコンピュータから入力された更新データに基づいて、
前記スレーブコンピュータ内の更新用データベースを更
新する第3の更新手段と、前記スレーブコンピュータか
ら入力された更新データを前記マスタコンピュータに転
送する転送手段と、前記マスタコンピュータの配信手段
により配信された更新データに基づいて前記スレーブコ
ンピュータ内の複写用データベースを更新する第4の更
新手段とを備えている。
The present invention is also an automatic database replication system for mutually copying databases managed by computers on a network,
The computer includes an update database dedicated to data update, and a copy database dedicated to copying,
A master computer among the computers includes a first update unit that updates an update database and a copy database in the master computer based on update data input from the master computer; Second updating means for updating the copy database in the master computer based on the transferred update data, and distributing the update data transferred from the other slave computer to all slave computers on the network Distribution means, the slave computer, based on the update data input from the slave computer,
Third update means for updating the update database in the slave computer, transfer means for transferring update data input from the slave computer to the master computer, and update data delivered by the delivery means of the master computer Fourth updating means for updating the copy database in the slave computer based on the

【0012】また、本発明は、ネットワーク上の各コン
ピュータにより各々管理されるデータベース間で相互に
複写を行うことによりデータベースを自動的に複製する
ための制御プログラムを記憶する記憶媒体であって、前
記コンピュータは、各々データ更新専用の更新用データ
ベースと、複写専用の複写用データベースとを備え、前
記コンピュータのうちのマスタコンピュータにて実行さ
れる前記制御プログラムは、該マスタコンピュータから
入力された更新データに基づいて、該マスタコンピュー
タ内の更新用データベースと複写用データベースとを更
新する第1の更新ルーチンと、他のスレーブコンピュー
タから転送されてきた更新データに基づいて前記マスタ
コンピュータ内の複写用データベースを更新する第2の
更新ルーチンと、前記他のスレーブコンピュータから転
送されてきた更新データを前記ネットワーク上の全ての
スレーブコンピュータに配信する配信ルーチンとを含
み、前記スレーブコンピュータにて実行される前記制御
プログラムは、前記スレーブコンピュータから入力され
た更新データに基づいて、前記スレーブコンピュータ内
の更新用データベースを更新する第3の更新ルーチン
と、前記スレーブコンピュータから入力された更新デー
タを前記マスタコンピュータに転送する転送ルーチン
と、前記マスタコンピュータの配信ルーチンにより配信
された更新データに基づいて前記スレーブコンピュータ
内の複写用データベースを更新する第4の更新ルーチン
とを含んでいる。
The present invention is also a storage medium for storing a control program for automatically duplicating a database by mutually duplicating a database managed by each computer on a network. The computer includes an update database dedicated to data update, and a copy database dedicated to copying, and the control program executed by a master computer of the computers is configured to update data input from the master computer. A first update routine for updating the update database and the copy database in the master computer, and updating the copy database in the master computer based on update data transferred from another slave computer. A second update routine, And a distribution routine for distributing update data transferred from another slave computer to all slave computers on the network, wherein the control program executed by the slave computer is input from the slave computer. A third update routine for updating the update database in the slave computer based on the update data, a transfer routine for transferring the update data input from the slave computer to the master computer, and a distribution routine for the master computer And a fourth update routine for updating the copy database in the slave computer based on the update data distributed by the computer.

【0013】また、本発明では、前記マスタコンピュー
タ、スレーブコンピュータは、各種分野のデータを集積
した複数の更新用データベースと複写用データベースと
を備えている。
Further, in the present invention, the master computer and the slave computer include a plurality of update databases and copy databases in which data of various fields are integrated.

【0014】[0014]

【発明の実施の形態】次に、本発明の実施の形態につい
て、図面を参照しながら詳細に説明する。
Next, an embodiment of the present invention will be described in detail with reference to the drawings.

【0015】図1は、本発明の実施の形態に係るデータ
ベースの自動複製装置を適用した情報処理システムのシ
ステム構成図である。本情報処理システムは、そけぞれ
データベース・サーバとして機能する複数のコンピュー
タ13,14,15,…nが、ネットワークNを介して
接続されている。
FIG. 1 is a system configuration diagram of an information processing system to which an automatic database copy apparatus according to an embodiment of the present invention is applied. In this information processing system, a plurality of computers 13, 14, 15,... N each functioning as a database server are connected via a network N.

【0016】このうち、コンピュータ13は、ネットワ
ークNに接続されている全てのコンピュータ13,1
4,15,…n上のデータベースの更新データを受取
り、この更新データを他のコンピュータ14,15,…
nに配信するマスタ・マシンとして機能し、コンピュー
タ14〜nは、マスタ・マシンに対するスレーブ・マシ
ンとして機能するように構成されている。
The computer 13 includes all the computers 13 and 1 connected to the network N.
, N, and receives the update data of the database on the other computers 14, 15,.
n, and the computers 14 to n are configured to function as slave machines to the master machine.

【0017】これらコンピュータ13〜nは、図2に示
したように、それぞれ、中央処理装置1、主記憶装置
2、補助記憶装置3、入力装置4、出力装置5、及びネ
ットワークI/F6を有している。コンピュータ13〜
nの補助記憶装置3には、それぞれ、データベースが格
納されている。また、主記憶装置2には、後述するデー
タベースの自動複製処理を行うための制御プログラムが
格納されており、中央処理装置1は、主記憶装置2内の
制御プログラムに従って、後述するデータベースの自動
複製処理を行う。
As shown in FIG. 2, each of these computers 13 to n has a central processing unit 1, a main storage unit 2, an auxiliary storage unit 3, an input unit 4, an output unit 5, and a network I / F 6. are doing. Computer 13 ~
Each of the n auxiliary storage devices 3 stores a database. The main storage device 2 stores a control program for performing a later-described automatic replication process of a database, and the central processing unit 1 performs automatic replication of a later-described database according to a control program in the main storage device 2. Perform processing.

【0018】入力装置4は、キーボード、マウス等によ
り構成され、データベースの更新データ、更新命令等を
入力し、出力装置5は、CRTディスプレイ装置等によ
り構成され、データべースのデータ等を出力する。ま
た、ネットワークI/F6は、データベースの更新デー
タ等を他のコンピュータに転送するのに利用される。
The input device 4 is constituted by a keyboard, a mouse and the like, and inputs update data of a database, an update command, and the like. I do. Further, the network I / F 6 is used to transfer update data of the database and the like to another computer.

【0019】データべースは、図3〜5に示したよう
に、データ更新用に利用されるデータ更新専用テーブル
TAと、複写テーブルTBとにより構成されている。な
お、データ更新専用テーブルTAと複写テーブルTBに
は、同一内容のデータ(厳密には完全一致とは限らな
い)が格納されている。
As shown in FIGS. 3 to 5, the database is composed of a data update-dedicated table TA used for data update and a copy table TB. It should be noted that the data update-dedicated table TA and the copy table TB store data of the same content (strictly, not completely identical).

【0020】また、本実施形態においては、図3〜5に
矢印で示したような経路で更新データが転送されること
により、マスタ・マシン13とスレーブ・マシン14〜
n間で、更新データ(すなわち複写テーブル)を相互に
複製し合っている。
In this embodiment, the master machine 13 and the slave machines 14 to 14 are transferred by transmitting the update data along the paths shown by arrows in FIGS.
The update data (that is, the copy table) is mutually replicated among n.

【0021】すなわち、データ更新専用テーブルTA
は、このデータ更新専用テーブルを搭載しているマスタ
・マシン13、またはスレーブ・マシン14〜nで入力
された更新データのみにより更新される。換言すれぱ、
データ更新専用テーブルTAは、自己入力された更新デ
ータにより更新され、他のマシンから入力された更新デ
ータにより更新されることはない。
That is, the data update dedicated table TA
Is updated only by the update data input by the master machine 13 or the slave machines 14 to n equipped with the data update dedicated table. In other words,
The data update-dedicated table TA is updated by self-input update data, and is not updated by update data input from another machine.

【0022】一方、複写テーブルTBは、ネットワーク
N上の全てのコンピュータ(マスタ・マシン13、及び
スレーブ・マシン14〜n)で入力された更新データに
より更新され、これにより全てのコンピュータ上の複写
テーブルTBの内容が完全に一致するようになる。
On the other hand, the copy table TB is updated by the update data inputted by all the computers (master machine 13 and slave machines 14 to n) on the network N, whereby the copy tables on all the computers are updated. The contents of the TB completely match.

【0023】なお、図3〜5には、1種類のデータベー
スのテーブルのみが示されているが、実際には、補助記
憶装置3には、各種分野の情報を集積した複数のデータ
ベースのテーブルが格納されている。
Although FIGS. 3 to 5 show only one type of database table, the auxiliary storage device 3 actually stores a plurality of database tables in which information in various fields is accumulated. Is stored.

【0024】次に、図3〜5に矢印で示した経路で更新
データを転送することにより、マスタ・マシン13とス
レーブ・マシン14,15間で、更新データを相互に複
製し合う複製処理を、図6〜図9のフローチャートに従
って説明する。
Next, by transferring the update data along the path indicated by the arrows in FIGS. 3 to 5, a copy process of mutually copying the update data between the master machine 13 and the slave machines 14 and 15 is performed. 6 to 9 will be described.

【0025】まず、マスタ・マシン13のデータ更新専
用テーブルTAを監視し、マスタ・マシン13の複写テ
ーブルTBを更新する一連の処理を、図6のフローチャ
ートに従って説明する。
First, a series of processes for monitoring the data update table TA of the master machine 13 and updating the copy table TB of the master machine 13 will be described with reference to the flowchart of FIG.

【0026】マスタ・マシン13において、図6のフロ
ーチャートに従った一連の処理が、コンピュータの起動
時またはプログラムの実行指示により実行されており、
まず、本処理を終了するか否かを判断し(ステップS
1)、終了すると判断された場合は、終了する。図3の
更新データD1が発生した場合、データを更新するため
専用のテーブル(データ更新専用テーブルTA)に対し
てデータの更新が行われる(図3の矢印a1参照)。
In the master machine 13, a series of processing according to the flowchart of FIG. 6 is executed when the computer is started or when a program execution instruction is issued.
First, it is determined whether or not to end this processing (step S
1) If it is determined to end, the process ends. When the update data D1 in FIG. 3 occurs, the data is updated in a dedicated table (data update dedicated table TA) for updating the data (see arrow a1 in FIG. 3).

【0027】そこで、本処理を終了しないと判断された
場合は、マスタ・マシン13のデータ更新専用テーブル
TAをチェックし(ステップS2)、データ更新がなさ
れたか否かを判別する(ステップS3)。その結果、デ
ータ更新がなされていない場合は、ステップS1に戻
る。一方、データ更新がなされている場合は、その更新
データを取得し(ステップS4、図3の矢印a2参
照)、取得した更新データに基づいて、マスタ・マシン
13内の複写テーブルTBを更新して(ステップS
5)、ステップS1に戻る。
If it is determined that the process is not to be terminated, the data update dedicated table TA of the master machine 13 is checked (step S2), and it is determined whether or not the data has been updated (step S3). As a result, if the data has not been updated, the process returns to step S1. On the other hand, if the data has been updated, the update data is obtained (step S4, see arrow a2 in FIG. 3), and the copy table TB in the master machine 13 is updated based on the obtained update data. (Step S
5) Return to step S1.

【0028】次に、マスタ・マシン13の複写テーブル
TBを監視し、ネットワークNに接続されているスレー
ブ・マシン13〜nに更新データを転送する処理を、図
7のフローチャートに従って説明する。
Next, the process of monitoring the copy table TB of the master machine 13 and transferring update data to the slave machines 13 to n connected to the network N will be described with reference to the flowchart of FIG.

【0029】マスタ・マシン13において、図7のフロ
ーチャートに従った一連の処理がコンピュータの起動時
またはプログラムの実行指示により実行されており、ま
ず本処理を終了するか否かを判断し(ステップS1
1)、終了すると判断された場合は、終了する。
In the master machine 13, a series of processes according to the flowchart of FIG. 7 are executed when the computer is started or in response to an instruction to execute a program. First, it is determined whether or not to end this process (step S1).
1) If it is determined to end, the process ends.

【0030】一方、終了しないと判断された場合は、ス
レーブ・マシン14〜nから更新データが転送されてき
たか否かを判断する(ステップS12、図4の矢印a
5、図5の矢印a8参照)。その結果、更新データが転
送されてきた場合は、その転送されてきた更新データに
基づいて、マスタ・マシン13内の複写テーブルTBを
更新する(ステップS13)。そして、マスタ・マシン
13内の複写テーブルTBをチェックし(ステップS1
4)、データが更新されたか否かを判断する(ステップ
S15)。ステップS12にて、更新データが転送され
てきていないと判断された場合は、ステップS13の複
写テーブルTBの更新処理をスキップしてステップS1
4に進み、マスタ・マシン13内の複写テーブルTBの
データが更新されたか否かをチェックする。
On the other hand, if it is determined that the update is not to be completed, it is determined whether or not the update data has been transferred from the slave machines 14 to n (step S12, arrow a in FIG. 4).
5, see arrow a8 in FIG. 5). As a result, when the update data is transferred, the copy table TB in the master machine 13 is updated based on the transferred update data (step S13). Then, the copy table TB in the master machine 13 is checked (step S1).
4) It is determined whether the data has been updated (step S15). If it is determined in step S12 that the update data has not been transferred, the process of updating the copy table TB in step S13 is skipped and step S1 is executed.
Proceeding to step S4, it is checked whether the data of the copy table TB in the master machine 13 has been updated.

【0031】ステップS15にて、マスタ・マシン13
内の複写テーブルTBのデータが更新されなかったと判
断された場合は、ステップS11に戻る。一方、複写テ
ーブルTBのデータが更新されたと判断された場合は、
その更新データを取得し(ステップS16)、ネットワ
ークNを介して更新データを全てのスレーブ・マシン1
4〜nに転送して(ステップS17、図4の矢印a6,
a7、図5の矢印a9,a10参照)、ステップS11
に戻る。
At step S15, master machine 13
If it is determined that the data of the copy table TB has not been updated, the process returns to step S11. On the other hand, when it is determined that the data of the copy table TB has been updated,
The update data is acquired (step S16), and the update data is transferred to all slave machines 1 via the network N.
4 to n (step S17, arrow a6 in FIG. 4).
a7, see arrows a9 and a10 in FIG. 5), step S11
Return to

【0032】次に、スレーブ・マシン14〜nのデータ
更新専用テーブルTAを監視し、更新データをマスタ・
マシン13に転送する一連の処理を、図8のフローチャ
ートに従って説明する。
Next, the data update dedicated table TA of the slave machines 14 to n is monitored, and the updated data is
A series of processes to be transferred to the machine 13 will be described with reference to the flowchart of FIG.

【0033】スレーブ・マシン14〜nにおいて、図8
のフローチャートに従った一連の処理が、コンピュータ
の起動時またはプログラムの実行指示により実行されて
おり、まず、本処理を終了するか否かを判断し(ステッ
プS21)、終了すると判断された場合は、終了する。
図3、図4の更新データD2、D3が発生した場合、デ
ータを更新するため専用のテーブル(データ更新専用テ
ーブルTA)に対してデータの更新が行われる。
In the slave machines 14 to n, FIG.
Is executed when the computer is started or in response to an instruction to execute a program. First, it is determined whether or not to end the present process (step S21). ,finish.
When the update data D2 and D3 shown in FIGS. 3 and 4 are generated, the data is updated in a dedicated table for updating the data (data update dedicated table TA).

【0034】そこで、本処理を終了しないと判断された
場合は、自己(スレーブ・マシン14〜n)のデータ更
新専用テーブルTAをチェックし(ステップS22)、
データ更新がなされたか否かを判別する(ステップS2
3)。その結果、データ更新がなされていない場合は、
ステップS21に戻る。一方、データ更新がなされてい
る場合は、その更新データを取得する(ステップS2
4)。そして、取得した更新データをネットワークNを
介してマスタ・マシン13に転送して(ステップS2
5、図4の矢印a5、図5の矢印a8参照)、ステップ
S21に戻る。
Therefore, if it is determined that the present processing is not to be ended, the data updating dedicated table TA of its own (slave machine 14 to n) is checked (step S22).
It is determined whether the data has been updated (step S2).
3). As a result, if the data has not been updated,
It returns to step S21. On the other hand, if the data has been updated, the updated data is obtained (step S2).
4). Then, the acquired update data is transferred to the master machine 13 via the network N (step S2).
5, see arrow a5 in FIG. 4 and arrow a8 in FIG. 5), and return to step S21.

【0035】次に、スレーブ・マシン14〜nにおい
て、マスタ・マシン13から転送されてきた更新データ
に基づいて、自己(スレーブ・マシン14〜n)の複写
テーブルTBを更新する処理を、図9のフローチャート
に従って説明する。
Next, in the slave machines 14 to n, the processing of updating the copy table TB of the own machine (slave machines 14 to n) based on the update data transferred from the master machine 13 is shown in FIG. This will be described according to the flowchart of FIG.

【0036】スレーブ・マシン14〜nにおいて、図9
フローチャートに従った一連の処理がコンピュータの起
動時またはプログラムの実行指示により実行されてお
り、まず本処理を終了するか否かを判断し(ステップS
31)、終了すると判断された場合は、終了する。
In the slave machines 14 to n, FIG.
A series of processes according to the flowchart are executed when the computer is started or in response to a program execution instruction, and it is first determined whether or not to end the present process (step S
31) If it is determined to end, the process ends.

【0037】一方、終了しないと判断された場合は、マ
スタ・マシン13から更新データが転送されてきたか否
かを判断する(ステップS32、図4の矢印a6,a
7、図5の矢印a9,a10参照)。その結果、更新デ
ータが転送されてこなかった場合は、ステップS31に
戻る。一方、更新データが転送されてきた場合は、その
転送されてきた更新データに基づいて、自己(スレーブ
・マシン14〜n)の複写テーブルTBを更新して(ス
テップS33)、ステップS31に戻る。
On the other hand, if it is determined that the update is not to be completed, it is determined whether or not the update data has been transferred from the master machine 13 (step S32, arrows a6 and a in FIG. 4).
7, see arrows a9 and a10 in FIG. 5). As a result, if the update data has not been transferred, the process returns to step S31. On the other hand, if the update data has been transferred, the copy table TB of its own (slave machine 14 to n) is updated based on the transferred update data (step S33), and the process returns to step S31.

【0038】このように、本実施形態では、各コンピュ
ータ上のデータべースを、データ更新専用のデータベー
スであるデータ更新専用テーブルTAと、複写用のデー
タベースである複写テーブルTBとにより構成してい
る。そして、マスタ・マシン13は、自己入力された更
新データに基づいて、自己のデータ更新専用テーブルT
Aと複写テーブルTBとを更新すると共に、スレーブ・
マシン14〜nから転送されてきた更新データに基づい
て自己の複写テーブルTBを更新し、さらにスレーブ・
マシン14〜nから転送されてきた更新データを全ての
スレーブ・マシン14〜nに配信している。
As described above, in the present embodiment, the database on each computer is constituted by the data update-dedicated table TA which is a database exclusively for data update, and the copy table TB which is a database for copy. I have. Then, based on the self-input update data, master machine 13 uses its own data update table T
A and the copy table TB are updated.
It updates its own copy table TB based on the update data transferred from the machines 14-n,
The update data transferred from the machines 14 to n is distributed to all the slave machines 14 to n.

【0039】一方、スレーブ・マシン14〜nは、自己
入力された更新データに基づいて、自己のデータ更新専
用テーブルTAを更新すると共に、その更新データをマ
スタ・マシン13に転送し、また、マスタ・マシン13
から配信された更新データに基づいて自己の複写テーブ
ルTBを更新している。
On the other hand, the slave machines 14 to n update their own data update-dedicated table TA based on the self-input update data, and transfer the updated data to the master machine 13.・ Machine 13
Updates its own copy table TB on the basis of the update data distributed from.

【0040】従って、1度発生した更新データに基づい
て、複数のデータベース間で永久に複写処理が継続して
行われるという弊害を防止しつつ、複数のデータベース
間で相互に更新データ(データベース)の複写(複製)
処理が可能となる。
Therefore, based on the update data that has been generated once, it is possible to prevent the harmful effect that the copying process is continuously performed between the plurality of databases forever, and to exchange the update data (database) between the plurality of databases. Copy
Processing becomes possible.

【0041】[0041]

【発明の効果】以上説明したように、本発明によれば、
ネットワーク上の各コンピュータにより各々管理される
データベース間で相互に複写を行うデータベースの自動
複製装置であって、前記コンピュータは、各々データ更
新専用の更新用データベースと、複写専用の複写用デー
タベースとを備え、前記コンピュータのうちのマスタコ
ンピュータは、該マスタコンピュータから入力された更
新データに基づいて、該マスタコンピュータ内の更新用
データベースと複写用データベースとを更新する第1の
更新手段と、他のスレーブコンピュータから転送されて
きた更新データに基づいて前記マスタコンピュータ内の
複写用データベースを更新する第2の更新手段と、前記
他のスレーブコンピュータから転送されてきた更新デー
タを前記ネットワーク上の全てのスレーブコンピュータ
に配信する配信手段とを備え、前記スレーブコンピュー
タは、前記スレーブコンピュータから入力された更新デ
ータに基づいて、前記スレーブコンピュータ内の更新用
データベースを更新する第3の更新手段と、前記スレー
ブコンピュータから入力された更新データを前記マスタ
コンピュータに転送する転送手段と、前記マスタコンピ
ュータの配信手段により配信された更新データに基づい
て前記スレーブコンピュータ内の複写用データベースを
更新する第4の更新手段とを備えたので、データベース
の更新データの複製処理が複数のデータベース間で永久
に継続されるのを回避しつつ、複数のデータベース間で
データベースの更新データを相互に複製し合えるように
なる。
As described above, according to the present invention,
An automatic duplication apparatus for a database for mutually copying between databases managed by computers on a network, wherein the computer includes an updating database dedicated to data updating and a copying database dedicated to copying. A first updating means for updating an update database and a copy database in the master computer based on update data inputted from the master computer, and another slave computer Second updating means for updating the copy database in the master computer based on the update data transferred from the master computer, and updating the update data transferred from the other slave computer to all slave computers on the network. Delivery hand to deliver And a third updating unit that updates an update database in the slave computer based on update data input from the slave computer, and updates the input data from the slave computer. A transfer unit that transfers the data to the master computer; and a fourth update unit that updates the copy database in the slave computer based on the update data distributed by the distribution unit of the master computer. The update data of the database can be mutually replicated among the plurality of databases while avoiding the data replication process from continuing forever between the plurality of databases.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態に係るデータベースの自動
複製装置を適用した情報処理システムのシステム構成図
である。
FIG. 1 is a system configuration diagram of an information processing system to which a database automatic copying apparatus according to an embodiment of the present invention is applied.

【図2】図1の情報処理システムにおける各コンピュー
タに共通なハード構成を示すブロック図である。
FIG. 2 is a block diagram showing a hardware configuration common to each computer in the information processing system of FIG. 1;

【図3】マスタ・マシンにおいて更新データが発生した
場合の複製処理における更新データの流れを示すイメー
ジ図である。
FIG. 3 is an image diagram showing a flow of update data in a copy process when update data occurs in a master machine.

【図4】スレーブ・マシンにおいて更新データが発生し
た場合の複製処理における更新データの流れを示す概念
図である。
FIG. 4 is a conceptual diagram showing a flow of update data in a replication process when update data occurs in a slave machine.

【図5】別のスレーブ・マシンにおいて更新データが発
生した場合の複製処理における更新データの流れを示す
概念図である。
FIG. 5 is a conceptual diagram showing a flow of update data in a copy process when update data occurs in another slave machine.

【図6】マスタ・マシンのデータ更新専用テーブルを監
視して複写テーブルヘ更新データを複写する処理を示す
フローチャートである。
FIG. 6 is a flowchart showing a process of monitoring a data update-dedicated table of a master machine and copying update data to a copy table.

【図7】更新データをマスタ・マシンによりスレーブ・
マシンに配信する処理を示すフローチャートである。
FIG. 7: Update data is transferred from a master machine to a slave machine.
It is a flowchart which shows the process which distributes to a machine.

【図8】スレーブ・マシンのデータ更新専用テーブルを
監視してマスタ・マシンに更新データを転送する処理を
示すフローチャートである。
FIG. 8 is a flowchart showing a process of monitoring a data update dedicated table of a slave machine and transferring update data to a master machine.

【図9】マスタ・マシンからの更新データの転送を監視
して複写テーブルを更新する処理を示すフローチャート
である。
FIG. 9 is a flowchart showing a process of monitoring transfer of update data from a master machine and updating a copy table.

【符号の説明】[Explanation of symbols]

1 中央処理装置 2 主記憶装置 3 補助記憶装置 13 マスタ・マシン 14,15,n スレーブ・マシン N ネットワーク TA 複写テーブル TB データ更新専用テーブル D1,D2,D3 更新データ DESCRIPTION OF SYMBOLS 1 Central processing unit 2 Main storage device 3 Auxiliary storage device 13 Master machine 14, 15, n Slave machine N Network TA Copy table TB Data update dedicated table D1, D2, D3 Update data

───────────────────────────────────────────────────── フロントページの続き (72)発明者 神長倉 まき 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 (72)発明者 小川 淳 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 Fターム(参考) 5B082 GA14 HA03 HA05 5B089 AA16 AC07 AD02 AF05 CB02 CB03 DD18  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Maki Kanchokura 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc. (72) Inventor Jun Ogawa 3-30-2 Shimomaruko, Ota-ku, Tokyo Kia Non-corp. F term (reference) 5B082 GA14 HA03 HA05 5B089 AA16 AC07 AD02 AF05 CB02 CB03 DD18

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ネットワーク上の各コンピュータにより
各々管理されるデータベース間で相互に複写を行うデー
タベースの自動複製装置であって、 前記コンピュータは、各々データ更新専用の更新用デー
タベースと、複写専用の複写用データベースとを備え、 前記コンピュータのうちのマスタコンピュータは、該マ
スタコンピュータから入力された更新データに基づい
て、該マスタコンピュータ内の更新用データベースと複
写用データベースとを更新する第1の更新手段と、 他のスレーブコンピュータから転送されてきた更新デー
タに基づいて前記マスタコンピュータ内の複写用データ
ベースを更新する第2の更新手段と、 前記他のスレーブコンピュータから転送されてきた更新
データを前記ネットワーク上の全てのスレーブコンピュ
ータに配信する配信手段とを備え、 前記スレーブコンピュータは、前記スレーブコンピュー
タから入力された更新データに基づいて、前記スレーブ
コンピュータ内の更新用データベースを更新する第3の
更新手段と、 前記スレーブコンピュータから入力された更新データを
前記マスタコンピュータに転送する転送手段と、 前記マスタコンピュータの配信手段により配信された更
新データに基づいて前記スレーブコンピュータ内の複写
用データベースを更新する第4の更新手段とを備えたこ
とを特徴とするデータベースの自動複製装置。
1. An automatic copying apparatus for a database for mutually copying between databases managed by respective computers on a network, wherein the computers each include an updating database exclusively for updating data and a copying database exclusively for copying. A first update unit that updates the update database and the copy database in the master computer based on update data input from the master computer. Second updating means for updating a copy database in the master computer based on update data transferred from another slave computer; and updating update data transferred from the other slave computer on the network. All slave computers Distribution means for distributing, wherein the slave computer is configured to update an update database in the slave computer based on update data input from the slave computer, and input from the slave computer. Transfer means for transferring the updated data to the master computer, and fourth updating means for updating a copy database in the slave computer based on the update data distributed by the distribution means of the master computer. Automatic database replication apparatus characterized by the following.
【請求項2】 ネットワーク上の各コンピュータにより
各々管理されるデータベース間で相互に複写を行うデー
タベースの自動複製方法であって、 前記コンピュータは、各々データ更新専用の更新用デー
タベースと、複写専用の複写用データベースとを備え、 前記コンピュータのうちのマスタコンピュータは、該マ
スタコンピュータから入力された更新データに基づい
て、該マスタコンピュータ内の更新用データベースと複
写用データベースとを更新する第1の更新工程と、 他のスレーブコンピュータから転送されてきた更新デー
タに基づいて前記マスタコンピュータ内の複写用データ
ベースを更新する第2の更新工程と、 前記他のスレーブコンピュータから転送されてきた更新
データを前記ネットワーク上の全てのスレーブコンピュ
ータに配信する配信工程とを備え、 前記スレーブコンピュータは、前記スレーブコンピュー
タから入力された更新データに基づいて、前記スレーブ
コンピュータ内の更新用データベースを更新する第3の
更新工程と、 前記スレーブコンピュータから入力された更新データを
前記マスタコンピュータに転送する転送工程と、 前記マスタコンピュータの配信工程により配信された更
新データに基づいて前記スレーブコンピュータ内の複写
用データベースを更新する第4の更新工程とを備えたこ
とを特徴とするデータベースの自動複製方法。
2. An automatic replication method of a database for mutually copying between databases managed by respective computers on a network, wherein the computers each include an updating database exclusively for data updating and a copying database exclusively for copying. A first update step of updating the update database and the copy database in the master computer based on update data input from the master computer. A second update step of updating a copy database in the master computer based on update data transferred from another slave computer; and updating the copy data transferred from the other slave computer on the network. All slave computers A distribution step of distributing, wherein the slave computer is configured to update a database for updating in the slave computer based on update data input from the slave computer; A transfer step of transferring the updated data to the master computer, and a fourth update step of updating a copy database in the slave computer based on the update data distributed by the distribution step of the master computer. Automatic replication method of database characterized by the following.
【請求項3】 ネットワーク上の各コンピュータにより
各々管理されるデータベース間で相互に複写を行うデー
タベースの自動複製システムであって、 前記コンピュータは、各々データ更新専用の更新用デー
タベースと、複写専用の複写用データベースとを備え、 前記コンピュータのうちのマスタコンピュータは、該マ
スタコンピュータから入力された更新データに基づい
て、該マスタコンピュータ内の更新用データベースと複
写用データベースとを更新する第1の更新手段と、 他のスレーブコンピュータから転送されてきた更新デー
タに基づいて前記マスタコンピュータ内の複写用データ
ベースを更新する第2の更新手段と、 前記他のスレーブコンピュータから転送されてきた更新
データを前記ネットワーク上の全てのスレーブコンピュ
ータに配信する配信手段とを備え、 前記スレーブコンピュータは、前記スレーブコンピュー
タから入力された更新データに基づいて、前記スレーブ
コンピュータ内の更新用データベースを更新する第3の
更新手段と、 前記スレーブコンピュータから入力された更新データを
前記マスタコンピュータに転送する転送手段と、 前記マスタコンピュータの配信手段により配信された更
新データに基づいて前記スレーブコンピュータ内の複写
用データベースを更新する第4の更新手段とを備えたこ
とを特徴とするデータベースの自動複製システム。
3. An automatic database replication system for mutually duplicating databases managed by computers on a network, said computers comprising: an update database dedicated to data update; and a copy database dedicated to copy. A first update unit that updates the update database and the copy database in the master computer based on update data input from the master computer. Second updating means for updating a copy database in the master computer based on update data transferred from another slave computer; and updating update data transferred from the other slave computer on the network. All slave computers Distribution means for distributing data to the slave computer, wherein the slave computer is configured to update an update database in the slave computer based on update data input from the slave computer; and Transfer means for transferring the input update data to the master computer; and fourth update means for updating a copy database in the slave computer based on the update data distributed by the distribution means of the master computer. An automatic database replication system.
【請求項4】 ネットワーク上の各コンピュータにより
各々管理されるデータベース間で相互に複写を行うこと
によりデータベースを自動的に複製するための制御プロ
グラムを記憶する記憶媒体であって、前記コンピュータ
は、各々データ更新専用の更新用データベースと、複写
専用の複写用データベースとを備え、前記コンピュータ
のうちのマスタコンピュータにて実行される前記制御プ
ログラムは、該マスタコンピュータから入力された更新
データに基づいて、該マスタコンピュータ内の更新用デ
ータベースと複写用データベースとを更新する第1の更
新ルーチンと、 他のスレーブコンピュータから転送されてきた更新デー
タに基づいて前記マスタコンピュータ内の複写用データ
ベースを更新する第2の更新ルーチンと、 前記他のスレーブコンピュータから転送されてきた更新
データを前記ネットワーク上の全てのスレーブコンピュ
ータに配信する配信ルーチンとを含み、 前記スレーブコンピュータにて実行される前記制御プロ
グラムは、前記スレーブコンピュータから入力された更
新データに基づいて、前記スレーブコンピュータ内の更
新用データベースを更新する第3の更新ルーチンと、 前記スレーブコンピュータから入力された更新データを
前記マスタコンピュータに転送する転送ルーチンと、 前記マスタコンピュータの配信ルーチンにより配信され
た更新データに基づいて前記スレーブコンピュータ内の
複写用データベースを更新する第4の更新ルーチンとを
含むことを特徴とする記憶媒体。
4. A storage medium for storing a control program for automatically duplicating a database by mutually duplicating a database managed by each computer on a network, wherein the computer comprises: An update database dedicated to data update and a copy database dedicated to copying are provided, and the control program executed by the master computer of the computers is based on update data input from the master computer. A first update routine for updating the update database and the copy database in the master computer; and a second update routine for updating the copy database in the master computer based on update data transferred from another slave computer. An update routine and the other slave A distribution routine for distributing update data transferred from the computer to all slave computers on the network, wherein the control program executed by the slave computer is based on update data input from the slave computer. A third update routine for updating the update database in the slave computer, a transfer routine for transferring update data input from the slave computer to the master computer, and a distribution routine for the master computer. And a fourth update routine for updating a copy database in the slave computer based on the update data.
【請求項5】 前記マスタコンピュータ、スレーブコン
ピュータは、各種分野のデータを集積した複数の更新用
データベースと複写用データベースとを備えていること
を特徴とする請求項1〜4記載のデータベースの自動複
製装置、自動複製方法、自動複製システム、および記憶
媒体。
5. The automatic replication of a database according to claim 1, wherein the master computer and the slave computer include a plurality of update databases and a copy database in which data in various fields are accumulated. Apparatus, automatic duplication method, automatic duplication system, and storage medium.
JP10179769A 1998-06-12 1998-06-12 Automatic duplicating device for data base, its method, system therefor and storage medium Pending JP2000003300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10179769A JP2000003300A (en) 1998-06-12 1998-06-12 Automatic duplicating device for data base, its method, system therefor and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10179769A JP2000003300A (en) 1998-06-12 1998-06-12 Automatic duplicating device for data base, its method, system therefor and storage medium

Publications (1)

Publication Number Publication Date
JP2000003300A true JP2000003300A (en) 2000-01-07

Family

ID=16071573

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10179769A Pending JP2000003300A (en) 1998-06-12 1998-06-12 Automatic duplicating device for data base, its method, system therefor and storage medium

Country Status (1)

Country Link
JP (1) JP2000003300A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010061559A (en) * 2008-09-05 2010-03-18 Hitachi Ltd Information processing system, and data update method and data update program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010061559A (en) * 2008-09-05 2010-03-18 Hitachi Ltd Information processing system, and data update method and data update program
JP4612715B2 (en) * 2008-09-05 2011-01-12 株式会社日立製作所 Information processing system, data update method, and data update program

Similar Documents

Publication Publication Date Title
EP0226734B1 (en) Method and apparatus for managing obsolescence of data objects
US7143079B2 (en) Integrated composite data base system
JP4310354B2 (en) Replication facility
KR20200100173A (en) Data replication and data failover within the database system
TW202001608A (en) Intelligent contract invocation method and device based on block chain, and electronic device
CN109947773A (en) Change of the deployment to key mode in multi-tenant database system
CN109947767A (en) System in multiple lease database system shares type
CN110147369A (en) Data separating and write-in in multiple lease database system redirect
CN108475271A (en) The application container of container database
CN104239439A (en) Selective database replication
JPH01502786A (en) Naming service for networked digital data processing systems
US20060190460A1 (en) Method and mechanism of handling reporting transactions in database systems
KR101527634B1 (en) Method and apparatus for providing sharding service
JP2006146663A (en) Session information management method, session information management system, session information management server and program therefor
JP2000003300A (en) Automatic duplicating device for data base, its method, system therefor and storage medium
US20190065327A1 (en) Efficient versioned object management
WO2022039812A1 (en) Methods, devices and systems for writer pre-selection in distributed data systems
JPH0981431A (en) Data base processing system and method for updating data base
CN109683955A (en) Version repository clone method and system
JPH0498546A (en) Duplicate data updating system
JP3374320B2 (en) Database access method and system using stateless protocol
JPH10161922A (en) Replica type definition system
JPH09171480A (en) Network system provided with information storage system, input system and automatic operation system of the network system, and automatic operating method for the network system
TW425514B (en) E-mail driving data exchange method
Sinha et al. Flexible user-definable memory coherence scheme in distributed shared memory of galaxy