JP2643811B2 - Database reorganization method - Google Patents

Database reorganization method

Info

Publication number
JP2643811B2
JP2643811B2 JP5323105A JP32310593A JP2643811B2 JP 2643811 B2 JP2643811 B2 JP 2643811B2 JP 5323105 A JP5323105 A JP 5323105A JP 32310593 A JP32310593 A JP 32310593A JP 2643811 B2 JP2643811 B2 JP 2643811B2
Authority
JP
Japan
Prior art keywords
database
information
index
control information
reorganization
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
JP5323105A
Other languages
Japanese (ja)
Other versions
JPH07152615A (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.)
NEC Corp
Original Assignee
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP5323105A priority Critical patent/JP2643811B2/en
Publication of JPH07152615A publication Critical patent/JPH07152615A/en
Application granted granted Critical
Publication of JP2643811B2 publication Critical patent/JP2643811B2/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 reorganization system, and more particularly, to a database reorganization system comprising a copy source database and a copy destination database comprising an index section and a data record section having a hierarchical structure. The present invention relates to a database reorganization method in a database system that reorganizes a database by copying.

【0002】[0002]

【従来の技術】従来、この種のデータベース再編成方式
では、複写元データベースおよび複写先データベースを
業務処理プログラムからアクセスできない排他状態(オ
フライン状態)にして、複写元データベースから複写先
データベースにデータレコードをコピーすることにより
データベースの再編成を行っていた。
2. Description of the Related Art Conventionally, in this type of database reorganization method, a copy source database and a copy destination database are placed in an exclusive state (offline state) inaccessible from a business processing program, and data records are transferred from the copy source database to the copy destination database. The database was reorganized by copying.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のデータ
ベース再編成方式では、複写元データベースおよび複写
先データベースを業務処理プログラムからアクセスでき
ない排他状態にして、複写元データベースから複写先デ
ータベースにデータレコードをコピーすることによりデ
ータベースの再編成を行っていたので、データベースシ
ステムを24時間連続運転するような場合、複写元デー
タベースを業務処理プログラムからアクセスできない排
他状態にすることはできないためにデータベースの再編
成処理を行うことができないという問題点があった。
In the conventional database reorganization method described above, the copy source database and the copy destination database are set to an exclusive state in which the business processing program cannot access them, and data records are copied from the copy source database to the copy destination database. Therefore, when the database system is operated continuously for 24 hours, the copy source database cannot be put into an exclusive state in which the business processing program cannot access the database system. There was a problem that it could not be performed.

【0004】そこで、複写元データベースおよび複写先
データベースが業務処理プログラムからアクセス可能な
共有状態で複写元データベースから複写先データベース
にデータレコードのコピーを行う際に、業務処理プログ
ラムとデータベース再編成方式との間でデータレコード
に矛盾が起こることを防ぐ共有制御技術として、例えば
特開平4−175841号公報に開示されたデータベー
ス再編成処理方式がすでに提案されていた。しかし、こ
の従来のデータベース再編成処理方式では、複写先デー
タベースにデータレコードが先頭側から順に書き込まれ
て再編成処理が行われていたので、複写先データベース
に適度な空き領域が確保されておらず、再編成後に複写
先データベースに書き込まれるデータレコードを論理的
に関連するデータレコードの近傍に書き込むことができ
ないためにデータアクセス性能が急速に劣化しやすいと
いう問題点があった。
Therefore, a copy source database and a copy destination
Database is accessible from business processing programs
From the source database to the destination database in a shared state
When copying data records to
Data records between RAM and database reorganization scheme
As a shared control technology that prevents inconsistencies in
A database disclosed in Japanese Patent Application Laid-Open No. H4-175841.
A reorganization processing method has already been proposed. But this
In the conventional database reorganization processing method of
Data records are written to the database in order from the top.
The copy destination database has been reorganized.
There is not enough free space secured and copy after reorganization
Data records written to the destination database are logical
Can be written near the data record associated with
Data access performance is likely to deteriorate rapidly
There was a problem.

【0005】本発明の目的は、上述の点に鑑み、データ
ベースの運転状態でデータベースの再編成処理を可能と
するデータベース再編成方式において、複写先データベ
ースの再編成処理に先立って、複写元データベースより
データレコードを読み出して空き領域取得情報に基づい
て複写先データベースでの再編成後の索引キーの配置を
模擬し、模擬結果に従って複写先データベースに索引部
のみを生成する再編成事前処理を行い、複写先データベ
ースに適度な空き領域が確保されるようにしたデータベ
ース再編成方式を提供することにある。
In view of the above, an object of the present invention is to provide a data
The database can be reorganized while the base is operating.
Database reorganization method
Prior to the source reorganization process,
Read data record and based on free space acquisition information
Index key placement after reorganization in the copy destination database
Simulate and index into the destination database according to the simulation results
Performs reorganization pre-processing that generates only the
Database to ensure that there is adequate free space in the database.
An object of the present invention is to provide a source reorganization method.

【0006】[0006]

【課題を解決するための手段】本発明のデータベース再
編成方式は、索引部と階層構造を有するデータレコード
部とからなる複写元データベースおよび複写先データベ
ースを備え、前記複写元データベースから前記複写先デ
ータベースにデータレコードをコピーすることによりデ
ータベースの再編成を行うデータベースシステムにおい
て、前記複写先データベースの空き領域を設定するため
に利用者が指定する空き領域取得情報を取得する利用者
情報取得手段と、この利用者情報取得手段により取得さ
れた空き領域取得情報を記憶する利用者情報記憶手段
と、前記複写元データベースよりデータレコードを読み
出し該データレコードの情報と前記利用者情報記憶手段
に格納された空き領域取得情報とから前記複写先データ
ベースでの再編成後の索引キーの配置を模擬して前記複
写先データベースの索引情報の生成を行うための格納制
御情報を作成するデータベース格納制御情報生成手段
と、このデータベース格納制御情報生成手段により作成
された格納制御情報を記憶する格納制御情報記憶手段
と、前記複写先データベースを初期化後に前記格納制御
情報記憶手段に格納された格納制御情報に基づき索引キ
ー値を設定したそれ自体は情報を持たないダミーレコー
ドを前記複写先データベースに一旦格納した後に当該ダ
ミーレコードを削除することによって前記複写先データ
ベースの索引部の生成のみを行う索引情報設定手段とか
らなる再編成事前処理手段と、この再編成事前処理手段
による前記複写先データベースの索引部の作成後に前記
複写元データベースおよび前記複写先データベースが前
記業務処理プログラムからアクセス可能な共有状態で前
記複写元データベースから前記複写先データベースにデ
ータレコードをコピーするデータベースコピー手段から
なる再編成手段とを有する。
According to the present invention, there is provided a database reorganization method comprising a copy source database and a copy destination database each comprising an index section and a data record section having a hierarchical structure. In a database system that reorganizes a database by copying data records to a destination, to set a free space in the copy destination database
User who acquires the free space acquisition information specified by the user in
Information obtaining means and the user information obtaining means.
User information storage means for storing the obtained free area acquisition information
Read a data record from the copy source database.
Outgoing data record information and the user information storage means
From the free space acquisition information stored in the
Simulate the layout of index keys after reorganization
Storage system for generating index information of the destination database
Database storage control information generating means for creating control information
Created by this database storage control information generation means
Storage control information storage means for storing the stored storage control information
And the storage control after initializing the copy destination database.
An index key based on the storage control information stored in the information storage means.
-A dummy record that does not have any information
After the code is temporarily stored in the copy destination database,
The copy destination data is deleted by deleting the me record.
Index information setting means that only generates the base index part
And Ranaru reorganization pre-processing means, the copy from the copy source data base and the copy destination database after creation of the index portion of the copy destination database by the reorganization pre-processing means wherein the work processing program accessible shared state From a database copy means for copying data records from a source database to the destination database
And a reorganization means to be.

【0007】[0007]

【実施例】次に、本発明について図面を参照して詳細に
説明する。
Next, the present invention will be described in detail with reference to the drawings.

【0008】図1は、本発明の一実施例に係るデータベ
ース再編成方式の構成を示すブロック図である。本実施
例のデータベース再編成方式は、再編成事前処理手段1
と、再編成手段2と、利用者情報記憶手段4と、複写元
データベース6と、複写先データベース7と、格納制御
情報記憶手段8と、業務処理プログラム11と、空き領
域取得情報12とから、その主要部が構成されている。
FIG. 1 is a block diagram showing the configuration of a database reorganization system according to one embodiment of the present invention. The database reorganization method of the present embodiment is based on
From the reorganization means 2, the user information storage means 4, the copy source database 6, the copy destination database 7, the storage control information storage means 8, the business processing program 11, and the free space acquisition information 12, Its main part is configured.

【0009】再編成事前処理手段1は、利用者情報取得
手段3と、データベース格納制御情報生成手段5と、索
引情報設定手段9とを含んで構成されている。
The reorganization pre-processing means 1 includes a user information obtaining means 3, a database storage control information generating means 5, and an index information setting means 9.

【0010】再編成手段2は、データベースコピー手段
10を含んで構成されている。
[0010] The reorganization means 2 includes a database copy means 10.

【0011】複写元データベース6および複写先データ
ベース7は、索引部と階層構造を有するデータレコード
部とからなり、データレコードには索引キーにより格納
および検索されるルートレコードタイプと、ルートレコ
ードと論理的な関係がありその近傍に配置されるレコー
ドタイプとが存在する。1個のルートレコードと、それ
に論理的に関係のあるデータレコードとの集まりをクラ
スタと呼ぶとすると、複写元データベース6には、例え
ば図2に示す索引キー値および容量(ブロック数に換算
したもの)を持つクラスタが図3に示すように格納され
ている。図3の状態において、何ブロックに1つの索引
情報を設定するかを示す1索引制御領域ブロック数が3
であるので、索引部の索引キー値および開始ブロック番
号は図示のようになる。
The copy source database 6 and the copy destination database 7 each include an index portion and a data record portion having a hierarchical structure. The data record includes a root record type stored and searched by an index key, and a logical relationship with the root record. And a record type arranged in the vicinity. Assuming that a set of one root record and data records logically related thereto is called a cluster, the copy source database 6 stores, for example, an index key value and a capacity (converted into the number of blocks) shown in FIG. ) Are stored as shown in FIG. In the state of FIG. 3, the number of blocks in one index control area indicating the number of blocks to which one piece of index information is set is three.
Therefore, the index key value and the starting block number of the index part are as shown in the figure.

【0012】図4は、空き領域取得情報12を示し、設
定する索引情報をシミュレート(模擬)するための情報
として、何ブロック毎に索引キーを設定するか(以下、
1索引制御領域ブロック数という)として5を、何個の
索引キーを設定する毎に空き領域を取得するか(以下、
空き領域取得頻度という)として2を、1回にとる空き
領域のブロック数を示す空き領域ブロック数として2を
入力している。
FIG. 4 shows the free space acquisition information 12, and how many blocks an index key is set as information for simulating (simulating) the index information to be set (hereinafter, referred to as an index key).
5 is set as one index control area block number, and how many index keys are set to obtain an empty area (hereinafter, referred to as an index control area block number).
2 is input as the number of free area blocks indicating the number of free area blocks to be taken at one time.

【0013】図5は、格納制御情報記憶手段に記憶し
た格納制御情報レコードを例示する図である。各格納制
御情報レコードは、識別子と、索引キー値と、容量(ブ
ロック数に換算したもの)とからなり、データ格納用の
領域情報であることを示す識別子(=“D”)の格納制
御情報レコードには索引キー値が格納されるが、空き領
域情報であることを示す識別子(=“S”)の格納制御
情報レコードには索引キー値が格納されない。
FIG. 5 is a diagram exemplifying a storage control information record stored in the storage control information storage means 8 . Each storage control information record is composed of an identifier, an index key value, and a capacity (converted to the number of blocks). The storage control information of an identifier (= “D”) indicating that the information is area information for data storage. The index key value is stored in the record, but the index key value is not stored in the storage control information record of the identifier (= “S”) indicating free space information.

【0014】図6(a)〜(c)は、索引情報設定手段
9による索引情報の設定手順を例示する図であり、
(a)は先頭索引キー値の設定時、(b)は第2索引キ
ー値の設定時、(c)は第3索引キー値の設定時をそれ
ぞれ示す。
FIGS. 6A to 6C are diagrams illustrating an example of a procedure for setting the index information by the index information setting means 9. FIG.
(A) shows the setting of the first index key value, (b) shows the setting of the second index key value, and (c) shows the setting of the third index key value.

【0015】図7は、再編成後の複写先データベース内
の格納状態および索引部を例示する図である。
FIG. 7 is a diagram exemplifying a storage state and an index portion in the copy destination database after the reorganization.

【0016】図8を参照すると、データベース格納制御
情報生成手段5の処理は、カウンタ類初期化ステップS
101と、クラスタ入力ステップS102と、クラスタ
終了判定ステップS103と、索引キー値蓄積ステップ
S104と、ブロック数加算ステップS105と、1索
引制御領域ブロック数判定ステップS106と、データ
格納用格納制御情報レコード作成および出力ステップS
107と、格納制御情報カウンタ加算ステップS108
と、ブロック数カウンタクリアステップS109と、索
引キー値スタッククリアステップS110と、空き領域
設定頻度判定ステップS111と、空き領域用格納制御
情報レコード作成および出力ステップS112と、格納
制御情報カウンタクリアステップS113とからなる。
Referring to FIG. 8, the processing of the database storage control information generating means 5 is a counter initialization step S
101, cluster input step S102, cluster end determination step S103, index key value accumulation step S104, block number addition step S105, one index control area block number determination step S106, storage control information record for data storage And output step S
107 and storage control information counter adding step S108
Block number counter clear step S109, index key value stack clear step S110, free area setting frequency determining step S111, free area storage control information record creation and output step S112, and storage control information counter clear step S113. Consists of

【0017】図9を参照すると、索引情報設定手段9の
処理は、複写先データベース初期化ステップS201
と、次格納ブロックポインタ1初期化ステップS202
と、格納制御情報レコード入力ステップS203と、格
納制御情報レコード終了判定ステップS204と、識別
子判定ステップS205と、ダミーレコード作成,格納
および削除ステップS206と、次格納ブロックポイン
タ加算ステップS207とからなる。
Referring to FIG. 9, the processing of the index information setting means 9 is a copy destination database initialization step S201.
And the next storage block pointer 1 initialization step S202
, A storage control information record input step S203, a storage control information record end determination step S204, an identifier determination step S205, a dummy record creation, storage and deletion step S206, and a next storage block pointer addition step S207.

【0018】次に、このように構成された本実施例のデ
ータベース再編成方式の動作について説明する。
Next, the operation of the database reorganization system according to the present embodiment configured as described above will be described.

【0019】データベースの再編成が必要になると、複
写元データベース6が業務処理プログラム11からアク
セス可能な共有状態のままで、複写先データベース7が
業務処理プログラム11からアクセス不可能な排他状態
とされ、再編成事前処理手段1が起動される。
When the database needs to be reorganized, the copy source database 6 is placed in an exclusive state inaccessible from the business processing program 11 while the copy source database 6 remains in a shared state accessible from the business processing program 11. The reorganization pre-processing means 1 is activated.

【0020】すると、利用者情報取得手段3は、空き領
域取得情報12を取得して解析し、利用者情報記憶手段
4に格納する。
Then, the user information acquisition means 3 acquires and analyzes the free space acquisition information 12 and stores it in the user information storage means 4.

【0021】次に、データベース格納制御情報生成手段
5は、ブロック数カウンタ(図示せず),格納制御情報
カウンタ(図示せず)および索引キー値スタック(図示
せず)を初期化し(ステップS101)、複写元データ
ベース6から索引キー値の順にクラスタを入力する(ス
テップS102)。
Next, the database storage control information generating means 5 initializes a block number counter (not shown), a storage control information counter (not shown), and an index key value stack (not shown) (step S101). Then, clusters are input from the copy source database 6 in the order of index key values (step S102).

【0022】クラスタが入力されると(ステップS10
3でノー)、データベース格納制御情報生成手段5は、
クラスタのルートレコードの索引キー値を索引キー値ス
タックに蓄積し(ステップS104)、クラスタのレコ
ードサイズを積算してそのブロック数換算値をブロック
数カウンタに加算する(ステップS105)。
When a cluster is input (step S10)
3), the database storage control information generating means 5
The index key value of the root record of the cluster is accumulated in the index key value stack (step S104), the record size of the cluster is integrated, and the converted block number value is added to the block number counter (step S105).

【0023】続いて、データベース格納制御情報生成手
段5は、ブロック数カウンタが1索引制御領域ブロック
数以上であるかどうかを判断し(ステップS106)、
ブロック数カウンタが1索引制御領域ブロック数未満の
場合には、ステップS102に制御を戻す。
Subsequently, the database storage control information generating means 5 determines whether or not the block number counter is equal to or greater than the number of one index control area blocks (step S106).
If the block number counter is less than one index control area block number, control is returned to step S102.

【0024】ブロック数カウンタが1索引制御領域ブロ
ック数以上になる場合には(ステップS106でイエ
ス)、データベース格納制御情報生成手段5は、索引キ
ー値スタックに蓄積されている先頭(最先)の索引キー
値およびブロック数カウンタのブロック数を、データ格
納用の領域情報であることを示す識別子(=“D”)と
ともに格納制御情報レコードとして格納制御情報記憶手
段5に出力する(ステップS107)。この後、データ
ベース格納制御情報生成手段5は、格納制御情報カウン
タを1つ加算し(ステップS108)、ブロック数カウ
ンタを0にクリアし(ステップS109)、索引キー値
スタックをクリアする(ステップS110)。
If the number-of-blocks counter is equal to or greater than one index control area block number (YES in step S106), the database storage control information generating means 5 sets the first (earliest) value stored in the index key value stack. The index key value and the number of blocks of the block number counter are output to the storage control information storage means 5 as a storage control information record together with an identifier (= "D") indicating that the information is area information for data storage (step S107). Thereafter, the database storage control information generating means 5 adds one to the storage control information counter (step S108), clears the block number counter to 0 (step S109), and clears the index key value stack (step S110). .

【0025】次に、データベース格納制御情報生成手段
5は、格納制御情報カウンタと空き領域設定頻度とを比
較し(ステップS111)、格納制御情報カウンタが空
き領域設定頻度未満であれば、ステップS102に制御
を戻す。
Next, the database storage control information generating means 5 compares the storage control information counter with the free area setting frequency (step S111). If the storage control information counter is less than the free area setting frequency, the processing proceeds to step S102. Return control.

【0026】格納制御情報カウンタが空き領域設定頻度
以上であれば(ステップS111でイエス)、データベ
ース格納制御情報生成手段5は、空き領域ブロック数を
空き領域情報であることを示す識別子(=“S”)とと
もに格納制御情報レコードとして格納制御情報記憶手段
8に出力する(ステップS112)。この後、データベ
ース格納制御情報生成手段5は、格納制御情報カウンタ
を0にクリアし(ステップS113)、ステップS10
2に制御を戻す。
If the storage control information counter is equal to or higher than the free area setting frequency (Yes in step S111), the database storage control information generating means 5 determines the number of free area blocks as an identifier (= “S ) Is output to the storage control information storage means 8 as a storage control information record (step S112). Thereafter, the database storage control information generating means 5 clears the storage control information counter to 0 (step S113), and proceeds to step S10.
Return control to 2.

【0027】データベース格納制御情報生成手段5は、
ステップS102〜S113を繰り返し、ステップS1
03で複写元データベース6からクラスタが入力されな
くなると、処理を終了する。
The database storage control information generating means 5 comprises:
Steps S102 to S113 are repeated, and step S1
When the cluster is no longer input from the copy source database 6 in 03, the processing is terminated.

【0028】データベース格納制御情報生成手段5の処
理の終了の後、索引情報設定手段9は、複写先データベ
ース7を初期化し(ステップS201)、次格納ブロッ
クポインタを1に初期化した後に(ステップS20
2)、格納制御情報記憶手段8より格納制御情報レコー
ドを入力する(ステップS203)。
After the processing of the database storage control information generating means 5 ends, the index information setting means 9 initializes the copy destination database 7 (step S201), and initializes the next storage block pointer to 1 (step S20).
2) The storage control information record is input from the storage control information storage means 8 (step S203).

【0029】格納制御情報レコードが入力されれば(ス
テップS204でノー)、索引情報設定手段9は、識別
子を判断し(ステップS205)、識別子がデータ格納
用の領域情報であることを示す識別子(=“D”)であ
れば、格納制御情報レコード中の索引キー値をそれ自体
は情報を持たないダミーレコードにセットして複写先デ
ータベース7に格納することによって索引情報を索引部
に設定し、直後に当該ダミーレコードを削除することに
よって索引部のみを作成する(ステップS206)。
こで、ダミーレコードを削除するのは、複写先データベ
ース7に一旦格納されることにより索引部を作成する目
的を終えたダミーレコードが物理的な領域を占有し続け
る弊害を除去するためである。ステップ205で識別子
が空き領域情報であることを示す識別子(=“S”)で
あれば、索引情報設定手段9は、ステップS206をス
キップする。
If a storage control information record is input (No in step S204), the index information setting means 9 determines an identifier (step S205), and an identifier indicating that the identifier is data storage area information (step S205). = “D”), the index key value in the storage control information record is itself
It sets the index information in the index section by storing in set dummy records that do not have the information to the copy destination database 7, only create index portion by removing the dummy records immediately (step S206). This
Here, the deletion of the dummy record is based on the copy destination database.
To create an index part once stored in source 7
Dummy records that have completed the target occupy the physical area
This is to eliminate the adverse effects. If it is determined in step 205 that the identifier is free space information (= “S”), the index information setting unit 9 skips step S206.

【0030】次に、索引情報設定手段9は、格納制御情
報レコード中のブロック数を次格納ブロックポインタに
加算して(ステップS207)、ステップS203に制
御を戻す。
Next, the index information setting means 9 adds the number of blocks in the storage control information record to the next storage block pointer (step S207), and returns the control to step S203.

【0031】索引情報設定手段9は、ステップS203
〜S207を繰り返して、複写先データベース7に索引
部のみを作成し、ステップS204で格納制御情報記憶
手段8の格納制御情報レコードがなくなれば、処理を終
了する。
The index information setting means 9 determines in step S203
Steps S207 to S207 are repeated to create only the index part in the copy destination database 7. When the storage control information record in the storage control information storage unit 8 is exhausted in step S204, the process is terminated.

【0032】再編成事前処理手段1の処理が終了した
後、複写元データベース6が業務処理プログラム11か
らアクセス可能な共有状態のままで、複写先データベー
ス7が業務処理プログラム11からアクセス可能な共有
状態とされ、再編成手段2が起動される。
After the processing of the reorganization preprocessing means 1 is completed, the copy source database 6 remains in the shared state accessible from the business processing program 11 and the copy destination database 7 remains in the shared state accessible from the business processing program 11. And the reorganization means 2 is activated.

【0033】すると、データベースコピー手段8は、複
写元データベース6よりデータレコードを入力し、複写
先データベース7に格納する。このとき、格納されるデ
ータレコードは、再編成事前処理手段1によりすでに設
定されている索引部に従って格納され、例えば図7に示
す格納状態となる。また、複写先データベース7に格納
したデータレコードについては、複写元データベース6
のデータレコード内の複写済みフラグ(図示せず)をオ
ンにしてアクセスすべきデータレコードを一意に決定で
きるようにする。なお、前記特開平4−175841号
公報に開示されたように、索引部に再編成の表示を付加
することにより、データレコードに矛盾が起こることを
防ぐようにしてもよい。
Then, the database copy means 8 inputs the data record from the copy source database 6 and stores it in the copy destination database 7. At this time, the data records to be stored are stored according to the index section already set by the reorganization pre-processing means 1, for example, in the storage state shown in FIG. For the data records stored in the copy destination database 7, the copy source database 6
To turn on a copied flag (not shown) in the data record to uniquely determine the data record to be accessed. Incidentally, as disclosed in the above-mentioned Japanese Patent Application Laid-Open No. 4-1755841, by adding a display of reorganization to the index portion, it is possible to prevent inconsistency in the data record.

【0034】業務処理プログラム11は、データベース
コピー手段8の処理中、コピー済みのデータレコードに
ついては複写先データベース7、未コピーのデータレコ
ードについては複写元データベース6にアクセスする。
During the processing of the database copying means 8, the business processing program 11 accesses the copy destination database 7 for copied data records and the copy source database 6 for uncopied data records.

【0035】[0035]

【発明の効果】以上説明したように本発明は、データベ
ースの運転状態でデータベースの再編成処理を可能とす
るデータベース再編成方式において、複写先データベー
スの再編成処理に先立って、複写元データベースよりデ
ータレコードを読み出して空き領域取得情報に基づいて
複写先データベースでの再編成後の索引キーの配置を模
擬し、模擬結果に従って複写先データベースに索引部の
みを生成する再編成事前処理を行い、複写先データベー
スに適度な空き領域が確保されるようにしたことによ
り、再編成後に複写先データベースに挿入されるデータ
レコードが索引制御されたブロックに格納されるため、
データアクセス性能の劣化を遅くすることができるとい
う効果がある。
As described above, the present invention provides a database
Database reorganization processing in the operating state of the database
Database reorganization method
Prior to the data reorganization process,
Data record is read and based on the free space acquisition information.
Mimics the placement of index keys after reorganization in the destination database
Simulate the index part in the copy destination database according to the simulated result.
Performs reorganization pre-processing to generate
A reasonable free space for
Data inserted into the destination database after reorganization
Because records are stored in indexed blocks,
Data access performance can be slowed down
Has the effect.

【0036】[0036]

【0037】[0037]

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

【図1】本発明の一実施例に係るデータベース再編成方
式の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a database reorganization method according to an embodiment of the present invention.

【図2】図1中の複写元データベース内のクラスタの索
引キー値および容量を例示する図である。
FIG. 2 is a diagram exemplifying an index key value and a capacity of a cluster in a copy source database in FIG. 1;

【図3】図1中の複写元データベース内の格納状態およ
び索引部を例示する図である。
FIG. 3 is a diagram exemplifying a storage state and an index unit in a copy source database in FIG. 1;

【図4】図1中の空き領域取得情報の一例を示す図であ
る。
FIG. 4 is a diagram showing an example of free area acquisition information in FIG.

【図5】図1中の格納制御情報記憶手段の内容の一例を
示す図である。
FIG. 5 is a diagram showing an example of the contents of a storage control information storage means in FIG. 1;

【図6】図1中の索引情報設定手段による索引情報の設
定手順を例示する図であり、(a)は先頭索引キー値の
設定時、(b)は第2索引キー値の設定時、(c)は第
3索引キー値の設定時をそれぞれ示す。
6A and 6B are diagrams exemplifying a procedure for setting index information by the index information setting means in FIG. 1, wherein FIG. 6A is a diagram for setting a leading index key value, FIG. 6B is a diagram for setting a second index key value, (C) shows the time when the third index key value is set.

【図7】図1中の複写先データベースの再編成後の格納
状態および索引部を例示する図である。
FIG. 7 is a diagram exemplifying a storage state and an index part of the copy destination database in FIG. 1 after reorganization;

【図8】図1中のデータベース格納制御情報生成手段の
処理を示す流れ図である。
FIG. 8 is a flowchart showing a process of a database storage control information generating means in FIG. 1;

【図9】図1中の索引情報設定手段の処理を示す流れ図
である。
FIG. 9 is a flowchart showing the processing of the index information setting means in FIG. 1;

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

1 再編成事前処理手段 2 再編成手段 3 利用者情報取得手段 4 利用者情報記憶手段 5 データベース格納制御情報生成手段 6 複写元データベース 7 複写先データベース 8 格納制御情報記憶手段 9 索引情報設定手段 10 データベースコピー手段 11 業務処理プログラム 12 空き領域取得情報 1 Reorganization preprocessing means 2 Reorganization means 3 User information acquisition means 4 User information storage means 5 Database storage control information generation means 6 Copy source database 7 Copy destination database 8 Storage control information storage means 9 Index information setting means 10 Database Copying means 11 Business processing program 12 Free space acquisition information

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 索引部と階層構造を有するデータレコー
ド部とからなる複写元データベースおよび複写先データ
ベースを備え、前記複写元データベースから前記複写先
データベースにデータレコードをコピーすることにより
データベースの再編成を行うデータベースシステムにお
いて、前記複写先データベースの空き領域を設定するために利
用者が指定する空き領域取得情報を取得する利用者情報
取得手段と、この利用者情報取得手段により取得された
空き領域取得情報を記憶する利用者情報記憶手段と、前
記複写元データベースよりデータレコードを読み出し該
データレコードの情報と前記利用者情報記憶手段に格納
された空き領域取得情報とから前記複写先データベース
での再編成後の索引キーの配置を模擬して前記複写先デ
ータベースの索引情報の生成を行うための格納制御情報
を作成するデータベース格納制御情報生成手段と、この
データベース格納制御情報生成手段により作成された格
納制御情報を記憶する格納制御情報記憶手段と、前記複
写先データベースを初期化後に前記格納制御情報記憶手
段に格納された格納制御情報に基づき索引キー値を設定
したそれ自体は情報を持たないダミーレコードを前記複
写先データベースに一旦格納した後に当該ダミーレコー
ドを削除することによって前記複写先データベースの索
引部の生成のみを行う索引情報設定手段とからなる 再編
成事前処理手段と、 この再編成事前処理手段による前記複写先データベース
の索引部の作成後に前記複写元データベースおよび前記
複写先データベースが前記業務処理プログラムからアク
セス可能な共有状態で前記複写元データベースから前記
複写先データベースにデータレコードをコピーするデー
タベースコピー手段からなる再編成手段とを有すること
を特徴とするデータベース再編成方式。
A copy source database and a copy destination database each comprising an index section and a data record section having a hierarchical structure, and a database is reorganized by copying data records from the copy source database to the copy destination database. In the database system to be used, it is useful to set the free area of the copy destination database.
User information for acquiring the free space acquisition information specified by the user
Acquiring means and the user information acquired by the user information acquiring means.
User information storage means for storing free space acquisition information;
Reads data records from the source database
Data record information and stored in the user information storage means
From the obtained free space acquisition information and the copy destination database
Simulate the index key arrangement after reorganization in
Storage control information for generating database index information
Database storage control information generating means for creating
The case created by the database storage control information generation means
Storage control information storage means for storing delivery control information;
After initializing the destination database, the storage control information storage
Set the index key value based on the storage control information stored in the column
A dummy record that does not have any information
Once stored in the destination database,
By deleting the database, the destination database can be searched.
And reorganization pre-processing means comprising an index information setting means for performing only the generation of引部, the copy source database and the copy destination database after creation of the index portion of the copy destination database by the reorganization pre-processing means wherein Day of copying data records accessible shared state from the business processing program from the copy source database to the copy destination database
A database reorganization method comprising a database reorganization unit comprising a database copy unit .
【請求項2】 前記複写元データベースおよび前記複写
先データベースが、索引キーにより格納および検索され
るルートレコードと、ルートレコードと論理的な関係が
ありその近傍に配置されるレコードとがクラスタをなす
請求項1記載のデータベース再編成方式。
2. A cluster in which a root record stored and retrieved in the copy source database and the copy destination database by an index key and a record which is logically related to the root record and arranged near the root record form a cluster. Item 2. The database reorganization method according to Item 1.
【請求項3】 前記空き領域取得情報が、何ブロック毎
に索引キーを設定するかを示す1索引制御領域ブロック
数と、何個の索引キーを設定する毎に空き領域を取得す
るかを示す空き領域取得頻度と、1回にとる空き領域の
ブロック数を示す空き領域ブロック数とからなる請求項
記載のデータベース再編成方式。
3. The free area acquisition information indicates the number of one index control area block indicating how many blocks an index key is set and how many index keys are set to obtain a free area. A claim comprising: a free area acquisition frequency; and a free area block number indicating the number of free area blocks taken at one time.
1. The database reorganization method according to 1.
【請求項4】 前記格納制御情報が、データ格納用領域
情報または空き領域情報であることを示す識別子と、索
引キー値と、容量とからなる請求項記載のデータベー
ス再編成方式。
Wherein said storing control information, an identifier indicating the area information or free space information for data storage, an index key value and the database reorganization method according to claim 1, wherein comprising a capacitor.
JP5323105A 1993-11-29 1993-11-29 Database reorganization method Expired - Fee Related JP2643811B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5323105A JP2643811B2 (en) 1993-11-29 1993-11-29 Database reorganization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5323105A JP2643811B2 (en) 1993-11-29 1993-11-29 Database reorganization method

Publications (2)

Publication Number Publication Date
JPH07152615A JPH07152615A (en) 1995-06-16
JP2643811B2 true JP2643811B2 (en) 1997-08-20

Family

ID=18151140

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5323105A Expired - Fee Related JP2643811B2 (en) 1993-11-29 1993-11-29 Database reorganization method

Country Status (1)

Country Link
JP (1) JP2643811B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5933820A (en) * 1996-05-20 1999-08-03 International Business Machines Corporation System, method, and program for using direct and indirect pointers to logically related data and targets of indexes
US6418450B2 (en) 1998-01-26 2002-07-09 International Business Machines Corporation Data warehouse programs architecture
US7028043B2 (en) 1998-04-10 2006-04-11 International Business Machines Corporation Creation of customized trees
JP4494950B2 (en) * 2004-12-08 2010-06-30 富士通株式会社 Table switching program and computer system
JP4699469B2 (en) * 2005-09-14 2011-06-08 株式会社日立製作所 Database management program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0488440A (en) * 1990-07-25 1992-03-23 Nec Corp Data base reorganizing system
JPH04175841A (en) * 1990-11-07 1992-06-23 Nec Corp Data base reformation processing system
JPH05151037A (en) * 1991-06-24 1993-06-18 Nec Corp Reorganization processing system for database in business processing

Also Published As

Publication number Publication date
JPH07152615A (en) 1995-06-16

Similar Documents

Publication Publication Date Title
EP0124097B1 (en) Method for storing and retrieving data in a data base
JP3910221B2 (en) Object-oriented database management system and method
EP0339901A2 (en) Improved version management tool
JPH0916607A (en) Method for managing index in data base management system
JP4101410B2 (en) Time version data storage device
JPH10320423A (en) Method and device for executing connection question in data base system
KR101085735B1 (en) System and method for identifying and storing changes made to a table
US5481703A (en) Database restructuring system for detecting functionally dependent relations and converting them into third normal form
JP2009522677A (en) Method, system, and device for file system dump / restore by node numbering
US7269589B2 (en) Database managing method and system having data backup function and associated programs
JP2643811B2 (en) Database reorganization method
CN104111962B (en) Enhanced affairs cache with batch operation
JP3484440B2 (en) Distributed database update method
JP3636773B2 (en) Information processing device for database check
JP2000155706A (en) Method and device for mapping object-oriented and relational data base and its storage medium
JP3245047B2 (en) Version control apparatus and method
JPH02212949A (en) Reorganization processing system for data base in on-line operation
JP2002108947A (en) Design support system
JPS62287350A (en) Index integrally updating system
JP2658097B2 (en) Secondary file creation method
JPH08328929A (en) Database split management system
JP2746770B2 (en) File processing method of optical disk verification system
JPH05120343A (en) Index updating system
JP2785966B2 (en) Foreign key dynamic resolution processing method
JPH11175376A (en) Updating method and updating device for data base and recording medium in which updating method is written

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090502

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100502

Year of fee payment: 13

LAPS Cancellation because of no payment of annual fees