[go: up one dir, main page]

JP2001117931A - Database system - Google Patents

Database system

Info

Publication number
JP2001117931A
JP2001117931A JP29501699A JP29501699A JP2001117931A JP 2001117931 A JP2001117931 A JP 2001117931A JP 29501699 A JP29501699 A JP 29501699A JP 29501699 A JP29501699 A JP 29501699A JP 2001117931 A JP2001117931 A JP 2001117931A
Authority
JP
Japan
Prior art keywords
data
site
log
change
sites
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.)
Withdrawn
Application number
JP29501699A
Other languages
Japanese (ja)
Inventor
Shigeru Furuki
茂 古木
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP29501699A priority Critical patent/JP2001117931A/en
Publication of JP2001117931A publication Critical patent/JP2001117931A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【課題】 ネットワークの負荷を少なくし各サイト間の
データの一致化を図る。 【解決手段】 複数のサイトに備えられ、データが記憶
されるテーブルT1,T2と、テーブルT1,T2にお
けるデータ変更のログデータを収集するログ収集手段
と、テーブルT1,T2へのアクセスがあると、他のサ
イトのログエリアLOG1,LOG2のログデータを参
照してデータ変更の有無を検出し、変更有りを検出する
と前記他のサイトのログデータに基づいて自サイトのテ
ーブルT1,T2のデータを前記他のサイトのテーブル
T1,T2のデータに一致させるデータ一致化手段とを
具備する。
(57) [Summary] [Problem] To reduce the load on a network and to make data consistent between sites. SOLUTION: When there are tables T1 and T2 provided at a plurality of sites and storing data, log collection means for collecting log data of data changes in the tables T1 and T2, and access to the tables T1 and T2. The presence / absence of a data change is detected by referring to the log data of the log areas LOG1 and LOG2 of the other site. Data matching means for matching the data of the tables T1 and T2 of the other sites.

Description

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

【0001】[0001]

【発明の属する技術分野】近年、データベースシステム
では、分散化の傾向の進行により複数のサイトに同一デ
ータを置く必要が生じている。係るシステムにおいて
は、各サイトのデータの同期、整合性をとる機能とし
て、レプリケーション機能が採用される。
BACKGROUND OF THE INVENTION In recent years, in a database system, it has become necessary to store the same data in a plurality of sites due to the progress of decentralization. In such a system, a replication function is adopted as a function for synchronizing and matching data at each site.

【0002】[0002]

【従来の技術】従来のレプリケーション機能としては、
定期的に他のサイトへデータ変更の有無を問い合わせ、
サイト間のデータの同期をとるものが一般的である。
2. Description of the Related Art Conventional replication functions include:
We regularly ask other sites for data changes,
It is common to synchronize data between sites.

【0003】例えば、図6に示されるように、サイト1
00−1〜100−Nがネットワーク110を介してセ
ンタ120に接続され、サイト100−1〜100−N
が、CPU101−1〜101−Nとデータベース部1
02−1〜102−Nを備えている。サイト100−1
〜100−Nには、それぞれ複数のパーソナルコンピュ
ータ等の端末が接続されている。
[0003] For example, as shown in FIG.
00-1 to 100-N are connected to the center 120 via the network 110, and the sites 100-1 to 100-N
Are the CPUs 101-1 to 101-N and the database unit 1
02-1 to 102-N. Site 100-1
100 to N are connected to a plurality of terminals such as personal computers.

【0004】そして、係るシステムではセンタ120が
サイト100−1〜100−NのCPU101−1〜1
01−Nへ定期的に問い合わせを行い、データベース部
102−1〜102−Nにて変更されたデータがある場
合には、変更されたデータを他のサイトのデータベース
部102−1〜102−Nに反映させる処理を行ってゆ
く。
In such a system, the center 120 is composed of the CPUs 101-1 to 101-1 of the sites 100-1 to 100-N.
01-N, and if there is data changed in the database units 102-1 to 102-N, the changed data is sent to the database units 102-1 to 102-N of another site. The process to reflect on is performed.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記の
ようなレプリケーション機能によると、定期的周期を適
切に設定することが極めて困難であり、データの変更に
対して問い合わせが遅れると、各サイト間でデータの不
一致が大きくなる問題点があり、逆データの変更に対し
て問い合わせが頻繁過ぎると、無駄な問い合わせが行わ
れていることになり、ネットワークに対する負荷が大き
なものとなる問題点があった。
However, according to the above-described replication function, it is extremely difficult to appropriately set the periodic period. There is a problem that data inconsistency becomes large. If queries are frequently made for changes in reverse data, useless queries are made and the load on the network becomes large.

【0006】本発明は上記のような従来のデータベース
システムの問題点を解決せんとしてなされたもので、そ
の目的は、ネットワークの負荷を大きくすることなく各
サイト間のデータの一致化を図ることのできるデータベ
ースシステムを提供することである。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems of the conventional database system, and an object of the present invention is to match data between sites without increasing the load on a network. The goal is to provide a database system that can do this.

【0007】[0007]

【課題を解決するための手段】本発明に係るデータベー
スシステムは、複数のサイトに備えられ、データが記憶
される記憶手段と、前記記憶手段におけるデータ変更の
ログデータを収集するログ収集手段と、前記記憶手段へ
のアクセスがあると、他のサイトのログデータを参照し
てデータ変更の有無を検出し、変更有りを検出すると前
記他のサイトのログデータに基づいて自サイトの記憶手
段のデータを前記他のサイトの記憶手段のデータに一致
させるデータ一致化手段とを具備することを特徴とす
る。これにより、データアクセスの際にはサイト間にお
いてデータの一致化が図られることになる。
A database system according to the present invention is provided at a plurality of sites and has storage means for storing data, log collection means for collecting log data of data changes in the storage means, When there is access to the storage means, the presence / absence of data change is detected by referring to the log data of another site. When the presence of change is detected, the data of the storage means of the own site is detected based on the log data of the other site. And data matching means for matching the data with the data in the storage means of the other site. As a result, at the time of data access, data consistency between sites is achieved.

【0008】また、本発明に係るデータベースシステム
は、複数のサイトに備えられ、データが記憶される記憶
手段と、前記記憶手段のデータに変更がなされると、こ
の変更に係るデータを他のサイトの記憶手段に反映させ
るデータ一致化手段とを具備することを特徴とする。こ
れにより、データ変更がなされた際にはサイト間におい
てデータの一致化が図られることになる。
Further, the database system according to the present invention is provided at a plurality of sites, a storage means for storing data, and when data in the storage means is changed, the data relating to the change is transferred to another site. And data matching means for reflecting the data in the storage means. As a result, when data is changed, data consistency between sites is achieved.

【0009】[0009]

【発明の実施の形態】以下、添付図面を参照して本発明
の実施の形態に係るデータベースシステムを説明する。
図1には本発明の実施の形態に係るデータベースシステ
ムの構成が示されている。サイト1−1〜1−Nがネッ
トワーク10を介して相互に接続され、サイト1−1〜
1−Nが、CPU11−1〜11−Nとデータベース部
12−1〜12−Nを備えている。サイト1−1〜1−
Nには、それぞれ複数のパーソナルコンピュータ等の端
末が接続されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A database system according to an embodiment of the present invention will be described below with reference to the accompanying drawings.
FIG. 1 shows a configuration of a database system according to an embodiment of the present invention. The sites 1-1 to 1-N are mutually connected via the network 10, and the sites 1-1 to 1-N
1-N includes CPUs 11-1 to 11-N and database units 12-1 to 12-N. Site 1-1 to 1-1
N is connected to a plurality of terminals such as personal computers.

【0010】次に第1の実施の形態を説明する。ここで
は、上記システムにおいてNが2の場合を考える。図2
に示されるように、サイト1−1のデータベース部12
−1には、データベースに係るデータを記憶するための
テーブルT1が備えられ、サイト1−2のデータベース
部12−2には、データベースに係るデータを記憶する
ためのテーブルT2が備えられている。
Next, a first embodiment will be described. Here, a case where N is 2 in the above system is considered. FIG.
As shown in FIG.
-1 is provided with a table T1 for storing data related to the database, and the database unit 12-2 of the site 1-2 is provided with a table T2 for storing data related to the database.

【0011】また、サイト1−1のCPU11−1は、
データ変更のログデータを保持するログエリアLOG1
を有し、サイト1−2のCPU11−2は、データ変更
のログデータを保持するログエリアLOG2を有する。
また、サイト1−1のCPU11−1は、データ一致化
を図るための処理プログラムが記述されたデータベース
トリガDB−TR1を有し、サイト1−2のCPU11
−2は、データ一致化を図るための処理プログラムが記
述されたデータベーストリガDB−TR2を有する。デ
ータベーストリガDB−TRには、一致化(データベー
ストリガDB−TRの記述では「select」)の対象とな
るサイト及びテーブルの識別情報が、1または複数記憶
されている。
Also, the CPU 11-1 of the site 1-1 is:
Log area LOG1 that holds log data of data changes
And the CPU 11-2 of the site 1-2 has a log area LOG2 for holding log data of data change.
The CPU 11-1 of the site 1-1 has a database trigger DB-TR1 in which a processing program for achieving data matching is described.
-2 has a database trigger DB-TR2 in which a processing program for achieving data matching is described. The database trigger DB-TR stores one or a plurality of pieces of identification information of sites and tables to be matched (“select” in the description of the database trigger DB-TR).

【0012】以上の構成において、サイト1−1のCP
U11−1は、自サイトにてデータ変更があると、ログ
エリアLOG1へ当該変更に係るデータのテーブルT1
におけるアドレス、変更前データ、変更後データ、日付
(date)を履歴として記憶する(ログ収集手段)。
サイト1−2のCPU11−2も同様に、自サイトにて
データ変更があると、ログエリアLOG2へ当該変更に
係るデータのテーブルT2におけるアドレス、変更前デ
ータ、変更後データ、日付(date)を履歴として記
憶する(ログ収集手段)。
In the above configuration, the CP of the site 1-1 is
When there is a data change at its own site, U11-1 stores in the log area LOG1 a table T1 of data relating to the change.
, The data before the change, the data after the change, and the date are stored as a history (log collecting means).
Similarly, when there is a data change at its own site, the CPU 11-2 of the site 1-2 stores the address, the pre-change data, the post-change data, and the date (date) in the table T2 of the data relating to the change in the log area LOG2. Store as a history (log collecting means).

【0013】そして、サイト1−1のCPU11−1、
サイト1−2のCPU11−2は、それぞれ、図3に示
されるフローチャートに対応プログラムを有し、これを
実行することによりデータ一致化手段として機能する。
以下の説明では、サイト1−2のCPU11−2による
動作を説明するが、サイト1−1のCPU11−1も同
様に動作を行う。
Then, the CPU 11-1 of the site 1-1,
Each of the CPUs 11-2 of the site 1-2 has a program corresponding to the flowchart shown in FIG. 3, and functions as a data matching unit by executing the program.
In the following description, the operation of the CPU 11-2 of the site 1-2 will be described, but the CPU 11-1 of the site 1-1 operates similarly.

【0014】図3に示す通り、テーブルT2の例えば図
2の最上の最左欄のエリアへアクセスが発生するとスタ
ートとなり、他のサイトであるサイト1−1のログエリ
アLOG1のログデータを参照して当該アクセスに係る
データに変更が生じているかを検出する(S1、S
2)。ここで、当該データに変更が生じている場合に
は、他のサイトであるサイト1−1のログエリアLOG
1のログデータに基づき対応するデータをテーブルT1
から取り込み、これをテーブルT2へ反映させる(S
3)。
As shown in FIG. 3, when an access occurs to, for example, an area in the leftmost column at the top of FIG. 2 in the table T2, a start is made, and the log data of the log area LOG1 of the site 1-1 which is another site is referred to. To detect whether the data related to the access has been changed (S1, S2).
2). Here, if there is a change in the data, the log area LOG of the site 1-1, which is another site, is obtained.
Table 1 corresponding data based on the log data
And reflect this in the table T2 (S
3).

【0015】そして、この反映を行ったエリアのデータ
をアクセス元へ返送する(S4)。このステップS4の
処理は、ステップS2において、当該アクセスに係るデ
ータに変更が生じていないことが検出された場合にも実
行される。
Then, the data in the reflected area is returned to the access source (S4). The process in step S4 is also executed when it is detected in step S2 that the data related to the access has not been changed.

【0016】次に、図4、図5を参照して第2の実施の
形態を説明する。この実施の形態でも第1の実施の形態
と同様に、テーブルT1とテーブルT2が備えられてい
るが、ログデータを使用しない。そして、データ一致化
を図るための処理プログラムが記述されたデータベース
トリガDB−TR(サイト1−1ではデータベーストリ
ガDB−TR1−2、サイト1−2ではデータベースト
リガDB−TR2−2)が用いられる。データベースト
リガDB−TRには、データを反映(データベーストリ
ガDB−TRの記述では「insert」) させる相手となる
サイト及びテーブルの識別情報が、1または複数記憶さ
れている。
Next, a second embodiment will be described with reference to FIGS. In this embodiment, similarly to the first embodiment, a table T1 and a table T2 are provided, but log data is not used. Then, a database trigger DB-TR (a database trigger DB-TR1-2 at the site 1-1 and a database trigger DB-TR2-2 at the site 1-2) in which a processing program for achieving data matching is described is used. . The database trigger DB-TR stores one or more pieces of identification information of sites and tables to which data is reflected (“insert” in the description of the database trigger DB-TR).

【0017】そして、サイト1−1のCPU11−1、
サイト1−2のCPU11−2は、それぞれ、図5に示
されるフローチャートに対応プログラムを有し、これを
実行することによりデータ一致化手段として機能する。
以下の説明では、サイト1−2のCPU11−2による
動作を説明するが、サイト1−1のCPU11−1も同
様に動作を行う。
Then, the CPU 11-1 of the site 1-1,
Each of the CPUs 11-2 of the site 1-2 has a program corresponding to the flowchart shown in FIG. 5, and functions as a data matching unit by executing the program.
In the following description, the operation of the CPU 11-2 of the site 1-2 will be described, but the CPU 11-1 of the site 1-1 operates similarly.

【0018】図5に示す通り、テーブルT2の例えば図
4の斜線のエリアにてデータ変更が発生するとスタート
となり、変更に係るデータをデータベーストリガDB−
TR2−2に応じて他のサイトであるサイト1−1のテ
ーブルT1の該当欄へ書き込み反映を行う(S5)。こ
れにより、当該サイトで生じたデータの変更が、データ
の変更時に所要のサイトへ反映されることになる。
As shown in FIG. 5, when a data change occurs in, for example, the hatched area of FIG.
In accordance with TR2-2, the data is reflected in the corresponding column of the table T1 of the site 1-1 which is another site (S5). As a result, a change in data generated at the site is reflected on a required site when the data is changed.

【0019】[0019]

【発明の効果】以上説明したよう本発明によれば、デー
タが記憶される記憶手段と、前記記憶手段におけるデー
タ変更のログデータを収集するログ収集手段と、前記記
憶手段へのアクセスがあると、他のサイトのログデータ
を参照してデータ変更の有無を検出し、変更有りを検出
すると前記他のサイトのログデータに基づいて自サイト
の記憶手段のデータを前記他のサイトの記憶手段のデー
タに一致させるデータ一致化手段とを具備するので、デ
ータアクセスの際には変更有りが検出され、この場合に
前記他のサイトのログデータに基づいてサイト間におい
てデータの一致化が図られることになり、無駄なくデー
タベースのデータの同期をとることができ、しかもアク
セス元へ適切なデータを送ることが可能となる。
As described above, according to the present invention, there is provided a storage means for storing data, a log collection means for collecting log data of data change in the storage means, and an access to the storage means. The presence / absence of data change is detected by referring to the log data of the other site, and when the presence of the change is detected, the data of the storage unit of the own site is stored in the storage unit of the other site based on the log data of the other site. Since data matching means is provided for matching data, the presence of a change is detected at the time of data access, and in this case, matching of data between sites is attempted based on the log data of the other site. Thus, the data in the database can be synchronized without waste, and appropriate data can be sent to the access source.

【0020】また、本発明によれば、データが記憶され
る記憶手段と、前記記憶手段のデータに変更がなされる
と、この変更に係るデータを他のサイトの記憶手段に反
映させるデータ一致化手段とを具備するので、データ変
更がなされた際にはサイト間においてデータの一致化が
図られることになり、無駄なくデータベースのデータの
同期をとることができる。
Further, according to the present invention, a storage means for storing data and a data matching means for reflecting the data related to the change to the storage means of another site when the data of the storage means are changed. Therefore, when the data is changed, the data is matched between the sites, and the data in the database can be synchronized without waste.

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

【図1】本発明の実施の形態に係るデータベースシステ
ムの構成を示す図。
FIG. 1 is a diagram showing a configuration of a database system according to an embodiment of the present invention.

【図2】本発明の第1の実施の形態に係るデータベース
システムの要部の詳細構成を示す図。
FIG. 2 is a diagram showing a detailed configuration of a main part of the database system according to the first embodiment of the present invention.

【図3】本発明の第1の実施の形態に係るデータベース
システムの動作を説明するためのフローチャート。
FIG. 3 is a flowchart for explaining the operation of the database system according to the first embodiment of the present invention.

【図4】本発明の第2の実施の形態に係るデータベース
システムの要部の詳細構成を示す図。
FIG. 4 is a diagram showing a detailed configuration of a main part of a database system according to a second embodiment of the present invention.

【図5】本発明の第2の実施の形態に係るデータベース
システムの動作を説明するためのフローチャート。
FIG. 5 is a flowchart for explaining the operation of the database system according to the second embodiment of the present invention.

【図6】従来例に係るデータベースシステムの構成を示
す図。
FIG. 6 is a diagram showing a configuration of a database system according to a conventional example.

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

1−1〜1−N サイト 10 ネットワーク 11−1〜11−N CPU 12−1〜12−N データベース部 T1、T2 テーブル LOG1、LOG2 ログエリア DB−TR1、DB−TR2、DB−TR1−2、DB
−TR2−2 データベーストリガ
1-1 to 1-N site 10 network 11-1 to 11-N CPU 12-1 to 12-N database part T1, T2 table LOG1, LOG2 log area DB-TR1, DB-TR2, DB-TR1-2, DB
-TR2-2 Database trigger

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数のサイトに備えられ、データが記憶
される記憶手段と、 前記記憶手段におけるデータ変更のログデータを収集す
るログ収集手段と、 前記記憶手段へのアクセスがあると、他のサイトのログ
データを参照してデータ変更の有無を検出し、変更有り
を検出すると前記他のサイトのログデータに基づいて自
サイトの記憶手段のデータを前記他のサイトの記憶手段
のデータに一致させるデータ一致化手段とを具備するこ
とを特徴とするデータベースシステム。
1. A storage unit provided at a plurality of sites and storing data, a log collection unit for collecting log data of a data change in the storage unit, and an access to the storage unit, The presence / absence of data change is detected by referring to the log data of the site, and when the presence of the change is detected, the data of the storage means of the own site matches the data of the storage means of the other site based on the log data of the other site. A database system comprising:
【請求項2】 複数のサイトに備えられ、データが記憶
される記憶手段と、 前記記憶手段のデータに変更がなされると、この変更に
係るデータを他のサイトの記憶手段に反映させるデータ
一致化手段とを具備することを特徴とするデータベース
システム。
2. A storage unit provided at a plurality of sites and storing data, and a data match that, when a change is made to the data in the storage unit, reflects data related to the change in a storage unit at another site. A database system comprising:
【請求項3】 データを一致させるべきサイト及び記憶
手段の識別情報が設定されており、 データ一致化手段は、この識別情報に基づきデータ一致
処理を行うことを特徴とする請求項1または2に記載の
データベースシステム。
3. The apparatus according to claim 1, wherein identification information of a site and a storage unit to which data is to be matched is set, and the data matching unit performs data matching processing based on the identification information. The described database system.
JP29501699A 1999-10-18 1999-10-18 Database system Withdrawn JP2001117931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29501699A JP2001117931A (en) 1999-10-18 1999-10-18 Database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29501699A JP2001117931A (en) 1999-10-18 1999-10-18 Database system

Publications (1)

Publication Number Publication Date
JP2001117931A true JP2001117931A (en) 2001-04-27

Family

ID=17815253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29501699A Withdrawn JP2001117931A (en) 1999-10-18 1999-10-18 Database system

Country Status (1)

Country Link
JP (1) JP2001117931A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003058779A (en) * 2001-08-10 2003-02-28 Direct Marketing Kenkyusho:Kk Member information update management system by sharing information between multiple sites
KR20040040938A (en) * 2002-11-08 2004-05-13 에스케이 텔레콤주식회사 The method of synchronizing the information of the client
KR100839445B1 (en) * 2007-02-15 2008-06-19 건국대학교 산학협력단 Mobile Database Synchronization System Using Message Digest and Its Method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003058779A (en) * 2001-08-10 2003-02-28 Direct Marketing Kenkyusho:Kk Member information update management system by sharing information between multiple sites
KR20040040938A (en) * 2002-11-08 2004-05-13 에스케이 텔레콤주식회사 The method of synchronizing the information of the client
KR100839445B1 (en) * 2007-02-15 2008-06-19 건국대학교 산학협력단 Mobile Database Synchronization System Using Message Digest and Its Method

Similar Documents

Publication Publication Date Title
US6785674B2 (en) System and method for structuring data in a computer system
US10417103B2 (en) Fault-tolerant methods, systems and architectures for data storage, retrieval and distribution
CN113987064B (en) Data processing method, system and device
WO1996037837A3 (en) Continuously available database server having multiple groups of nodes with minimum intersecting sets of database fragment replicas
CN105376277B (en) A kind of method of data synchronization and device
KR20140047448A (en) Client and database server for resumable transaction and method thereof
CN111639132B (en) Log synchronization method and device
CN116775727B (en) Data delay statistics method, device, equipment and storage medium
CN113760519B (en) Distributed transaction processing method, device, system and electronic equipment
JP2001117931A (en) Database system
CN114168641A (en) A data restoration method, device, equipment and storage medium
JP5416490B2 (en) Distributed data management system, data management apparatus, data management method, and program
KR102105478B1 (en) High throughput, highly reliable data processing system
CN108415951A (en) A kind of database control method and system
WO2025139127A1 (en) Log matching method and apparatus for master and slave nodes, and storage medium and electronic device
JP2005534099A (en) Database synchronization
US20060117076A1 (en) Method for replication tracing
JP3250453B2 (en) Link maintenance system
Liang et al. Online recovery in cluster databases
CN116684429A (en) Semi-synchronous and asynchronous network blockchain consensus switching method and device
JPH07114495A (en) Multiplexing file managing system
CN114297182A (en) Industrial model data management method, device, equipment and readable storage medium
WO2004006067A2 (en) System and method for structuring data in a computer system
JPS63278155A (en) Management processing system for decentralized data base
JP2000020374A (en) Replication control system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070109