[go: up one dir, main page]

JP2828354B2 - Database management device - Google Patents

Database management device

Info

Publication number
JP2828354B2
JP2828354B2 JP3109392A JP10939291A JP2828354B2 JP 2828354 B2 JP2828354 B2 JP 2828354B2 JP 3109392 A JP3109392 A JP 3109392A JP 10939291 A JP10939291 A JP 10939291A JP 2828354 B2 JP2828354 B2 JP 2828354B2
Authority
JP
Japan
Prior art keywords
data
update
record
search
database
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 - Lifetime
Application number
JP3109392A
Other languages
Japanese (ja)
Other versions
JPH04337866A (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.)
PII SHII EE KK
Original Assignee
PII SHII EE KK
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 PII SHII EE KK filed Critical PII SHII EE KK
Priority to JP3109392A priority Critical patent/JP2828354B2/en
Publication of JPH04337866A publication Critical patent/JPH04337866A/en
Application granted granted Critical
Publication of JP2828354B2 publication Critical patent/JP2828354B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データベース管理装置
に係り、特に、複数の端末装置からの要求に応じてデー
タベースを使用したデータ検索処理及びデータ検索処理
中のデータ更新処理を行うデータベース管理装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database management apparatus and, more particularly, to a database management apparatus for performing data search processing using a database and data update processing during data search processing in response to requests from a plurality of terminal devices. About.

【0002】[0002]

【従来の技術及び発明が解決しようとする課題】データ
ベースシステムは、データベースとデータベース管理装
置とから構成されておりデータベース管理装置は複数の
ユーザーからの要求によりマルチタスクによってデータ
の検索とデータの更新とを行う。一般のデータ検索は、
リアルタイムによって行われるため最新のデータを基準
にして検索を行えばよい。しかしながら、会計データを
記憶したデータベースのようにある特定時期のデータを
基準にして検索する必要がある場合には、無制限に更新
を受付けるとデータが次々に更新されるため特定時期の
データを基準にした検索が不可能になる。
2. Description of the Related Art A database system is composed of a database and a database management device. The database management device searches for data and updates data by multitasking in response to requests from a plurality of users. I do. General data search,
Since the search is performed in real time, the search may be performed based on the latest data. However, if it is necessary to perform a search based on data at a specific time, such as a database that stores accounting data, accepting unlimited updates will cause the data to be updated one after another. Search becomes impossible.

【0003】このため従来では、ファイルの更新を何度
も行う場合には更新前のファイルを履歴ファイルとして
複数個保持し、必要な時点における履歴ファイルを基準
に検索することが行われている。しかしながら、この方
法では更新前の履歴ファイルを複数個保持する必要があ
るため、記憶容量が大きなファイル装置を必要とする、
という問題がある。
For this reason, conventionally, when a file is updated many times, a plurality of files before updating are held as history files, and a search is performed based on the history file at a necessary time. However, in this method, since it is necessary to hold a plurality of history files before updating, a file device having a large storage capacity is required.
There is a problem.

【0004】一方、データの検索を実行しているときに
はデータの更新要求を排除する、いわゆる排他制御も行
われているが、データの更新を行うユーザーはデータ検
索処理が終了するまで待機させられるため、この待機期
間中データの更新処理が行えない、という問題がある。
[0004] On the other hand, when data retrieval is being performed, so-called exclusive control for eliminating a data update request is also performed. However, a user who updates data is made to wait until the data retrieval process is completed. However, there is a problem that data cannot be updated during the waiting period.

【0005】本発明は上記問題点を解決すべくなされた
もので、データベースシステム側の記憶容量を大きくす
ることなくまたマルチタスクにおける各ユーザーの待機
時間を軽減することができる、データベース管理装置を
提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and provides a database management apparatus capable of reducing the waiting time of each user in multitasking without increasing the storage capacity of the database system. The purpose is to do.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
請求項1記載の発明における複数の端末装置からの要
求に応じてデータベースを使用したデータ検索処理及び
データ検索処理中のデータ更新処理を行うデータベース
管理装置は、更新後のデータを更新時期と共に記憶する
記憶手段と、データ検索処理中にデータ更新要求があっ
たときには更新前のデータを更新することなく更新前の
データに対応させて更新した旨のデータをデータベース
に記憶し、更新後のデータを更新時期と共に前記記憶手
段にレコード単位で追加記憶させる第1の処理手段と、
データ検索要求があったときにはデータベース及び前記
記憶手段に記憶された内容を用いて指定された時期のデ
ータに基づいたデータ検索処理を行う第2の処理手段
と、を含んで構成されている。また、請求項2記載の発
明は、前記更新前のデータが必要でない場合には、前記
データベースのデータを前記記憶手段に記憶されている
更新後のデータに書き換えると共に、前記記憶手段の記
憶内容を消去することを特徴としている。
In order to achieve the above object, a data retrieval process using a database in response to a request from a plurality of terminal devices and a data update process during the data retrieval process according to the first aspect of the present invention. The database management device performs a storage unit that stores the updated data together with the update time, and performs a data update before the update without updating the data before the update when there is a data update request during the data search process .
A database that updates the data to correspond to the data
A first processing means for additionally stored in units of records in the storage unit stores the updated data with update time to,
And a second processing unit for performing a data search process based on data at a designated time using a database and contents stored in the storage unit when a data search request is issued. Further, according to the second aspect,
If the data before the update is not needed,
Database data is stored in the storage means
In addition to rewriting the updated data,
It is characterized by erasing memory contents.

【0007】[0007]

【作用】本発明の請求項1記載のデータベース管理装置
には、更新後のデータを更新時期と共に記憶する記憶手
段が設けられている。第1の処理手段は、データ検索処
理中にデータ更新要求(データの追加、修正及び削除の
要求)があったときには、更新前のデータを更新するこ
となく更新前のデータに対応させて更新した旨のデータ
をデータベースに記憶し、更新後のデータを更新時期と
共に記憶手段に記憶させる。記憶手段に記憶する更新後
のデータは、レコード単位で追加して記憶すればよく、
別のファイルを設けて記憶する必要はない。このため、
従来のファイル単位で記憶する場合に比較してデータベ
ースシステム側の記憶容量を小さくすることができる。
第2の処理手段は、データ検索要求があったときには、
データベース及び記憶手段に記憶された内容を用いて、
指定された時期のデータに基づいたデータ検索処理をレ
コード単位で行う。記憶手段には、更新時期即ち履歴が
記憶されているため、この履歴を用いて指定された時期
のデータに基づいたデータ検索、例えば検索開始時点で
の最新のデータに基づいた検索、検索開始後も刻々と変
化する最新のデータに基づいた検索を行うことができ
る。
The database management device according to the first aspect of the present invention is provided with storage means for storing the updated data together with the update time. When there is a data update request (data addition, correction and deletion request) during the data search process, the first processing means updates the data before update without updating the data before update. Data
Is stored in the database, and the updated data is stored in the storage means together with the update time. Updated data to be stored in the storage means may be added and stored in units of records,
There is no need to provide and store a separate file. For this reason,
The storage capacity on the database system side can be reduced as compared with the conventional case of storing in file units.
The second processing means, when there is a data search request,
Using the contents stored in the database and the storage means,
A data search process based on the data at the designated time is performed for each record. Since the storage unit stores the update time, that is, the history, the data search based on the data at the time designated using the history, for example, the search based on the latest data at the time of starting the search, Can also search based on the latest data that changes every moment.

【0008】また、本発明の請求項2記載の発明のよう
に、更新前のデータが必要でない場合には、データベー
スのデータを記憶手段に記憶されている更新後のデータ
に書き換えると共に、記憶手段の記憶内容を消去するの
が好ましい。このようにすれば、必要な更新後データの
みが記憶手段に記憶されることになるので記憶手段の容
量を小さくすることができる。
Further, according to the invention of claim 2 of the present invention ,
To, if not necessary before the update data can rewrites the updated data stored in the storage means the data of the database, it is preferable to erase the stored contents of the storage means. With this configuration, only the necessary updated data is stored in the storage unit, so that the capacity of the storage unit can be reduced.

【0009】[0009]

【実施例】以下図面を参照して本発明の実施例を詳細に
説明する。図1は本実施例のハードウェアを示すブロッ
ク図であり、データベースシステム10には、複数の端
末装置121 、122 ……12N が接続されている。デ
ータベースシステム10は、データベースとデータベー
ス管理装置とから構成されている。このデータベースシ
ステムには、図2に示したインデックスファイル、図3
に示したデータファイル及び管理プロクラムがあらかじ
め記憶されている。インデックスファイルは、キー(制
御フィールド)とキーに対応したポインターとを1レコ
ードとして複数のレコードで構成されている。データフ
ァイルは、コード、データ、第1ポインター、修正フラ
グ及び第2ポインターを1レコードとして複数のレコー
ドで構成されている。会計データベースの場合コードは
勘定科目コード、データは金額に対応する。第1ポイン
ターは当該レコードのアドレスを表すものである。修正
フラグはデータの修正(訂正及び削除)の有無を表すも
のであり、セットされているとき修正あり、リセットさ
れているとき修正なしを表す。第2ポインターは、修正
データが記憶されているレコードのアドレスを表すもの
である。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram showing the hardware of the present embodiment. A plurality of terminal devices 12 1 , 12 2 ... 12 N are connected to a database system 10. The database system 10 includes a database and a database management device. This database system includes the index file shown in FIG.
Are stored in advance in the data file and the management program shown in FIG. The index file is composed of a plurality of records using a key (control field) and a pointer corresponding to the key as one record. The data file is composed of a plurality of records using the code, data, first pointer, correction flag, and second pointer as one record. In the case of the accounting database, the code corresponds to the account code, and the data corresponds to the amount. The first pointer indicates the address of the record. The correction flag indicates whether or not data has been corrected (corrected and deleted). When it is set, it is corrected, and when it is reset, it is not corrected. The second pointer indicates the address of the record in which the correction data is stored.

【0010】図3を例にさらに説明すると、第1ポイン
ターの1、2、n、n+1、n+2はそれぞれ当該レコ
ードのアドレスを表しており、レコード1の修正フラグ
がセットされているためこのレコードのデータは修正さ
れていることを表している。第2ポインターを見るとア
ドレスがn+1になっているため、レコード1のデータ
を修正した後のレコードは第2ポインターで示されるア
ドレスn+1のレコードn+1に記憶されている。さら
に、レコードn+1の修正フラグがセットされているた
め、レコードn+1も修正されており、この修正データ
は第2ポインターで示されるアドレスn+2のレコード
n+2に記憶されている。レコードn+2の修正フラグ
はリセットされているためレコードn+2のデータが最
新のデータである。即ち、レコード1のデータはレコー
ドn+1、レコードn+2と2回修正されていることに
なる。また、第2ポインタがn+1、n+2と順にイン
クリメントされているため第2ポインターからどのよう
な順に修正されたか、即ち修正時期を知ることができ
る。
Referring to FIG. 3 as an example, the first pointers 1, 2, n, n + 1 and n + 2 represent the address of the record, and the modification flag of the record 1 is set because the correction flag of the record 1 is set. The data indicates that it has been corrected. Looking at the second pointer, since the address is n + 1, the record obtained by correcting the data of record 1 is stored in record n + 1 at address n + 1 indicated by the second pointer. Further, since the correction flag of the record n + 1 is set, the record n + 1 is also corrected, and the corrected data is stored in the record n + 2 at the address n + 2 indicated by the second pointer. Since the correction flag of the record n + 2 has been reset, the data of the record n + 2 is the latest data. That is, the data of the record 1 is corrected twice to the record n + 1 and the record n + 2. Further, since the second pointer is incremented in order of n + 1 and n + 2, it is possible to know in what order the second pointer has been modified, that is, the modification time.

【0011】次に、図4を参照して端末装置側の処理ル
ーチンとデータベースシステム側の処理ルーチンとを説
明する。なお、図4では理解を容易にするため端末側処
理ルーチンとデータベースシステム側処理ルーチンとを
並記し、端末側処理ルーチンのステップには符号にB
を、データベースシステム側ステップには符号にDを付
してある。また以下では最新の更新データに基づく検索
をリアルモード、特定時期のデータに基づく検索をバラ
ンスモードとして説明する。
Next, a processing routine on the terminal device side and a processing routine on the database system side will be described with reference to FIG. In FIG. 4, the terminal-side processing routine and the database system-side processing routine are shown side by side for easy understanding, and the steps of the terminal-side processing routine are denoted by reference characters “B”.
, And D is added to the code for the database system side steps. Hereinafter, a search based on the latest update data will be described as a real mode, and a search based on data at a specific time will be described as a balance mode.

【0012】まずバランスモードによる処理ルーチンを
説明する。端末装置側では、ステップ20Bにおいてバ
ランスモードでの処理を指定してファイルオープンを要
求する。データベースシステム側では、ステップ22D
においてファイルオープン要求を受付、ステップ24D
においてバランスモード処理をオンにする。これによっ
て、以後の処理はバランスモード処理になる。ステップ
26Dでは他のユーザーによる使用によってファイルが
ロックされているか否かを判断し、ファイルがロックさ
れていないときにはステップ32Dにおいてファイルを
オープンする。一方、ファイルがロックされているとき
には、ステップ28Dにおいてファイルロックが終了す
るまで待機する。このファイルロックは、1レコードに
対するアクセス時間を単位に定められており、1レコー
ドに対するアクセス中ファイルはロックされる。次のス
テップ30Dではファイルロックを解除し、ステップ3
4Dにおいてインデックスファイルのレコードに対応さ
せて最新の更新番号、即ち最も新しいデータに対する第
1ポインターを送信する。図3の例では、レコード1に
対してはレコードn+1、レコードn+2と順に更新さ
れているため最新のデータを記憶したレコードn+2の
第1ポインターのn+2、レコード2に対しては第1ポ
インターの2、レコードnに対しては第1ポインターの
nが最新更新番号になる。端末装置側では、ステップ3
6Bにおいてこの最新更新番号を受信する。なお、端末
装置側ではステップ20Bからステップ36Bまでの間
は待機状態になるが、待機時間は最大1レコードに対す
るアクセス時間程度であるので従来の排他制御よりも短
くなる。次のステップ38Bでは、検索キーと検索キー
に対応する最新更新番号とを付けて更新番号を指定した
検索要求を行う。なお、検索キーに対応する最新更新番
号は端末装置によって自動的に付加されるので、端末装
置を操作するオペレータは更新番号の入力は不要であ
る。データベースシステム側のステップ40Dでは検索
要求を受付、検索キーと最新更新番号とを受信する。そ
して、ステップ42Dにおいて後述する検索処理を行っ
てデータを送信する。端末装置側ではステップ44Bに
おいてデータを受信し、ステップ46Bにおいて検索処
理終了か否かを判断する。検索処理終了でない場合には
ステップ38Bに戻って上記のステップを繰り返し、検
索処理終了の場合にはステップ48Bにおいて検索終了
要求を送信する。これによって、データーベースシステ
ム側ではステップ50Dにおいてバランスモードをオフ
する。
First, a processing routine in the balance mode will be described. In step 20B, the terminal device specifies a process in the balance mode and requests a file open. On the database system side, step 22D
Accepts a file open request at step 24D
, The balance mode processing is turned on. As a result, the subsequent processing becomes the balance mode processing. In step 26D, it is determined whether or not the file is locked by use by another user. If the file is not locked, the file is opened in step 32D. On the other hand, when the file is locked, the process waits until the file lock is completed in step 28D. This file lock is determined in units of access time to one record, and a file is locked during access to one record. In the next step 30D, the file lock is released, and step 3
In 4D, the latest update number corresponding to the record of the index file, that is, the first pointer to the newest data is transmitted. In the example of FIG. 3, the record 1 is updated in order of record n + 1 and record n + 2, so that the first pointer n + 2 of record n + 2 storing the latest data, and the first pointer 2 For record n, n of the first pointer is the latest update number. On the terminal device side, step 3
The latest update number is received at 6B. Note that the terminal device is in a standby state from step 20B to step 36B, but the standby time is shorter than the conventional exclusive control because the maximum wait time is about the access time for one record. In the next step 38B, a search request in which the search number and the latest update number corresponding to the search key are assigned and the update number is specified is performed. Note that the latest update number corresponding to the search key is automatically added by the terminal device, so that the operator operating the terminal device does not need to input the update number. At step 40D on the database system side, a search request is accepted, and a search key and the latest update number are received. Then, in step 42D, a search process described later is performed and the data is transmitted. The terminal device receives the data in step 44B, and determines in step 46B whether or not the search processing has ended. If not, the process returns to step 38B to repeat the above steps. If the search process is completed, a search end request is transmitted in step 48B. As a result, the balance mode is turned off at step 50D on the database system side.

【0013】図5はステップ42Dのデータ検索処理ル
ーチンの詳細を示すものである。ステップ60では、ス
テップ40Dで受信した検索キーとインデックスファイ
ルとを用いて検索キーに対応するポインターを検索す
る。ステップ62ではインデックスファイルで検索した
ポインターと同じ第1ポインターを有するレコードをデ
ータファイルから読込む。ステップ64では第1ポイン
ターの更新番号を調査し、端末装置によって指定された
更新番号が有効か否かを判断する。更新番号が有効でな
い場合にはステップ68においてファイルが終わりであ
る旨を表す情報(EOF)を端末装置側に送信する。一
方、更新番号が有効な場合にはステップ70において修
正フラグがセットされているか否かを判断する。修正フ
ラグがリセットされているときにはデータは訂正又は削
除されていないためステップ72でこのレコードのコー
ドとデータとを端末装置側に送信する。
FIG. 5 shows details of the data search processing routine in step 42D. In step 60, a pointer corresponding to the search key is searched using the search key and the index file received in step 40D. In step 62, a record having the same first pointer as the pointer searched in the index file is read from the data file. In step 64, the update number of the first pointer is checked to determine whether the update number specified by the terminal device is valid. If the update number is not valid, information (EOF) indicating that the file has ended is transmitted to the terminal device in step 68. On the other hand, if the update number is valid, it is determined in step 70 whether the correction flag is set. When the correction flag is reset, the data is not corrected or deleted, so the code and data of this record are transmitted to the terminal device in step 72.

【0014】一方、ステップ70で修正フラグがセット
されていると判断されたときには、修正後の更新番号で
ある第2ポインターを調査し、ステップ76においてこ
の更新番号が、ステップ38Bで指定された最新の更新
番号より小さいか否か、即ちファイルオープン又はファ
イルロック解除前の更新番号であるか否かを判断する。
修正後の更新番号が指定された更新番号より大きい更新
番号である場合には、ステップ38Bで指定したとき以
後に更新されたデータであるため、更新前のデータ即ち
当該レコードのデータを送信する。これによって、デー
タが刻々と更新されていても指定された時期のデータを
検索して端末装置側に送信することができる。
On the other hand, if it is determined in step 70 that the correction flag has been set, the second pointer, which is the updated update number, is checked, and in step 76, this update number is updated to the latest pointer designated in step 38B. Is determined to be smaller than the update number of the file, that is, whether the update number is before the file is opened or the file is unlocked.
If the updated update number is larger than the specified update number, the data before update, that is, the data of the record, is transmitted because it is data updated after the time specified in step 38B. Thereby, even if the data is updated every moment, it is possible to search for the data at the designated time and transmit it to the terminal device side.

【0015】ステップ76で修正後の更新番号が指定さ
れた更新番号より小さい更新番号であると判断されたと
きには、ステップ78において履歴レコード、即ち第2
ポインターの更新番号で指定されたアドレスのレコード
を読出し、ステップ70に戻って修正フラグがセットさ
れているか否かを判断する。そして、修正フラグがリセ
ットされているとき、即ちデータが修正されていないと
きには当該レコードのデータを送信し、修正フラグがセ
ットされているとき、即ちデータが修正されているとき
には、ステップ72で当該レコードのデータを送信する
までステップ74〜ステップ78を繰り返す。
If it is determined in step 76 that the updated update number is smaller than the specified update number, then in step 78 the history record, ie, the second
The record at the address specified by the update number of the pointer is read, and the process returns to step 70 to determine whether the correction flag is set. When the correction flag is reset, that is, when the data is not corrected, the data of the record is transmitted. When the correction flag is set, that is, when the data is corrected, the record is transmitted at step 72. Steps 74 to 78 are repeated until this data is transmitted.

【0016】図6はバランスモードのときに他のユーザ
ーから要求があったときの処理ルーチンを示すものであ
る。ステップ80では端末装置からの要求を受付、ステ
ップ82においてデータ追加要求か否かを判断する。デ
ータ追加要求のときには、ステップ84においてデータ
ファイルに記憶されている最終レコードの次に、コー
ド、データ、第1ポインターを含むレコードを追加記憶
する。
FIG. 6 shows a processing routine when there is a request from another user in the balance mode. In step 80, a request from the terminal device is received, and in step 82, it is determined whether or not the request is a data addition request. At the time of a data addition request, a record including a code, data, and a first pointer is additionally stored in step 84 after the last record stored in the data file.

【0017】ステップ82で否定判断されたときには、
ステップ86において訂正要求か否かを判断する。訂正
要求のときには、訂正前のレコード、即ちデータ修正の
対象となっているレコードの修正フラグをセットすると
共に第2ポインターに修正後のデータを記憶するアドレ
スを修正更新番号として付加し、ステップ90において
第2ポインターのアドレスに対応する位置にコード、修
正後のデータ、第1ポインターを含むレコードを追加し
て記憶する。
If a negative decision is made in step 82,
In step 86, it is determined whether the request is a correction request. In the case of a correction request, the correction flag of the record before correction, that is, the record whose data is to be corrected is set, and the address for storing the corrected data is added to the second pointer as the correction update number. At the position corresponding to the address of the second pointer, a record including the code, the corrected data, and the first pointer is additionally stored.

【0018】ステップ86の判断が否定のときにはステ
ップ96において削除要求か否かを判断する。削除要求
のときには、ステップ94において削除前のデータを備
えたレコード、即ちデータが削除対象となっているレコ
ードの修正フラグをセットすると共に、第2ポインター
に削除データを記憶するためのアドレスを修正更新番号
として記憶し、ステップ96において第2ポインターに
対応するアドレス位置にコード、削除データ即ち削除し
た旨を表すデータ、このレコードのアドレスを更新番号
とする第1ポインターを含むレコードを最終レコードの
次に追加記憶する。
If the determination in step 86 is negative, it is determined in step 96 whether the request is a deletion request. At the time of the deletion request, the correction flag of the record having the data before deletion, that is, the record whose data is to be deleted is set in step 94, and the address for storing the deletion data is updated and updated in the second pointer. In step 96, a record including a code, deletion data, that is, data indicating deletion, and a first pointer whose update number is the address of this record at the address position corresponding to the second pointer is stored next to the last record. Additional storage.

【0019】以上の結果、バランスモード中、即ちデー
タ検索中でもデータの更新処理(データ追加、データ訂
正、データ削除)が行われ、更新処理では更新前のデー
タを更新することなく更新後のデータを新たにレコード
を追加することによって記憶し、更新前のレコードには
当該レコードを更新した旨のデータが記憶される。ま
た、データ検索は処理指定した更新番号に対応するデー
タを基に行われるため、検索開始時から検索終了時まで
にデータの更新があっても更新対象データには影響を及
ぼさない。したがって、データ検索中にもデータの更新
を行うことができるため、データ更新ユーザーの待機時
間を短縮することがてきる。また、データ検索をしてい
るユーザーはデータ検索開始時点のデータを基準に検索
することができるため、検索のやり直し等が不要にな
る。
As a result, during the balance mode, that is, during the data search, data update processing (data addition, data correction, data deletion) is performed. In the update processing, the updated data is updated without updating the data before the update. The record is stored by adding a new record, and data indicating that the record has been updated is stored in the record before the update. Further, since the data search is performed based on the data corresponding to the update number designated for processing, even if the data is updated from the start of the search to the end of the search, the data to be updated is not affected. Therefore, the data can be updated even during the data search, so that the waiting time of the data update user can be reduced. In addition, since the user who is performing data search can search based on the data at the start of the data search, it is not necessary to repeat the search.

【0020】図7はリアルモードの要求があったときの
データベースシステム側での検索ルーチンを示すもので
ある。なお図7において図5と対応する部分には同一符
号を付した。このルーチンでは、ステップ70とステッ
プ78において、修正フラグがリセットされているレコ
ードが読みだされるまで繰返し履歴レコードが読みださ
れ、これによって最新のデータをリアルタイムで読みだ
すことができる。
FIG. 7 shows a search routine on the database system side when there is a request for the real mode. In FIG. 7, parts corresponding to those in FIG. In this routine, in steps 70 and 78, a history record is repeatedly read until a record whose correction flag is reset is read, whereby the latest data can be read in real time.

【0021】以上説明したように本実施例によればバラ
ンスモードによる検索とリアルモードによる検索とを同
時に行うことができる。従って、検索開始時点での最新
のデータによる検索と検索開始後刻々と変化する最新の
データによる検索との2種類の検索を同時に行うことが
できる。
As described above, according to this embodiment, the search in the balance mode and the search in the real mode can be performed simultaneously. Therefore, it is possible to simultaneously perform two types of searches, a search using the latest data at the start of the search and a search using the latest data that changes every moment after the start of the search.

【0022】全てのユーザーからのバランスモードがオ
フにされたときは、データベース側では削除及び修正に
対する最新の履歴レコードを用いてもとのレコードのデ
ータを書き換えると共に対応する履歴レコードを消去す
る。図3の例で説明すると、レコード1のデータがレコ
ードn+2のデータとなるようにレコード1のデータを
書き換え、レコードn+2、レコードn+1を消去す
る。これによって、不要なレコードが消去されるため、
データベースシステム側のファイルスペースを節約でき
る。なお、複数回データを修正する場合には、最初のレ
コードの第2ポインター(図3の例ではレコード1の第
2ポインター)に常に最新の更新番号(最新のデータを
備えたレコードのアドレス)を記憶するようにすれば、
途中の更新データをスキップして最新のレコードに直接
到達することができるため、リアルモードの検索時間を
短縮することができる。
When the balance mode from all users is turned off, the database rewrites the data of the original record using the latest history record for deletion and correction and deletes the corresponding history record. 3, the data of record 1 is rewritten so that the data of record 1 becomes the data of record n + 2, and records n + 2 and n + 1 are deleted. This will erase unwanted records,
File space on the database system side can be saved. When the data is corrected a plurality of times, the latest update number (the address of the record having the latest data) is always assigned to the second pointer of the first record (the second pointer of record 1 in the example of FIG. 3). If you remember
Since the update data in the middle can be skipped and the latest record can be directly reached, the search time in the real mode can be reduced.

【0023】[0023]

【発明の効果】以上説明したように本発明によれば、
新前のデータを更新することなく更新前のデータに対応
させて更新した旨のデータを記憶し、更新後のデータを
更新時期と共に記憶手段にレコード単位で追加記憶する
ようにしているため、更新前のデータを退避するファイ
ルを設ける必要がなく、このため、データ検索中にデー
タ更新処理を行う場合であっても記憶容量を大きくする
ことなく検索開始時点での最新のデータと検索開始後も
刻々と変化する最新のデータに基づいたデータ検索を
行うことができる、という効果が得られる。
According to the present invention as described above, according to the present invention, further
Corresponds to data before update without updating data before new
And store the data to the effect that the data has been updated.
Since the data is additionally stored in the storage unit in record units together with the update time, the file for saving the data before update is saved.
Therefore, even if the data update process is performed during the data search, the latest data at the start of the search and the latest data that changes every moment after the start of the search can be obtained without increasing the storage capacity. it is possible to perform data retrieval based on the data, the effect is obtained that.

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

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】インデックスファイルを概略的に示す線図であ
る。
FIG. 2 is a diagram schematically showing an index file.

【図3】データファイルを概略的に示す線図である。FIG. 3 is a diagram schematically showing a data file.

【図4】端末装置側及びデータベースシステム側の処理
ルーチンを示す流れ図である。
FIG. 4 is a flowchart showing a processing routine on the terminal device side and the database system side.

【図5】図4のステップ42Dの詳細を示す流れ図であ
る。
FIG. 5 is a flowchart showing details of step 42D in FIG. 4;

【図6】バランスモード中に他のユーザーから要求があ
ったときの処理ルーチンを示す流れ図である。
FIG. 6 is a flowchart showing a processing routine when another user makes a request during the balance mode.

【図7】リアルモードのときのデータ検索ルーチンを示
す流れ図である。
FIG. 7 is a flowchart showing a data search routine in a real mode.

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

10 データベースシステム 121 〜12N 端末装置10 Database system 12 1 to 12 N terminal device

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 17/30──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 17/30

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数の端末装置からの要求に応じてデー
タベースを使用したデータ検索処理及びデータ検索処理
中のデータ更新処理を行うデータベース管理装置であっ
て、 更新後のデータを更新時期と共に記憶する記憶手段と、 データ検索処理中にデータ更新要求があったときには更
新前のデータを更新することなく更新前のデータに対応
させて更新した旨のデータをデータベースに記憶し、
新後のデータを更新時期と共に前記記憶手段にレコード
単位で追加記憶させる第1の処理手段と、 データ検索要求があったときにはデータベース及び前記
記憶手段に記憶された内容を用いて指定された時期のデ
ータに基づいたデータ検索処理を行う第2の処理手段
と、 を含むデータベース管理装置。
1. A database management device for performing a data search process using a database and a data update process during a data search process in response to requests from a plurality of terminal devices, and stores updated data together with an update time. Storage means and responds to data before update without updating data before update when data update request is received during data search processing
Is allowed to store the data indicative of the updated database records in the storage means the data after updated with update time
First processing means for additionally storing in units of data, and second processing for performing data search processing based on data at a designated time using data stored in the database and the storage means when a data search request is made Means, and a database management device comprising:
【請求項2】 前記更新前のデータが必要でない場合に
は、前記データベースの更新前のデータを前記記憶手段
に記憶されている更新後のデータに書き換えると共に、
前記記憶手段の記憶内容を消去することを特徴とする請
求項1記載のデータベース管理装置。
2. When the data before update is not required
Storing the data before updating the database in the storage means
And rewrite the updated data stored in
Erasing the storage contents of the storage means.
The database management device according to claim 1.
JP3109392A 1991-05-14 1991-05-14 Database management device Expired - Lifetime JP2828354B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3109392A JP2828354B2 (en) 1991-05-14 1991-05-14 Database management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3109392A JP2828354B2 (en) 1991-05-14 1991-05-14 Database management device

Publications (2)

Publication Number Publication Date
JPH04337866A JPH04337866A (en) 1992-11-25
JP2828354B2 true JP2828354B2 (en) 1998-11-25

Family

ID=14509075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3109392A Expired - Lifetime JP2828354B2 (en) 1991-05-14 1991-05-14 Database management device

Country Status (1)

Country Link
JP (1) JP2828354B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0785076A (en) * 1993-06-26 1995-03-31 Just Syst Corp Data storage method
US6760840B1 (en) 1994-03-15 2004-07-06 Kabushiki Kaisha Toshiba File editing system and shared file editing system with file content secrecy, file version management, and asynchronous editing
ATE165174T1 (en) * 1994-05-10 1998-05-15 Siemens Ag DATA MANAGEMENT SYSTEM OF A REAL-TIME SYSTEM

Also Published As

Publication number Publication date
JPH04337866A (en) 1992-11-25

Similar Documents

Publication Publication Date Title
JPH06290099A (en) Method for storage management and subsystem therefor
JPH09294158A (en) Electronic telephone directory system
JP2828354B2 (en) Database management device
JP3636773B2 (en) Information processing device for database check
JPH08314780A (en) File management system
JP3245047B2 (en) Version control apparatus and method
JPH04324541A (en) Network system
JPH07168744A (en) Information managing device and its control method
JP2000148548A (en) Unnecessary record deleting device
JPH0581096A (en) Page deletion system for electronic filing device
JP2912657B2 (en) File access processor
JPH04131944A (en) Document filling device containing batch changing function of document title information
JP2980610B2 (en) Transaction management device
JP3368378B2 (en) Storage content management method and data processing device
JPH05120092A (en) File deletion controlling method for file device
JPH03206535A (en) Shared file control system
JPH0784849A (en) Data access control method
JPH0744426A (en) File management method for file system
JP3298935B2 (en) File management device
JPH07192005A (en) Learning storage controller
JP3398672B2 (en) Intermediate data storage device
KR100377216B1 (en) Method of Outputting Disk Files in the Switching System
JP2817911B2 (en) Access control method for keyed files
JPH06259293A (en) Useless document batch deleting device
JPH03225539A (en) Record control system

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20070918

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20080918

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090918

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100918

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100918

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20110918

Year of fee payment: 13

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110918

Year of fee payment: 13