JPH0456344B2 - - Google Patents

Info

Publication number
JPH0456344B2
JPH0456344B2 JP60272330A JP27233085A JPH0456344B2 JP H0456344 B2 JPH0456344 B2 JP H0456344B2 JP 60272330 A JP60272330 A JP 60272330A JP 27233085 A JP27233085 A JP 27233085A JP H0456344 B2 JPH0456344 B2 JP H0456344B2
Authority
JP
Japan
Prior art keywords
secondary index
processing
database
record
update
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
JP60272330A
Other languages
Japanese (ja)
Other versions
JPS62131349A (en
Inventor
Junji Yamanaka
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 Ltd
Original Assignee
Fujitsu 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 Ltd filed Critical Fujitsu Ltd
Priority to JP60272330A priority Critical patent/JPS62131349A/en
Publication of JPS62131349A publication Critical patent/JPS62131349A/en
Publication of JPH0456344B2 publication Critical patent/JPH0456344B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔概要〕 データベースの二次インデツクスをもつレコー
ドを追加、変更、削除する更新処理を行う場合、
同時に二次インデツクスの更新処理を行わず、後
にまとめて更新する。これによりレコードの更新
処理を高速化する。
[Detailed Description of the Invention] [Summary] When performing update processing to add, change, or delete records with secondary indexes in a database,
The secondary index is not updated at the same time, but is updated all at once. This speeds up record update processing.

〔産業上の利用分野〕[Industrial application field]

本発明は、データベース処理システムにおける
レコード更新時の二次インデツクスの更新処理方
式に関する。
The present invention relates to a secondary index update processing method when updating records in a database processing system.

〔従来の技術〕[Conventional technology]

一般にデータベースのレコードは、レコードの
配列順序を規定する整理番号などの一次インデツ
クスと、必要により、レコード中の各種のデータ
項目からレコードを検索可能にするための任意個
数の二次インデツクスとをそなえている。これら
の一次インデツクスと二次インデツクスとを用い
ることにより、データベースに対する多様な要求
を効率的に処理することができる。
In general, records in a database have a primary index such as a serial number that specifies the order in which the records are arranged, and, if necessary, an arbitrary number of secondary indexes that allow records to be searched from various data items in the record. There is. By using these primary indexes and secondary indexes, various requests to the database can be efficiently processed.

ところで、二次インデツクスは、平均した検索
効率を保つため、木構造に編成され、大容量記憶
装置に格納される。第3図に、二次インデツクス
の構造を示す。
By the way, in order to maintain average search efficiency, the secondary index is organized into a tree structure and stored in a mass storage device. FIG. 3 shows the structure of the secondary index.

このような木構造の二次インデツクスは、通
常、レコードとは別に管理されている。従来は、
レコードが更新されたとき、それと同時に二次イ
ンデツクスの更新も行つていた。
Such a tree-structured secondary index is usually managed separately from records. conventionally,
When a record was updated, the secondary index was also updated at the same time.

第4図は、従来のデータベース処理システムの
構成を示したものである。図において、1はデー
タベース処理装置、2はデータベース、3は端
末、10は応用プログラム、11はデータベース
管理部、12は二次インデツクス処理部、13は
二次インデツクスである。
FIG. 4 shows the configuration of a conventional database processing system. In the figure, 1 is a database processing device, 2 is a database, 3 is a terminal, 10 is an application program, 11 is a database management section, 12 is a secondary index processing section, and 13 is a secondary index.

利用者が端末3からデータベース処理装置1に
処理要求を行つたとき、対応する応用プログラム
10が呼び出される。応用プログラム10は、処
理に必要なデータ項目をもつレコードの取り出
し、追加、削除、変更等をデータベース管理部1
1に依頼する。
When a user issues a processing request to the database processing device 1 from the terminal 3, the corresponding application program 10 is called. The application program 10 uses the database management unit 1 to retrieve, add, delete, change, etc. records that have data items necessary for processing.
Request 1.

データベース管理部11は、処理すべきレコー
ドが二次インデツクス付きのものである場合、ま
ず二次インデツクス処理部12に、レコード位置
の検出を依頼する。二次インデツクス処理部12
は、二次インデツクス13から、必要なデータ項
目をひき、該当するるレコードのポインタを得
て、データベース管理部11に通知する。
If the record to be processed has a secondary index, the database management section 11 first requests the secondary index processing section 12 to detect the record position. Secondary index processing section 12
extracts the necessary data item from the secondary index 13, obtains a pointer to the corresponding record, and notifies the database management section 11 of the pointer.

データベース管理部11は、二次インデツクス
処理部12から通知されたレコードポインタを用
いて、データベース2のレコードについて、依頼
された処理を行う。レコード処理が追加、削除、
変更のいずれかの更新処理である場合には、この
後、二次インデツクス処理部12に対して、二次
インデツクス13の更新処理を行わせる。
The database management section 11 uses the record pointer notified from the secondary index processing section 12 to perform the requested processing on the records of the database 2. Record processing adds, deletes,
If the update processing is one of changes, then the secondary index processing unit 12 is caused to perform update processing on the secondary index 13.

このようにして、二次インデツクス13は、デ
ータベース2の状態を常に反映するように管理さ
れる。
In this way, the secondary index 13 is managed so as to always reflect the state of the database 2.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来のデータベース処理システムでは、二次イ
ンデツクス付きレコードの追加、削除、変更の更
新処理を行つたとき、同時に二次インデツクスの
更新処理も行ういわゆる同期処理方式をとつてい
た。
Conventional database processing systems have adopted a so-called synchronous processing method in which when an update process of adding, deleting, or changing a record with a secondary index is performed, an update process of the secondary index is also performed at the same time.

このため、次のレコード処理が遅れ、特に二次
インデツクスの更新が木構造上で上位レベルにま
で波及する場合には、アクセス回数が大幅に増え
て、データベース処理時間が長くなるという問題
があつた。このため、レコードに付加できる二次
インデツクスの個数に制限を設ける必要があつ
た。
This caused a problem in that the processing of the next record was delayed, and the number of accesses increased significantly, especially when updates to the secondary index spread to higher levels in the tree structure, resulting in longer database processing times. . For this reason, it was necessary to set a limit on the number of secondary indexes that can be added to a record.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、データベースのレコード更新処理と
二次インデツクスの更新処理とを分離して、二次
インデツクスの更新処理を非同期処理とし、また
データベース管理部と二次インデツクス処理部と
の間をマクロ命令インタフエースとする。そして
レコード更新が発生するごとに、二次インデツク
スの更新処理を要求するマクロ命令をログ媒体に
取得しておき、ある時間帯にまとめて二次インデ
ツクスの更新処理を行うようにするものである。
これにより、データベースのレコード更新処理を
高速化するることができる。
The present invention separates database record update processing and secondary index update processing, makes the secondary index update processing asynchronous processing, and provides a macro instruction interface between the database management section and the secondary index processing section. Make it an ace. Then, each time a record update occurs, a macro command that requests update processing of the secondary index is acquired in a log medium, and the update processing of the secondary index is performed all at once in a certain time period.
This makes it possible to speed up database record update processing.

第1図は、本発明の原理的構成を示すものであ
る。図において、1はデータベース処理装置、2
はデータベース、3は端末、4はログ媒体、10
は応用プログラム、11′はデータベース管理部、
12は二次インデツクス処理部、13は二次イン
デツクス、14は定義体を表す。
FIG. 1 shows the basic configuration of the present invention. In the figure, 1 is a database processing device;
is the database, 3 is the terminal, 4 is the log medium, 10
is the application program, 11' is the database management section,
12 represents a secondary index processing section, 13 represents a secondary index, and 14 represents a definition field.

データベース処理装置1は、データベース2を
管理し、端末3の利用者の要求に応じて、データ
ベースを用いた処理を実行する。
A database processing device 1 manages a database 2 and executes processing using the database in response to a request from a user of a terminal 3.

応用プログラム10は、利用者の要求した処理
を実行する。その際データの入出力が必要なと
き、データベース管理部11′に依頼する。
The application program 10 executes processing requested by the user. At that time, when data input/output is required, a request is made to the database management section 11'.

なお定義体14には、二次インデツクスの更新
処理が非同期である旨の定義を設けておく。
Note that the definition body 14 includes a definition to the effect that the update process of the secondary index is asynchronous.

データベース管理部11′は、データベース2
からのレコードの読み出し、あるいはレコードの
追加、削除、変更等の更新を行う。
The database management unit 11'
Read records from or update records by adding, deleting, changing, etc.

特に、データベース管理部11′は、二次イン
デツクス付きのレコードを更新する場合に、二次
インデツクス処理部12に依頼して、レコードア
ドレスを得てからデータベース2のアクセスを行
う。またその際、定義体14を参照し、二次イン
デツクスの更新処理が非同期であることが定義さ
れている場合に、二次インデツクスを更新するマ
クロ命令を発行する。しかしこのときは、そのマ
クロ命令を二次インデツクス処理部12へ与えず
に、ログ媒体4へ、格納のみを行う。
In particular, when updating a record with a secondary index, the database management section 11' requests the secondary index processing section 12 to obtain the record address before accessing the database 2. At this time, the definition body 14 is referred to, and if it is defined that the secondary index update processing is asynchronous, a macro instruction for updating the secondary index is issued. However, at this time, the macro command is only stored in the log medium 4 without being given to the secondary index processing section 12.

二次インデツクス処理部12は、データベース
管理部11′からの二次インデツクス13を参照
する依頼を受けたとき、二次インデツクスから、
データベース2のレコードアドレスを示すポイン
タを求め、データベース管理部11′に通知する。
When the secondary index processing unit 12 receives a request to refer to the secondary index 13 from the database management unit 11', the secondary index processing unit 12 performs the following from the secondary index:
A pointer indicating the record address of the database 2 is obtained and notified to the database management section 11'.

〔作用〕[Effect]

本発明によると、二次インデツクス付きレコー
ドの更新処理は、二次インデツクスの更新処理を
後回しにして行われるため、結果としてレコード
更新処理時間が短縮される。また二次インデツク
スの更新処理は、適当な時間帯、たとえば夜間等
の空き時間を利用して一括処理できる。
According to the present invention, since the update processing of a record with a secondary index is performed after the update processing of the secondary index, the record update processing time is shortened as a result. Further, the secondary index update process can be performed all at once during an appropriate time slot, for example, during free time such as at night.

〔実施例〕〔Example〕

第2図に、本発明によるデータベース処理シス
テムの1実施例構成を示す。
FIG. 2 shows the configuration of one embodiment of the database processing system according to the present invention.

図において、1ないし4で示されている各要素
は、第1図に示されているものと同じであり、第
2図においても共通に用いられる。
In the figure, each element indicated by 1 to 4 is the same as that shown in FIG. 1, and is also commonly used in FIG. 2.

ここでは、データベース管理部11′中に示さ
れている処理フローを中心に説明する。図中の
ないしは、各処理ステージを示す。
Here, the processing flow shown in the database management section 11' will be mainly explained. In the figure, each processing stage is shown.

応用プログラム10からの処理依頼が二次イ
ンデツクス付きレコードであるか否かを識別す
る。
It is determined whether the processing request from the application program 10 is a record with a secondary index.

で二次インデツクス付きレコードである場
合には、二次インデツクス処理部12に対する
二次インデツクスの検索処理を依頼し、レコー
ドアドレスを貰う。
If the record is a record with a secondary index, it requests the secondary index processing unit 12 to perform a secondary index search process and receives a record address.

データベース2に対するレコード処理を実行
する。
Record processing for database 2 is executed.

のレコード処理がレコードの追加、削除、
変更の更新処理であるか否かを識別する。
Record processing includes adding, deleting, and
Identifies whether or not it is a change update process.

で更新処理の場合、二次インデツクス更新
のマクロ命令を発行する。マクロ命令の形式を
下に例示する。
In the case of update processing, a macro instruction for updating the secondary index is issued. The format of the macro instruction is illustrated below.

(レコードA1を追加) INSERT Key
(A1) (レコードB1を削除) DELETE Key
(B1) (レコードC1をD1に変更) MODIFY Key
(C1,D1) 定義体14を調べ、二次インデツクス更新処
理について非同期の定義が行われているか否か
を調べる。
(Add record A 1 ) INSERT Key
(A 1 ) (Delete record B 1 ) DELETE Key
(B 1 ) (Change record C 1 to D 1 ) MODIFY Key
(C 1 , D 1 ) Check the definition body 14 to see if an asynchronous definition is performed for the secondary index update process.

で非同期の定義が行われていた場合、で
発行したマクロ命令を、ログ媒体4に格納す
る。
If an asynchronous definition has been made in , the macro instruction issued in is stored in the log medium 4.

で非同期の定義がされていない場合には、
で発行したマクロ命令を二次インデツクス処
理部12に渡し、二次インデツクス更新を実行
させる。
If asynchronous is not defined in
The macro instruction issued in step 1 is passed to the secondary index processing unit 12, and the secondary index is updated.

においてレコード更新処理でなかつた場合
およびでマクロ命令のログをとつた後は、終
了する。
If record update processing is not performed in and after logging macro instructions, the process ends.

またで二次インデツクス付きでないレコー
ドの場合は、直ちにのレコードアクセス処理
を行う。
If the record does not have a secondary index, immediate record access processing is performed.

後に非同期による二次インデツクスの更新処
理が起動された場合、ログ媒体4を読み出し、
各マクロ命令を順に二次インデツクス処理部1
2に渡し、一括処理を行う。
If the asynchronous secondary index update process is started later, the log medium 4 is read and
The secondary index processing unit 1 sequentially processes each macro instruction.
2 for batch processing.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、二次インデツクス付きレコー
ドの更新処理を、従来システムにくらべて迅速化
することができ、システムの処理効率も向上させ
ることができる。
According to the present invention, it is possible to speed up the update processing of records with secondary indexes compared to conventional systems, and it is also possible to improve the processing efficiency of the system.

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

第1図は本発明によるデータベース処理システ
ムの原理的構成図、第2図は本発明の1実施例シ
ステムの構成図、第3図は二次インデツクスの構
造の説明図、第4図は従来のデータベース処理シ
ステムの構成図である。 第1図中、1…データベース処理装置、2…デ
ータベース、3…端末、4…ログ媒体、10…応
用プログラム、11′…データベース管理部、1
2…二次インデツクス処理部、13…二次インデ
ツクス、14…定義体。
FIG. 1 is a diagram showing the basic configuration of a database processing system according to the present invention, FIG. 2 is a diagram showing the configuration of an embodiment of the system according to the present invention, FIG. 3 is an explanatory diagram of the structure of a secondary index, and FIG. FIG. 1 is a configuration diagram of a database processing system. In FIG. 1, 1...database processing device, 2...database, 3...terminal, 4...log medium, 10...application program, 11'...database management section, 1
2...Secondary index processing unit, 13...Secondary index, 14...Definition body.

Claims (1)

【特許請求の範囲】 1 二次インデツクス付きレコードを含むデータ
ベース2を管理するデータベース管理部11と、
二次インデツクスを格納した二次インデツクス1
3を管理する二次インデツクス処理部12とを有
するデータベース処理システムにおいて、 二次インデツクス付きレコードの更新処理を行
う際に二次インデツクスの更新を非同期に行う旨
の定義を設けた定義体14と、ログ媒体4とをそ
なえ、 またデータベース管理部11と二次インデツク
ス処理部12との間にマクロ命令のインタフエー
スを設け、 データベース管理部11は、インデツクス付き
レコードの更新処理を行う依頼を受けるたびに、
二次インデツクスを更新するマクロ命令を発行
し、その際定義体14を参照して、二次インデツ
クスの更新を非同期に行う旨の定義がされている
場合には、発行した上記マクロ命令をログ媒体4
に格納するのみとし、業務処理終了後の適当な時
間に、ログ媒体4より各マクロ命令を順次取り出
して二次インデツクス処理部12に与え、二次イ
ンデツクス13の一括更新処理を行わせることを
特徴とするデータベース処理方式。
[Claims] 1. A database management unit 11 that manages a database 2 including records with secondary indexes;
Secondary index 1 storing secondary index
In a database processing system having a secondary index processing unit 12 that manages 3, a definition body 14 includes a definition that the secondary index is updated asynchronously when performing update processing of a record with a secondary index; A macro command interface is provided between the database management section 11 and the secondary index processing section 12, and the database management section 11 executes the index processing every time it receives a request to update an indexed record. ,
If a macro instruction to update a secondary index is issued, and the definition body 14 is referred to and a definition is made to update the secondary index asynchronously, the issued macro instruction is stored in the log medium. 4
The main feature of this system is that each macro instruction is sequentially retrieved from the log medium 4 and sent to the secondary index processing unit 12 at an appropriate time after the completion of business processing, and the secondary index 13 is collectively updated. A database processing method that uses
JP60272330A 1985-12-03 1985-12-03 Data base processing system Granted JPS62131349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60272330A JPS62131349A (en) 1985-12-03 1985-12-03 Data base processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60272330A JPS62131349A (en) 1985-12-03 1985-12-03 Data base processing system

Publications (2)

Publication Number Publication Date
JPS62131349A JPS62131349A (en) 1987-06-13
JPH0456344B2 true JPH0456344B2 (en) 1992-09-08

Family

ID=17512381

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60272330A Granted JPS62131349A (en) 1985-12-03 1985-12-03 Data base processing system

Country Status (1)

Country Link
JP (1) JPS62131349A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01171041A (en) * 1987-12-25 1989-07-06 Fujitsu Dai Ichi Commun Software Ltd Data base cleaning system
JPH01268615A (en) * 1988-04-20 1989-10-26 Kao Corp Cosmetic
JPH0279163A (en) * 1988-09-16 1990-03-19 Hitachi Ltd Information retrieving method
JP4522170B2 (en) * 2004-07-02 2010-08-11 富士通株式会社 Relational database index addition program, index addition apparatus, and index addition method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60103461A (en) * 1983-11-10 1985-06-07 Fujitsu Ltd Substitute key control processing system using plural items
JPS6175925A (en) * 1984-09-21 1986-04-18 Nec Corp Index maintenance system for file having plural indexes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60103461A (en) * 1983-11-10 1985-06-07 Fujitsu Ltd Substitute key control processing system using plural items
JPS6175925A (en) * 1984-09-21 1986-04-18 Nec Corp Index maintenance system for file having plural indexes

Also Published As

Publication number Publication date
JPS62131349A (en) 1987-06-13

Similar Documents

Publication Publication Date Title
EP2402861A1 (en) Storage system
US10078647B2 (en) Allocating free space in a database
JPH0456344B2 (en)
US8818990B2 (en) Method, apparatus and computer program for retrieving data
JPH09305622A (en) Method and system for managing data base having document retrieval function
CN115718571B (en) Data management method and device based on multidimensional features
JP2980610B2 (en) Transaction management device
JPH0283640A (en) Data base updating method
JPS63285631A (en) Updating and processing system for index file
JPH01282635A (en) Index maintaining system
JPH04112253A (en) Data accessing method using multilayer buffer
JP2615046B2 (en) Record addition processing method
JP2912657B2 (en) File access processor
JP2747009B2 (en) Record addition method for indexed sequential files
JPH0465427B2 (en)
JPH0762833B2 (en) Exclusive control method for shared data set
JP2816430B2 (en) Set fetch processing method
JP2785966B2 (en) Foreign key dynamic resolution processing method
JPS63262735A (en) Managing system for index file having secondary index
JPS61278932A (en) Method of processing data addition
CN116860700A (en) Method, device, equipment and medium for processing metadata in distributed file system
JP2000276382A (en) Time-series data retention and addition system for database
JPS63239540A (en) Data management system in memory medium
JPH06214849A (en) Data base system
JPH04250568A (en) Record retrieval device

Legal Events

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