JP2503361B2 - Database search method - Google Patents

Database search method

Info

Publication number
JP2503361B2
JP2503361B2 JP5103359A JP10335993A JP2503361B2 JP 2503361 B2 JP2503361 B2 JP 2503361B2 JP 5103359 A JP5103359 A JP 5103359A JP 10335993 A JP10335993 A JP 10335993A JP 2503361 B2 JP2503361 B2 JP 2503361B2
Authority
JP
Japan
Prior art keywords
record
search
database
application
management information
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
JP5103359A
Other languages
Japanese (ja)
Other versions
JPH06314300A (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.)
Fujitsu Social Science Labs Ltd
Original Assignee
Fujitsu Social Science Labs 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 Fujitsu Social Science Labs Ltd filed Critical Fujitsu Social Science Labs Ltd
Priority to JP5103359A priority Critical patent/JP2503361B2/en
Publication of JPH06314300A publication Critical patent/JPH06314300A/en
Application granted granted Critical
Publication of JP2503361B2 publication Critical patent/JP2503361B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、データベースを検索す
るデータベース検索方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database search system for searching a database.

【0002】[0002]

【従来の技術】従来、リレーショナル・データベース
(SQL仕様)は、カーソルを使用したデータベースの
検索方法として、以下のステートメントを使用する。
2. Description of the Related Art Conventionally, a relational database (SQL specification) uses the following statements as a database search method using a cursor.

【0003】 DECLAREステートメント 検索条件およびカーソル名を定義する。 OPENステートメント 検索対象のテーブルをオープンおよびカーソルをテーブ
ルの先頭に位置づける。
DECLARE statement Search conditions and cursor names are defined. OPEN statement Opens the table to be searched and positions the cursor at the beginning of the table.

【0004】 FETCHステートメント カーソルを条件の満足するレコードに位置づけるおよび
カーソルの指すレコードを読み出す。
FETCH statement Positions the cursor on a record that satisfies the condition and reads the record pointed to by the cursor.

【0005】 CLOSEステートメント カーソルを無効にするおよび検索対象のテーブルをクロ
ーズする。アプリケーションプログラム(以下アプリと
いう)は、図4に示すようにレコードを読み込むための
バッファ23を用意しておき、バッファ23が満杯にな
るまでFETCHステートメントを発行し、満杯になっ
た時点でCLOSEステートメントを発行する。バッフ
ァ23に読み込んだレコードを処理後、再度OPENス
テートメントを発行し、残りのレコードの処理を同様に
繰り返す。図4の構成を簡単に説明する。
CLOSE statement Invalidates the cursor and closes the table to be searched. An application program (hereinafter referred to as an application) prepares a buffer 23 for reading records as shown in FIG. 4, issues FETCH statements until the buffer 23 becomes full, and when the buffer 23 becomes full, executes a CLOSE statement. Issue. After processing the records read in the buffer 23, the OPEN statement is issued again, and the processing of the remaining records is similarly repeated. The configuration of FIG. 4 will be briefly described.

【0006】図4は、従来技術の説明図を示す。図4に
おいて、アプリ21は、アプリケーションプログラムで
あって、ここでは、データベースをアクセスして業務処
理を行なうものである。
FIG. 4 shows an explanatory view of the prior art. In FIG. 4, the application 21 is an application program, and here accesses the database and performs business processing.

【0007】データベースモニタ22は、データベース
を検索などするものである。バッファ23は、データベ
ースから読み出したレコードを格納するものである。
The database monitor 22 searches the database. The buffer 23 stores the record read from the database.

【0008】テーブル24は、データベースを構成する
レコードを格納するものである。
The table 24 stores the records that make up the database.

【0009】[0009]

【発明が解決しようとする課題】従来のデータベースの
検索は、上述した第1回目のOPEN−CLOSEステ
ートメンで処理した続きのレコードから読み込んで処理
を続行しようとしても、2回目以降のOPENステート
メント実行時にカーソルがテーブルの先頭のレコードに
位置づけられてしまうため、既に処理したレコードも再
度検索対象となってしまい、後のレコードになる程、検
索時間が多く必要となってしまうという問題があった。
具体的に図4を用いて説明すると、1回目のOPEN−
CLOSEステートメントでテーブル24のの範囲の
レコードを読み出してバッファ23が一杯になったので
終了する。続いて2回目のOPEN−CLOSEステー
トメントでテーブル24の先頭にカーソルが位置づけら
れてしまうため、の部分も再度検索してしまって点線
の部分が重複して検索し、後のレコード程、検索時間が
長くなってしまう。
In the conventional database search, even if an attempt is made to continue processing by reading from the subsequent record processed by the first OPEN-CLOSE statemen described above, the second and subsequent OPEN statement executions are executed. Since the cursor is sometimes positioned at the top record of the table, the record that has already been processed becomes the search target again, and there is a problem that the search time becomes longer as the record becomes later.
Specifically, with reference to FIG. 4, the first OPEN-
The record in the range of the table 24 is read by the CLOSE statement, and the buffer 23 is full. Then, since the cursor is positioned at the beginning of the table 24 in the second OPEN-CLOSE statement, the part of is also searched again, and the part of the dotted line is searched again. It will be long.

【0010】本発明は、これらの問題を解決するため、
OPEN−CLOSE処理中でレコードアドレス(カー
ソル情報)を保存すると共に管理情報を設けて継続して
可/不可の判断を行い、継続したレコードの検索を可能
にして高速化を図ることを目的としている。
The present invention solves these problems.
The objective is to save the record address (cursor information) during the OPEN-CLOSE process and to provide management information to continuously judge whether the record is possible or not, thereby enabling continuous record retrieval and speeding up. .

【0011】[0011]

【課題を解決するための手段】図1は、本発明の原理構
成図を示す。図1において、テーブル21は、検索対象
のレコードを格納するテーブルである。
FIG. 1 is a block diagram showing the principle of the present invention. In FIG. 1, a table 21 is a table that stores records to be searched.

【0012】制御表12は、テーブル21の検索を中断
したレコードアドレスを格納して記憶するものである。
管理情報5は、アプリ1毎にテーブル21の参照/更新
の区別を設定して記憶するものである。
The control table 12 stores and stores the record address at which the search of the table 21 is interrupted.
The management information 5 sets and stores the reference / update distinction of the table 21 for each application 1.

【0013】[0013]

【作用】本発明は、図1に示すように、アプリ1がデー
タベース2を構成するテーブル21を検索しようとする
ときに、管理情報5が設定されており、かつ当該管理情
報5中に他のアプリ1から当該テーブル21の更新がさ
れていたと判明したときに検索条件で指定されたテーブ
ル21の先頭のレコードから検索開始し、一方、更新が
されていないと判明したときに制御表12に記憶されて
いる中断したレコードアドレスからテーブル21を検索
再開するようにしている。
According to the present invention, as shown in FIG. 1, when the application 1 tries to search the table 21 constituting the database 2, the management information 5 is set, and other management information 5 is set in the management information 5. When it is determined from the application 1 that the table 21 has been updated, the search is started from the first record of the table 21 specified by the search condition, and when it is determined that the table 21 has not been updated, the control table 12 stores it. The table 21 is searched and restarted from the suspended record address.

【0014】この際、アプリ1がデータベース2を構成
するテーブル21のレコードを、指示された検索条件に
従って検索したときに、アプリ1毎に設けた管理情報5
中に当該アプリ名、テーブル名、参照/更新の区別を設
定、および検索条件に従ってテーブル21の検索を中断
したレコードアドレスを制御表12に格納して記憶する
ようにしている。
At this time, when the application 1 searches the record of the table 21 constituting the database 2 according to the specified search condition, the management information 5 provided for each application 1
The application name, the table name, the reference / update distinction are set therein, and the record address at which the search of the table 21 is interrupted according to the search condition is stored and stored in the control table 12.

【0015】従って、OPEN−CLOSE処理でテー
ブル21の中断するレコードアドレス(カーソル情報)
を保存すると共に管理情報5に更新/参照(継続して検
索可/不可)を設定し、これらを参照してデータベース
2を構成するテーブル21中のレコードの継続した検索
を行い、レコード検索の高速化を図ることが可能とな
る。
Therefore, the record address (cursor information) of the table 21 to be interrupted by the OPEN-CLOSE process.
And the management information 5 is updated / referenced (continuously searchable / not possible) is set and the records in the table 21 constituting the database 2 are continuously searched by referring to these to speed up record search. Can be realized.

【0016】[0016]

【実施例】次に、図1から図3を用いて本発明の実施例
の構成および動作を順次詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the construction and operation of an embodiment of the present invention will be described in detail with reference to FIGS.

【0017】図1は、本発明の原理構成図を示す。図1
において、アプリ1は、アプリケーションプログラムで
あって、データベース2のテーブル21を参照/更新し
て各種業務処理を行なうものである。ここでは、 ・OPENステートメント ・FETCHステートメント ・CLOSEステートメント を発行し、データベース2のテーブル21からレコード
を読み出して各種処理を行なうものである。
FIG. 1 is a block diagram showing the principle of the present invention. FIG.
In the application, the application 1 is an application program, and refers to / updates the table 21 of the database 2 to perform various business processes. Here, the OPEN statement, the FETCH statement, and the CLOSE statement are issued, and a record is read from the table 21 of the database 2 to perform various processes.

【0018】タスク域(カレント)11は、アプリ1が
使用する領域であって、ここでは、制御表12を設ける
領域である。制御表12は、アプリ1がデータベース2
のテーブル21を検索したときに、そのときのカーソル
名およびそのカーソル名でポイントするテーブル21の
先頭からのレコードアドレスを設定して記憶するもので
ある。これにより、2回目以降にテーブル21の検索を
継続する場合、このレコードアドレスのレコードから検
索を再開し、先頭からこのレコードアドレスまでの検索
を省略でき、テーブル21の検索の高速化を図ることが
可能となる(図2、図3参照)。
The task area (current) 11 is an area used by the application 1 and is an area where the control table 12 is provided here. In the control table 12, the application 1 has a database 2
When the table 21 is searched, the cursor name at that time and the record address from the beginning of the table 21 pointed by the cursor name are set and stored. As a result, when continuing the search of the table 21 from the second time onward, the search can be restarted from the record of this record address, and the search from the beginning to this record address can be omitted, and the speed of the search of the table 21 can be increased. This is possible (see FIGS. 2 and 3).

【0019】データベース2は、検索対象のレコードを
多数検索し易いように構成したものであって、複数のテ
ーブル21などから構成されるものである。テーブル2
1は、レコードを複数格納したものであって、検索条件
で指示された当該テーブル21を先頭から順次検索して
指示された条件に合致するレコードを取り出す対象とな
るものである。
The database 2 is constructed so that a large number of records to be searched can be easily searched, and is composed of a plurality of tables 21 and the like. Table 2
Reference numeral 1 stores a plurality of records, and is a target for retrieving a record that matches the specified condition by sequentially searching the table 21 specified by the search condition from the top.

【0020】DBモニタ(データベースモニタ)3は、
データベース2を参照/更新するための各種処理を行な
うものである(図2、図3参照)。共通テーブル4は、
システム域に設け、管理情報5などの先頭アドレスを格
納して管理するものである。
The DB monitor (database monitor) 3 is
It performs various processes for referring to / updating the database 2 (see FIGS. 2 and 3). The common table 4 is
It is provided in the system area and stores and manages the start address of the management information 5 and the like.

【0021】管理情報5は、アプリ1毎(タスク毎)に
設けた管理情報であって、ここでは、データベース2の
テーブル21を参照/更新したときに図示のような情報
を設定して記憶し、テーブル21中から継続したレコー
ドより検索を再開するためのものである。ここでは、管
理情報5は、アプリ毎(タスク毎)に設け、図示の下記
の情報を時系列につなぐ。
The management information 5 is management information provided for each application 1 (for each task). Here, when the table 21 of the database 2 is referred to / updated, the information as shown is set and stored. , For restarting the search from the record continued from the table 21. Here, the management information 5 is provided for each application (for each task), and the following information shown in the figure is connected in time series.

【0022】・タスク情報:データベース2のテーブル
21を参照/更新したタスク(アプリ1)を設定する。 ・対象テーブル:アプリ1がデータベース2中で検索し
た対象のテーブル名を設定する。
Task information: Set the task (application 1) that refers / updates the table 21 of the database 2. Target table: Set the table name of the target searched by the application 1 in the database 2.

【0023】・参照/更新の種別:アプリ1が検索した
対象のテーブルを参照あるいは更新の種別(区別)を設
定する。更新と設定された場合には、テーブル21の内
容が更新されているので、継続した検索を中止するため
である。
Reference / update type: The type (reference) of reference or update of the target table searched by the application 1 is set. This is because when the update is set, the contents of the table 21 have been updated, so that the continuous search is stopped.

【0024】・次の管理情報アドレス:管理情報5をア
プリ1毎に時系列にリンクするための次の管理情報5の
先頭アドレスを設定する。 次に、図2および図3に示す順序に従い、図1の構成の
動作を詳細に説明する。ここで、AP処理は図1のアプ
リ1が行なう処理であり、DBモニタ処理は図1のDB
モニタ3が行なう処理である。
Next management information address: The top address of the next management information 5 for linking the management information 5 in time series for each application 1 is set. Next, the operation of the configuration of FIG. 1 will be described in detail according to the order shown in FIGS. Here, the AP process is a process performed by the application 1 in FIG. 1, and the DB monitor process is the DB in FIG.
This is the process performed by the monitor 3.

【0025】S1は、定義文を取り込み、保持する。S
2は、アプリ1がOPENステートメントを発行する。
S3は、DBモニタ3がオープン処理を行なう。
In step S1, the definition sentence is fetched and held. S
In 2, the application 1 issues an OPEN statement.
In S3, the DB monitor 3 performs an open process.

【0026】S4は、カーソルC1の初期化を行なう。
これは、S1の定義文で定義されたカーソルC1の初期
化として、アプリ1のタスク域(カレント)11中の制
御表12のカーソルC1をクリアする。
In step S4, the cursor C1 is initialized.
This clears the cursor C1 of the control table 12 in the task area (current) 11 of the application 1 as the initialization of the cursor C1 defined by the definition statement of S1.

【0027】S5は、管理情報5の登録を行なう。これ
は、S1の定義文で定義されたテーブル名T1の管理情
報5を作成してリンクし、図示の下記のように登録す
る。 ・タスク情報:AP1(アプリ(AP1)) ・対象テーブル:T1 ・参照/更新:参照 以上のS2からS5によってOPENステートメントを
発行したことに対応する処理を終了したこととなる。
In step S5, the management information 5 is registered. For this, the management information 5 of the table name T1 defined by the definition statement of S1 is created, linked, and registered as shown below. -Task information: AP1 (application (AP1))-Target table: T1-Reference / update: reference This means that the processing corresponding to the issuance of the OPEN statement in S2 to S5 has been completed.

【0028】次に、S6は、FETCHステートメント
を発行する。S7は、DBモニタ3がフェッチ処理を行
なう。S8は、検索条件でデータベース検索する。
Next, S6 issues a FETCH statement. In S7, the DB monitor 3 performs a fetch process. In S8, the database is searched under the search condition.

【0029】S9は、条件に一致するレコードの取り出
しを行なう。これは、S1の定義文で定義された検索条
件に従って指定されたテーブルT1の先頭のレコードか
ら検索条件に一致するか比較し、一致するレコードを取
り出す(このときのレコードアドレスLi)。
In step S9, the record that matches the condition is fetched. This compares the search condition from the first record of the table T1 designated according to the search condition defined by the definition statement of S1 and extracts the matching record (record address Li at this time).

【0030】S10は、レコードのアドレスLiをC1
に設定する。これは、矢印を用いて示すように、S9で
一致するレコードをテーブル(T1)21から取り出し
たときのレコードアドレスLiを、制御表12中のレコ
ードアドレスの位置に設定して記憶する。
In S10, the address Li of the record is changed to C1.
Set to. As shown by the arrow, the record address Li when the matching record is fetched from the table (T1) 21 in S9 is set and stored in the record address position in the control table 12.

【0031】S11は、レコードの返却を行う。これに
より、DBモニタ3がアプリ1に検索指示のあったレコ
ードを1つ返却する。S12は、アプリ1がS11で返
却されたレコードをバッファ13に格納し、当該バッフ
ァ13が満杯になったか判別する。YESの場合には、
満杯になったのでS13でCLOSEステートメントを
発行してデータベース2のCLOSE処理を行なう。一
方、NOの場合には、バッファ13が満杯でないので、
S6に戻り、同様にして次のレコードをバッファ13に
格納することを満杯になるまで繰り返す。
In step S11, the record is returned. As a result, the DB monitor 3 returns one record for which the application 1 is instructed to search. In S12, the application 1 stores the record returned in S11 in the buffer 13, and determines whether the buffer 13 is full. If yes,
Since it is full, a CLOSE statement is issued in S13 to perform the CLOSE processing of the database 2. On the other hand, in the case of NO, since the buffer 13 is not full,
Returning to S6, similarly, storing the next record in the buffer 13 is repeated until it becomes full.

【0032】以上によって、1回目のOPEN−CLO
SE処理を終了し、S1の定義文で指示されたデータベ
ース2のテーブル名T1から検索条件に合致するレコー
ドを、バッファ13が満杯になるまでレコード単位に繰
り返し格納する。バッファ13が満杯になったときは、
テーブル名T1からレコードを取り出すことを中断し、
当該バッファ13のデータの処理を行なう。このように
制御表12および管理情報5に設定しておくことによ
り、図3の2回目のOPEN−CLOSE処理時に、テ
ーブル名T1の続きのレコードアドレス(制御表12に
記憶)から検索を再開することができ、テーブル21の
無駄な検索を無くし、高速検索を行なうことが可能とな
る。以下説明する。
By the above, the first OPEN-CLO
The SE process is ended, and records matching the search condition from the table name T1 of the database 2 designated by the definition statement of S1 are repeatedly stored in record units until the buffer 13 becomes full. When the buffer 13 is full,
Interrupted fetching records from table name T1,
The data in the buffer 13 is processed. By setting the control table 12 and the management information 5 in this manner, the search is restarted from the record address (stored in the control table 12) following the table name T1 during the second OPEN-CLOSE processing in FIG. Therefore, it is possible to eliminate unnecessary search of the table 21 and perform high-speed search. This will be described below.

【0033】図3は、本発明の動作説明図(その2)を
示す。図3において、S21は、アプリ1がOPENス
テートメントを発行する。S22は、DBモニタ3がオ
ープン処理を行なう。
FIG. 3 is a diagram (No. 2) for explaining the operation of the present invention. In FIG. 3, in S21, the application 1 issues an OPEN statement. In S22, the DB monitor 3 performs an open process.

【0034】S23は、管理情報5が在りか判別する。
在りの場合には、S25に進む。無しの場合には、S2
4で1回目のオープン処理として既述した図2のS2以
降の処理を行なう。
In step S23, it is determined whether the management information 5 exists.
If yes, go to S25. If none, S2
In S4, the processes after S2 in FIG. 2 described above are performed as the first open process.

【0035】S25は、他タスク(他アプリ1)からの
更新有りか判別する。これは、S23の在りで管理情報
5が存在したので、当該管理情報5中に他タスクからの
更新が在りか判別する(ここでは検索対象のテーブルT
1への他のアプリ1から更新があったか判別する)。有
りの場合には、S26でカーソル情報を無効、即ち検索
しようとするテーブル名T1の更新が他のアプリ1によ
って行われていると判明したので、制御表12のカーソ
ル情報(レコードアドレス)を無効とする。一方、無し
の場合には、終了する。
In S25, it is determined whether or not there is an update from another task (other application 1). Since the management information 5 exists in S23, it is determined whether there is an update from another task in the management information 5 (here, the search target table T).
It is determined whether there is an update from another application 1 to 1). If yes, the cursor information is invalid in S26, that is, it is found that the table name T1 to be searched is updated by another application 1, so the cursor information (record address) in the control table 12 is invalid. And On the other hand, if there is none, the process ends.

【0036】以上のS21からS26によってOPEN
ステートメントを発行したことに対応して、これから2
回目以降の検索を再開しようとするここではテーブル名
T1について、他のアプリ1から更新がされていた場合
には、制御表12のレコードアドレス(カーソル情報)
を無効にする。更新されていなかったときは制御表12
のレコードアドレスを有効のままとしておく。
OPEN by S21 to S26
2 in response to the issue of the statement
Attempt to restart the search after the first time. Here, if the table name T1 has been updated from another application 1, the record address of the control table 12 (cursor information)
Disable. If not updated, control table 12
Leave the record address of valid.

【0037】S27は、アプリ1がFETCHステート
メントを発行する。S28は、DBモニタ3がフェッチ
処理を行なう。S29は、カーソル情報が有効か判別す
る。有効の場合には、S30でC1指定で検索、即ち右
側に記載したように制御表12に設定されているカーソ
ル名C1でテーブルT1のレコードアドレスLiから検
索を再開する。一方、無効の場合には、S31で検索条
件によりデータベース検索、即ち、テーブルT1の先頭
のレコードから検索を開始する(テーブルT1が更新さ
れていたので途中から検索開始不可であり、テーブルT
1の先頭レコードから検索開始する)。
In S27, the application 1 issues a FETCH statement. In S28, the DB monitor 3 performs a fetch process. In S29, it is determined whether the cursor information is valid. If it is valid, the search is performed by designating C1 in S30, that is, the search is restarted from the record address Li of the table T1 with the cursor name C1 set in the control table 12 as described on the right side. On the other hand, if the table is invalid, the database search is performed in S31 according to the search condition, that is, the search is started from the first record of the table T1 (since the table T1 has been updated, the search cannot be started halfway.
The search starts from the first record of 1.).

【0038】S32は、条件に一致するレコードの取り
出しを行なう。S33は、レコードのアドレスLiをカ
レントの制御表(タスク域)12のC1に設定して記憶
する。
In step S32, the record matching the condition is taken out. In S33, the address Li of the record is set and stored in C1 of the current control table (task area) 12.

【0039】S34は、レコードの返却を行う。これに
より、DBモニタ3がアプリ1に検索指示のあったレコ
ードを1つ返却する。S35は、アプリ1がS34で返
却されたレコードをバッファ13に格納し、当該バッフ
ァ13が満杯になったか判別する。YESの場合には、
満杯になったのでS36でCLOSEステートメントを
発行してデータベース2のCLOSE処理を行なう。一
方、NOの場合には、バッファ13が満杯でないので、
S27に戻り、同様にして次のレコードをバッファ13
に格納することを満杯になるまで繰り返す。
In step S34, the record is returned. As a result, the DB monitor 3 returns one record for which the application 1 is instructed to search. In S35, the application 1 stores the record returned in S34 in the buffer 13, and determines whether the buffer 13 is full. If yes,
Since it is full, a CLOSE statement is issued in S36 to perform the CLOSE processing of the database 2. On the other hand, in the case of NO, since the buffer 13 is not full,
Returning to S27, the next record is similarly stored in the buffer 13
Repeat to store in until full.

【0040】以上によって、2回目以降のOPEN−C
LOSE処理を実行し、S1の定義文で指示されたデー
タベース2のテーブル名T1から検索条件に合致するレ
コードの検索を中断したレコードアドレスから再開(更
新されていなかった場合)あるいはテーブル21の先頭
から開始(更新されていた場合)し、返却されたレコー
ドを格納してバッファ13が満杯になるまであるいは検
索を終了するまでレコード単位に繰り返し格納する。バ
ッファ13に満杯になったときあるいは検索を終了した
とき、テーブル名T1からレコードを取り出すことを中
断あるいは終了し、当該バッファ13のデータの処理を
行なう。このように制御表12および管理情報5に設定
しておくことにより、2回目以降のOPEN−CLOS
E処理時に、テーブル名T1の続きのレコードアドレス
(制御表12に記憶)から検索を再開し、テーブル21
の無駄な検索を無くし、高速検索することが可能とな
る。
As described above, the second and subsequent OPEN-Cs
The LOSE process is executed, and the search of the record matching the search condition is restarted from the table address T1 of the database 2 designated by the definition statement of S1 from the interrupted record address (if not updated) or from the beginning of the table 21. It starts (when it has been updated), stores the returned record, and repeatedly stores it in record units until the buffer 13 is full or the search is completed. When the buffer 13 is full or when the search is completed, the retrieval of records from the table name T1 is interrupted or terminated, and the data in the buffer 13 is processed. By setting the control table 12 and the management information 5 in this way, the second and subsequent OPEN-CLOS
At the time of E processing, the search is restarted from the record address (stored in the control table 12) following the table name T1, and the table 21
It is possible to eliminate a wasteful search and perform a high-speed search.

【0041】[0041]

【発明の効果】以上説明したように、本発明によれば、
OPEN−CLOSE処理時にデータベース2のテーブ
ル21の中断するレコードアドレス(カーソル情報)を
制御表12に設定して記憶すると共に管理情報5に更新
/参照(継続して検索可/不可)を設定し、これらを参
照してデータベース2のテーブル21を検索する構成を
採用しているため、データベース2のテーブル21中の
レコードを検索する際に、検索中断した前回のレコード
から検索を再開することができ、テーブル21の先頭か
らの無駄な検索を無くして高速検索を行なうことができ
る。
As described above, according to the present invention,
The record address (cursor information) to be interrupted in the table 21 of the database 2 during the OPEN-CLOSE processing is set and stored in the control table 12, and the management information 5 is updated / referenced (continuously searchable / not possible). Since the configuration is adopted in which the table 21 of the database 2 is searched by referring to these, when the record in the table 21 of the database 2 is searched, the search can be restarted from the previous record that was interrupted, A high-speed search can be performed by eliminating unnecessary search from the beginning of the table 21.

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

【図1】本発明の原理構成図である。FIG. 1 is a principle configuration diagram of the present invention.

【図2】本発明の動作説明図(その1)である。FIG. 2 is an operation explanatory diagram (1) of the present invention.

【図3】本発明の動作説明図(その2)である。FIG. 3 is an operation explanatory diagram (2) of the present invention.

【図4】従来技術の説明図である。FIG. 4 is an explanatory diagram of a conventional technique.

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

1:アプリ(アプリケーションプログラム) 11:タスク域(カレント) 12:制御表 13:バッファ 2:データベース 21:テーブル 3:DBモニタ 4:共通テーブル 5:管理情報 1: Application (application program) 11: Task area (current) 12: Control table 13: Buffer 2: Database 21: Table 3: DB monitor 4: Common table 5: Management information

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】データベースを検索するデータベース検索
方式において、 検索対象のレコードを格納するテーブル(21)と、 このテーブル(21)の検索を中断したレコードアドレ
スを格納して記憶する制御表(12)と、 アプリ(1)毎に上記テーブル(21)の参照/更新の
区別を設定して記憶する管理情報(5)とを備え、 アプリ(1)がデータベースを構成する上記テーブル
(21)を検索しようとするときに、管理情報(5)が
設定されており、かつ当該管理情報(5)中に他のアプ
リ(1)から当該テーブル(21)の更新がされていた
と判明したときに検索条件で指定されたテーブル(2
1)の先頭のレコードから検索開始し、一方、更新がさ
れていないと判明したときに上記制御表(12)に記憶
されている中断したレコードアドレスからテーブル(2
1)の検索再開するように構成したことを特徴とするデ
ータベース検索方式。
1. A database search method for searching a database, a table (21) for storing a record to be searched, and a control table (12) for storing and storing a record address for which the search of the table (21) is interrupted. And the management information (5) which sets and stores the reference / update distinction of the table (21) for each application (1), and the application (1) searches the table (21) forming a database. At the time of trying, it is found that the management information (5) is set, and it is found that the table (21) has been updated from another application (1) in the management information (5). Table specified by (2
The search is started from the first record of 1), while the table (2) is started from the interrupted record address stored in the control table (12) when it is determined that the update is not made.
A database search method characterized in that the search of 1) is restarted.
【請求項2】アプリ(1)がデータベースを構成する上
記テーブル(21)のレコードを、指示された検索条件
に従って検索したときに、アプリ(1)毎に設けた上記
管理情報(5)中に当該アプリ名、上記テーブル名、参
照/更新の区別を設定、および検索条件に従ってテーブ
ル(21)の検索を中断したレコードアドレスを上記制
御表(12)に格納して記憶するように構成したことを
特徴とする請求項1記載のデータベース検索方式。
2. When the application (1) searches the record of the table (21) constituting the database according to the instructed search condition, the management information (5) provided for each application (1) The application name, the table name, reference / update distinction are set, and the record address for which the search of the table (21) is interrupted according to the search condition is stored and stored in the control table (12). The database search method according to claim 1, characterized in that
JP5103359A 1993-04-30 1993-04-30 Database search method Expired - Fee Related JP2503361B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5103359A JP2503361B2 (en) 1993-04-30 1993-04-30 Database search method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5103359A JP2503361B2 (en) 1993-04-30 1993-04-30 Database search method

Publications (2)

Publication Number Publication Date
JPH06314300A JPH06314300A (en) 1994-11-08
JP2503361B2 true JP2503361B2 (en) 1996-06-05

Family

ID=14351940

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5103359A Expired - Fee Related JP2503361B2 (en) 1993-04-30 1993-04-30 Database search method

Country Status (1)

Country Link
JP (1) JP2503361B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852511A (en) 1993-10-20 1998-12-22 Olympus Optical Co. Ltd Optical system for non-flexible endoscopes

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5852511A (en) 1993-10-20 1998-12-22 Olympus Optical Co. Ltd Optical system for non-flexible endoscopes

Also Published As

Publication number Publication date
JPH06314300A (en) 1994-11-08

Similar Documents

Publication Publication Date Title
KR100398753B1 (en) Transaction processing system using efficient file update processing and recovery processing
US6694305B2 (en) Method, system, and program for processing modifications to data in tables in a database system
JP2503361B2 (en) Database search method
JP3777666B2 (en) Database processing method and system
JPH02297670A (en) Data base retrieving system
JP2933486B2 (en) How to search all databases simultaneously
JP3260587B2 (en) Time series data management method
JPH01282635A (en) Index maintaining system
JP2000339337A (en) Database retrieval system
JP2740238B2 (en) File exclusive control unit
JPS59188766A (en) Processing device of data base retrieval
JPH03129570A (en) Data base retrieving system
JPH01120621A (en) Retrieving/updating system for data base
JP2642787B2 (en) Interruption location search method
JPH1173353A (en) Transaction retrieval processor based on specified time
JPS59188765A (en) Processing device of data base inquiry
JPH0340070A (en) Data base retrieving device
JP3022574B2 (en) Data operation instruction blocking method
JPH0447367A (en) Data base retrieval system
JP2816430B2 (en) Set fetch processing method
JPH038070A (en) Keyword extracting system
JPH02253451A (en) Data base managing system
JPH1139200A (en) Access processing system of structured type database
JP2003228586A (en) Device and method for accessing database
JPH01106163A (en) Replacement method for learning memory for kana (japanese syllabary)/kanji (chinese character) conversion

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees