JPH10161917A - Database file update device - Google Patents
Database file update deviceInfo
- Publication number
- JPH10161917A JPH10161917A JP8331666A JP33166696A JPH10161917A JP H10161917 A JPH10161917 A JP H10161917A JP 8331666 A JP8331666 A JP 8331666A JP 33166696 A JP33166696 A JP 33166696A JP H10161917 A JPH10161917 A JP H10161917A
- Authority
- JP
- Japan
- Prior art keywords
- record
- server
- remote server
- flag
- master server
- 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)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
(57)【要約】
【課題】 WANによって構成されたマスタデータベー
スに対して、低速の回線を使用しても、ほぼリアルタイ
ムで、遠隔地のデータを更新することができるデータベ
ースのファイル更新装置を提供することを目的とするも
のである。
【解決手段】 マスタサーバのデータファイル中の複数
のレコードのそれぞれについて変更の有無を示すフラグ
を常時監視し、当該変更が発生したレコードを、通信網
を介して遠隔地サーバに送出する手段が、上記マスタサ
ーバとは別に、上記マスタサーバ側に設けられているデ
ータベースのファイル更新装置である。
(57) [Problem] To provide a database file updating device capable of updating data in a remote place almost in real time with a master database configured by a WAN even when a low-speed line is used. It is intended to do so. A means for constantly monitoring a flag indicating the presence or absence of a change in each of a plurality of records in a data file of a master server, and transmitting the record in which the change has occurred to a remote server via a communication network, This is a database file update device provided separately from the master server on the master server side.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、マスタサーバのデ
ータベース中のデータファイルと同一構造のデータファ
イルを遠隔地サーバが備え、通信網を介して上記遠隔地
サーバが上記マスタサーバと接続され、低速の回線を使
用しても、遠隔地データベースとマスタデータベースと
を、ほぼ同時に更新することができるファイル更新装置
に関するものである。The present invention relates to a remote server having a data file having the same structure as a data file in a database of a master server. The remote server is connected to the master server via a communication network. The present invention relates to a file updating apparatus that can update a remote database and a master database almost simultaneously even if the line is used.
【0002】[0002]
【従来の技術】データベースを遠隔地から利用する場
合、従来は、ファイルサーバをINS64等で結び、い
わゆるWAN(Wide Area Network )を構築してアクセ
スする方法を採用している。しかし、この方法では、デ
ータ転送速度が遅いので、レスポンスが非常に悪く、特
に、データサイズが大きい場合や検索項目が多い場合、
または、多くのファイルをリレーションで使用する場合
には、ほとんど使用に堪えないほどアクセス速度が低下
するという欠点がある。2. Description of the Related Art Conventionally, when a database is used from a remote place, a method of connecting a file server with INS64 or the like and constructing a so-called WAN (Wide Area Network) to access the database is adopted. However, with this method, the data transfer speed is slow, so the response is very poor, especially when the data size is large or there are many search items,
Alternatively, when a large number of files are used in a relation, there is a disadvantage that the access speed is reduced so that the file is hardly usable.
【0003】この欠点を解決するには、スループットの
大きい回線に切り替える方法を採用するか、または、マ
スタサーバ(親サーバ)のデータベースと同一構造のデ
ータベースを、遠隔地サーバ(遠隔地のファイルサー
バ)に用意し、マスタサーバのデータベースを定期的に
コピーし、遠隔地サーバに送る方法を採用するようにし
ている。In order to solve this drawback, a method of switching to a line with a higher throughput is adopted, or a database having the same structure as that of the master server (parent server) is replaced with a remote server (remote file server). And periodically copy the master server database and send it to a remote server.
【0004】[0004]
【発明が解決しようとする課題】上記のようにマスタサ
ーバのデータベースを定期的にコピーするようにした場
合、遠隔地サーバのデータベースをコピーし、これをマ
スタサーバに送出することはできない。つまり、双方向
でコピーするようにすると、マスタサーバでデータベー
スが更新されていたにも係らず、その更新情報が盛り込
まれていない遠隔地サーバのデータベースがマスタサー
バのデータベースとしてコピーされることになるので、
マスタサーバと遠隔地サーバとの双方向でコピーするよ
うにはしていない。したがって、遠隔地サーバでは、マ
スタサーバのデータベースを参照するにとどまる。When the database of the master server is periodically copied as described above, the database of the remote server cannot be copied and sent to the master server. In other words, if copying is performed in both directions, the database of the remote server that does not include the update information is copied as the database of the master server even though the database has been updated on the master server. So
It does not copy in both directions between the master server and the remote server. Therefore, the remote server only refers to the database of the master server.
【0005】また、マスタサーバからコピーする場合、
実際には、そのコピーの頻度を多く取れることができ
ず、たとえばデータベースを使用しない夜間にのみコピ
ーする場合には、1日遅れのデータしか参照できないと
いう問題がある。[0005] When copying from the master server,
Actually, the frequency of the copying cannot be increased. For example, when copying is performed only at night when the database is not used, there is a problem that only data delayed by one day can be referred to.
【0006】一方、特開昭58−2939号公報に記載
されている「ファイル制御方式」では、書込側と読込側
とにおいて、更新処理を矛盾無く実行することができる
が、書込側と読込側とを同時に更新することができない
という問題がある。On the other hand, in the "file control method" described in Japanese Patent Application Laid-Open No. 58-2939, the updating process can be executed without inconsistency between the writing side and the reading side. There is a problem that the reading side and the reading side cannot be updated at the same time.
【0007】また、特開平1−112448号公報に記
載されている「ファイル更新装置」では、仮想ファイル
の概念を導入し、異常ファイルの復元を高速に行うもの
であり、リアルタイム処理できるが、遠隔地サーバで同
時に更新することができないという問題がある。The "file updating apparatus" described in Japanese Patent Application Laid-Open No. 1-112448 introduces the concept of a virtual file and restores an abnormal file at a high speed. There is a problem that it cannot be updated simultaneously on the local server.
【0008】さらに、特開平4−71044号公報に記
載されている「マスタサーバファイル更新装置」では、
ファイル更新を仮ファイルに格納し、当日の再修正を即
座に行うことができるが、遠隔地サーバで同時に更新す
ることはできないという問題がある。Further, in the “master server file updating device” described in Japanese Patent Application Laid-Open No. 4-71044,
Although the file update can be stored in the temporary file and re-correction of the day can be performed immediately, there is a problem that it cannot be updated at the remote server at the same time.
【0009】すなわち、上記従来例においては、書込側
と読込側とで矛盾無く更新処理することができるもの
の、マスタサーバと遠隔地サーバとで同時に更新するこ
とができない(ファイル更新の同期がとれない)という
問題があり、また、マスタサーバにおけるデータベース
のファイルのレコード内容と、遠隔地サーバにおけるデ
ータベースのファイルのレコード内容とが異なるという
問題があり、さらに、両レコード間の相違を修復するた
めには、高度な技術力を必要とするという問題がある。That is, in the above-mentioned conventional example, although the updating process can be performed without inconsistency between the writing side and the reading side, the updating cannot be performed simultaneously by the master server and the remote server (the file update can be synchronized). There is a problem that the record content of the database file on the master server is different from the record content of the database file on the remote server. Further, in order to repair the difference between the two records, However, there is a problem that requires a high technology.
【0010】本発明は、WANによって構成されたマス
タデータベースに対して、低速の回線を使用しても、ほ
ぼリアルタイムで、遠隔地のデータを更新することがで
きるデータベースのファイル更新装置を提供することを
目的とするものである。An object of the present invention is to provide a database file updating apparatus capable of updating data in a remote place almost in real time with respect to a master database constituted by a WAN even when a low-speed line is used. It is intended for.
【0011】また、本発明は、WANによって構成され
たマスタデータベースに対して、低速の回線を使用して
も、ほぼリアルタイムで、マスタデータベースと遠隔地
のデータとを更新することができるデータベースのファ
イル更新装置を提供することを目的とするものである。Further, the present invention provides a database file which can update a master database and data at a remote location almost in real time with respect to a master database constituted by a WAN even when a low-speed line is used. An object is to provide an updating device.
【0012】[0012]
【課題を解決するための手段】請求項1、2に記載の発
明は、マスタサーバのデータベース中のデータファイル
と同一構造のデータファイルを遠隔地サーバが備え、通
信網を介して遠隔地サーバがマスタサーバと接続され、
マスタサーバのデータファイルの更新に応じて、遠隔地
サーバのデータファイルを更新させるデータベースのフ
ァイル更新装置において、マスタサーバのデータファイ
ル中の複数のレコードのそれぞれについて変更の有無を
示すフラグを常時監視するフラグ監視手段と、レコード
に変更が発生したことを、フラグに基づいて、フラグ監
視手段が検出したときに、当該変更が発生したレコード
を取り込むレコード取り込み手段と、レコード取り込み
手段が取り込んだレコードを、通信網を介して上記遠隔
地サーバに送出するレコード送出手段とを有し、上記フ
ラグ監視手段と上記レコード取り込み手段と上記レコー
ド送出手段とが、上記マスタサーバとは別に、上記マス
タサーバ側に設けられているデータベースのファイル更
新装置である。According to the present invention, the remote server has a data file having the same structure as the data file in the database of the master server, and the remote server has the data file via the communication network. Connected to the master server,
In a database file update device that updates a data file of a remote server in response to an update of a data file of the master server, a flag indicating whether or not there is a change in each of a plurality of records in the data file of the master server is constantly monitored. A flag monitoring unit, a record capturing unit that captures a record in which the change has occurred when the flag monitoring unit detects that a change has occurred in the record based on the flag, and a record that the record capturing unit captures. Record transmitting means for transmitting to the remote server via a communication network, wherein the flag monitoring means, the record capturing means, and the record transmitting means are provided on the master server side separately from the master server. Is a file updating device for the database.
【0013】また、請求項3、4に記載の発明は、上記
フラグ監視手段と上記レコード取り込み手段と上記レコ
ード送出手段とで構成されるファイル更新装置が、マス
タサーバとは別に、マスタサーバ側に設けられていると
ともに、上記フラグ監視手段と上記レコード取り込み手
段と上記レコード送出手段とで構成される他のファイル
更新装置が、遠隔地サーバとは別に、遠隔地サーバ側に
設けられているデータベースのファイル更新装置であ
る。According to a third aspect of the present invention, a file updating device comprising the flag monitoring means, the record fetching means and the record sending means is provided on the master server side separately from the master server. In addition to the remote server, another file updating device including the flag monitoring unit, the record capturing unit, and the record sending unit is provided. File update device.
【0014】[0014]
【発明の実施の形態および実施例】図1は、本発明の一
実施例であるデータベースのファイル更新装置FR1を
示す概要図である。DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a schematic diagram showing a database file updating apparatus FR1 according to one embodiment of the present invention.
【0015】データベースのファイル更新装置FR1
は、マスタサーバ側と、遠隔地サーバ側と、通信網とで
構成されている。[0015] Database file updating device FR1
Is composed of a master server, a remote server, and a communication network.
【0016】マスタサーバ側は、マスタサーバ10と、
マスタサーバ側ファイル更新装置1とで構成され、遠隔
地サーバ側は、遠隔地サーバ20と、遠隔地サーバ側フ
ァイル更新装置2とで構成され、通信網は、マスタサー
バ側と遠隔地サーバ側とを接続するものである。On the master server side, a master server 10
The remote server is composed of the remote server 20 and the remote server file updating device 2. The communication network is composed of the master server and the remote server. Is to connect.
【0017】マスタサーバ10は、マスタデータベース
11と、インデックファイル12と、アプリケーション
13と、マスタ用ハードウェア14とで構成されてい
る。The master server 10 includes a master database 11, an index file 12, an application 13, and master hardware 14.
【0018】マスタデータベース11は、データファイ
ルを有し、このデータファイルは、複数のレコードを有
するものである。インデックファイル12は、マスタサ
ーバのデータベース11のデータファイル中の複数のレ
コードのそれぞれのIDを格納する領域と、複数のレコ
ードについて変更の有無を示すフラグを格納する領域と
を有するものである。The master database 11 has a data file, and this data file has a plurality of records. The index file 12 has an area for storing IDs of a plurality of records in the data file of the database 11 of the master server, and an area for storing flags indicating whether or not the plurality of records have been changed.
【0019】ファイル更新装置1は、マスタサーバのデ
ータベース11のデータファイル中の複数のレコードの
それぞれについて変更の有無を示すフラグを常時監視
し、レコードに変更が発生したことを、そのフラグに基
づいて検出したときに、当該変更が発生したレコードを
取り込み、この取り込んだレコードを通信網を介して遠
隔地サーバ20に送出するものであり、マスタサーバ1
0とは別に、マスタサーバ側に設けられているものであ
る。The file updating apparatus 1 constantly monitors a flag indicating whether or not there is a change in each of a plurality of records in the data file of the database 11 of the master server, and determines that a change has occurred in the record based on the flag. Upon detection, the record in which the change has occurred is fetched, and the fetched record is sent to the remote server 20 via the communication network.
0 is provided on the master server side.
【0020】つまり、ファイル更新装置1は、マスタサ
ーバのデータファイル中の複数のレコードのそれぞれに
ついて変更の有無を示す第1のフラグを常時監視する第
1のフラグ監視手段と、上記レコードに変更が発生した
ことを、上記第1のフラグに基づいて、上記第1のフラ
グ監視手段が検出したときに、当該変更が発生したレコ
ードを取り込む第1のレコード取り込み手段と、上記第
1のレコード取り込み手段が取り込んだレコードを、上
記通信網を介して上記遠隔地サーバに送出する第1のレ
コード送出手段とを有し、上記第1のフラグ監視手段と
上記第1のレコード取り込み手段と上記第1のレコード
送出手段とが、上記マスタサーバとは別に、上記マスタ
サーバ側に設けられているマスタサーバ側ファイル更新
装置の例である。That is, the file updating device 1 constantly monitors the first flag indicating the presence or absence of a change in each of a plurality of records in the data file of the master server, When the first flag monitoring means detects that the change has occurred, based on the first flag, the first record capturing means captures a record in which the change has occurred, and the first record capturing means Has a first record sending means for sending the fetched record to the remote server via the communication network, wherein the first flag monitoring means, the first record fetching means, and the first The record sending means is an example of a master server-side file updating device provided on the master server side separately from the master server.
【0021】遠隔地サーバ20は、遠隔地データベース
21と、インデックファイル22と、アプリケーション
23と、遠隔地用ハードウェア24とで構成されてい
る。The remote server 20 comprises a remote database 21, an index file 22, an application 23, and remote hardware 24.
【0022】遠隔地データベース21は、データファイ
ルを有し、このデータファイルは、複数のレコードを有
するものである。インデックファイル22は、遠隔地サ
ーバのデータベース21のデータファイル中の複数のレ
コードのそれぞれのIDを格納する領域と、複数のレコ
ードについて変更の有無を示すフラグを格納する領域と
を有するものである。The remote database 21 has a data file, and this data file has a plurality of records. The index file 22 has an area for storing the IDs of a plurality of records in the data file of the database 21 of the remote server, and an area for storing a flag indicating whether or not the plurality of records have been changed.
【0023】ファイル更新装置2は、遠隔地サーバのデ
ータベース21のデータファイル中の複数のレコードの
それぞれについて変更の有無を示すフラグを常時監視
し、レコードに変更が発生したことを、そのフラグに基
づいて検出したときに、当該変更が発生したレコードを
取り込み、この取り込んだレコードを通信網を介してマ
スタサーバ10に送出するものであり、遠隔地サーバ2
0とは別に、遠隔地サーバ側に設けられているものであ
る。The file update device 2 constantly monitors a flag indicating the presence or absence of a change in each of a plurality of records in the data file of the database 21 of the remote server, and determines that a record has been changed based on the flag. When the change is detected, the record in which the change has occurred is fetched, and the fetched record is transmitted to the master server 10 via the communication network.
Aside from 0, it is provided on the remote server side.
【0024】つまり、ファイル更新装置2は、上記遠隔
地サーバのデータファイル中の複数のレコードのそれぞ
れについて変更の有無を示す第2のフラグを常時監視す
る第2のフラグ監視手段と、上記レコードに変更が発生
したことを、上記第2のフラグに基づいて、上記第2の
フラグ監視手段が検出したときに、当該変更が発生した
レコードを取り込む第2のレコード取り込み手段と、上
記第2のレコード取り込み手段が取り込んだレコード
を、上記通信網を介して上記マスタサーバに送出する第
2のレコード送出手段とを有し、上記第2のフラグ監視
手段と上記第2のレコード取り込み手段と上記第2のレ
コード送出手段とが、上記遠隔地サーバとは別に、上記
遠隔地サーバ側に設けられている遠隔地サーバ側ファイ
ル更新装置の例である。That is, the file updating device 2 constantly monitors the second flag indicating whether or not there is a change in each of the plurality of records in the data file of the remote server, When the second flag monitoring unit detects that a change has occurred based on the second flag, a second record capturing unit that captures a record in which the change has occurred, Second record sending means for sending the record taken by the taking means to the master server via the communication network, wherein the second flag monitoring means, the second record taking means, and the second record taking means are provided. Is an example of a remote server-side file update device provided on the remote server side separately from the remote server. .
【0025】次に、上記実施例の動作について説明す
る。Next, the operation of the above embodiment will be described.
【0026】図2は、図1に示すデータベースのファイ
ル更新装置FR1の動作を示し、特に、マスタサーバ1
0におけるレコードが変更されことに伴って、遠隔地サ
ーバ20のレコードを更新する場合の動作を示すフロー
チャートである。図2において、その左側に記載してあ
る動作(S1〜S7)は、マスタサーバ側の動作であ
り、その右側に記載してある動作(S11〜S13)
は、遠隔地サーバ側の動作である。FIG. 2 shows the operation of the database file updating apparatus FR1 shown in FIG.
10 is a flowchart showing an operation when updating a record of the remote server 20 in response to a change in the record at 0. In FIG. 2, the operations (S1 to S7) described on the left side are operations on the master server side, and the operations (S11 to S13) described on the right side thereof.
Is an operation on the remote server side.
【0027】まず、インデックスファイル12における
フラグであって、全てのレコードにそれぞれ対応するフ
ラグの全てを「0」にセットする。フラグが「0」であ
るとは、そのフラグに対応するレコードに変更が存在し
ないことを意味し、つまり、そのフラグに対応するレコ
ードを、遠隔地サーバ20において更新する必要がない
ことを意味する。First, all the flags in the index file 12 corresponding to all the records are set to "0". The flag being “0” means that there is no change in the record corresponding to the flag, that is, it is not necessary to update the record corresponding to the flag in the remote server 20. .
【0028】図3は、上記実施例において、マスタデー
タベース11のデータファイル中のレコードの例と、イ
ンデックスファイル12の例とを示す図である。FIG. 3 is a diagram showing an example of a record in the data file of the master database 11 and an example of the index file 12 in the above embodiment.
【0029】データファイル中のレコードは、商品名の
IDを格納するID領域と、商品名を格納する商品名領
域と、商品タイプを格納する商品タイプ領域と、単価を
格納する単価領域とで構成されている。また、インデッ
クスファイルは、商品名のIDを格納するID領域と、
フラグを格納するフラグ領域とのみで構成され、ファイ
ル更新装置1内のメモリに格納されている。A record in the data file is composed of an ID area for storing an ID of a product name, a product name area for storing a product name, a product type area for storing a product type, and a unit price area for storing a unit price. Have been. The index file includes an ID area for storing an ID of a product name,
It is composed of only a flag area for storing a flag, and is stored in a memory in the file updating device 1.
【0030】なお、図3においては、データファイル中
のレコードの内容例として、所定の商品名が示されてい
るが、この商品の代わりに、サービス、予定、行事、工
事等、他のアイテムをデータファイル中のレコードの内
容としてもよい。In FIG. 3, a predetermined product name is shown as an example of the contents of the record in the data file. However, instead of this product, other items such as services, schedules, events, and construction are described. It may be the contents of a record in the data file.
【0031】図2のフローチャートに戻って、マスタデ
ータベース11のデータファイル中の複数のレコードの
うちで、変更が発生する(S2)と、その変更されたレ
コードに対応するフラグが「1」に変更される(S
3)。なお、レコードの変更は作業者が行い、このレコ
ードの変更に伴って、その作業者がフラグを「1」に手
動で変更するようにしてもよく、また、レコードの変更
に伴って、自動的にフラグが「1」に変更されるように
してもよい。Returning to the flowchart of FIG. 2, when a change occurs among a plurality of records in the data file of the master database 11 (S2), the flag corresponding to the changed record is changed to "1". (S
3). The record may be changed by an operator, and the operator may manually change the flag to “1” with the change of the record. Alternatively, the operator may automatically change the flag with the change of the record. May be changed to "1".
【0032】そして、ファイル更新装置1が、常時、イ
ンデックスファイル12を監視し(つまり、「1」であ
るフラグを監視し)、「1」であるフラグを発見する
と、この「1」であるフラグに対応するIDを、インデ
ックスファイル12から直ちに得、このIDに対応する
レコードをマスタデータベース11から取り込む(S
4)。ファイル更新装置1は、マスタデータベース11
から取り込んだレコードを、通信網を介して、遠隔地サ
ーバ20に送出する(S5)。When the file updating apparatus 1 constantly monitors the index file 12 (that is, monitors the flag of “1”) and finds the flag of “1”, the flag of “1” is detected. Is immediately obtained from the index file 12, and the record corresponding to this ID is fetched from the master database 11 (S
4). The file updating device 1 includes a master database 11
Is transmitted to the remote server 20 via the communication network (S5).
【0033】遠隔地サーバ20は、マスタサーバ10か
らレコードを受信し(S11)、この受信したレコード
をコピーすることによって、遠隔地データベース21の
レコードを更新する(S12)。この更新操作が終了す
ると、遠隔地サーバ20がマスタサーバ側のファイル更
新装置1に対して、更新完了信号を送出する(S1
3)。The remote server 20 receives the record from the master server 10 (S11), and updates the record in the remote database 21 by copying the received record (S12). When this update operation is completed, the remote server 20 sends an update completion signal to the file update device 1 on the master server side (S1).
3).
【0034】ファイル更新装置1は、遠隔地サーバ20
から更新完了信号を受信すると(S6)、この更新完了
信号に対応するフラグを「0」に戻し、そのフラグに対
応するレコードに、変更が生じていないことを表示さ
せ、また、そのフラグに対応するレコードについて遠隔
地サーバで更新する必要がないことを表示させる。な
お、遠隔地サーバ20から更新完了信号を受信したとき
に(S6)、この更新完了信号に対応するフラグを
「0」に戻すだけであり、インデックスファイル12に
おけるレコード自身を削除するのではない。The file updating device 1 is provided with a remote server 20
(S6), the flag corresponding to the update completion signal is returned to "0", a record corresponding to the flag is displayed to indicate that no change has occurred, and Display that the record to be updated does not need to be updated on the remote server. When the update completion signal is received from the remote server 20 (S6), only the flag corresponding to the update completion signal is returned to "0", and the record itself in the index file 12 is not deleted.
【0035】上記実施例においては、ファイル更新装置
1が、常時、インデックスファイル12を監視し、
「1」であるフラグを発見すると、直ちに、遠隔地サー
バ20における遠隔地データベース21が更新されるの
で、低速の回線を使用しても、遠隔地のデータを迅速に
更新することができる。ここで、ファイル更新装置1が
インデックスファイル12を監視しているときに、イン
デックスファイル12を一巡する時間だけ、更新開始タ
イミングが最大遅れるが、この遅れ時間は実際上では無
視し得るものであり、遠隔地のデータをほぼリアルタイ
ムで更新することができる。In the above embodiment, the file updating device 1 constantly monitors the index file 12,
When the flag “1” is found, the remote location database 21 in the remote location server 20 is updated immediately, so that the data at the remote location can be quickly updated even if a low-speed line is used. Here, when the file update device 1 is monitoring the index file 12, the update start timing is delayed by a maximum amount of time for one cycle of the index file 12, but this delay time can be ignored in practice. Remote data can be updated almost in real time.
【0036】つまり、マスタサーバ10の更新時期と、
遠隔地サーバ20の更新時期とが、僅かとはいえ、時間
的にずれているので、双方のデータベース11、21に
おいて、同一のフィルドを別個に更新した場合、矛盾が
起こる(同一のフィルドに格納された内容が異なる)場
合がある。この場合には、上記実施例では、本質的な解
決はできないものの、実際の業務では、厳密な同期性を
必要とする場合はそれ程多くはなく、データを参照する
だけで足りる場合がほとんどである。このような場合
に、厳密な同期性を持ったデータベースを使用するよう
にすると、操作性をいたずらに犠牲にすることになる。That is, when the master server 10 is updated,
Since the update time of the remote server 20 is slightly different in time, the inconsistency occurs when the same field is separately updated in both databases 11 and 21 (stored in the same field). Content may differ). In this case, in the above embodiment, the essential solution cannot be made, but in actual business, there are not so many cases where strict synchronization is required, and in most cases it is sufficient to refer to data. . In such a case, if a database having strict synchronization is used, operability is sacrificed unnecessarily.
【0037】また、インデックスファイル12そのもの
を、ジャーナルファイル(暫定的なファイル)として使
用することができ、つまり、マスタサーバ10と遠隔地
サーバ20との間における人為的な矛盾を管理する場合
に、インデックスファイル12を利用することができ
る。Further, the index file 12 itself can be used as a journal file (temporary file). That is, when managing an artificial inconsistency between the master server 10 and the remote server 20, The index file 12 can be used.
【0038】上記実施例において、通信網を介して、ア
プリケーションソフト13が遠隔地データベース21を
直接更新処理を行うのではなく、アプリケーションソフ
ト13は、マスタサーバ10に用意されているデータベ
ース11のみにアクセスするだけとする。つまり、遠隔
地のアプリケーション23から見れば、データベース1
1は本物ではなくレプリカである。In the above embodiment, the application software 13 does not directly update the remote database 21 via the communication network, but the application software 13 accesses only the database 11 prepared in the master server 10. Just do it. That is, from the viewpoint of the remote application 23, the database 1
1 is not a real one but a replica.
【0039】なお、インデックスファイル12の内容
は、IDの他には、フラグだけが設けられているので、
新規にデータベースを設計する場合は、データベースフ
ァイルと兼用にすることもできる。この場合、データベ
ース11のフィルドに、フラグに充当するフィルドを1
個追加するだけで足りる。The contents of the index file 12 include only a flag in addition to the ID.
When a new database is designed, it can be shared with a database file. In this case, the field corresponding to the flag is set to 1 in the field of the database 11.
It is enough to add them.
【0040】アプリケーションソフト13は、自分のサ
ーバ10内のデータベースフィアルを書き込みするの
で、通信網を経由して更新する場合よりも、遥かに短時
間で書き込み処理を実行することができる。Since the application software 13 writes the database file in its own server 10, the writing process can be executed in a much shorter time than when updating via a communication network.
【0041】図4は、図1に示すデータベースのファイ
ル更新装置FR1の動作を示し、特に、遠隔地サーバ2
0におけるレコードが変更されたことに伴って、マスタ
サーバ10のレコードを更新する場合の動作を示すフロ
ーチャートである。図4において、その左側に記載して
ある動作(S21〜S27)は、遠隔地サーバ側の動作
であり、その右側に記載してある動作(S31〜S3
3)は、マスタサーバ側の動作である。FIG. 4 shows the operation of the database file updating apparatus FR1 shown in FIG.
10 is a flowchart showing an operation when updating a record of the master server 10 in response to a change of a record at 0. In FIG. 4, the operations (S21 to S27) described on the left side are operations on the remote server side, and the operations (S31 to S3) described on the right side thereof.
3) is the operation on the master server side.
【0042】まず、インデックスファイル22における
フラグであって、遠隔地側の全てのレコードにそれぞれ
対応するフラグの全てを「0」にセットする。そして、
遠隔地データベース21におけるデータファイル中の複
数のレコードのうちで、変更が発生する(S22)と、
その変更が発生されたレコードに対応するフラグが
「1」に変更される(S23)。First, all of the flags in the index file 22 corresponding to all the records on the remote side are set to "0". And
When a change occurs in a plurality of records in the data file in the remote place database 21 (S22),
The flag corresponding to the record in which the change has occurred is changed to "1" (S23).
【0043】そして、ファイル更新装置1が、常時、イ
ンデックスファイル22を監視し、「1」であるフラグ
を監視し、「1」であるフラグを発見すると、この
「1」であるフラグに対応するIDを、インデックスフ
ァイル22から得、このIDに対応するレコードを遠隔
地データベース21から取り込む(S24)。ファイル
更新装置2は、遠隔地データベース21から取り込んだ
レコードを、通信網を介して、マスタサーバ10に送出
する(S25)。Then, the file updating apparatus 1 constantly monitors the index file 22 and monitors the flag of "1". When the file updating apparatus 1 finds the flag of "1", it corresponds to the flag of "1". An ID is obtained from the index file 22, and a record corresponding to the ID is taken from the remote database 21 (S24). The file update device 2 sends the record fetched from the remote database 21 to the master server 10 via the communication network (S25).
【0044】マスタサーバ10は、遠隔地サーバ20か
らレコードを受信し(S31)、この受信したレコード
をコピーすることによって、マスタデータベース11の
レコードを更新する(S32)。この更新操作が終了す
ると、マスタサーバ10が遠隔地サーバ20に更新完了
信号を送出する(S33)。The master server 10 receives the record from the remote server 20 (S31), and updates the record in the master database 11 by copying the received record (S32). When this update operation is completed, the master server 10 sends an update completion signal to the remote server 20 (S33).
【0045】ファイル更新装置2は、マスタサーバ10
から更新完了信号を受信すると(S26)、この更新完
了信号に対応するフラグを「0」に戻し、そのフラグに
対応するレコードに、変更が生じていないことを表示さ
せ、また、そのフラグに対応するレコードについてマス
タサーバで更新する必要がないことを表示させる。[0045] The file update device 2
(S26), the flag corresponding to this update completion signal is returned to "0", a record corresponding to the flag is displayed to indicate that no change has occurred, and That the record to be updated does not need to be updated on the master server.
【0046】マスタサーバにのみデータベースを設けた
従来例においては、マスタサーバで発生した変更データ
を、アプリケーションソフトが通信網を経由して遠隔地
サーバに送り、この送られたデータによって、遠隔地サ
ーバのデータを書き換えており、複数のデータベースの
間で同期更新させること(両データベースの一方のデー
タベースで変更されたデータを、他方のデータベースで
更新させること)が不可能になる。一方、マスタサーバ
と遠隔地サーバとの双方にデータベースを別々に設けた
従来例においては、変更されたデータを通信回線を経由
させる必要はないが、複数のデータベースの間で同期更
新させることが不可能になる。In the conventional example in which the database is provided only in the master server, the application software sends the change data generated in the master server to the remote server via the communication network, and the transmitted data sends the changed data to the remote server. , It is impossible to update synchronously between a plurality of databases (data changed in one database of both databases is updated in the other database). On the other hand, in the conventional example in which the databases are separately provided on both the master server and the remote server, it is not necessary to pass the changed data through a communication line, but it is impossible to synchronize and update the plurality of databases. Will be possible.
【0047】上記実施例は、アプリケーションソフト
が、データ処理や画面表示等の本来の仕事の他に、「通
信回線を使用して」更新をする仕事まで行っていること
に着目し、マスタサーバと遠隔地サーバとにデータベー
スを別々に設け、しかも、「データを同期更新をする仕
事」を、上記本来の仕事から分離し、サーバとは別に、
ファイル更新装置1、2を設け、これらファイル更新装
置1、2に、ファイル更新操作を実行させることによっ
て、リアルタイムに更新させるようにしてものである。
なお、ファイル更新装置1、2として、パソコンを使用
するようにしてもよく、専用装置を使用するようにして
もよい。The above embodiment focuses on the fact that the application software performs not only the original work of data processing and screen display, but also the work of updating using a communication line. Separate the database from the remote server, and separate the "work to update data synchronously" from the above-mentioned original work.
The file updating apparatuses 1 and 2 are provided, and the file updating apparatuses 1 and 2 execute a file updating operation to update the file in real time.
It should be noted that a personal computer may be used as the file updating devices 1 and 2, or a dedicated device may be used.
【0048】図5は、本発明の他の実施例であるデータ
ベースのファイル更新装置FR2を示す図である。FIG. 5 is a diagram showing a database file update device FR2 according to another embodiment of the present invention.
【0049】データベースのファイル更新装置FR2
は、マスタサーバ10で発生したレコードの変更につい
て、遠隔地サーバ20の遠隔地データベース21を更新
するものであり、逆方向の更新を実行しないものであ
る。つまり、遠隔地サーバ20でレコードが変更されて
も、この変更について、マスタサーバ10のマスタデー
タベース11を更新しないものである。Database file updating device FR2
Is to update the remote location database 21 of the remote location server 20 with respect to a record change that has occurred in the master server 10, and does not execute update in the reverse direction. In other words, even if the record is changed in the remote server 20, the master database 11 of the master server 10 is not updated for this change.
【0050】データベースのファイル更新装置FR2の
動作は、図2に示す動作と同じである。The operation of the database file update device FR2 is the same as the operation shown in FIG.
【0051】[0051]
【発明の効果】請求項1、2記載発明によれば、WAN
によって構成されたマスタデータベースに対して、低速
の回線を使用しても、遠隔地のデータを、ほぼリアルタ
イムで更新することができるという効果を奏する。According to the first and second aspects of the present invention, a WAN is provided.
In this case, it is possible to update data in a remote place almost in real time even if a low-speed line is used for the master database configured by the above method.
【0052】請求項3、4記載発明によれば、WANに
よって構成されたマスタデータベースに対して、低速の
回線を使用しても、マスタデータベースと遠隔地データ
ベースとを、ほぼリアルタイムで更新することができる
という効果を奏する。According to the third and fourth aspects of the present invention, the master database and the remote database can be updated almost in real time even if a low-speed line is used for the master database configured by the WAN. It has the effect of being able to.
【図1】本発明の一実施例であるデータベースのファイ
ル更新装置FR1を示す概要図である。FIG. 1 is a schematic diagram showing a database file update device FR1 according to an embodiment of the present invention.
【図2】図1に示すデータベースのファイル更新装置F
R1の動作を示し、特に、マスタサーバ10におけるレ
コードが変更されことに伴って、遠隔地サーバ20のレ
コードを更新する場合の動作を示すフローチャートであ
る。FIG. 2 is a file updating apparatus F for the database shown in FIG.
9 is a flowchart showing an operation of R1, and particularly showing an operation when updating a record of the remote server 20 in response to a change of a record in the master server 10.
【図3】上記実施例において、マスタデータベース11
のデータファイル中のレコードの例と、インデックスフ
ァイル12の例とを示す図である。FIG. 3 shows a master database 11 in the embodiment.
FIG. 3 is a diagram showing an example of a record in the data file of FIG.
【図4】図1に示すデータベースのファイル更新装置F
R1の動作を示し、特に、遠隔地サーバ20におけるレ
コードが変更されたことに伴って、マスタサーバ10の
レコードを更新する場合の動作を示すフローチャートで
ある。4 is a file updating apparatus F for the database shown in FIG.
9 is a flowchart showing an operation of R1, and particularly showing an operation when updating a record of the master server 10 in response to a change of a record in the remote server 20.
【図5】本発明の他の実施例であるデータベースのファ
イル更新装置FR2を示す図である。FIG. 5 is a diagram showing a database file update device FR2 according to another embodiment of the present invention.
FR1、FR2…データベースのファイル更新装置、 1、2…ファイル更新装置、 10…マスタサーバ、 11…マスタデータベース、 12…インデックファイル、 13…アプリケーション、 14…マスタ用ハードウェア、 20…遠隔地サーバ、 21…遠隔地データベース、 22…インデックファイル、 23…アプリケーション、 24…遠隔地用ハードウェア。 FR1, FR2: Database file updating device 1, 2, File updating device, 10: Master server, 11: Master database, 12: Index file, 13: Application, 14: Master hardware, 20: Remote server, 21 remote site database 22 index file 23 application 23 remote site hardware
Claims (4)
ファイルと同一構造のデータファイルを遠隔地サーバが
備え、通信網を介して上記遠隔地サーバが上記マスタサ
ーバと接続され、上記マスタサーバのデータファイルの
更新に応じて、上記遠隔地サーバのデータファイルを更
新させるデータベースのファイル更新装置において、 上記マスタサーバのデータファイル中の複数のレコード
のそれぞれについて変更の有無を示すフラグを常時監視
するフラグ監視手段と;上記レコードに変更が発生した
ことを、上記フラグに基づいて、上記フラグ監視手段が
検出したときに、当該変更が発生したレコードを取り込
むレコード取り込み手段と;上記レコード取り込み手段
が取り込んだレコードを、上記通信網を介して上記遠隔
地サーバに送出するレコード送出手段と;を有し、上記
フラグ監視手段と上記レコード取り込み手段と上記レコ
ード送出手段とが、上記マスタサーバとは別に、上記マ
スタサーバ側に設けられていることを特徴とするデータ
ベースのファイル更新装置。1. A remote server having a data file having the same structure as a data file in a database of a master server, wherein the remote server is connected to the master server via a communication network. A file updating device for updating a data file of the remote server in response to the update; a flag monitoring means for constantly monitoring a flag indicating whether or not each of a plurality of records in the data file of the master server has changed; When the flag monitoring means detects that a change has occurred in the record based on the flag, a record fetching means for fetching the record in which the change has occurred; Send to the remote server via the communication network And a code sending means; wherein the flag monitoring means, the record fetching means, and the record sending means are provided on the master server side separately from the master server. Update device.
レコードについて、上記遠隔地サーバが更新完了する
と、上記遠隔地サーバが上記マスタサーバに更新完了情
報を送出し、上記遠隔地サーバから上記マスタサーバが
上記更新完了情報を受信すると、当該変更が発生したレ
コードに対応する上記フラグを更新不可状態に変化させ
ることを特徴とタるデータベースのファイル更新装置。2. The remote server according to claim 1, wherein when the remote server completes updating of the record transmitted to the remote server via the communication network, the remote server sends update completion information to the master server. And transmitting the update completion information from the remote server to the master server, and changing the flag corresponding to the record in which the change has occurred to an update-disabled state.
ファイルと同一構造のデータファイルを遠隔地サーバが
備え、通信網を介して上記遠隔地サーバと上記マスタサ
ーバとが接続され、上記マスタサーバのデータファイル
と上記遠隔地サーバのデータファイルとを更新させるデ
ータベースのファイル更新装置において、 上記マスタサーバのデータファイル中の複数のレコード
のそれぞれについて変更の有無を示す第1のフラグを常
時監視する第1のフラグ監視手段と、上記レコードに変
更が発生したことを、上記第1のフラグに基づいて、上
記第1のフラグ監視手段が検出したときに、当該変更が
発生したレコードを取り込む第1のレコード取り込み手
段と、上記第1のレコード取り込み手段が取り込んだレ
コードを、上記通信網を介して上記遠隔地サーバに送出
する第1のレコード送出手段とを有し、上記第1のフラ
グ監視手段と上記第1のレコード取り込み手段と上記第
1のレコード送出手段とが、上記マスタサーバとは別
に、上記マスタサーバ側に設けられているマスタサーバ
側ファイル更新装置と;上記遠隔地サーバのデータファ
イル中の複数のレコードのそれぞれについて変更の有無
を示す第2のフラグを常時監視する第2のフラグ監視手
段と、上記レコードに変更が発生したことを、上記第2
のフラグに基づいて、上記第2のフラグ監視手段が検出
したときに、当該変更が発生したレコードを取り込む第
2のレコード取り込み手段と、上記第2のレコード取り
込み手段が取り込んだレコードを、上記通信網を介して
上記マスタサーバに送出する第2のレコード送出手段と
を有し、上記第2のフラグ監視手段と上記第2のレコー
ド取り込み手段と上記第2のレコード送出手段とが、上
記遠隔地サーバとは別に、上記遠隔地サーバ側に設けら
れている遠隔地サーバ側ファイル更新装置と;を有する
ことを特徴とするデータベースのファイル更新装置。3. The remote server includes a data file having the same structure as a data file in a database of the master server. The remote server and the master server are connected via a communication network, and the data file of the master server is provided. A file updating device for updating a data file of the remote server and a data file of the remote server, wherein a first flag for constantly monitoring a first flag indicating the presence or absence of a change in each of a plurality of records in the data file of the master server. Monitoring means, and first record capturing means for capturing a record in which the change has occurred when the first flag monitoring means detects that a change has occurred in the record based on the first flag. And the record fetched by the first record fetching means via the communication network. A first record sending unit for sending to the remote server, wherein the first flag monitoring unit, the first record fetching unit, and the first record sending unit are separate from the master server. A master server-side file update device provided on the master server; and a second flag for constantly monitoring a second flag indicating whether or not each of a plurality of records in the data file of the remote server is changed. Monitoring means for notifying that the change has occurred in the record;
When the second flag monitor detects the second record based on the flag of the second record, the second record capturer captures the record in which the change has occurred, and records the record captured by the second record capturer in the communication. Second record sending means for sending to the master server via a network, wherein the second flag monitoring means, the second record fetching means, and the second record sending means are connected to the remote location. A file updating device for a database provided on the remote server side, separately from the server.
レコードについて、上記遠隔地サーバが更新完了する
と、上記遠隔地サーバが上記マスタサーバに更新完了情
報を送出し、上記遠隔地サーバから上記マスタサーバが
上記更新完了情報を受信すると、当該変更が発生したレ
コードに対応する上記第1のフラグを更新不可状態に変
化させ、 一方、上記通信網を介して上記マスタサーバに送信され
た上記レコードについて、上記マスタサーバが更新完了
すると、上記マスタサーバが上記遠隔地サーバに更新完
了情報を送出し、上記マスタサーバから上記遠隔地サー
バが上記更新完了情報を受信すると、当該変更が発生し
たレコードに対応する上記第2のフラグを更新不可状態
に変化させることを特徴とするデータベースのファイル
更新装置。4. The remote server according to claim 3, wherein when the remote server completes updating of the record transmitted to the remote server via the communication network, the remote server sends update completion information to the master server. And when the master server receives the update completion information from the remote server, changes the first flag corresponding to the record in which the change has occurred to an update-disabled state. When the master server completes updating of the record transmitted to the master server, the master server sends update completion information to the remote server, and the remote server receives the update completion information from the master server. Then, the second flag corresponding to the record in which the change has occurred is changed to a non-updatable state. File updating device of the database.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8331666A JPH10161917A (en) | 1996-11-27 | 1996-11-27 | Database file update device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8331666A JPH10161917A (en) | 1996-11-27 | 1996-11-27 | Database file update device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH10161917A true JPH10161917A (en) | 1998-06-19 |
Family
ID=18246230
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP8331666A Pending JPH10161917A (en) | 1996-11-27 | 1996-11-27 | Database file update device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH10161917A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002366481A (en) * | 2001-06-05 | 2002-12-20 | Nippon Telegraph & Telephone East Corp | Electronic bulletin board system, recording medium, and program |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH03202935A (en) * | 1989-12-28 | 1991-09-04 | Hitachi Ltd | Synchronization update system in distributed processing system |
-
1996
- 1996-11-27 JP JP8331666A patent/JPH10161917A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH03202935A (en) * | 1989-12-28 | 1991-09-04 | Hitachi Ltd | Synchronization update system in distributed processing system |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002366481A (en) * | 2001-06-05 | 2002-12-20 | Nippon Telegraph & Telephone East Corp | Electronic bulletin board system, recording medium, and program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12341887B2 (en) | Techniques for maintaining snapshot data consistency during file system cross-region replication | |
| CN101426026B (en) | Method and system for data synchronization between multiple servers | |
| US7934262B1 (en) | Methods and apparatus for virus detection using journal data | |
| CN101221573B (en) | Method for restoring storage database to the original state | |
| US6181867B1 (en) | Video storage and retrieval system | |
| US20070255763A1 (en) | Database replication method and system | |
| US20140081927A1 (en) | Data node fencing in a distributed file system | |
| JP2001273219A (en) | Picture sharing system | |
| JP2025523408A (en) | Techniques for Replication Checkpointing During Disaster Recovery | |
| US20190294836A1 (en) | Memory structure for inventory management | |
| CN114185489A (en) | Data synchronization method and device, electronic equipment and storage medium | |
| CN111400263A (en) | Monitoring switch-back method and device based on file change | |
| JPH10161917A (en) | Database file update device | |
| JPH09186686A (en) | Network management system | |
| JP2009098757A (en) | Security monitoring control system | |
| JPH113368A (en) | Schedule data management method and system in distributed environment and storage medium storing schedule data management program | |
| JP3239463B2 (en) | Electronic conference system | |
| CN115776491B (en) | Data sharing methods and data sharing systems | |
| JP2015041146A (en) | Server device, client device, system, information processing method, and program | |
| CN115080560B (en) | Data processing method and device | |
| JPH1141588A (en) | Access History Management System for Video Server System | |
| JP2004038232A (en) | Information management device, information processor and method for controlling them, information management system and program | |
| CN110647279A (en) | Method, system, device, equipment and medium for managing articles in article storage box | |
| JP2000148563A (en) | Multiple server computer system | |
| TWI224277B (en) | Method displaying redirected data on remote computer and computer system using the method |