JPH04354036A - Data base management method - Google Patents

Data base management method

Info

Publication number
JPH04354036A
JPH04354036A JP3129766A JP12976691A JPH04354036A JP H04354036 A JPH04354036 A JP H04354036A JP 3129766 A JP3129766 A JP 3129766A JP 12976691 A JP12976691 A JP 12976691A JP H04354036 A JPH04354036 A JP H04354036A
Authority
JP
Japan
Prior art keywords
record
data
position pointer
database
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.)
Pending
Application number
JP3129766A
Other languages
Japanese (ja)
Inventor
Chiaki Ito
伊東 千明
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP3129766A priority Critical patent/JPH04354036A/en
Publication of JPH04354036A publication Critical patent/JPH04354036A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To attain the data base management of time sequential data by having an adding position pointer, and a taking-out position pointer controlled by a First In First Out system in a data management. CONSTITUTION:At the time of adding one record, data are filled in fields c1n-c3n in sequence according to the position of an adding position pointer P1 in order to prepare a record rn. Then, one record is written in an invert file corresponding to an object field of a key retrieving processing. Then, the adding position pointer P1 is updated to the next record position rn+1. At that time, when the capacity of a master record MR is filled up, the oldest one record is erased. When the above mentioned capacity has a room to spare, a data adding operation is repeated. At the time of taking out the data, the presence or absence of the data in the master record MR is checked, and one record at the position designated by a present taking-out position pointer P2 is taken out. Then, the value of this taking-out position pointer P2 is updated.

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 method for managing a database set up in an industrial computer system, and more specifically, to an improved method for handling time-series data.

【0002】0002

【従来の技術】従来、工場に設置されるような計算機シ
ステムにおけるデータベースは、図7に示すような2次
元の表形式で表現され、フィールドc1,c2,…(カ
ラム)から構成されるレコードr1,r2,…の形式で
管理されるものが一般的であった。即ち、データベース
作成者は、フィールドc11,c21,c31を埋めて
レコードr1を作成し、フィールドc21,c22,c
32を埋めてレコードr2を作成するというような手順
を繰り返し行って、マスタ・レコードMRを設定する。
2. Description of the Related Art Conventionally, a database in a computer system installed in a factory is expressed in a two-dimensional table format as shown in FIG. , r2, ... were generally managed. That is, the database creator creates record r1 by filling in fields c11, c21, and c31, and fills in fields c21, c22, and c31.
The master record MR is set by repeating the procedure of filling in 32 and creating record r2.

【0003】更に、このようなデータベース(マスタ・
レコードMR)から必要なデータ(レコード)のみを抽
出したい場合があり、この時はデータ検索処理がしばし
ば行われる。データ検索処理は、このマスタ・レコード
MRの近傍にインバート・ファイルIFを生成すること
により行われることが多い。即ち、インバート・ファイ
ルIFは、後で検索対象となるカラム、例えばカラムc
2について、その検索値“××”と、この値“××”を
有するレコード番号(r3,r5,…)とが対応付けら
れるファイルであり、このインバート・ファイルIFも
、レコードを新たに追加される毎に追加される。従って
、実際にフィールドc2における値“××”のキー検索
が開始すると、インバート・ファイルIFが参照され、
この中のレコード番号r3,r5,…に対応してマスタ
・レコードMRからレコードr3,r5の内容が読み出
される。インバート・ファイルIFは、予め、想定され
る全ての検索処理に対応して、複数種類のものが生成さ
れる。このようにして、データベースが生成され、この
データベースについて高速に検索処理を行うことができ
る。
[0003] Furthermore, such a database (master
There are cases where it is desired to extract only necessary data (records) from records MR), and in this case, data search processing is often performed. Data search processing is often performed by creating an invert file IF near this master record MR. That is, the invert file IF contains a column to be searched later, for example column c.
Regarding 2, this is a file in which the search value "XX" is associated with the record number (r3, r5,...) having this value "XX", and this invert file IF also adds a new record. will be added each time. Therefore, when a key search for the value "XX" in field c2 actually starts, the invert file IF is referenced,
The contents of records r3, r5 are read out from master record MR corresponding to record numbers r3, r5, . . . A plurality of types of invert file IFs are generated in advance in response to all possible search processes. In this way, a database is generated, and a search process can be performed on this database at high speed.

【0004】0004

【発明が解決しようとする課題】以上述べたような、従
来のデータベース管理方法は、登録されたデータについ
て時間的な登録順序は特になく、工業用計算機システム
等で要求される時系列的なデータの取り扱いには不向き
であった。即ち、登録されたデータについて、キー検索
のみが可能であり、トレンド表示処理等を行うには、別
途、アプリケーション・プログラム側でトレンド表示処
理のためのプログラムを設定するというような複雑な処
理手順が必要であった。本発明は、時系列データをデー
タベース管理できるようにすることを課題とし、工業用
の計算機システムのパフォーマンスを向上させることを
目的とする。
[Problems to be Solved by the Invention] In the conventional database management method as described above, there is no particular chronological registration order for registered data, and the chronological data required by industrial computer systems, etc. It was not suitable for handling. In other words, only key searches are possible for registered data, and in order to perform trend display processing, complicated processing procedures such as setting up a separate program for trend display processing on the application program side are required. It was necessary. The present invention aims to enable time-series data to be managed in a database, and to improve the performance of an industrial computer system.

【0005】[0005]

【課題を解決するための手段】以上の課題を解決した本
発明は、少なくとも1個以上のフィールドからなるレコ
ードを少なくとも1個以上有するデータベースについて
、キーとなるフィールド毎に検索対象とするインバート
ファイルを予め生成し、このインバートファイルにより
検索処理をするデータベース管理方法において、a)1
レコードを追加する際は、データベースの全体の容量を
越えない場合は当該1レコードを追加し、データベース
の全体の容量を越える場合は最も古いレコードを消去し
てから当該1レコードを追加するようにデータ追加位置
を指定する追加位置ポインタに従い、b)1レコードを
取り出す際は、このデータベース中にある最も古いレコ
ードを指定する取出位置ポインタに従うことを特徴とす
るデータベース管理方法である。
[Means for Solving the Problems] The present invention, which has solved the above problems, creates an invert file that is searched for each key field in a database that has at least one record consisting of at least one field. In a database management method in which search processing is performed using an inverted file generated in advance, a) 1
When adding a record, if it does not exceed the total capacity of the database, add the record; if it exceeds the total capacity of the database, delete the oldest record and then add the record. This database management method is characterized in that it follows an addition position pointer that specifies an addition position, and b) when retrieving one record, it follows a retrieval position pointer that specifies the oldest record in this database.

【0006】[0006]

【作用】本発明のデータベース管理方法によりデータベ
ースを構築する際、レコード位置を指定する追加位置ポ
インタに、順次、フィールドを埋めるようにしてレコー
ドが追加される。レコードを取り出す際は、データベー
ス容量が満杯になっていない場合は、最も古いレコード
に取出位置ポインタが設定されており、この取出ポイン
タに従ってレコードが取り出される。データベース容量
が満杯の場合は、最も古いレコードが捨てられる。デー
タ検索を実行する場合は、インバート・ファイルを参照
する。
[Operation] When constructing a database using the database management method of the present invention, records are sequentially added to the addition position pointer that specifies the record position by filling in the fields. When retrieving records, if the database capacity is not full, a retrieval position pointer is set to the oldest record, and records are retrieved according to this retrieval pointer. If the database is full, the oldest records are discarded. Refer to the invert file when performing data searches.

【0007】[0007]

【実施例】以下、本発明のデータベース管理方法を実施
した例を説明する。本発明のデータベース管理方法は、
従来のキー検索を行えるデータベース管理方式に、デー
タの管理について、FIFO(First In Fi
rst Out)方式で制御される追加位置ポインタ、
取出位置ポインタを追加したことを特徴とするものであ
る。図3は、本発明方法を実現する計算機システムの必
要最少限の構成要素を表わす概念ブロック図である。マ
スタ・レコードMRは、図7に示したものと同様なデー
タベースであり、計算機システムの主記憶または補助記
憶上のファイルである。インバート・ファイル制御装置
IFCは、図7に示したインバート・ファイルIFを制
御するブロックであり、マスタ・レコードMRと同様の
場所に位置する。カレント・ポインタ制御装置PCは、
計算機システム内のCPU上のレジスタまたは主記憶上
の固定領域にあり、レコードを追加する際に使用される
追加位置ポインタP1、レコードを取り出す際に使用さ
れる取出位置ポインタP2の位置制御に関与するブロッ
クで、必要に応じて補助記憶上にもバックアップされる
[Embodiment] An example of implementing the database management method of the present invention will be described below. The database management method of the present invention includes:
In addition to the conventional database management method that allows key searches, FIFO (First In FiFO) is used for data management.
an additional position pointer controlled in the rst Out) manner;
This is characterized by the addition of an extraction position pointer. FIG. 3 is a conceptual block diagram showing the minimum necessary components of a computer system that implements the method of the present invention. The master record MR is a database similar to that shown in FIG. 7, and is a file on the main memory or auxiliary memory of the computer system. The invert file control device IFC is a block that controls the invert file IF shown in FIG. 7, and is located at the same location as the master record MR. The current pointer control device PC is
It is located in a register on the CPU in the computer system or in a fixed area on the main memory, and is involved in position control of the addition position pointer P1 used when adding records and the extraction position pointer P2 used when taking out records. Blocks are also backed up on auxiliary storage if necessary.

【0008】このような構成において実現される本発明
方法を図1,図2のフローチャートに表わし、図3の概
念ブロック図とともにその作用を説明する。図2は、デ
ータベースを構築する場合のフローチャートであり、マ
スタ・レコードMRにデータを追加する手順を表わす。 1レコードを追加する際、追加位置ポインタP1の位置
に従い、フィールドc1n,c2n,c3nの順にデー
タを埋め、レコードrnが生成される。そして、キー検
索処理の対象フィールドに対応してインバート・ファイ
ルIFに1レコード書き込まれる。例えば、キー検索対
象としてフィールドc2が想定されていれば、このレコ
ードrnのフィールドc2nの値“YY”に対応するイ
ンバート・ファイルIFにレコード番号rnが登録され
る。次に、追加位置ポインタP1が次のレコード位置(
rn+1)に更新される。ここで、このマスタ・レコー
ドMRの容量が満杯になったとすると、最も古いレコー
ド1個(レコードr1)が消去される。マスタ・レコー
ドMRの容量にまだ余裕がある場合は、上記のデータ追
加動作が繰り返される。
The method of the present invention realized in such a configuration is shown in the flowcharts of FIGS. 1 and 2, and its operation will be explained with reference to the conceptual block diagram of FIG. 3. FIG. 2 is a flowchart for constructing a database, and represents the procedure for adding data to the master record MR. When adding one record, data is filled in fields c1n, c2n, and c3n in this order according to the position of addition position pointer P1, and record rn is generated. Then, one record is written to the invert file IF corresponding to the target field of the key search process. For example, if field c2 is assumed to be the key search target, record number rn is registered in the invert file IF corresponding to the value "YY" of field c2n of this record rn. Next, the additional position pointer P1 is set to the next record position (
rn+1). Here, if the capacity of this master record MR becomes full, the oldest record (record r1) will be erased. If there is still room in the capacity of the master record MR, the above data addition operation is repeated.

【0009】図1のフローチャートは、図2のフローチ
ャートによってデータを追加処理する一方で、このデー
タベースからあるデータ(レコード)を取り出す処理及
びキー検索処理する際のフローチャートである。データ
を検索する場合は、従来の方式と同様に、検索対象とな
るインバート・ファイルIFを読み出し、続いて、該当
するレコードをマスタ・データMRから読み出し、アプ
リケーション・プログラムに引き渡す。データを取り出
す場合は、マスタ・レコードMR内のデータの有無を調
べ、現在の取出位置ポインタP2が指定する位置にある
レコード(r1)を1個取り出す。そして、この取出位
置ポインタP2の値を更新する。具体的には、図3にお
いて、取出位置ポインタP2はこのマスタ・レコードM
Rにおける最も古いレコードr1を指定しているが、レ
コードr1取り出し後、取出位置ポインタP2はレコー
ドr1の次に古いレコードr2の位置に移動する。次に
、この読み出したレコードr1をアプリケーション・プ
ログラム側へ引き渡す。尚、データを取り出す場合にデ
ータがマスタ・レコードMRになければ、データ入力待
ちとなる。
The flowchart in FIG. 1 is a flowchart for processing for retrieving certain data (records) from this database and for key search processing, while adding data according to the flowchart in FIG. When searching for data, as in the conventional method, the invert file IF to be searched is read out, and then the corresponding record is read out from the master data MR and passed to the application program. When data is to be retrieved, the presence or absence of data in the master record MR is checked, and one record (r1) located at the position specified by the current retrieval position pointer P2 is retrieved. Then, the value of this extraction position pointer P2 is updated. Specifically, in FIG. 3, the extraction position pointer P2 points to this master record M.
Although the oldest record r1 in R is specified, after record r1 is retrieved, the retrieval position pointer P2 moves to the next oldest record r2 after record r1. Next, this read record r1 is delivered to the application program side. Note that when data is extracted, if the data is not in the master record MR, the system waits for data input.

【0010】次に、図4、図5、図6を用い、本発明方
法によるデータ追加、取り出し、検索の実際の動作例を
説明する。図4は、マスタ・レコードMRにデータを追
加していく場合を表わす図である。  この例において
は、初期状態としてデータが空であり、追加位置ポイン
タP1は、データ(レコード)を追加していく毎に、レ
コード位置r1、r2、r3、r4を指定するように順
次、移動する。一方、データ追加動作中は、取出位置ポ
インタP2はこのマスタ・レコードMR中の最も古いデ
ータr1を指定している。
Next, an example of actual operation of data addition, extraction, and retrieval by the method of the present invention will be explained using FIGS. 4, 5, and 6. FIG. 4 is a diagram showing the case where data is added to the master record MR. In this example, the data is initially empty, and the additional position pointer P1 sequentially moves to specify record positions r1, r2, r3, and r4 each time data (records) are added. . On the other hand, during the data addition operation, the retrieval position pointer P2 specifies the oldest data r1 in this master record MR.

【0011】図5は、図4の状態からデータを取り出し
ていく場合を表わす図である。はじめ、取出位置ポイン
タP2は、最も古いレコードr1を指定しており、この
レコードr1を取り出すと、次に古いレコードr2を示
すように移動する。そして、この図において、取出位置
ポインタP2は、データが逐次追加されていくのに追従
して順次下方へ移動し、最下方に達すると、再び、最上
方に移動する。尚、追加位置ポインタP1も同様に、こ
の図において、データ追加毎に順次下方へ移動し、最下
方に達すると、再び、最上方に移動する。
FIG. 5 is a diagram showing the case where data is extracted from the state shown in FIG. Initially, the retrieval position pointer P2 specifies the oldest record r1, and when this record r1 is retrieved, it moves to point to the next oldest record r2. In this figure, the retrieval position pointer P2 sequentially moves downward following the successive addition of data, and when it reaches the bottom, moves to the top again. Similarly, in this figure, the additional position pointer P1 sequentially moves downward each time data is added, and when it reaches the bottom, it moves to the top again.

【0012】図6は、図4の状態からデータ検索を行う
場合を表わす図であり、フィールドc2において、値“
ZZ”を有するレコードを抽出したいことを想定する。 この場合は、従来方式と同様に、対応するインバート・
ファイルIFにある値“ZZ”の対応ファイルを参照し
、このファイルよりフィールドc2の値が“ZZ”であ
るレコードr3が判明し、マスタ・レコードMRよりレ
コードr3を読み出す。これにより、データ検索を実行
する。尚、このデータ検索処理は、追加位置ポインタP
1、取出位置ポインタP2の位置とは全く無関係である
FIG. 6 is a diagram showing a case where data is searched from the state shown in FIG. 4. In field c2, the value "
Assume that you want to extract records that have "ZZ". In this case, as in the conventional method, the corresponding invert
A file corresponding to the value "ZZ" in the file IF is referred to, and a record r3 in which the value of field c2 is "ZZ" is found from this file, and record r3 is read from the master record MR. This executes the data search. Note that this data search process is performed using the additional position pointer P.
1. It is completely unrelated to the position of the extraction position pointer P2.

【0013】このようにして、従来のキー検索を行える
データベース管理方式に、データの管理について、FI
FO(First In First Out)方式で
制御される追加位置ポインタ、取出位置ポインタを追加
できる。
In this way, in addition to the conventional database management system that allows key searches, FI
It is possible to add an additional position pointer and an extraction position pointer that are controlled by the FO (First In First Out) method.

【0014】[0014]

【発明の効果】以上述べたように、本発明のデータベー
ス管理方法によれば、次の効果を得る。  工業用計算
機システムにおいて、アプリケーション・プログラムは
データベースについて時系列的なデータ管理を行わずに
すみ、アプリケーション・プログラムからのデータベー
スの取り扱いが容易となった。同時に、通常のデータベ
ースで要求される特定のデータの検索等も高速に行うこ
とができ、広い範囲の業務に応用できる。
[Effects of the Invention] As described above, according to the database management method of the present invention, the following effects can be obtained. In industrial computer systems, application programs no longer need to perform time-series data management for databases, making it easier for application programs to handle databases. At the same time, searches for specific data required in regular databases can be performed at high speed, and can be applied to a wide range of businesses.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明のデータベース管理方法におけるデータ
検索、取り出しのフローチャートである。
FIG. 1 is a flowchart of data search and retrieval in the database management method of the present invention.

【図2】本発明のデータベース管理方法におけるデータ
追加のフローチャートである。
FIG. 2 is a flowchart of data addition in the database management method of the present invention.

【図3】本発明のデータベース管理方法を実現する構成
要素を表わす概念ブロック図である。
FIG. 3 is a conceptual block diagram showing components that implement the database management method of the present invention.

【図4】本発明方法におけるレコード追加動作を実際に
行った場合のマスタ・レコードの状態を表わす図である
FIG. 4 is a diagram showing the state of a master record when a record adding operation is actually performed in the method of the present invention.

【図5】本発明方法におけるレコード取出動作を実際に
行った場合のマスタ・レコードの状態を表わす図である
FIG. 5 is a diagram showing the state of a master record when a record retrieval operation is actually performed in the method of the present invention.

【図6】本発明方法におけるレコード検索動作を実際に
行った場合のマスタ・レコードの状態を表わす図である
FIG. 6 is a diagram showing the state of a master record when a record search operation in the method of the present invention is actually performed.

【図7】従来の一般的なデータベース管理を表わす図で
ある。 MR  マスタ・レコード IFC  インバート・ファイル制御装置PC  カレ
ント・ポインタ制御装置
FIG. 7 is a diagram showing conventional general database management. MR Master record IFC Invert file control device PC Current pointer control device

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  少なくとも1個以上のフィールドから
なるレコードを少なくとも1個以上有するデータベース
について、キーとなるフィールド毎に検索対象とするイ
ンバートファイルを予め生成し、このインバートファイ
ルにより検索処理をするデータベース管理方法において
、a)1レコードを追加する際は、データベースの全体
の容量を越えない場合は当該1レコードを追加し、デー
タベースの全体の容量を越える場合は最も古いレコード
を消去してから当該1レコードを追加するようにデータ
追加位置を指定する追加位置ポインタに従い、b)1レ
コードを取り出す際は、このデータベース中にある最も
古いレコードを指定する取出位置ポインタに従うことを
特徴とするデータベース管理方法。
Claim 1: Database management that generates in advance an invert file to be searched for each key field for a database that has at least one record consisting of at least one field, and performs search processing using this invert file. In the method, a) When adding one record, if it does not exceed the total capacity of the database, add the record, and if it exceeds the total capacity of the database, delete the oldest record and then add the record. b) when retrieving one record, following an retrieval position pointer that designates the oldest record in the database.
JP3129766A 1991-05-31 1991-05-31 Data base management method Pending JPH04354036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3129766A JPH04354036A (en) 1991-05-31 1991-05-31 Data base management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3129766A JPH04354036A (en) 1991-05-31 1991-05-31 Data base management method

Publications (1)

Publication Number Publication Date
JPH04354036A true JPH04354036A (en) 1992-12-08

Family

ID=15017680

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3129766A Pending JPH04354036A (en) 1991-05-31 1991-05-31 Data base management method

Country Status (1)

Country Link
JP (1) JPH04354036A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991180A (en) * 1995-09-21 1997-04-04 Nec Corp Ring file form data management system
US7555624B2 (en) 2003-02-28 2009-06-30 Fujitsu Limited Program, an apparatus and a method for guaranteeing a data storage order in an ISAM file

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991180A (en) * 1995-09-21 1997-04-04 Nec Corp Ring file form data management system
US7555624B2 (en) 2003-02-28 2009-06-30 Fujitsu Limited Program, an apparatus and a method for guaranteeing a data storage order in an ISAM file

Similar Documents

Publication Publication Date Title
JPH04354036A (en) Data base management method
JPH06215037A (en) Automatic updating device for index
JPH08314780A (en) File management system
JP2676731B2 (en) Electronic document retrieval device
JPH05151056A (en) Data controller
JP3018674B2 (en) Parts development processing equipment
JP3398672B2 (en) Intermediate data storage device
JPS59108105A (en) Retrieving system of shortest route
JPH03129570A (en) Data base retrieving system
JPH01248233A (en) Data base retrieving device
JPH04252342A (en) Data archive controller for information processing system
JP2861548B2 (en) Multiple host method
JP3559571B2 (en) Data processing device and data processing method
JP2785966B2 (en) Foreign key dynamic resolution processing method
JPS6380325A (en) Information retrieval method and index used therefor
JPH01282635A (en) Index maintaining system
JPH05250243A (en) Data processing system for extended storage device
JP3585264B2 (en) Database system and data retrieval method
JPS63231527A (en) Time series retrieving system
JPH0266672A (en) Floppy controller
JPH02224152A (en) File exclusive control device
JPH04140825A (en) Optical disk device access system
JPS60254325A (en) Control method of data retrieval key
JPH10240744A (en) System for processing retrieval of range division chart and method therefor and recording medium for recording retrieval processing program
JPH04230576A (en) Method for retrieving record