JP5108637B2 - Data update method and data update system - Google Patents

Data update method and data update system Download PDF

Info

Publication number
JP5108637B2
JP5108637B2 JP2008145358A JP2008145358A JP5108637B2 JP 5108637 B2 JP5108637 B2 JP 5108637B2 JP 2008145358 A JP2008145358 A JP 2008145358A JP 2008145358 A JP2008145358 A JP 2008145358A JP 5108637 B2 JP5108637 B2 JP 5108637B2
Authority
JP
Japan
Prior art keywords
update
page
terminal
version
file
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.)
Expired - Fee Related
Application number
JP2008145358A
Other languages
Japanese (ja)
Other versions
JP2009020873A (en
Inventor
徹 伊藤
聖宣 原
秀司 島田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Hitachi Solutions Ltd
Original Assignee
Hitachi Ltd
Hitachi Solutions Ltd
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 Hitachi Ltd, Hitachi Solutions Ltd filed Critical Hitachi Ltd
Priority to JP2008145358A priority Critical patent/JP5108637B2/en
Priority to EP08252031.3A priority patent/EP2003579B1/en
Priority to US12/138,931 priority patent/US8051054B2/en
Publication of JP2009020873A publication Critical patent/JP2009020873A/en
Application granted granted Critical
Publication of JP5108637B2 publication Critical patent/JP5108637B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、データ更新方法、および、データ更新システムに関する。 The present invention relates to a data updating method, and relates to a data updating system.

データベース(以下、適宜DB(Database)と省略する)のデータ更新には、CPU(Central Processing Unit)やメモリなどのリソース(計算機資源)を必要とする。組み込みシステムのようなリソースに制約がある端末上のデータベースに対して、データを大量に更新する処理は、負担となる。   Updating data in a database (hereinafter abbreviated as DB (Database) as appropriate) requires resources (computer resources) such as a CPU (Central Processing Unit) and memory. The process of updating a large amount of data with respect to a database on a terminal such as an embedded system that has limited resources is a burden.

これまで、組み込みシステム内のデータベースは、データベース管理システムのようなミドルウェアで管理するのではなく、組み込みシステム内のアプリケーションが独自に処理を作りこむような手法を用いていた。   Until now, the database in the embedded system is not managed by middleware like a database management system, but a method in which an application in the embedded system creates its own processing has been used.

ところが、近年のストレージ技術の進歩、組込みシステムの高機能化により、扱うデータの大容量化、多様化が進み、組み込みシステム内のアプリケーション独自のデータ管理では、組込みシステムに要求されるより高い性能や信頼性に応えることは困難になりつつある。また、組込みシステム市場における競争の激化により、製品開発のスピードが更に重要になっていきている。   However, due to recent advances in storage technology and higher functionality of embedded systems, the volume of data handled and the diversification have advanced, and in application-specific data management in embedded systems, higher performance and higher performance required for embedded systems are required. It is becoming difficult to meet reliability. In addition, the speed of product development is becoming more important due to intensifying competition in the embedded system market.

このような状況の中、端末上のデータベースについて、組み込みシステム内のアプリケーション内に実装するのではなく、センタなどのリソースが豊富なコンピュータで動作するような高機能なRDB(Relational Database)を適用して、アプリケーションとデータ管理を分離し、ソフトウェア開発の生産性を高めようとする認識が広がっている。   In such a situation, the database on the terminal is not implemented in an application in the embedded system, but a high-performance RDB (Relational Database) that operates on a computer with abundant resources such as a center is applied. As such, there is a growing awareness of separating application and data management and increasing software development productivity.

ここで、前記センタよりは低性能な組み込みシステムに、高機能なRDBを動作させるために、処理を軽減させる必要がある。処理を軽減させる方法の一例として、更新命令のログデータを活用する方法が挙げられる。例えば、特許文献1では、自局への更新を実施するときに、その更新命令をログとして記録しておき、他局への更新を実施するときにもそのログを活用する。
特開2004−145827号公報
Here, it is necessary to reduce processing in order to operate a high-performance RDB in an embedded system having a lower performance than the center. As an example of a method for reducing processing, there is a method of using log data of update instructions. For example, in Patent Document 1, when an update to the own station is performed, the update instruction is recorded as a log, and the log is also used when an update to another station is performed.
JP 2004-145827 A

しかしながら、従来の技術では、組み込みシステムでRDBを動作させるほどには、充分に処理が軽減させていなかった。   However, in the conventional technique, the processing has not been sufficiently reduced to operate the RDB in the embedded system.

例えば、特許文献1では、複数の装置でログを再利用するが、ログの適用にはSQL(Structured Query Language)などにより記述された更新命令(以下、SQL更新命令と略す)を解釈して適用する処理が、各装置で個別に必要となる。この更新命令に関する処理が高負荷な理由は、更新命令の演算対象がRDBのテーブルという論理構造を対象とするためである。   For example, in Patent Document 1, a log is reused by a plurality of devices, but an update command written in SQL (Structured Query Language) or the like (hereinafter abbreviated as an SQL update command) is applied to apply the log. This process is required for each device individually. The reason why the processing related to the update instruction is heavy is that the operation target of the update instruction is a logical structure called an RDB table.

つまり、各装置は、自装置に格納された物理構造としてのファイルから論理構造としてのテーブルを組み立てる処理が必要となるが、この処理が高負荷となってしまう。   In other words, each device needs to assemble a table as a logical structure from a file as a physical structure stored in the device itself, but this processing becomes a heavy load.

そこで、本発明は、前記した問題を解決し、高性能なコンピュータおよび前記センタよりは低性能なコンピュータが協働するシステムにおいて、前記センタよりは低性能なコンピュータへのデータベース処理の負荷を軽減することを主な目的とする。   Therefore, the present invention solves the above-described problems and reduces the load of database processing on a computer having a lower performance than the center in a system in which a high performance computer and a computer having a lower performance than the center cooperate. The main purpose.

前記課題を解決するため、本発明は、2次元の表により構成されるRDB(Relational Database)の論理構造としてのテーブルを、ディスク装置のファイルに格納される物理構造としてのページとして、バージョンごとに管理するDBMS(Data Base Management System)を、高性能な1台のセンタ、および、前記センタよりは低性能な1台以上の端末において、互いに同一のバージョンで稼働を開始するデータベースシステムにより実行されるデータ更新方法であって、
前記センタが、
入力されたセンタ側受付命令を前記テーブルに適用した結果をファイルのDB領域内のページに格納し、
前記DB領域内のページについて、前記センタ側受付命令による更新前バージョンから更新後バージョンへのデータ変更がなされた差分ページを示す更新差分ファイルを作成する場合に、前記センタ装置側受付命令を適用更新前バージョンの前記DB領域内のページに適用するときに、ページが更新されたことを示す更新フラグを、ページの配列に対応する更新フラグ配列の更新されたページに対応する箇所について更新済と設定し、前記更新フラグ配列を順に参照し、前記更新フラグが更新済となっているページを差分ページとして抽出し、
各前記端末が、
入力された端末側受付命令を前記テーブルに適用した結果をファイルの前記DB領域内のページに格納し、
前記DB領域内のページについて、前記端末側受付命令による更新前バージョンから前記更新後バージョンへのデータ変更がなされたページについて、更新前バージョンのページをバックアップページとしてバックアップファイルに退避し、
前記センタ側受付命令が発行されたときに、前記端末側受付命令により前記更新後バージョンへのデータ変更がなされたページについて、前記バックアップページを上書きコピーすることにより、前記端末側受付命令が適用される前である更新前バージョンに書き戻し、
前記センタから通知された前記更新差分ファイルの差分ページを、前記端末のDB領域上のページに上書きコピーすることにより、前記センタ側受付命令が適用された後である前記更新後バージョンに更新することを特徴とする。
その他の手段は、後記する。
In order to solve the above-described problem, the present invention provides a table as a logical structure of an RDB (Relational Database) composed of a two-dimensional table as a page as a physical structure stored in a file of a disk device for each version. A DBMS (Data Base Management System) to be managed is executed by a database system that starts operation with the same version in one high-performance center and one or more terminals that have lower performance than the center. A data update method,
The center is
Store the result of applying the inputted center side acceptance instruction to the table in a page in the DB area of the file,
For the page in the DB area, when the update difference file indicating the difference page in which the data change from the pre-update version to the post-update version by the center side reception instruction is created , the center apparatus side reception instruction is applied and updated. When applied to a page in the DB area of the previous version, an update flag indicating that the page has been updated is set as updated for the location corresponding to the updated page of the update flag array corresponding to the page array Then, referring to the update flag array in order, the page where the update flag has been updated is extracted as a difference page,
Each said terminal
Store the result of applying the received terminal-side acceptance command to the table in a page in the DB area of the file;
For the page in the DB area, for the page in which the data change from the pre-update version to the post-update version by the terminal side acceptance instruction, the pre-update version page is saved in a backup file as a backup page,
When the center side acceptance command is issued, the terminal side acceptance command is applied by overwriting the backup page for the page whose data has been changed to the updated version by the terminal side acceptance command. Write back to the pre-update version,
Updating the updated difference file of the updated difference file notified from the center to the updated version after the application of the center-side acceptance command by overwriting the page in the DB area of the terminal. It is characterized by.
Other means will be described later.

本発明によれば、高性能なセンタおよび前記センタよりは低性能な端末が協働するシステムにおいて、前記センタよりは低性能なコンピュータへのデータベース処理の負荷を軽減することができる。   According to the present invention, in a system in which a high-performance center and a terminal having a lower performance than the center cooperate, it is possible to reduce the load of database processing on a computer having a lower performance than the center.

以下に、本発明が適用されるデータベースシステムの一実施形態について、図面を参照して詳細に説明する。   Hereinafter, an embodiment of a database system to which the present invention is applied will be described in detail with reference to the drawings.

図1は、本実施形態のデータベースシステム全体の概要を示す説明図である。本システムは、1台のセンタと、1台以上の端末とがネットワークで接続されている。センタ、および、端末は、それぞれ所定のバージョンのデータが格納されているDBを有している。以下、センタが有するDBをセンタDBとし、端末が有するDBを端末DBとする。   FIG. 1 is an explanatory diagram showing an overview of the entire database system of this embodiment. In this system, one center and one or more terminals are connected via a network. Each of the center and the terminal has a DB in which a predetermined version of data is stored. Hereinafter, the DB possessed by the center is referred to as the center DB, and the DB possessed by the terminal is referred to as the terminal DB.

センタ、および、端末は、それぞれDBを格納する記憶手段、および、制御処理などを実行するCPUを備えたコンピュータとして実現される。   The center and the terminal are each realized as a computer including a storage unit that stores a DB and a CPU that executes control processing and the like.

なお、図1では、各コンピュータが有するDB内のデータのバージョンを、楕円内の数値にて表現している。例えば、図1(a)の左側(更新前)におけるセンタ、および、全端末は、バージョン「1.0」のデータを有している。つまり、同じ内容データが、各コンピュータに格納されている。   In FIG. 1, the version of the data in the DB possessed by each computer is represented by a numerical value in the ellipse. For example, the center and all terminals on the left side (before update) of FIG. 1A have version “1.0” data. That is, the same content data is stored in each computer.

次に、更新の影響範囲に着目した2種類の更新(センタ側受付更新、および、端末側受付更新)について、説明する。   Next, two types of update (center side received update and terminal side received update) focusing on the influence range of the update will be described.

図1(a)は、端末側受付更新を示す説明図である。端末側受付更新は、図1(b)に示すセンタ側受付更新が対象とする大量のデータ更新とは異なり、組み込みシステム上でも十分実行可能な、負荷が大きくない更新を、主な対象とする。   FIG. 1A is an explanatory diagram showing terminal-side received update. Unlike the large amount of data updates targeted by the center-side received update shown in FIG. 1B, the terminal-side received update mainly targets updates that can be executed sufficiently even on an embedded system and do not have a large load. .

センタDBと端末DBは、初期状態では同一のバージョン「1.0」を保持する。3台の端末のうち、1台の端末Aが、SQLの更新命令の入力を受け付ける。すると、端末Aは、自装置の端末DBに対して、SQLの更新命令を反映する。この更新命令の反映処理は、端末AのDB管理部21(図8)によって実行される。その結果、端末Aの端末DBのバージョンが「1.0」から「1.1」へと更新される。   The center DB and the terminal DB hold the same version “1.0” in the initial state. Of the three terminals, one terminal A accepts an input of an SQL update command. Then, the terminal A reflects the SQL update command on the terminal DB of its own device. This update command reflection processing is executed by the DB management unit 21 (FIG. 8) of the terminal A. As a result, the version of the terminal DB of terminal A is updated from “1.0” to “1.1”.

このバージョン「1.1」への更新は、他の端末やセンタへは反映されず、端末Aに閉じた(換言すると、ローカルな)更新である。端末側受付更新により、各DBでは、独立した更新が行われる。よって、端末が複数ある場合でも、各端末の端末DBは、それぞれ独立して運用され、互いに影響を与えることはない。本実施形態では、端末側受付更新について、バージョン番号の小数値の増加で表現する。   The update to the version “1.1” is an update that is closed to the terminal A (in other words, local) without being reflected to other terminals and centers. Independent update is performed in each DB by terminal side received update. Therefore, even when there are a plurality of terminals, the terminal DBs of the terminals are operated independently and do not affect each other. In the present embodiment, the terminal-side received update is expressed by increasing the decimal value of the version number.

図1(b)は、センタ側受付更新を示す説明図である。図1(a)の端末側受付更新だけを個別に行うと、端末のリソースを圧迫する。そこで、センタ側受付更新は、全ての端末で共通する更新を、リソースの豊富なセンタが代表して行うことにより、端末への負担を軽減する。   FIG.1 (b) is explanatory drawing which shows center side reception update. If only the terminal side received update of FIG. 1A is performed individually, the resources of the terminal are compressed. Therefore, the center side received update reduces the burden on the terminal by performing an update common to all the terminals on behalf of the resource-rich center.

センタDBと端末DBは、初期状態では同一のバージョン「1.0」を保持する。3台の端末を管理するセンタが、SQLの更新命令の入力を受け付ける。すると、センタは、自装置のセンタDBに対して、SQLの更新命令を反映する。この更新命令の反映処理は、センタのDB管理部11(図8)によって実行される。その結果、センタのセンタDBのバージョンが「1.0」から「2.0」へと更新される。   The center DB and the terminal DB hold the same version “1.0” in the initial state. A center that manages three terminals accepts an input of an SQL update command. Then, the center reflects the SQL update command on the center DB of its own device. The update command reflection process is executed by the DB management unit 11 (FIG. 8) of the center. As a result, the version of the center DB of the center is updated from “1.0” to “2.0”.

このバージョン「2.0」への更新は、センタが管理する全端末へと反映される。つまり、全端末に反映される(換言すると、グローバルな)更新である。本明細書では、センタ側受付更新について、バージョン番号の整数値の増加で表現する。   This update to version “2.0” is reflected in all terminals managed by the center. In other words, the update is reflected in all terminals (in other words, global). In this specification, the center side received update is expressed by increasing the integer value of the version number.

ここで、端末側受付更新が行われた後に、センタ側受付更新が行われたときについて、説明する。図1(a)の端末側受付更新により、端末Aの端末DBのバージョン「1.1」と、端末B,Cの端末DBのバージョン「1.0」とが混在する。センタ側受付更新では、センタDBのバージョン「1.0」→「2.0」への更新を、全端末に反映する必要がある。   Here, the case where the center side reception update is performed after the terminal side reception update is performed will be described. As a result of the terminal-side received update in FIG. 1A, the version “1.1” of the terminal DB of the terminal A and the version “1.0” of the terminal DB of the terminals B and C are mixed. In the center side received update, it is necessary to reflect the update of the center DB version “1.0” → “2.0” to all terminals.

まず、端末B,Cでは、更新前のバージョンがセンタと同一な「1.0」であるため、センタの更新と同等の処理を端末でも行うことにより、バージョン「2.0」へと問題なく更新される。   First, in the terminals B and C, the version before the update is “1.0”, which is the same as that of the center. Therefore, the process equivalent to the center update is also performed in the terminal, so that the version “2.0” can be obtained without any problem. Updated.

一方、端末Aでは、更新前のバージョンがセンタとは異なり「1.1」である。よって、センタの更新と同等の処理を行っても、更新前のデータが異なることにより、端末DBをバージョン「2.0」へ更新することはできない。つまり、2種類の更新(端末側受付更新とセンタ側受付更新)を併用するときの問題となる。   On the other hand, in the terminal A, the version before update is “1.1” unlike the center. Therefore, even if processing equivalent to center update is performed, the terminal DB cannot be updated to version “2.0” because the data before update is different. That is, it becomes a problem when two types of updates (terminal side received update and center side received update) are used together.

図1(c)は、2種類の更新を併用するときの問題への対処法を示す説明図である。この図は、端末Aの端末DBのバージョンに着目した状態遷移図であり、楕円の中に記載された数値は、バージョン番号を示す。   FIG.1 (c) is explanatory drawing which shows the coping method to the problem when using two types of update together. This figure is a state transition diagram focusing on the version of the terminal DB of the terminal A, and the numerical value described in the ellipse indicates the version number.

まず、バージョン「1.0」→「1.1」への状態遷移を説明する。端末DBは、図1(a)に示す端末側受付更新を行う。この端末側受付更新は、端末AのDB管理部21(図8)によって実行される。この際、データを書き換えるページを特定すると、実際に書き換える前のページをバックアップファイルとして退避する。このバックアップファイルの退避(格納)処理は、バックアップファイル作成部23(図8)によって実行される。なお、同一箇所のページに対して、複数回の端末側受付更新が行われたときには、バックアップファイルの退避は、各ページにつき最初の一度だけよい。   First, state transition from version “1.0” to “1.1” will be described. The terminal DB performs terminal side received update shown in FIG. This terminal-side received update is executed by the DB management unit 21 (FIG. 8) of the terminal A. At this time, if a page for rewriting data is specified, the page before the actual rewriting is saved as a backup file. The backup file saving (storing) process is executed by the backup file creation unit 23 (FIG. 8). Note that when a terminal-side received update is performed a plurality of times on the same page, the backup file may be saved only once for each page.

次に、バージョン「1.1」→「1.0」への状態遷移を説明する。この状態遷移は、図1(b)で示すバージョン「1.0」→「2.0」のセンタ側受付更新を、端末Aに反映するための前準備である。このセンタ側受付更新を端末Aにも反映するときには、端末Aの端末DBのバージョン「1.1」と、センタDBの更新元バージョン「1.0」と、を同一バージョンにする必要がある。   Next, state transition from version “1.1” to “1.0” will be described. This state transition is a preparation for reflecting the center side received update of version “1.0” → “2.0” shown in FIG. When this center side received update is reflected on the terminal A, the terminal DB version “1.1” of the terminal A and the update source version “1.0” of the center DB need to be the same version.

そのため、端末Aの端末DBのバージョンを「1.1」から「1.0」へと書き戻す。この書き戻し処理は、端末Aのページ書き戻し部25(図8)によって実行される。具体的には、バージョン「1.0」→「1.1」への状態遷移のときの、バージョン「1.0」のバックアップファイルを「1.1」のページに上書きすることで、実現される。   Therefore, the version of the terminal DB of terminal A is written back from “1.1” to “1.0”. This write-back process is executed by the page write-back unit 25 (FIG. 8) of the terminal A. Specifically, it is realized by overwriting the backup file of version “1.0” on the page of “1.1” at the time of state transition from version “1.0” to “1.1”. The

そして、バージョン「1.0」→「2.0」への状態遷移を説明する。この状態遷移は、図1(b)で示すバージョン「1.0」→「2.0」のセンタ側受付更新を、端末Aに反映する処理である。センタは、バージョン「1.0」→「2.0」の差分データを作成し、差分データを端末Aに入力する。   The state transition from version “1.0” to “2.0” will be described. This state transition is processing for reflecting on the terminal A the center side received update of version “1.0” → “2.0” shown in FIG. The center creates difference data of version “1.0” → “2.0”, and inputs the difference data to the terminal A.

具体的には、センタは、あらかじめ用意していた初期状態「1.0」のデータベースと、更新が施された「2.0」のデータベースをページごとに比較し、ページが異なるページのうち、被更新データベースのページをファイルに格納する。このファイルが差分データとなる。この差分データの格納処理は、センタの更新差分ファイル作成部13(図8)によって実行される。センタのデータベースを「1.0」から「2.0」へ更新する処理は、DB管理部11(図8)によって実行される。   Specifically, the center compares the database of the initial state “1.0” prepared in advance with the updated database of “2.0” for each page, and among the pages with different pages, Store the updated database page in a file. This file becomes the difference data. This difference data storage processing is executed by the center update difference file creation unit 13 (FIG. 8). The process of updating the center database from “1.0” to “2.0” is executed by the DB management unit 11 (FIG. 8).

センタからの差分データを入力された端末Aは、バージョン「1.0」の端末DBに、差分データを適用することにより、バージョン「2.0」へと更新する。この更新処理は、端末Aのページ更新部26(図8)によって実行される。これにより、センタ側受付更新が端末Aにも反映される。   The terminal A to which the difference data from the center is input updates the version DB to “2.0” by applying the difference data to the terminal DB of the version “1.0”. This update process is executed by the page update unit 26 of the terminal A (FIG. 8). Thereby, the center side received update is reflected on the terminal A.

さらに、バージョン「2.0」→「2.1」への状態遷移を説明する。この状態遷移は、バージョン「1.0」→「1.1」の端末側受付更新の内容を、バージョン「2.0」に適用することにより、バージョン「2.1」とする処理である。   Further, state transition from version “2.0” to “2.1” will be described. This state transition is a process of setting the version “2.1” by applying the contents of the terminal side received update of version “1.0” → “1.1” to the version “2.0”.

具体的には、端末Aは、既に行ったバージョン「1.0」→「1.1」への端末側受付更新の際のSQL更新命令を記憶しておき、そのSQL更新命令を、バージョン「2.0」へ適用することにより、バージョン「2.1」とする。これにより、1回のSQL更新命令が、2回の端末側受付更新で再利用されるため、端末AへSQL更新命令を入力する手間が省ける。なお、SQL更新命令を記憶する処理は、更新命令履歴管理部27(図8)によって実行される。   Specifically, the terminal A stores the SQL update instruction at the time of the terminal-side received update from “1.0” to “1.1” that has already been performed, and the SQL update instruction is stored in the version “ By applying to "2.0", the version is "2.1". As a result, since one SQL update command is reused in two terminal-side received updates, the trouble of inputting the SQL update command to the terminal A can be saved. The process for storing the SQL update command is executed by the update command history management unit 27 (FIG. 8).

つまり、バージョン「2.1」とすることにより、センタ側受付更新処理の実行後に、バージョン「1.0」への書き戻しの際に失われた端末側受付更新の内容を、回復させることができる。   That is, by setting the version “2.1”, it is possible to recover the contents of the terminal-side received update lost when writing back to the version “1.0” after executing the center-side received update process. it can.

ここで回復できる更新内容は、一部に限られる。例えば、端末側受付更新で所定のページを書き換えた場合、もしその所定のページが、センタ側受付更新処理の結果削除されていた場合、所定のページはなくなっているため、そのような端末側受付更新は、バージョン「2.1」では回復できない。   The update contents that can be recovered here are limited to a part. For example, if a predetermined page is rewritten by terminal-side reception update, if the predetermined page has been deleted as a result of the center-side reception update process, the predetermined page disappears, so such terminal-side reception Updates cannot be recovered with version “2.1”.

一方、ある端末側受付更新が対象としている特定のページが、物理センタ側受付更新処理によって、論理構造上影響を受けない場合、すなわち、表中のどの行にも変更が加わらない場合は、その端末側受付更新の内容は、バージョン「2.1」で回復することができる。   On the other hand, if a specific page targeted for a terminal-side received update is not affected by the logical structure by the physical center-side received update process, that is, if no change is made to any row in the table, The contents of the terminal side received update can be recovered with version “2.1”.

Figure 0005108637
表1は、SQL更新命令の更新命令履歴ファイルの一例である。更新命令履歴ファイルには、更新の順序を識別するための更新IDと、指定されたSQL文と、SQL文の入力パラメータ値とを対応づけて格納する。更新IDは、例えば、SQL更新命令の発行時の時間を識別するように作成される。例えば、第1列の更新ID「2006-1223-0123」は、2006年12月23日01時23分という発行時の時間をもとに作成されたものである。更新IDによって順序を一意に規定することにより、その順序でSQL文を適用することができる。
Figure 0005108637
Table 1 is an example of an update command history file of SQL update commands. In the update command history file, the update ID for identifying the update order, the designated SQL statement, and the input parameter value of the SQL statement are stored in association with each other. The update ID is created, for example, so as to identify the time when the SQL update command is issued. For example, the update ID “2006-1223-0123” in the first column is created based on the issuance time of 01:23 on December 23, 2006. By uniquely defining the order by the update ID, SQL statements can be applied in that order.

図2は、RDBにおける論理構造のテーブルと、物理構造のページとの関係を示す説明図である。   FIG. 2 is an explanatory diagram showing a relationship between a logical structure table in RDB and a physical structure page.

RDBは、今日、情報システムにて運用されている最も一般的なデータベースである。RDBでは、データベースの論理構造を2次元の表(テーブル)形式で表す。テーブルの横方向を行(レコード)、縦方向を列(フィールド)と呼ぶ。行は、表を操作するときの単位であり、一つ以上の列から構成される。各行の同じ列には、同じ形式のデータが格納される。   RDB is the most common database used in information systems today. In RDB, the logical structure of a database is represented in a two-dimensional table format. The horizontal direction of the table is called a row (record), and the vertical direction is called a column (field). A row is a unit for manipulating a table and is composed of one or more columns. Data of the same format is stored in the same column of each row.

RDBでは、データの操作は、SQLという言語を用いて、操作対象となる表および行を指定することで行う。データベース中のデータを操作するには、RDBの操作者は、2次元で示される表の行や列といった論理構造を意識にするだけでよい。   In RDB, data operations are performed by specifying a table and a row to be operated using a language called SQL. In order to manipulate the data in the database, the RDB operator need only be aware of the logical structure such as the rows and columns of the table shown in two dimensions.

つまり、テーブルを格納する物理構造のファイル中において、どこにどのような形で格納されているかといった物理構造を意識しなくてよい。論理構造と物理構造との対応づけは、ミドルウェアであるデータベース管理システムが行う。   That is, it is not necessary to be aware of the physical structure where and in what form the file is stored in the physical structure file storing the table. The correspondence between the logical structure and the physical structure is performed by a database management system that is middleware.

データベースのアクセス対象となるデータは、論理構造のテーブルとして表現される。このテーブルを格納しているDB領域は、オペレーションシステムから見た場合は、物理領域に格納される1つまたは複数のファイルで構成されている。   Data to be accessed by the database is expressed as a logical structure table. The DB area storing this table is composed of one or more files stored in the physical area when viewed from the operation system.

なお、DB領域が複数のファイルから構成される場合は、DB領域に対して行っている更新などの操作を、DB領域を構成する複数のファイルそれぞれに対して行うようにすればよい。ファイルは、固定の大きさ(セグメントとも呼ばれる)を持ったページという単位で区切られている。物理構造上でのデータ操作は、ページごとに行われる。   In the case where the DB area is composed of a plurality of files, an operation such as updating performed on the DB area may be performed on each of the plurality of files constituting the DB area. Files are separated in units of pages with a fixed size (also called segments). Data operations on the physical structure are performed for each page.

図2(a)は、更新前のテーブルを示す。テーブルは、行と列とを軸とした2次元の表形式で表現される。このテーブルに対して、SQL形式で記述された更新命令が適用可能である。なお、図2(a)では、1つのテーブルの一部に着目して説明するが、DB領域は複数のテーブルを格納することとしてもよい。   FIG. 2A shows a table before update. The table is expressed in a two-dimensional table format with rows and columns as axes. An update instruction described in the SQL format can be applied to this table. In FIG. 2A, description will be given focusing on a part of one table, but the DB area may store a plurality of tables.

図2(b)は、図2(a)のテーブルと同じデータであり、DB領域に格納するときのページである。ページは、例えば、テーブルを構成するデータを順番に詰めて保存する。このページに対して、SQL形式で記述された更新命令は適用不可能である。なお、図2(b)では1つのページを抽出して説明したが、1つのテーブルが連続する複数のページにまたがって保存されていてもよい。   FIG. 2B is the same data as the table of FIG. 2A, and is a page when stored in the DB area. The page stores, for example, data constituting the table in order. The update command described in the SQL format is not applicable to this page. In FIG. 2B, one page is extracted and described. However, one table may be stored across a plurality of continuous pages.

図2(c)は、図2(a)に対してSQLの更新命令を適用した結果である更新後のテーブルを示す。SQLの更新命令「SQLの更新命令「第1列が11のレコードを選択し、そのレコードの第2列を999−999に変更」により、各行の第2列の値が「999−999」に更新されている。   FIG. 2C shows an updated table that is a result of applying the SQL update instruction to FIG. The SQL update instruction “SQL update instruction“ selects the record in which the first column is 11 and changes the second column of the record to 999-999 ”, thereby changing the value of the second column of each row to“ 999-999 ”. Has been updated.

データの更新について、データベース管理システムは、SQLの更新命令を受けると、該当ページの特定、および、該当ページ内の該当個所の特定を実行する。まず、該当ページの特定とは、SQLの更新命令で指定されたテーブルが格納されている該当ページを特定すること、換言すると、論理構造から物理構造へ変換することである。   When updating the data, upon receiving the SQL update command, the database management system identifies the corresponding page and identifies the corresponding part in the page. First, the identification of the corresponding page is to identify the corresponding page in which the table specified by the SQL update instruction is stored, in other words, to convert from the logical structure to the physical structure.

次に、該当ページ内の該当個所の特定とは、例えば、該当ページの中にある各行の第1列の値が、「11」であるか確認し、値が「11」の行を見つけると、その行の第2列の値が格納されている領域を値「999−999」に書き換えることである。このように、RDBの更新処理には、該当ページ、およびそのページ内の該当個所の特定というオーバーヘッドが生じてしまう。   Next, the identification of the corresponding part in the corresponding page is, for example, confirming that the value of the first column of each row in the corresponding page is “11”, and finding the row whose value is “11”. , Rewriting the area in which the value of the second column of the row is stored to the value “999-999”. As described above, the RDB update process has an overhead of specifying a corresponding page and a corresponding portion in the page.

図2(d)は、図2(c)のテーブルと同じデータであり、DB領域に格納するときのページである。図2(b)と比較すると、第2列のデータに該当する箇所が「999−999」に書き換わっている。   FIG. 2D is the same data as the table of FIG. 2C, and is a page when stored in the DB area. Compared with FIG. 2B, the portion corresponding to the data in the second column is rewritten as “999-999”.

ここで、本明細書の特徴としては、1回目に論理的更新を行い、2回目以降はその論理的更新の結果を流用して、物理的更新を行うことである。   Here, a feature of this specification is that the logical update is performed first time, and the physical update is performed using the result of the logical update after the second time.

まず、論理的更新とは、図2(b)の更新前のページから図2(d)の更新後のページに更新するときに、ページをテーブルに変換して(図中の実線矢印、図2(b)→図2(a)で示す)、変換したテーブルに対してSQLの更新命令を適用し(図中の実線矢印、図2(a)→図2(c)で示す)、適用されたテーブルをページに変換する(図中の実線矢印、図2(c)→図2(d)で示す)処理である。つまり、論理構造であるテーブルを用いた更新方法なので、論理的更新という。   First, logical update refers to converting a page into a table (solid line arrow in the figure, figure when updating from the page before update in FIG. 2B to the page after update in FIG. 2D). 2 (b) → shown in FIG. 2 (a), and an SQL update instruction is applied to the converted table (solid arrow in the figure, shown in FIG. 2 (a) → FIG. 2 (c)) and applied The converted table is converted into a page (shown by solid arrows in the figure, FIG. 2 (c) → FIG. 2 (d)). In other words, this is an update method using a table having a logical structure, and is called logical update.

一方、物理的更新とは、図2(b)の更新前のページから図2(d)の更新後のページに更新するときに、更新前のページが記憶されているDB領域に対して、更新後のページをコピー(上書き)する処理である。つまり、論理構造であるテーブルを用いず、物理構造であるページをそのまま用いた更新方法なので、物理的更新という。   On the other hand, physical update refers to the DB area in which the page before update is stored when updating from the page before update in FIG. 2B to the page after update in FIG. This is a process of copying (overwriting) the updated page. In other words, the update method uses the physical structure page as it is without using the logical structure table, and is called physical update.

なお、物理的更新には、更新前から更新後に更新する(バージョンアップする)ページ更新と、更新後から更新前に書き戻すページ書き戻しとがある。いずれの物理的更新でも、計算機の処理としては、SQLの解釈を行わずに、記憶装置に対するデータコピーだけで済むので、高速な処理が可能となる。つまり、SQLによる更新処理で発生していた論理構造から物理構造への変換によるオーバーヘッドが生じず、更新にかかる時間をほぼディスクの入出力時間と見積もることができる。   The physical update includes a page update that is updated (upgraded) after the update before the update, and a page write-back that is rewritten before the update after the update. In any physical update, since the computer processing is merely data copying to the storage device without interpreting SQL, high-speed processing is possible. That is, there is no overhead due to conversion from the logical structure to the physical structure that has occurred in the update process by SQL, and the time required for the update can be estimated as the disk input / output time.

従来では、組み込みシステムなどの前記センタよりは低性能な端末に対するデータ更新について、全て論理的更新を適用していた。そのとき、大量のデータに対する更新処理を、システムとして許容できる時間内に終えることは困難である。これは、RDBのデータ更新では、論理構造から物理構造への変換を行うオーバーヘッドが生じるためである。   Conventionally, all logical updates have been applied to data updates for terminals with lower performance than the center such as embedded systems. At that time, it is difficult to finish the update processing for a large amount of data within a time acceptable for the system. This is because an RDB data update causes an overhead for conversion from a logical structure to a physical structure.

組み込みシステム、とりわけ、コンシューマー向け組み込みシステムでは、コストや消費電力などの要因により、エンタープライズ系サーバなどと比べ、利用できるCPUや記憶装置などのリソースに制約があるため、前記のオーバーヘッドがシステムの性能に大きな影響を与えるからである。   In an embedded system, especially an embedded system for consumers, due to factors such as cost and power consumption, resources such as CPUs and storage devices that can be used are limited compared to enterprise servers, etc. It has a big influence.

ところで、図1(c)で示した2種類の更新を併用するときの問題への対処法において、図2で示した論理的更新および物理的更新を適切に適用することにより、更新処理の高速化を実現できる。以下、高速化処理の詳細を説明する。   By the way, in the method for coping with the problem when the two types of updates shown in FIG. 1C are used together, the logical update and the physical update shown in FIG. Can be realized. Details of the speed-up process will be described below.

まず、バージョン「1.0」→「1.1」への端末側受付更新には、論理的更新を適用する。これは、入力されたSQL更新命令を解釈する第1回目であるためである。   First, logical update is applied to terminal side received update from version “1.0” to “1.1”. This is because this is the first time to interpret the input SQL update instruction.

次に、バージョン「1.1」→「1.0」への端末側受付更新の書き戻しには、バックアップファイルを更新元ページとして、物理的更新のページ書き戻しを適用する。物理的更新なので、高速な処理が可能となる。   Next, to write back the terminal-side received update from version “1.1” to “1.0”, the page write-back of the physical update is applied with the backup file as the update source page. Since it is a physical update, high-speed processing is possible.

そして、バージョン「1.0」→「2.0」へのセンタ側受付更新には、センタは論理的更新を適用し、各端末は物理的更新を適用する。センタ側は自装置に入力されたSQL更新命令を解釈する第1回目であるため、論理的更新を行う。そして、各端末は第1回目の論理的更新の結果を流用する物理的更新のページ更新を行う。物理的更新なので、高速な処理が可能となる。   Then, in the center side received update from version “1.0” to “2.0”, the center applies a logical update, and each terminal applies a physical update. Since the center side is the first time to interpret the SQL update command input to its own device, logical update is performed. Each terminal then performs a physical update page update using the result of the first logical update. Since it is a physical update, high-speed processing is possible.

さらに、バージョン「2.0」→「2.1」への端末側受付更新には、論理的更新を適用する。入力されたSQL更新命令を解釈するため、物理的更新が適用できないためである。   Further, logical update is applied to the terminal side received update from version “2.0” to “2.1”. This is because physical update cannot be applied to interpret the input SQL update instruction.

以上説明したように、センタ側受付更新を各端末に反映するときに、物理的更新を適用することができるため、高速な処理が可能となる。さらに、端末側受付更新を持たない仕様で端末を構成するときには、SQL更新命令を解釈する機能を持たせず、全ての更新を物理的更新で済ますことができるため、装置の小型化および高速化が実現できる。   As described above, since the physical update can be applied when the center-side received update is reflected on each terminal, high-speed processing is possible. In addition, when configuring a terminal with specifications that do not have terminal-side received updates, it is not possible to have a function for interpreting SQL update instructions, and all updates can be done with physical updates, resulting in smaller and faster equipment. Can be realized.

図3は、2種類の更新を併用する説明図である。図3(a)は更新前の8つのページを示す。図3(b)は、図3(a)に対して、ページC,Dに対する端末側受付更新が行われた後のページを示す。更新されたページC,Dのバージョン番号が「1.1」になっている。   FIG. 3 is an explanatory diagram in which two types of updates are used together. FIG. 3A shows eight pages before update. FIG. 3B shows the page after the terminal-side received update for pages C and D is performed with respect to FIG. The version numbers of the updated pages C and D are “1.1”.

図3(c)は、図3(b)の状態において、前処理としてのページ書き戻しを実行せずに、センタ側受付更新「ページB,D,G,H」を適用した状態を示す。ページB,D,G,Hは、バージョン「2.0」に更新されるものの、ページCは、センタ側受付更新の対象ではないので、バージョン「1.1」のままである。しかし、センタDBのページCは、端末側受付更新が行われないのでバージョン「1.0」であり、図3(c)の端末DBとデータの不整合が発生してしまう。   FIG. 3C shows a state in which the center side received update “pages B, D, G, H” is applied without executing the page write-back as the preprocessing in the state of FIG. Although the pages B, D, G, and H are updated to the version “2.0”, the page C remains the version “1.1” because it is not an object of the center side received update. However, page C in the center DB is version “1.0” because no terminal-side received update is performed, and data inconsistency with the terminal DB in FIG. 3C occurs.

図3(d)は、図3(b)の状態において、前処理としてのページ書き戻しを実行してから、センタ側受付更新「ページB,D,G,H」を適用した状態を示す。ページCは、ページ書き戻し処理によりバージョン「1.0」へと戻る。よって、センタDBのページCとデータ内容が同一となり、不整合は解消される。   FIG. 3D shows a state in which the center side received update “pages B, D, G, H” is applied after executing the page write-back as the preprocessing in the state of FIG. Page C returns to version “1.0” by the page write-back process. Therefore, the data content is the same as page C of the center DB, and the inconsistency is eliminated.

図4は、端末側受付更新(バージョン「1.0」→「1.1」)およびその書き戻し(バージョン「1.1」→「1.0」)のために使用されるバックアップファイルを説明する説明図である。   FIG. 4 illustrates a backup file used for terminal side received update (version “1.0” → “1.1”) and write back (version “1.1” → “1.0”). It is explanatory drawing to do.

バックアップファイル24は、端末側受付更新が行われる際に、更新が行われるページの更新前のページを退避するファイルである。ただし、更新前ページの退避は、各ページにつき1度だけであり、各ページに対して最初に更新が行われるときにのみ行う。   The backup file 24 is a file that saves the page before the update of the page to be updated when the terminal side received update is performed. However, the page before update is saved only once for each page, and is performed only when the page is updated for the first time.

図4(a)は、端末側受付更新の指示を受け付けたときに、ページを更新するためにバックアップファイル24に退避する旨を示す。8つのページ(ページA〜ページH)のうち、2つのページ(ページC,ページD)に影響されるSQL更新命令を受け付けたとする。更新対象の2つのページは、更新する前にバックアップファイル24としてコピーすることにより、退避される。   FIG. 4A shows that when a terminal-side received update instruction is received, it is saved in the backup file 24 in order to update the page. It is assumed that an SQL update command affected by two pages (page C and page D) out of eight pages (page A to page H) is received. The two pages to be updated are saved by copying them as the backup file 24 before updating.

図4(b)は、端末側受付更新の指示を実行し、ページを更新した後のページを示す。8つのページ(ページA〜ページH)のうち、2つのページ(ページC,ページD)が変更される。   FIG. 4B shows a page after the terminal side received update instruction is executed and the page is updated. Of the eight pages (page A to page H), two pages (page C and page D) are changed.

図4(c)は、センタ側受付更新の指示を受け付けたときに、その前準備としてページを書き戻す旨を示す。図4(a)で退避されていた2つのバックアップファイル24(ページC,D)を、それぞれ該当箇所に上書きすることにより、高速なページ書き戻しが実現される。   FIG. 4C shows that the page is written back as a preparation when a center side received update instruction is received. By overwriting the two backup files 24 (pages C and D) saved in FIG. 4A in the corresponding portions, high-speed page write-back is realized.

図5は、更新差分ファイルの説明図である。この更新差分ファイル14は、DB領域の各ページについて、更新前から更新後への更新処理を実施した結果、ページの書き換え(ページの追加、ページの削除、および、ページの内容変更)が行われたページを差分として抽出したものである。   FIG. 5 is an explanatory diagram of an update difference file. This update difference file 14 is a page rewrite (page addition, page deletion, and page content change) as a result of performing update processing from before update to after update for each page in the DB area. The page is extracted as a difference.

更新差分ファイル14は、センタ側受付更新を実行したセンタから各端末へと通知される。この通知において、更新されないページを含めて全てのページを一括して通知する方式に比べ、差分だけなのでデータ量が少なくて済む。   The update difference file 14 is notified to each terminal from the center that has executed the center side received update. In this notification, the amount of data can be reduced as compared with a method in which all pages including a page that is not updated are notified collectively.

図5(a)に示す8ページのうち、4ページ(ページB,D,G,H)が変更され、2ページ(ページI,J)が追加されたとする。図5(b)に示す更新差分ファイルがセンタから各端末へと通知され、各端末は通知された更新差分ファイルを、各自の端末DBに反映する。これにより、図5(c)に示すように端末DBが更新される。   It is assumed that 4 pages (pages B, D, G, and H) among 8 pages shown in FIG. 5A are changed and 2 pages (pages I and J) are added. An update difference file shown in FIG. 5B is notified from the center to each terminal, and each terminal reflects the notified update difference file in its own terminal DB. Thereby, the terminal DB is updated as shown in FIG.

図6は、更新差分ファイルの合成処理を示す説明図である。複数の更新差分ファイル14は、バージョン番号に従って、1つの更新差分ファイル14へと合成することが可能である。例えば、更新差分ファイル14Xはバージョン「7.0」→「8.0」の更新を行うためのものであり、更新差分ファイル14Yはバージョン「8.0」→「9.0」の更新を行うためのものである。更新差分ファイル14Xの更新後のバージョン「8.0」と、更新差分ファイル14Yの更新前のバージョン「8.0」とが一致するため、両者は合成が可能である。   FIG. 6 is an explanatory diagram showing the synthesis process of the update difference file. The plurality of update difference files 14 can be combined into one update difference file 14 according to the version number. For example, the update difference file 14X is for updating version “7.0” → “8.0”, and the update difference file 14Y is updated for version “8.0” → “9.0”. Is for. Since the updated version “8.0” of the update difference file 14X matches the version “8.0” before the update of the update difference file 14Y, both can be combined.

更新差分ファイル14Xは、差分ページとして、ページ01aおよびページ06を有する。更新差分ファイル14Yは、差分ページとして、ページ01b、ページ07、ページ08を有する。ページ01aとページ01bとは、ともに同じページ01の位置に格納されるデータである。   The update difference file 14X has a page 01a and a page 06 as difference pages. The update difference file 14Y has page 01b, page 07, and page 08 as difference pages. The page 01a and the page 01b are data stored at the same page 01 position.

更新差分ファイル14Zは、更新差分ファイル14Xおよび更新差分ファイル14Yのいずれか一方にあるページの集合(ページ06,07,08)を有する。さらに、更新差分ファイル14Xおよび更新差分ファイル14Yの双方で同じ位置にあるページ(ページ01a、ページ01b)については、バージョン番号が新しい(大きい)更新差分ファイル14Yのページ01bが、更新差分ファイル14Zに含まれる。   The update difference file 14Z has a set of pages (pages 06, 07, 08) in one of the update difference file 14X and the update difference file 14Y. Furthermore, for pages (page 01a, page 01b) that are in the same position in both the update difference file 14X and the update difference file 14Y, the page 01b of the update difference file 14Y with the new (large) version number becomes the update difference file 14Z. included.

更新差分ファイル14の合成処理により、センタ上で、すべてのバージョンのDB領域を保持しておく必要がなくなり、ディスクサイズを節約することができる。新しく作成する更新差分ファイル14Yについて、既に作成されている更新差分ファイル14のうち、最も新しいものの更新後バージョン(例えば、更新差分ファイル14Xの「8.0」)を、新しく作成する更新差分ファイル14Yの更新前バージョンとする。その結果差分量が少なくて済むので、高速に更新差分ファイル14Zを作成することができる。   By combining the update difference file 14, it is not necessary to hold all versions of the DB area on the center, and the disk size can be saved. Regarding the newly created update difference file 14Y, the latest version of the update difference file 14 that has already been created (for example, "8.0" of the update difference file 14X) is newly created. The version before update. As a result, since the difference amount is small, the update difference file 14Z can be created at high speed.

例えば、バージョン「7.0」からバージョン「9.0」への更新など、バージョン番号が2バージョン以上離れているDB領域への更新用の更新差分ファイル14が必要になったら、バージョン「7.0」→「8.0」、および、「8.0」→「9.0」の更新差分ファイル14Zを合成すればよい。   For example, if an update difference file 14 for updating a DB area whose version number is two or more versions away is required, such as an update from version “7.0” to version “9.0”, version “7. The update difference file 14Z of “0” → “8.0” and “8.0” → “9.0” may be synthesized.

また、端末の更新元バージョンが統一されていない場合、センタは、それらの更新元バージョンごとに更新差分ファイル14を合成する。なお、更新元バージョンをセンタが取得する方法として、センタ側で各端末の更新元バージョンを保持する方法、または、各端末から更新元バージョンを通知される方法がある。   When the update source versions of the terminals are not unified, the center synthesizes the update difference file 14 for each update source version. As a method for the center to acquire the update source version, there are a method for holding the update source version of each terminal on the center side or a method for notifying the update source version from each terminal.

図7は、センタおよび端末をそれぞれ構成するためのコンピュータのハードウェアを示す構成図である。コンピュータは、CPU107a、NIC(Network Interface Card)107b、RAM(Random Access Memory)などの主記憶装置107c、および、HDD(Hard Disk Drive)などの補助記憶装置107gを備える。   FIG. 7 is a configuration diagram showing computer hardware for configuring the center and the terminal. The computer includes a CPU 107a, a NIC (Network Interface Card) 107b, a main storage device 107c such as a RAM (Random Access Memory), and an auxiliary storage device 107g such as an HDD (Hard Disk Drive).

CPU107aは、主記憶装置107c上のOS(Operating System)107fおよびアプリケーションプログラムを実行することで、DBMS(Data Base Management System)107dを実現する。DBMS107dは、通信管理部107eを用いることで、NIC107bを介して他装置とのデータ通信を行う。   The CPU 107a realizes a DBMS (Data Base Management System) 107d by executing an OS (Operating System) 107f and an application program on the main storage device 107c. The DBMS 107d performs data communication with other apparatuses via the NIC 107b by using the communication management unit 107e.

なお、センタと端末とのデータのやりとりについて、図7で示すように、NICを介するネットワークのデータ通信網を活用した通信処理を実現するかわりに、記憶媒体を用いてもよい。例えば、センタからのデータ出力(更新差分ファイルなど)をDVD−ROM(Digital Versatile Disc-Read Only Memory)などの記憶媒体に書き込み、その記憶媒体が端末に挿入されると、端末は、記憶媒体からデータを読み取ることにより、データが入力される。   As for data exchange between the center and the terminal, as shown in FIG. 7, a storage medium may be used instead of realizing the communication processing utilizing the data communication network of the network via the NIC. For example, when the data output from the center (update difference file or the like) is written in a storage medium such as a DVD-ROM (Digital Versatile Disc-Read Only Memory) and the storage medium is inserted into the terminal, the terminal Data is input by reading the data.

図8は、センタ1および端末2をそれぞれ構成するためのコンピュータの機能部に着目した構成図である。これらの各機能部は、図7の主記憶装置107cのDBMS107dの内部または外部に搭載される。   FIG. 8 is a configuration diagram focusing on the functional units of the computer for configuring the center 1 and the terminal 2 respectively. Each of these functional units is mounted inside or outside the DBMS 107d of the main storage device 107c in FIG.

センタ1は、DB管理部11、DB領域12、更新差分ファイル作成部13、および、更新差分ファイル14を有する。端末2は、DB管理部21、DB領域22、バックアップファイル作成部23、バックアップファイル24、ページ書き戻し部25、ページ更新部26、更新命令履歴管理部27、および、更新命令履歴ファイル28を有する。   The center 1 includes a DB management unit 11, a DB area 12, an update difference file creation unit 13, and an update difference file 14. The terminal 2 includes a DB management unit 21, a DB area 22, a backup file creation unit 23, a backup file 24, a page write-back unit 25, a page update unit 26, an update command history management unit 27, and an update command history file 28. .

DBMS内部に実装されるDB管理部11,21は、DB領域12,22へのSQL処理要求を受け付けて、その要求に応じたデータ操作処理をDB領域に対して実施する。SQL処理要求は、論理構造であるテーブルおよびその中の行を指定する形式である。ここで、センタ1のDB管理部11はセンタ側受付更新を処理し、端末2のDB管理部21は端末側受付更新を処理する。   The DB management units 11 and 21 installed in the DBMS receive SQL processing requests to the DB areas 12 and 22 and perform data operation processing corresponding to the requests on the DB areas. The SQL processing request has a format for designating a table having a logical structure and a row therein. Here, the DB management unit 11 of the center 1 processes center side received update, and the DB management unit 21 of the terminal 2 processes terminal side received update.

DB領域12,22は、図3で示すようなページを格納する記憶領域である。DB管理部11,21は、図2に示すように、論理構造であるテーブルに対するデータ操作処理を実施するときには、DB領域12,22内の物理構造であるページに対する操作に変換し、その操作を実行する。   The DB areas 12 and 22 are storage areas for storing pages as shown in FIG. As shown in FIG. 2, the DB management units 11 and 21 convert data into operations on pages that are physical structures in the DB areas 12 and 22 when performing data operation processing on tables that are logical structures. Execute.

更新差分ファイル作成部13は、図5に示す更新差分ファイル14を作成する。バックアップファイル作成部23は、図4で示すバックアップファイル24を作成する。ページ書き戻し部25、および、ページ更新部26は、それぞれ図2(b)(d)で説明した物理的更新を実行する。   The update difference file creation unit 13 creates the update difference file 14 shown in FIG. The backup file creation unit 23 creates the backup file 24 shown in FIG. The page write-back unit 25 and the page update unit 26 perform the physical update described with reference to FIGS.

更新命令履歴管理部27は、図1(c)の(1)端末側受付更新要求のSQL更新命令を更新命令履歴ファイル28に記録した後、その要求をDB管理部21に通知する。また、図1(c)の(4)端末側受付更新要求を再度実行のときには、更新命令履歴ファイル28からSQL更新命令を読み取り、その要求をDB管理部21に通知する。   The update command history management unit 27 records the SQL update command of the (1) terminal side received update request in FIG. 1C in the update command history file 28 and then notifies the DB management unit 21 of the request. Further, when the (4) terminal side received update request in FIG. 1C is executed again, the SQL update command is read from the update command history file 28 and the request is notified to the DB management unit 21.

図9は、DB領域のデータ構造をツリー形式で示す説明図である。ツリーのルート方向を左側に配置している。また、ノード間には多重度を設定している。例えば、1つのDB領域12は、1つのページ管理情報と、1つ以上のページ個別情報とから構成される。   FIG. 9 is an explanatory diagram showing the data structure of the DB area in a tree format. The root direction of the tree is arranged on the left side. A multiplicity is set between the nodes. For example, one DB area 12 includes one page management information and one or more page individual information.

ページ管理情報は、1つのテーブルに関する情報を示す。前記したように、1つのテーブルは、1つ以上のページに格納されるが、このページ管理情報は、各ページに共通する情報を示す。ページ数は、テーブルを構成するページの数である。ページサイズは、固定長のページのディスクに格納するときの容量を示す。削除ページ番号は、更新前のDB領域のあるページ番号以降のページを削除するための、削除を開始するページのページ番号を示す。更新フラグ配列は、後記する。   The page management information indicates information related to one table. As described above, one table is stored in one or more pages. This page management information indicates information common to each page. The number of pages is the number of pages constituting the table. The page size indicates the capacity when stored in a fixed-length page disk. The deletion page number indicates a page number of a page from which deletion is started for deleting pages after a certain page number in the DB area before update. The update flag array will be described later.

ページ個別情報は、1つのページに関する情報を示す。ページ番号は、DB領域中のページの位置を示す。   The page individual information indicates information related to one page. The page number indicates the position of the page in the DB area.

1つの更新フラグは、センタ1のDB領域12が更新されたか(値「1」)か、否か(値「0」)を設定する。更新フラグ配列は、更新フラグをまとめて配列にしたものである。ページ数分の更新フラグと、1つの更新フラグ配列とは同じ内容を示すので、後記するようにいずれか一方を構成すればよい。ページデータは、ページのデータ内容を示す。更新フラグ配列または更新フラグの値は、更新差分ファイル14が作成されるときに参照される。更新差分ファイル14が作成された後は、値「0」にクリアされる。   One update flag sets whether the DB area 12 of the center 1 has been updated (value “1”) or not (value “0”). The update flag array is an array of update flags. Since the update flags for the number of pages and one update flag array indicate the same contents, either one may be configured as described later. The page data indicates the data content of the page. The value of the update flag array or the update flag is referred to when the update difference file 14 is created. After the update difference file 14 is created, the value is cleared to “0”.

DB領域12と、DB領域22との違いは、DB領域12における更新フラグが、DB領域22におけるバックアップフラグに変更された点である。バックアップフラグは、ページが更新されたときに、そのページがバックアップファイル24に退避されたか(値「1」)か、否か(値「0」)を設定する。   The difference between the DB area 12 and the DB area 22 is that the update flag in the DB area 12 is changed to a backup flag in the DB area 22. The backup flag sets whether the page is saved in the backup file 24 (value “1”) or not (value “0”) when the page is updated.

ページの更新処理について、最初の1回では、バックアップするページに対応するバックアップフラグを値「0(バックアップされていない)」から、値「1(バックアップされている)」へと変更する。2回目以降では、バックアップするページに対応するバックアップフラグを参照し、値「1」なら、バックアップ処理を省略する。そして、バックアップファイル24が書き戻し処理に利用されたときには、値「0」へと戻し、使用して不要となったバックアップファイル24を削除してもよい。   In the first update process, the backup flag corresponding to the page to be backed up is changed from the value “0 (not backed up)” to the value “1 (backed up)”. In the second and subsequent times, the backup flag corresponding to the page to be backed up is referred to, and if the value is “1”, the backup process is omitted. When the backup file 24 is used for the write-back process, the value may be returned to the value “0” and the backup file 24 that is no longer needed after use may be deleted.

図10は、図9で説明した更新フラグおよび更新フラグ配列の説明図である。図10(a)に示す8つのページに対して、6カ所の更新(ページB,D,G,H,I,J)が行われたとする。図10(b)は、それらの更新の有無を更新フラグ配列としてまとめたものであり、図10(c)は、それらの更新の有無を各ページの左上に更新フラグとして個別に格納したものである。   FIG. 10 is an explanatory diagram of the update flag and the update flag array described in FIG. It is assumed that six updates (pages B, D, G, H, I, and J) have been performed on the eight pages shown in FIG. FIG. 10 (b) summarizes the presence / absence of those updates as an update flag array, and FIG. 10 (c) shows the presence / absence of those updates individually stored as update flags in the upper left of each page. is there.

図11(a)は、図5に示す更新差分ファイル14を格納するためのデータ構造を示す。1つの更新差分ファイル14は、1つのバージョン情報と、1つのページ管理情報と、1つ以上の差分ページから構成される。   FIG. 11A shows a data structure for storing the update difference file 14 shown in FIG. One update difference file 14 includes one version information, one page management information, and one or more difference pages.

バージョン情報は、更新前バージョンおよび更新後バージョンの組から構成されている。バージョン情報は、バージョン番号や作成日といった情報から構成される。   The version information is composed of a set of a pre-update version and a post-update version. The version information is composed of information such as a version number and a creation date.

ページ管理情報は、更新差分ファイル14に格納されている差分ページに共通する情報である。ページ管理情報は、更新差分ファイル14に格納しているページのページ数や、格納しているページのページサイズ、および物理センタ側受付更新処理時に、対象DB領域から削除するページの先頭ページ番号から構成されている。   The page management information is information common to the difference pages stored in the update difference file 14. The page management information includes the number of pages stored in the update difference file 14, the page size of the stored pages, and the first page number of the page to be deleted from the target DB area during the physical center side received update process. It is configured.

差分ページは、DB領域中のページであり、更新後のページである。差分ページは、ページ番号順になっている。この差分ページを順番に更新先のDB領域へコピーしていくようにすれば、ディスクヘッダの移動量を最小にでき更に更新処理の性能を高めることができる。また、各差分ページには、配置される該当箇所を示すページ番号が対応づけられている。よって、端末上でのDB領域の更新処理としては、更新ページをページ番号で指定された場所にコピーしていくだけで済む。   The difference page is a page in the DB area and is an updated page. The difference pages are in page number order. If the difference pages are sequentially copied to the update destination DB area, the movement amount of the disk header can be minimized and the performance of the update process can be further improved. In addition, each difference page is associated with a page number indicating a corresponding portion to be arranged. Therefore, the update process of the DB area on the terminal only needs to copy the update page to the location specified by the page number.

図11(b)は、図4に示すバックアップファイル24を格納するためのデータ構造を示す。1つのバックアップファイル24は、1つのバックアップ管理情報と、1つ以上のバックアップページから構成される。バックアップページは、DB領域から退避した更新前のページ内容を示す。   FIG. 11B shows a data structure for storing the backup file 24 shown in FIG. One backup file 24 includes one backup management information and one or more backup pages. The backup page indicates the page contents before update saved from the DB area.

バックアップ管理情報は、空き容量、ページサイズ、ページ数、および、新規ページ割り当て情報を有する。空き容量は、バックアップファイル24の空き容量を記憶する領域である。   The backup management information includes free capacity, page size, number of pages, and new page allocation information. The free space is an area for storing the free space of the backup file 24.

ページサイズは、バックアップファイル24で格納しているバックアップページの大きさ(ページサイズ)を記憶している領域である。ページ数は、バックアップファイル内のバックアップページの数を記憶する領域である。   The page size is an area that stores the size (page size) of the backup page stored in the backup file 24. The number of pages is an area for storing the number of backup pages in the backup file.

新規ページ割り当て情報は、DB領域を更新した過程において、DB領域を拡張し、新規ページを追加して割り当てたときの情報を記憶する領域である。割り当てフラグは、新規ページを追加した(値「1」)か、否か(値「0」)かを示すフラグである。開始位置は、追加した新規ページの開始位置を示すページ番号である。ページ数は、追加した新規ページのページ数である。   The new page allocation information is an area for storing information when the DB area is expanded and a new page is added and allocated in the process of updating the DB area. The allocation flag is a flag indicating whether a new page is added (value “1”) or not (value “0”). The start position is a page number indicating the start position of the added new page. The number of pages is the number of added new pages.

図12は、図1(c)の「(3)センタ側受付更新」を実施するときのセンタ1および端末2の動作を示す説明図である。この図では、端末側受付更新が行われておらず、更新前バージョンがセンタ1および端末2で同一であるときを説明する。例えば、図1(a)の端末B,Cがこの図の説明に該当する。   FIG. 12 is an explanatory diagram showing the operations of the center 1 and the terminal 2 when the “(3) center side received update” of FIG. In this figure, the case where the terminal-side received update is not performed and the version before update is the same in the center 1 and the terminal 2 will be described. For example, the terminals B and C in FIG.

端末2のDB領域22は、一定期間以上を経るごとに、センタ1のDB領域12と内容の同一化を行う。端末2は、工場出荷時などのタイミングでDB領域12のコピーであるDB領域22を作成する。このときのデータベースの状態をバージョン「1.0」とする。   The DB area 22 of the terminal 2 makes the contents the same as the DB area 12 of the center 1 every time a certain period or more passes. The terminal 2 creates a DB area 22 that is a copy of the DB area 12 at a timing such as factory shipment. The state of the database at this time is assumed to be version “1.0”.

センタ1のDB管理部11は、DB領域12に対してセンタ側受付更新を繰り返し、適当な段階で、更新を一旦凍結する。そのときのDB領域12をバージョン「2.0」とする。そして、センタ1の更新差分データ作成部13は、バージョン「1.0」とバージョン「2.0」との更新差分ファイル14を抽出する。   The DB management unit 11 of the center 1 repeats the center-side received update for the DB area 12 and temporarily freezes the update at an appropriate stage. The DB area 12 at that time is assumed to be version “2.0”. Then, the update difference data creation unit 13 of the center 1 extracts the update difference file 14 between the version “1.0” and the version “2.0”.

例えば、差分データ作成部13は、あらかじめ退避しておいたバージョン「1.0」と、最新のバージョン「2.0」とをページごとに比較し、違いがあったページのバージョン「2.0」のページを更新差分ファイル14に含める。   For example, the difference data creation unit 13 compares the version “1.0” saved in advance with the latest version “2.0” for each page, and the version “2.0” of the page with the difference is displayed. In the update difference file 14.

端末2のページ更新部26は、センタ1から更新差分ファイル14を受け取ると、更新差分ファイル内にあるページを、DB領域22内の該当するページ上に上書きする。この処理によって、センタ1および端末2のバージョンが同じ「2.0」となる。   When the page update unit 26 of the terminal 2 receives the update difference file 14 from the center 1, it overwrites the page in the update difference file on the corresponding page in the DB area 22. By this processing, the versions of the center 1 and the terminal 2 become the same “2.0”.

図13は、図1(c)の「(1)端末側受付更新」から「(4)端末側受付更新を再度実行」まで順に実施するときのセンタ1および端末2の動作を示す説明図である。この図では、端末側受付更新が行われることにより、更新前バージョンがセンタ1および端末2で不一致であるときを説明する。例えば、図1(a)の端末Aがこの図の説明に該当する。   FIG. 13 is an explanatory diagram showing the operations of the center 1 and the terminal 2 in order from “(1) terminal side received update” to “(4) terminal side received update again” in FIG. is there. In this figure, a case where the pre-update version does not match between the center 1 and the terminal 2 by performing terminal side received update will be described. For example, the terminal A in FIG. 1A corresponds to the description of this figure.

まず、図12で説明したように、センタ1のDB領域12と、端末2のDB領域22は、バージョン「1.0」とする。   First, as described with reference to FIG. 12, the DB area 12 of the center 1 and the DB area 22 of the terminal 2 are set to version “1.0”.

端末2のDB管理部21は、「(1)端末側受付更新」を実施する。具体的には、SQL更新命令を受けつけると、その命令に基づいたデータ操作をDB領域22に対して行うことにより、バージョン「1.1」に更新する。ここで、バックアップファイル作成部23は、バージョン「1.1」への更新を実行する前に、バージョン「1.0」のページをバックアップファイル24に退避する。なお、バックアップフラグが「1」であるページは、既にバックアップされているので、重複してバックアップする必要はない。   The DB management unit 21 of the terminal 2 performs “(1) terminal side received update”. Specifically, when an SQL update command is received, a data operation based on the command is performed on the DB area 22 to update the version to “1.1”. Here, the backup file creation unit 23 saves the page of the version “1.0” in the backup file 24 before executing the update to the version “1.1”. Note that the page with the backup flag “1” has already been backed up, so there is no need to make a duplicate backup.

端末2のページ書き戻し部25は、「(2)端末側受付更新の書き戻し」を実施する。具体的には、バージョン「1.0」のバックアップファイル24を、バージョン「1.1」へ更新されたDB領域22に上書きすることにより、バージョン「1.0」に書き戻す。これにより、更新前バージョンがセンタ1および端末2で同一となる。   The page write-back unit 25 of the terminal 2 performs “(2) terminal-side received update write-back”. Specifically, the backup file 24 of the version “1.0” is overwritten on the DB area 22 updated to the version “1.1”, thereby writing back to the version “1.0”. Thereby, the version before update becomes the same in the center 1 and the terminal 2.

センタ1は、図13で説明したように「(3)センタ側受付更新」を実施する。これにより、DB領域22は、バージョン「1.0」からバージョン「2.0」へと更新される。   The center 1 performs “(3) Center side received update” as described in FIG. As a result, the DB area 22 is updated from version “1.0” to version “2.0”.

端末2の更新命令履歴管理部27は、「(1)端末側受付更新」のときのSQL更新命令を更新命令履歴ファイル28に記録しておき、その更新命令履歴ファイル28を再度DB管理部21に実行させることで、「(4)端末側受付更新を再度実行」を実施する。その結果、DB領域22は、バージョン「2.0」からバージョン「2.1」へと更新される。   The update command history management unit 27 of the terminal 2 records the SQL update command at the time of “(1) terminal side received update” in the update command history file 28, and the update command history file 28 is again stored in the DB management unit 21. To execute “(4) Re-execute terminal side received update”. As a result, the DB area 22 is updated from version “2.0” to version “2.1”.

図14は、センタ1の更新差分データ作成部13が更新差分ファイル14を作成する処理を実現する3つの方式を説明するものである。この3つの方式のうち、いずれか1つの方式を適用することにより、更新差分ファイル14は作成される。   FIG. 14 illustrates three methods for realizing the process in which the update difference data creation unit 13 of the center 1 creates the update difference file 14. By applying any one of the three methods, the update difference file 14 is created.

図14(a)は、更新フラグを使用せず、全文比較する方式である。   FIG. 14A shows a full text comparison without using an update flag.

更新差分データ作成部13は、更新前(バージョン「1.0」)のDB領域の全データを退避しておき、SQL更新命令を適用するときは、とくに何もしない。更新差分データ作成部13は、更新差分ファイル14の作成時に、更新前後の全データを互いに比較することにより、一致しないページを抽出し、更新差分ファイル14を作成する。   The update difference data creation unit 13 saves all data in the DB area before update (version “1.0”), and does nothing particularly when applying the SQL update instruction. When creating the update difference file 14, the update difference data creation unit 13 compares all the data before and after the update to extract pages that do not match, and creates the update difference file 14.

この方式により、SQL更新命令を適用するときに処理が発生しないので、SQL更新命令のスループットを向上させることができる。また、更新フラグを用いる必要がないため、単純なデータ構造で済むため、既存システムへの拡張による影響を少なくすることができる。   According to this method, no processing occurs when applying the SQL update instruction, so that the throughput of the SQL update instruction can be improved. Further, since there is no need to use an update flag, a simple data structure is sufficient, and the influence of expansion to an existing system can be reduced.

図14(b)は、更新フラグをDB領域のページ外に設定する方式である。更新差分データ作成部13は、SQL更新命令を適用するときは、更新されたページに対応する更新フラグを、ページ外の更新フラグ配列(図10(b)参照)に設定する。更新差分データ作成部13は、更新差分ファイル14の作成時に、更新フラグが設定された更新後のページを抽出し、更新差分ファイル14を作成する。   FIG. 14B shows a method for setting the update flag outside the page of the DB area. When applying the SQL update instruction, the update difference data creation unit 13 sets the update flag corresponding to the updated page in the update flag array outside the page (see FIG. 10B). When creating the update difference file 14, the update difference data creation unit 13 extracts the updated page in which the update flag is set, and creates the update difference file 14.

この方式により、更新フラグ配列を読み取ることにより、更新対象のページを特定するため、ページのデータ内容にアクセスする必要が無く、高速な更新差分ファイル14の作成処理が可能となる。更新フラグ配列は、1カ所にまとまっているため、ディスクアクセスが高速となる。さらに、更新前(バージョン「1.0」)のDB領域の全データを退避しておく必要がないため、ディスク容量を節約することができる。   By this method, the update flag array is read to identify the page to be updated, so that it is not necessary to access the data content of the page, and the high-speed update difference file 14 can be created. Since the update flag array is gathered in one place, disk access becomes faster. Furthermore, since it is not necessary to save all data in the DB area before update (version “1.0”), the disk capacity can be saved.

図14(c)は、更新フラグをDB領域のページ内に設定する方式である。図14(b)との違いは、更新フラグ配列を用いる代わりに、ページ内に設定される更新フラグ(図10(c)参照)を用いることである。   FIG. 14C shows a method for setting the update flag in the page of the DB area. The difference from FIG. 14B is that an update flag (see FIG. 10C) set in the page is used instead of using the update flag array.

この方式により、図14(b)で説明したディスク容量の節約の効果に加え、更新フラグがページ単位の情報として埋め込まれており、更新フラグ配列のように別のデータを作成する必要がないため、既存システムからの変更量を少なくすることができ、開発コストを削減することができる。   By this method, in addition to the effect of saving the disk capacity described with reference to FIG. 14B, the update flag is embedded as page unit information, and it is not necessary to create another data unlike the update flag array. The amount of change from the existing system can be reduced and the development cost can be reduced.

図15は、端末2のDB管理部21が実行する端末側受付更新処理を示すフローチャートである。   FIG. 15 is a flowchart showing terminal-side received update processing executed by the DB management unit 21 of the terminal 2.

まず、SQL更新命令を受け付け、更新対象のページをDB領域から特定する(S101)。次に、特定したページのバックアップフラグが「1」か否かを判定する(S102)。S102でYesならS108に、NoならS103に、それぞれ移行する。   First, an SQL update command is received and a page to be updated is specified from the DB area (S101). Next, it is determined whether or not the backup flag of the specified page is “1” (S102). If Yes in S102, the process proceeds to S108, and if No, the process proceeds to S103.

そして、バックアップファイル内の新規ページ割り当てフラグが「1」かつバックアップファイル内の新規ページ割り当て情報の開始位置が特定したページのページ番号より小さい(S103)か否かを判定する。S103でYesならS107に、NoならS104に、それぞれ移行する。   Then, it is determined whether the new page allocation flag in the backup file is “1” and the start position of the new page allocation information in the backup file is smaller than the page number of the specified page (S103). If Yes in S103, the process proceeds to S107, and if No, the process proceeds to S104.

さらに、バックアップファイル内の空き容量が充分にある(S104)か否かを判定する。S104でYesならS106に、NoならS105に、それぞれ移行する。そして、更新処理をエラー状態として中断し(S105)、処理を終了する。   Further, it is determined whether there is sufficient free space in the backup file (S104). If Yes in S104, the process proceeds to S106, and if No, the process proceeds to S105. Then, the update process is interrupted as an error state (S105), and the process ends.

S104でYesのときは、特定したページのコピーをバックアップファイル内のバックアップページに格納する(S106)。そして、特定したページのバックアップフラグを「1」にする(S107)。そして、特定したページの内容を更新する(S108)。   If Yes in S104, a copy of the identified page is stored in the backup page in the backup file (S106). Then, the backup flag of the specified page is set to “1” (S107). Then, the contents of the specified page are updated (S108).

ここで、DB領域の空き領域が残り少ない(S109)か否かを判定する。S109でYesならS110に、Noなら処理終了に、それぞれ移行する。そして、S109でYesのときには、DB領域に新たにページを割り当て(S110)、新規ページ割り当て情報を更新し(S111)、処理を終了する。   Here, it is determined whether or not the free area of the DB area is small (S109). If Yes in S109, the process proceeds to S110, and if No, the process ends. If YES in S109, a new page is allocated to the DB area (S110), the new page allocation information is updated (S111), and the process is terminated.

図16(a)は、バックアップファイル作成部が実行するバックアップファイルの更新処理を示すフローチャートである。   FIG. 16A is a flowchart showing backup file update processing executed by the backup file creation unit.

まず、バックアップファイル内の新規ページ割り当て情報の割り当てフラグが「1」(S201)か否かを判定する。S201でYesならS203に、NoならS202に、それぞれ移行する。次に、バックアップファイル内の新規ページ割り当て情報について、開始位置を設定し、割り当てフラグを「1」にする(S202)。そして、バックアップファイル内の新規ページ割り当て情報について、ページ数の値に、今回割り当てるページ数を加算する(S203)。   First, it is determined whether or not the allocation flag of the new page allocation information in the backup file is “1” (S201). If Yes in S201, the process proceeds to S203, and if No, the process proceeds to S202. Next, the start position is set for the new page allocation information in the backup file, and the allocation flag is set to “1” (S202). Then, for the new page allocation information in the backup file, the number of pages allocated this time is added to the value of the number of pages (S203).

図16(b)は、ページ書き戻し部が実行するバックアップファイルを用いたページ書き戻し処理を示すフローチャートである。   FIG. 16B is a flowchart showing page write-back processing using a backup file executed by the page write-back unit.

まず、バックアップファイルから、バックアップページをページ番号順に選択する(S301)。次に、選択したバックアップページをDB領域上の同じページ番号をもつページに上書きコピーする(S302)。   First, backup pages are selected from the backup file in order of page number (S301). Next, the selected backup page is overwritten and copied to a page having the same page number in the DB area (S302).

ここで、バックアップファイル内に未選択のバックアップページがある(S303)か否かを判定する。S303でYesならS301に、NoならS304に、それぞれ移行する。また、バックアップファイル内の割り当てフラグが「1」(S304)か否かを判定する。S304でYesならS305に、NoならS306に、それぞれ移行する。   Here, it is determined whether or not there is an unselected backup page in the backup file (S303). If Yes in S303, the process proceeds to S301, and if No, the process proceeds to S304. Also, it is determined whether the allocation flag in the backup file is “1” (S304). If Yes in S304, the process proceeds to S305, and if No, the process proceeds to S306.

そして、バックアップファイル内の開始位置のページ番号以降のページ番号をもつ、DB領域上のページをすべて削除する(S305)。さらに、バックアップファイルをクリア、つまり、空き容量をファイルのサイズに、ページ数を「0」に、新規ページ割り当て情報を0クリアする(S306)。   Then, all pages on the DB area having page numbers after the page number at the start position in the backup file are deleted (S305). Further, the backup file is cleared, that is, the free space is cleared to the file size, the number of pages is set to “0”, and the new page allocation information is cleared to 0 (S306).

図17は、更新差分ファイル作成部が実行する更新差分ファイルの作成処理のうち、更新フラグを使用せず全文比較する方式(図14(a)参照)を示すフローチャートである。   FIG. 17 is a flowchart illustrating a method (see FIG. 14A) of full-text comparison without using an update flag in the update difference file creation processing executed by the update difference file creation unit.

まず、更新後のDB領域に未選択のページが存在する(S401)か否かを判定する。S401でYesならS402に、NoならS407に、それぞれ移行する。次に、更新後のDB領域から未選択のページを選択する(S402)。そして、選択した更新後のページと同じページ番号のページが更新前のDB領域に存在(S403)するか否かを判定する。S403でYesならS404に、NoならS406に、それぞれ移行する。   First, it is determined whether or not an unselected page exists in the updated DB area (S401). If Yes in S401, the process proceeds to S402, and if No, the process proceeds to S407. Next, an unselected page is selected from the updated DB area (S402). Then, it is determined whether a page with the same page number as the selected updated page exists in the DB area before update (S403). If Yes in S403, the process proceeds to S404, and if No, the process proceeds to S406.

そして、更新前のDB領域から同じページ番号のページを選択する(S404)。ここで、選択した更新前および更新後のページの内容が互いに一致(S405)するか否かを判定する。S405でYesならS401に、NoならS406に、それぞれ移行する。さらに、更新後のDB領域から選択したページを差分ページとして、更新差分ファイルに格納し(S406)、S401に戻る。   Then, a page with the same page number is selected from the DB area before update (S404). Here, it is determined whether or not the contents of the selected pre-update and post-update pages match each other (S405). If Yes in S405, the process proceeds to S401, and if No, the process proceeds to S406. Further, the page selected from the updated DB area is stored as a difference page in the update difference file (S406), and the process returns to S401.

ところで、S401でNoなら、更新前のDB領域に未選択のページが存在する(S407)か否かを判定し、S407でYesなら、未選択ページの最初のページを削除開始ページとして設定する(S408)。   By the way, if No in S401, it is determined whether or not an unselected page exists in the DB area before update (S407). If Yes in S407, the first page of the unselected pages is set as the deletion start page ( S408).

図18(a)は、更新差分ファイルの作成処理のうち、更新フラグをページ外に設定する方式(図14(b)参照)を実行するための、DB管理部が更新時に実行する更新フラグ設定処理を示すフローチャートである。   FIG. 18A shows an update flag setting executed by the DB management unit at the time of update for executing the method of setting the update flag outside the page (see FIG. 14B) in the update difference file creation process. It is a flowchart which shows a process.

まず、更新ページを特定し(S501)、その特定したページを書き換える(S502)。次に、ページ外に位置する更新フラグ配列で、特定したページのページ番号に対応するビットを「1」に変更する(S503)。他に更新するページが存在するときには(S504、Yes)、その更新するページについてS501に戻って処理を実行する。   First, an update page is specified (S501), and the specified page is rewritten (S502). Next, the bit corresponding to the page number of the specified page is changed to “1” in the update flag array located outside the page (S503). When there is another page to be updated (S504, Yes), the process returns to S501 for the page to be updated.

図18(b)は、更新差分ファイルの作成処理のうち、図18(a)で設定された更新フラグをもとに、更新差分ファイル作成部が実行する更新差分ファイルの作成処理を示すフローチャートである。   FIG. 18B is a flowchart showing the update difference file creation process executed by the update difference file creation unit based on the update flag set in FIG. 18A in the update difference file creation process. is there.

まず、更新フラグ配列の中で値が「1」であるビットが存在しないときには(S511、No)処理を終了する。次に、更新フラグ配列の中の値が「1」であるビットの配列位置から対応するページ番号を求める(S512)。そして、求めたページ番号をもつ書き換えたページをDB領域から取り出し、そのページを更新差分ファイルの差分ページに追加し(S513)、処理をS511に戻す。   First, when there is no bit having a value of “1” in the update flag array (S511, No), the process is terminated. Next, the corresponding page number is obtained from the bit arrangement position where the value in the update flag arrangement is “1” (S512). Then, the rewritten page having the obtained page number is taken out from the DB area, the page is added to the difference page of the update difference file (S513), and the process returns to S511.

図19(a)は、更新差分ファイルの作成処理のうち、更新フラグをページ内に設定する方式(図14(c)参照)を実行するための、DB管理部が更新時に実行する更新フラグ設定処理を示すフローチャートである。   FIG. 19A shows an update flag setting executed by the DB management unit at the time of update for executing a method of setting an update flag in a page (see FIG. 14C) in the update difference file creation process. It is a flowchart which shows a process.

まず、更新ページを特定し(S601)、その特定したページを書き換える(S602)。次に、特定したページに対応するページ個別情報の更新フラグを、値「1」に変更する(S603)。他に更新するページが存在するなら(S604、Yes)、その更新するページについてS601に戻って処理を実行する。   First, an update page is specified (S601), and the specified page is rewritten (S602). Next, the update flag of the page individual information corresponding to the specified page is changed to the value “1” (S603). If there is another page to be updated (S604, Yes), the process returns to S601 for the page to be updated.

図19(b)は、更新差分ファイルの作成処理のうち、図16(a)で設定された更新フラグをもとに、更新差分ファイル作成部が実行する更新差分ファイルの作成処理を示すフローチャートである。   FIG. 19B is a flowchart showing the update difference file creation process executed by the update difference file creation unit based on the update flag set in FIG. 16A in the update difference file creation process. is there.

まず、DB領域中のページを先頭から順番に1ページ選択する(S611)。次に、選択したページに対応するページ個別情報の更新フラグが「1」(S612)か否かを判定する。S612でYesならS613に、NoならS615に、それぞれ移行する。   First, one page in the DB area is selected in order from the top (S611). Next, it is determined whether or not the update flag of the page individual information corresponding to the selected page is “1” (S612). If Yes in S612, the process proceeds to S613, and if No, the process proceeds to S615.

そして、選択したページのコピーをDB領域から取り出し、そのページを更新差分ファイルの差分ページに追加する(S613)。さらに、選択したページの更新フラグを「0」に戻す(S614)。ここで、選択していないページが存在する(S615)か否かを判定する。S615でYesならS611に、Noなら処理終了に、それぞれ移行する。   Then, a copy of the selected page is taken out from the DB area, and the page is added to the difference page of the update difference file (S613). Further, the update flag of the selected page is returned to “0” (S614). Here, it is determined whether there is an unselected page (S615). If Yes in S615, the process proceeds to S611. If No, the process ends.

図20は、ページ更新部が実行するセンタ側受付更新処理のページ更新処理を示すフローチャートである。   FIG. 20 is a flowchart showing the page update process of the center side received update process executed by the page update unit.

まず、更新差分ファイルからページ番号順に差分ページを選択する(S701)。次に、選択した差分ページをDB領域上の同じページ番号をもつページ上に上書きコピーする(S702)。ここで、未選択の差分ページがあるときには(S703,Yes)、処理をS701に戻し、ないときには(S703,No)、処理を終了する。   First, difference pages are selected from the update difference file in the order of page numbers (S701). Next, the selected difference page is overwritten on the page having the same page number in the DB area (S702). Here, when there is an unselected difference page (S703, Yes), the process returns to S701, and when there is no difference page (S703, No), the process ends.

図21は、本実施例におけるセンタおよび端末について、それぞれ実現するコンピュータの構成を示す。コンピュータは、CPU107a、NIC(Network Interface Card)107b、RAM(Random Access Memory)などの主記憶装置107c、および、HDD(Hard Disk Drive)などの補助記憶装置107gを備える。   FIG. 21 shows a configuration of a computer that realizes each of the center and the terminal in this embodiment. The computer includes a CPU 107a, a NIC (Network Interface Card) 107b, a main storage device 107c such as a RAM (Random Access Memory), and an auxiliary storage device 107g such as an HDD (Hard Disk Drive).

CPU107aは、主記憶装置107c上のOS(Operating System)107fおよびアプリケーションプログラムを実行することで、DBMS(Data Base Management System)107dを実現する。DBMS107dは、通信管理部107eを用いることで、NIC107bを介して他装置とのデータ通信を行う。
なお、DBMS107dは、データベース管理部に該当する。データベース管理部は、データベースの論理構造データに対するデータアクセスを実行する。論理構造データは、例えば、図2で示したように、テーブル形式としてもよいし、XML(Extensible Markup Language)データの格納に適したツリー構造のデータなど、他の形式としてもよい。
The CPU 107a realizes a DBMS (Data Base Management System) 107d by executing an OS (Operating System) 107f and an application program on the main storage device 107c. The DBMS 107d performs data communication with other apparatuses via the NIC 107b by using the communication management unit 107e.
The DBMS 107d corresponds to a database management unit. The database management unit executes data access to the logical structure data of the database. The logical structure data may be in a table format as shown in FIG. 2, for example, or may be in other formats such as tree structure data suitable for storing XML (Extensible Markup Language) data.

なお、センタと端末とのデータのやりとりについては、NICを介するネットワークのデータ通信網を活用した通信処理を実現するかわりに、記憶媒体を用いてもよい。例えば、センタからのデータ出力(更新差分ファイルなど)をDVD−ROM(Digital Versatile Disc-Read Only Memory)などの記憶媒体に書き込み、その記憶媒体が端末に挿入されると、端末は、記憶媒体からデータを読み取ることにより、データが入力される。   As for data exchange between the center and the terminal, a storage medium may be used instead of realizing communication processing utilizing a data communication network of a network via NIC. For example, when the data output from the center (update difference file or the like) is written in a storage medium such as a DVD-ROM (Digital Versatile Disc-Read Only Memory) and the storage medium is inserted into the terminal, the terminal Data is input by reading the data.

センタ1は、DBMS107dの構成としてDB管理部11、および、更新差分ファイル作成部13を有し、補助記憶装置107gの構成としてDB領域12、および、更新差分ファイル14を有する。本実施例では、DB管理部11、更新差分ファイル作成部13は、プログラムで実現した一例を示しているが、オブジェクト、その機能を有するハードウェアで実現しても良い。   The center 1 has a DB management unit 11 and an update difference file creation unit 13 as a configuration of the DBMS 107d, and has a DB area 12 and an update difference file 14 as a configuration of the auxiliary storage device 107g. In this embodiment, the DB management unit 11 and the update difference file creation unit 13 are shown as an example realized by a program, but may be realized by an object and hardware having the function.

端末2は、DBMS107dの構成としてDB管理部21、バックアップファイル作成部23、ページ書き戻し部25、ページ更新部26、および、更新命令履歴管理部27を有し、補助記憶装置107gの構成としてDB領域22、バックアップファイル24、および、更新命令履歴ファイル28を有する。本実施例では、DB管理部21、バックアップファイル作成部23、ページ書き戻し部25、ページ更新部26および更新命令履歴管理部27は、プログラムで実現した一例を示しているが、オブジェクト、その機能を有するハードウェアで実現しても良い。これらのプログラムは、CD―ROMやDVD-ROMなどの記憶媒体に記憶し、本システムを稼動する前に記憶装置にインストールしても良い。   The terminal 2 includes a DB management unit 21, a backup file creation unit 23, a page write-back unit 25, a page update unit 26, and an update command history management unit 27 as a configuration of the DBMS 107d, and a DB as a configuration of the auxiliary storage device 107g. It has an area 22, a backup file 24, and an update command history file 28. In this embodiment, the DB management unit 21, the backup file creation unit 23, the page write-back unit 25, the page update unit 26, and the update command history management unit 27 show an example realized by a program. You may implement | achieve with the hardware which has. These programs may be stored in a storage medium such as a CD-ROM or DVD-ROM and installed in the storage device before the system is operated.

DBMS内部に実装されるDB管理部11,21は、DB領域12,22へのSQL処理要求を受け付けて、その要求に応じたデータ操作処理をDB領域に対して実施する。SQL処理要求は、論理構造であるテーブルおよびその中の行を指定する形式である。ここで、センタ1のDB管理部11はセンタ側受付更新を処理する。   The DB management units 11 and 21 installed in the DBMS receive SQL processing requests to the DB areas 12 and 22 and perform data operation processing corresponding to the requests on the DB areas. The SQL processing request has a format for designating a table having a logical structure and a row therein. Here, the DB management unit 11 of the center 1 processes the center side received update.

端末2におけるDB管理部21は端末側受付更新を処理する。   The DB management unit 21 in the terminal 2 processes terminal side received update.

DB領域12,22は、図3で示すようなページを格納する記憶領域である。DB管理部11,21は、図2に示すように、論理構造であるテーブルに対するデータ操作処理を実施するときには、DB領域12,22内の物理構造であるページに対する操作に変換し、その操作を実行する。   The DB areas 12 and 22 are storage areas for storing pages as shown in FIG. As shown in FIG. 2, the DB management units 11 and 21 convert data into operations on pages that are physical structures in the DB areas 12 and 22 when performing data operation processing on tables that are logical structures. Execute.

更新差分ファイル作成部13は、図5に示す更新差分ファイル14を作成する。バックアップファイル作成部23は、図4で示すバックアップファイル24を作成する。ページ書き戻し部25、および、ページ更新部26は、それぞれ図2(b)(d)で説明した物理的更新を実行する。   The update difference file creation unit 13 creates the update difference file 14 shown in FIG. The backup file creation unit 23 creates the backup file 24 shown in FIG. The page write-back unit 25 and the page update unit 26 perform the physical update described with reference to FIGS.

更新命令履歴管理部27は、図1(c)の(1)「端末側受付更新要求」のSQL更新命令を更新命令履歴ファイル28に記録した後、その要求をDB管理部21に通知する。また、図1(c)の(4)「端末側受付更新要求」を再度実行のときには、更新命令履歴ファイル28からSQL更新命令を読み取り、その要求をDB管理部21に通知する。
なお、図1(c)の(4)「端末側受付更新要求」を再度実行する動作主体について、端末2としてもよいし、センタ1としてもよい。センタ1が「端末側受付更新要求」を再度端末2に実行させるときには、その旨を示す制御命令を端末2に送信する。端末2は、制御命令の受信を待ってから、自らが過去に受信した「端末側受付更新要求」を再度適用する。
The update command history management unit 27 records the SQL update command of (1) “terminal side received update request” in FIG. 1C in the update command history file 28 and then notifies the DB management unit 21 of the request. When the (4) “terminal side received update request” in FIG. 1C is executed again, the SQL update command is read from the update command history file 28 and the request is notified to the DB management unit 21.
Note that the operating subject that executes (4) “terminal side received update request” in FIG. 1C again may be the terminal 2 or the center 1. When the center 1 causes the terminal 2 to execute the “terminal side received update request” again, a control command indicating that is transmitted to the terminal 2. The terminal 2 waits for the reception of the control command, and then reapplies the “terminal side received update request” received by the terminal 2 in the past.

本実施形態に関するデータベースシステム全体の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the whole database system regarding this embodiment. 本実施形態に関するRDBにおける論理構造のテーブルと、物理構造のページとの関係を示す説明図である。It is explanatory drawing which shows the relationship between the table of the logical structure in RDB regarding this embodiment, and the page of a physical structure. 本実施形態に関する2種類の更新を併用する旨を示す説明図である。It is explanatory drawing which shows that two types of update regarding this embodiment are used together. 本実施形態に関するバックアップファイルを示す説明図である。It is explanatory drawing which shows the backup file regarding this embodiment. 本実施形態に関する更新差分ファイルを示す説明図である。It is explanatory drawing which shows the update difference file regarding this embodiment. 本実施形態に関する更新差分ファイルの合成処理を示す説明図である。It is explanatory drawing which shows the synthetic | combination process of the update difference file regarding this embodiment. 本実施形態に関するセンタおよび端末のハードウェア構成を示す構成図である。It is a block diagram which shows the hardware constitutions of the center and terminal regarding this embodiment. 本実施形態に関するセンタおよび端末の機能構成を示す構成図である。It is a block diagram which shows the function structure of the center and terminal regarding this embodiment. 本実施形態に関するDB領域のデータ構造を示す説明図である。It is explanatory drawing which shows the data structure of DB area | region regarding this embodiment. 本実施形態に関する更新フラグおよび更新フラグ配列を示す説明図である。It is explanatory drawing which shows the update flag and update flag arrangement | sequence regarding this embodiment. 本実施形態に関する更新差分ファイルおよびバックアップファイルのデータ構造を示す説明図である。It is explanatory drawing which shows the data structure of the update difference file and backup file regarding this embodiment. 本実施形態に関するセンタ側受付更新の動作を示す説明図である。It is explanatory drawing which shows the operation | movement of the center side reception update regarding this embodiment. 本実施形態に関する端末側受付更新から端末側受付更新を再度実行まで順に実施するときの動作を示す説明図である。It is explanatory drawing which shows operation | movement when it implements in order from terminal side reception update regarding this embodiment to terminal side reception update again. 本実施形態に関する更新差分ファイルを作成する3つの方式を示す説明図である。It is explanatory drawing which shows three methods which produce the update difference file regarding this embodiment. 本実施形態に関する端末側受付更新処理を示すフローチャートである。It is a flowchart which shows the terminal side reception update process regarding this embodiment. 本実施形態に関するバックアップファイルの更新処理およびそのバックアップファイルを用いたページ書き戻し処理を示すフローチャートである。It is a flowchart which shows the update process of the backup file regarding this embodiment, and the page write-back process using the backup file. 本実施形態に関する更新差分ファイルの作成処理のうち、更新フラグを使用せず全文比較する方式を示すフローチャートである。It is a flowchart which shows the system which compares the whole sentence without using an update flag among the preparation processes of the update difference file regarding this embodiment. 本実施形態に関する更新差分ファイルの作成処理のうち、更新フラグをページ外に設定する方式を示すフローチャートである。It is a flowchart which shows the system which sets an update flag outside a page among the production processes of the update difference file regarding this embodiment. 本実施形態に関する更新差分ファイルの作成処理のうち、更新フラグをページ内に設定する方式を示すフローチャートである。It is a flowchart which shows the system which sets an update flag in a page among the preparation processes of the update difference file regarding this embodiment. 本実施形態に関するセンタ側受付更新処理のページ更新処理を示すフローチャートである。It is a flowchart which shows the page update process of the center side reception update process regarding this embodiment. 本実施形態に関するセンタおよび端末のコンピュータの構成を示す構成図である。It is a block diagram which shows the structure of the computer of the center and terminal regarding this embodiment.

符号の説明Explanation of symbols

1 センタ
11 DB管理部
12 DB領域
13 更新差分ファイル作成部
14 更新差分ファイル
2 端末
21 DB管理部
22 DB領域
23 バックアップファイル作成部
24 バックアップファイル
25 ページ書き戻し部
26 ページ更新部
27 更新命令履歴管理部
28 更新命令履歴ファイル
DESCRIPTION OF SYMBOLS 1 Center 11 DB management part 12 DB area 13 Update difference file creation part 14 Update difference file 2 Terminal 21 DB management part 22 DB area 23 Backup file creation part 24 Backup file 25 Page write-back part 26 Page update part 27 Update command history management Part 28 Update command history file

Claims (4)

データベースの論理構造データを、ディスク装置のファイルに格納される物理構造としてのページとして、バージョンごとに管理するデータベース管理部を、センタ装置および端末にそれぞれ有し、互いに同一のバージョンを稼働するデータベースシステムにより実行されるデータ更新方法であって、
前記センタ装置は、
前記各端末で共通する更新内容をセンタ装置が代表して受け付けるセンタ装置側受付命令の入力に応じて、前記論理構造データに適用した結果をファイルのDB領域内のページに格納し、
前記DB領域内のページについて、前記センタ装置側受付命令による更新前バージョンから更新後バージョンへのデータ変更がなされた差分ページを示す更新差分ファイルを作成する場合に、前記センタ装置側受付命令を適用更新前バージョンの前記DB領域内のページに適用するときに、ページが更新されたことを示す更新フラグを、ページの配列に対応する更新フラグ配列の更新されたページに対応する箇所について更新済と設定し、前記更新フラグ配列を順に参照し、前記更新フラグが更新済となっているページを差分ページとして抽出し、
前記端末は、
前記センタ装置から通知された前記更新差分ファイルの差分ページを、前記端末のDB領域上のページに上書きコピーすることにより、前記センタ装置側受付命令が適用された後である前記更新後バージョンに更新することを特徴とするデータ更新方法。
A database system that has database management units for managing versions of logical structure data of a database as a physical structure page stored in a file of a disk device for each version, and operates the same version. A data update method executed by
The center device is
In response to an input of a center device side acceptance command that the center device representatively accepts the update content common to each terminal, the result applied to the logical structure data is stored in a page in the DB area of the file,
For the page in the DB area, the center device side acceptance command is applied when creating an update difference file indicating a difference page in which the data change from the pre-update version to the post-update version by the center device side acceptance command is made. When applying to the page in the DB area of the version before update, the update flag indicating that the page has been updated is updated for the location corresponding to the updated page of the update flag array corresponding to the page array. Set, refer to the update flag array in order, extract the page where the update flag has been updated as a difference page,
The terminal
Update the updated difference file of the updated difference file notified from the center apparatus to the updated version after the application instruction for the center apparatus is applied by overwriting the page in the DB area of the terminal. A data update method characterized by:
前記端末は、
前記端末に適用される更新内容を示す端末側受付命令の入力に応じて、前記論理構造データに適用した結果をファイルの前記DB領域内のページに格納し、
前記DB領域内のページについて、前記端末側受付命令による更新前バージョンから前記更新後バージョンへのデータ変更がなされたページについて、更新前バージョンのページをバックアップページとしてバックアップファイルに格納し、
前記更新差分ファイルを使ったデータ更新の前に、前記端末側受付命令により前記更新後バージョンへのデータ変更がなされたページについて、前記バックアップページを上書きし、
前記端末側受付命令の入力に応じて、前記論理構造データに適用する工程にて、さらに、入力された前記端末側受付命令を順序づけて更新命令履歴ファイルに記録し、
前記端末のDB領域上のページに差分ページを上書きする工程の後に、さらに、前記更新後バージョンのページから構成される前記論理構造データに対して、更新命令履歴ファイルから読み取った前記端末側受付命令を順序づけて適用することを特徴とする
請求項1に記載のデータ更新方法。
The terminal
In response to an input of a terminal-side acceptance instruction indicating update contents applied to the terminal, the result applied to the logical structure data is stored in a page in the DB area of the file,
About the page in the DB area, for the page in which the data change from the pre-update version to the post-update version by the terminal side acceptance instruction, the pre-update version page is stored in the backup file as a backup page,
Before the data update using the update difference file, for the page where the data change to the updated version by the terminal-side acceptance instruction, the backup page is overwritten,
In response to the input of the terminal side reception instruction, in the step of applying to the logical structure data, further, the input terminal side reception instructions are ordered and recorded in the update instruction history file,
After the step of overwriting the difference page on the page in the DB area of the terminal, the terminal-side acceptance command read from the update command history file for the logical structure data composed of the updated version of the page The data update method according to claim 1, wherein the data update methods are applied in order.
前記端末は、
端末側受付命令の入力に応じて、前記論理構造データに適用した結果をファイルの前記DB領域内のページに格納し、
前記DB領域内のページについて、前記端末側受付命令による更新前バージョンから前記更新後バージョンへのデータ変更がなされたページについて、更新前バージョンのページをバックアップページとしてバックアップファイルに格納し、
前記更新差分ファイルを使ったデータ更新の前に、前記端末側受付命令により前記更新後バージョンへのデータ変更がなされたページについて、前記バックアップページを上書きし、
バックアップファイルに格納する工程は、
今回の前記端末側受付命令により更新対象のページが前記バックアップページとして格納されると、格納されたことを示す更新対象のページのバックアップフラグを格納済に設定し、
次回以降の前記端末側受付命令により前記バックアップフラグが格納済のページに対する更新がなされたときには、そのページに対する前記バックアップページの格納処理を省略することを特徴とする
請求項1に記載のデータ更新方法。
The terminal
In response to the input of the terminal side reception instruction, the result applied to the logical structure data is stored in a page in the DB area of the file,
About the page in the DB area, for the page in which the data change from the pre-update version to the post-update version by the terminal side acceptance instruction, the pre-update version page is stored in the backup file as a backup page,
Before the data update using the update difference file, for the page where the data change to the updated version by the terminal-side acceptance instruction, the backup page is overwritten,
The process of storing in the backup file is
When the page to be updated is stored as the backup page by the terminal-side acceptance instruction this time, the backup flag of the page to be updated indicating that it has been stored is set to stored,
2. The data update method according to claim 1, wherein when the backup flag is already updated by the terminal-side reception instruction after the next time, the storage process of the backup page for the page is omitted. .
データベースの論理構造データを、ディスク装置のファイルに格納される物理構造としてのページとして、バージョンごとに管理するデータベース管理部を、センタ装置および端末にそれぞれ有し、互いに同一のバージョンを稼働するデータベースシステムであって、
前記センタ装置は、
前記各端末で共通する更新内容をセンタ装置が代表して受け付けるセンタ装置側受付命令の入力に応じて、前記論理構造データに適用した結果をファイルのDB領域内のページに格納し、
前記DB領域内のページについて、前記センタ装置側受付命令による更新前バージョンから更新後バージョンへのデータ変更がなされた差分ページを示す更新差分ファイルを作成する場合に、前記センタ装置側受付命令を適用更新前バージョンの前記DB領域内のページに適用するときに、ページが更新されたことを示す更新フラグを、ページの配列に対応する更新フラグ配列の更新されたページに対応する箇所について更新済と設定し、前記更新フラグ配列を順に参照し、前記更新フラグが更新済となっているページを差分ページとして抽出し、
前記端末は、
前記センタ装置から通知された前記更新差分ファイルの差分ページを、前記端末のDB領域上のページに上書きコピーすることにより、前記センタ装置側受付命令が適用された後である前記更新後バージョンに更新することを特徴とするデータベースシステム。
A database system that has database management units for managing versions of logical structure data of a database as a physical structure page stored in a file of a disk device for each version, and operates the same version. Because
The center device is
In response to an input of a center device side acceptance command that the center device representatively accepts the update content common to each terminal, the result applied to the logical structure data is stored in a page in the DB area of the file,
For the page in the DB area, the center device side acceptance command is applied when creating an update difference file indicating a difference page in which the data change from the pre-update version to the post-update version by the center device side acceptance command is made. When applying to the page in the DB area of the version before update, the update flag indicating that the page has been updated is updated for the location corresponding to the updated page of the update flag array corresponding to the page array. Set, refer to the update flag array in order, extract the page where the update flag has been updated as a difference page,
The terminal
Update the updated difference file of the updated difference file notified from the center apparatus to the updated version after the application instruction for the center apparatus is applied by overwriting the page in the DB area of the terminal. A database system characterized by
JP2008145358A 2007-06-15 2008-06-03 Data update method and data update system Expired - Fee Related JP5108637B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2008145358A JP5108637B2 (en) 2007-06-15 2008-06-03 Data update method and data update system
EP08252031.3A EP2003579B1 (en) 2007-06-15 2008-06-12 Method and system for data processing with database update for the same
US12/138,931 US8051054B2 (en) 2007-06-15 2008-06-13 Method and system for data processing with database update for the same

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2007158143 2007-06-15
JP2007158143 2007-06-15
JP2008145358A JP5108637B2 (en) 2007-06-15 2008-06-03 Data update method and data update system

Publications (2)

Publication Number Publication Date
JP2009020873A JP2009020873A (en) 2009-01-29
JP5108637B2 true JP5108637B2 (en) 2012-12-26

Family

ID=40360423

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008145358A Expired - Fee Related JP5108637B2 (en) 2007-06-15 2008-06-03 Data update method and data update system

Country Status (1)

Country Link
JP (1) JP5108637B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113885894B (en) * 2021-09-15 2023-12-12 南京海泰医疗信息系统有限公司 Method and system for packaging and updating background based on electronic medical record products

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4160544B2 (en) * 1998-01-20 2008-10-01 富士通株式会社 Server management method and server program recording medium for distributed document processing system
JP4187302B2 (en) * 1998-03-25 2008-11-26 富士通株式会社 Relational database synchronization method and recording medium recording the program
JP2002157227A (en) * 2000-11-20 2002-05-31 Sony Corp Information processor, contents information updating method and recording medium recording contents information updating program
JP2002278820A (en) * 2001-03-21 2002-09-27 Ricoh Co Ltd Database management system

Also Published As

Publication number Publication date
JP2009020873A (en) 2009-01-29

Similar Documents

Publication Publication Date Title
US10754875B2 (en) Copying data changes to a target database
KR102579190B1 (en) Backup and restore in distributed databases using consistent database snapshots
EP2003579B1 (en) Method and system for data processing with database update for the same
EP3079078B1 (en) Multi-version concurrency control method in database, and database system
US7213116B2 (en) Method and apparatus for mirroring objects between storage systems
EP2452261B1 (en) Apparatus and method for read optimized bulk data storage
US10042910B2 (en) Database table re-partitioning using two active partition specifications
KR100961739B1 (en) Maintaining consistency for remote copy using virtualization
KR100556594B1 (en) A method relating to databases
JP2005529410A (en) Multiple simultaneously active file systems
US7698319B2 (en) Database system management method, database system, database device, and backup program
US8832022B2 (en) Transaction processing device, transaction processing method and transaction processing program
CN104021145A (en) Mixed service concurrent access method and device
JP2005332067A (en) Backup acquisition method and disk array device
US8595190B2 (en) Methods and apparatus related to completion of large objects within a DB2 database environment
CN102541691B (en) Log check point recovery method applied to memory data base OLTP (online transaction processing)
JP2011150458A (en) Information processor, information processing system, data archiving method and data deletion method
JP5721056B2 (en) Transaction processing apparatus, transaction processing method, and transaction processing program
US20110153580A1 (en) Index Page Split Avoidance With Mass Insert Processing
WO2007099636A1 (en) File system migration method, program and apparatus
JP5108637B2 (en) Data update method and data update system
CN114816247A (en) Logic data acquisition method and device
EP3944101B1 (en) Information processing program, information processing method, and information processing device
US20240104078A1 (en) Blockchain-based high-speed data processing device and method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100303

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120528

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120605

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120731

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120911

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121005

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151012

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees