[go: up one dir, main page]

JPH05289914A - Data base control system - Google Patents

Data base control system

Info

Publication number
JPH05289914A
JPH05289914A JP4112420A JP11242092A JPH05289914A JP H05289914 A JPH05289914 A JP H05289914A JP 4112420 A JP4112420 A JP 4112420A JP 11242092 A JP11242092 A JP 11242092A JP H05289914 A JPH05289914 A JP H05289914A
Authority
JP
Japan
Prior art keywords
record
records
storage
allowable value
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4112420A
Other languages
Japanese (ja)
Inventor
Satoshi Aoyanagi
智 青柳
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
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP4112420A priority Critical patent/JPH05289914A/en
Publication of JPH05289914A publication Critical patent/JPH05289914A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To automate the start of reorganization by executing reorganization without stopping the use of a data base and setting up the upper limit of a storing range. CONSTITUTION:This data base control system is constituted of an allowable value setting means 1 for setting up the storing ranges of respective records set up by a user in an allowable value management table 3 while referring to definition information 2, a storage status monitoring means 4 for obtaining data base updating information from a DBMS 7 for retrieving/updating the data base 8 and controlling the rearrangement of records while comparing the records with the contents of the table 3 and a record rearranging means 5 started from the means 4 to rearrange records, and when a storage state is not improved even after rearranging the records, output an alarm report 6.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、補助記憶装置上に格納
された複数種類の形式を持つレコード間の論理関係(セ
ット)を、レコードの格納アドレスを利用したポインタ
を用いて鎖状に連結することにより表現しているデータ
ベースを制御するためのデータベース制御システムに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention connects a logical relationship (set) between records stored in an auxiliary storage device and having a plurality of formats in a chain using a pointer using the storage address of the record. The present invention relates to a database control system for controlling a database represented by doing.

【0002】[0002]

【従来の技術】補助記憶装置上に格納された複数種類の
形式を持つレコード間の論理関係(セット)を、レコー
ドの格納アドレスを利用したポインタを用いて鎖状に連
結することにより表現しているデータベース管理システ
ムにおいて、あるレコード(親レコード)とそのレコー
ドにセット関係で結ばれたレコード(子レコード)の集
まり(クラスタ)は、一般的に、複数のブロック(物理
入出力の単位)にまたがって格納される。
2. Description of the Related Art A logical relationship (set) between records stored in an auxiliary storage device and having a plurality of formats is expressed by connecting them in a chain using a pointer using a storage address of the record. In a given database management system, a set (cluster) of a record (parent record) and a record (child record) connected to the record in a set relationship generally spans multiple blocks (units of physical input / output). Stored.

【0003】データベースの利用者は、実際に格納され
るレコード数の予定値からそれぞれのクラスタの格納さ
れるブロック数を予測しシステムの構築を行う。しかし
ながら、実際に、このようにして設計されたデータベー
スであっても、長期間にわたる運用に伴うレコードの追
加や削除などの結果として格納状態が乱れることがあ
る。
The user of the database constructs the system by predicting the number of blocks stored in each cluster from the expected value of the number of records actually stored. However, actually, even in the database designed in this way, the storage state may be disturbed as a result of addition or deletion of records due to long-term operation.

【0004】その結果、あるクラスタの格納されるブロ
ックの総数が設計当初の予定よりも大きくなり、データ
ベースのアクセスを行った際に予定以上の回数の物理入
出力が発生してシステム性能の低下が現れるようにな
る。このようなシステム性能の低下が起こった場合に
は、データベースの格納状態を是正する再編成処理を行
うことになる。
As a result, the total number of blocks stored in a certain cluster becomes larger than originally planned, and when the database is accessed, the physical input / output occurs more times than planned and the system performance is degraded. It will appear. When such system performance degradation occurs, reorganization processing for correcting the storage state of the database is performed.

【0005】従来の方式では、再編成のタイミングは実
際に処理性能の低下が現れるか、定期的に格納状態を測
定するプログラムを実行することによりチェックしてい
た。また、再編成の処理方式は一括処理によるものであ
った。これは、データベースのレコードをすべて別のフ
ァイルに退避してデータベースを初期化した後に、退避
したレコードをセットで連結された順にデータベースに
書き戻す方式である。
In the conventional method, the reorganization timing is checked by actually executing a program for measuring the storage state, whether or not the processing performance actually deteriorates. Moreover, the processing method of reorganization was a batch processing. This is a method in which all the records in the database are saved to another file and the database is initialized, and then the saved records are written back to the database in the order in which they are linked as a set.

【0006】[0006]

【発明が解決しようとする課題】上述した従来の再編成
方式では、データベースを別のファイルに退避した後に
一括してレコードの書き戻しを行うために、利用者は再
編成の対象となるデータベースをアクセスする業務プロ
グラムすべてを停止させなければならないという問題点
があった。また、再編成を行う本発明は、上記のような
従来例における問題点を解決するためになされたもの
で、データベースの運用を停止することなく再編成を可
能とすると共に、格納範囲の上限を設定することにより
再編成の起動を自動化できるデータベース制御システム
を提供することを目的とする。
In the above-mentioned conventional reorganization method, since the records are written back in a batch after the database is saved to another file, the user selects the database to be reorganized. There was a problem that all the business programs to access had to be stopped. Further, the present invention for performing reorganization is made in order to solve the problems in the conventional example as described above, and enables reorganization without stopping the operation of the database, and the upper limit of the storage range is set. It is an object of the present invention to provide a database control system that can automatically start reorganization by setting it.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係るデータベース制御システムは、補助記
憶装置上に格納された複数種類の形式を持つレコード間
のセットを、レコードの格納アドレスを利用したポイン
タを用いて鎖状に連結することにより表現しているデー
タベースで、1つのレコード内に上記セット内でのレコ
ードの論理出現順序を表す論理ポインタと、セット内で
の物理出現順序を表す物理ポインタとを持ち、レコード
の更新時に従来と同様の更新処理に加えて必要に応じて
物理ポインタの繋ぎ変え処理を行うデータベース管理シ
ステムにおいて、データベースの設計時に予測された1
つのセットに含まれる平均レコード件数より算出する1
つのセットに属するレコードに許される格納範囲の管理
を行う許容値設定手段と、上記許容値設定手段により設
定された格納範囲の許容値に基づき各論理ポインタで結
ばれたレコードの格納範囲を物理ポインタを利用して格
納範囲の割り出しを行うことにより監視し必要に応じて
レコードの再配置手段を呼び出す格納状態監視手段と、
あるセットに属するレコードの格納範囲が上記許容値設
定手段により設定された値を越えた場合に上記格納状態
監視手段より起動され対象レコード群の再配置を行うレ
コード再配置手段を備えたことを特徴とする。
In order to achieve the above object, the database control system according to the present invention sets a set of records having a plurality of formats stored in an auxiliary storage device as a storage address of the record. In a database that is expressed by connecting in a chain using a pointer using, a logical pointer that represents the logical appearance order of records in the above set within one record, and a physical appearance order in the set In a database management system that has a physical pointer that represents and that performs a reconnecting process of the physical pointers as needed in addition to the update process similar to the conventional process when updating a record
Calculated from the average number of records contained in one set 1
A permissible value setting means for managing the storage range allowed for records belonging to one set, and a physical pointer for the storage range of the records connected by each logical pointer based on the storage range allowable value set by the above-mentioned permissible value setting means. A storage status monitoring means for monitoring the storage range by using, and calling the record rearrangement means when necessary,
And a record rearrangement unit which is activated by the storage state monitoring unit and rearranges the target record group when the storage range of records belonging to a certain set exceeds the value set by the allowable value setting unit. And

【0008】[0008]

【作用】本発明において、格納状態監視手段は、許容値
設定手段により設定された格納範囲の許容値に基づき各
論理ポインタで結ばれたレコードの格納範囲を物理ポイ
ンタを利用して格納範囲の割り出しを行うことにより監
視し必要に応じてレコード再配置手段を呼び出す。レコ
ード再配置手段は、あるセットに属するレコードの格納
範囲が上記許容値設定手段により設定された値を越えた
場合に上記格納状態監視手段により起動され対象レコー
ド群の再配置を行う。
In the present invention, the storage state monitoring means uses the physical pointer to determine the storage range of the record connected by each logical pointer based on the storage range tolerance set by the tolerance setting means. The record relocation means is called as necessary. The record rearrangement unit is activated by the storage state monitoring unit to rearrange the target record group when the storage range of the records belonging to a certain set exceeds the value set by the allowable value setting unit.

【0009】[0009]

【実施例】次に、本発明の実施例について図面を参照し
ながら説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0010】図1は、レコードとセットの関係を示した
概念図で、丸はレコード、線分はセットを表す。図1中
ではレコードaが親レコードに、レコードbが子レコー
ドにそれぞれ相当する。
FIG. 1 is a conceptual diagram showing the relationship between records and sets. Circles represent records and line segments represent sets. In FIG. 1, the record a corresponds to a parent record and the record b corresponds to a child record.

【0011】また、図2は論理ポインタと物理ポインタ
の関係を表す概念図である。親レコードa1の下に子レ
コードがb1,b2,b3,b4,b6,b5の順でつ
ながっており、これが、各レコード間の論理関係を表す
論理ポインタである。これに対し、a1からb1,b
2,b3,b4,b5,b6と格納アドレス順で各レコ
ードが接続されるのが、物理ポインタである。どちらの
ポインタも親レコードは子レコードのうち先頭と最後尾
のレコードのアドレスを持っている。
FIG. 2 is a conceptual diagram showing the relationship between the logical pointer and the physical pointer. Child records are connected under the parent record a1 in the order of b1, b2, b3, b4, b6, b5, and this is a logical pointer indicating the logical relationship between the records. On the other hand, from a1 to b1, b
2, b3, b4, b5, b6 and the records are connected in the order of the storage address is the physical pointer. In both pointers, the parent record has the addresses of the first and last records of the child records.

【0012】図2の例では、論理ポインタはb5,b
1、物理ポインタはb6とb1のアドレスがこれに相当
する。また、先頭の子レコードは直前の子レコードのア
ドレスのかわりに、親レコードのアドレスを持ち、最後
尾の子レコードは直後の子レコードのアドレスのかわり
に親レコードのアドレスをポインタとして持っている。
In the example of FIG. 2, the logical pointers are b5 and b.
1. The physical pointers correspond to the addresses b6 and b1. The first child record has the address of the parent record instead of the address of the immediately preceding child record, and the last child record has the address of the parent record as a pointer instead of the address of the immediately following child record.

【0013】さらに、図3はレコード内の制御情報の概
念図である。各レコードはレコードヘッダ部、論理ポイ
ンタ部、物理ポインタ部とレコードの内容からなる。
Further, FIG. 3 is a conceptual diagram of the control information in the record. Each record consists of a record header part, a logical pointer part, a physical pointer part and the contents of the record.

【0014】図4は本発明を実施する構成図である。本
発明は、定義情報2を参照して、利用者の設定した各レ
コードの格納範囲の許容値を許容値管理表3にセットす
る許容値設定手段1、データベース8の検索・更新を行
うDBMS7からデータベース更新の情報を得、許容値
管理表3の内容と比較しながらレコードの再配置の制御
を行う格納状態監視手段4と、格納状態監視手段4によ
り起動され、レコードの再配置を行い、レコードの再配
置を行っても格納状態が改善されない場合に警告レポー
ト6の出力を行うレコード再配置手段5よりなる。
FIG. 4 is a configuration diagram for implementing the present invention. According to the present invention, referring to the definition information 2, the allowable value setting means 1 for setting the allowable value of the storage range of each record set by the user in the allowable value management table 3, and the DBMS 7 for searching / updating the database 8 The storage status monitoring means 4 for controlling the rearrangement of records while obtaining information for updating the database and comparing the contents of the allowable value management table 3, and the storage status monitoring means 4 are activated to rearrange the records, Of the record rearrangement means 5 for outputting the warning report 6 when the storage state is not improved even if the rearrangement is performed.

【0015】図5は本発明で使用する格納範囲の許容値
管理表3の一例を表す図である。この図は、格納範囲の
管理を行う対象となるクラスタの親レコードのレコード
名と、セット名、それぞれに対応する格納範囲の最大ブ
ロック数と実際の格納範囲が格納の許容値を越えていて
もそのクラスタの再配置を行わないよう制御するための
制御SWの情報を持っている。
FIG. 5 is a diagram showing an example of a storage range allowable value management table 3 used in the present invention. This figure shows that even if the record name of the parent record of the cluster whose storage range is to be managed, the set name, the maximum number of blocks in the storage range corresponding to each, and the actual storage range exceed the storage allowable value. It has the information of the control SW for controlling not to rearrange the cluster.

【0016】図6はレコードの再配置前後の格納状態を
表した図である。a)が再配置を行う前の格納状態に対
応し、b)が再配置の実行している最中、c)が再配置
後の格納状態にそれぞれ対応する。この図中の四角の1
つ1つはデータベースの1ブロックに対応し、丸はレコ
ード、レコードを結ぶ曲線はセットに対応する。また、
網掛け部分のブロックは再配置で使用するワーク領域で
ある。
FIG. 6 is a diagram showing the storage states before and after the rearrangement of records. a) corresponds to the storage state before the rearrangement, b) corresponds to the storage state after the rearrangement, and c) corresponds to the storage state after the rearrangement. Square 1 in this figure
Each one corresponds to one block in the database, circles correspond to records, and curves connecting the records correspond to sets. Also,
The shaded blocks are work areas used for rearrangement.

【0017】図7は実際にレコードの再配置を行う場合
の手順を、ある1つのクラスタを取り上げて説明した図
である。図6と同じく1つの四角がデータベースの1ブ
ロック、丸がレコード、丸を結ぶ曲線がセットにそれぞ
れ対応している。ここで例として取り上げたのは、1つ
のブロックにそれぞれ8つのレコードが格納できるデー
タベースである。
FIG. 7 is a diagram for explaining a procedure for actually rearranging records by taking a certain cluster. As in FIG. 6, one square corresponds to one block in the database, circles correspond to records, and curves connecting the circles correspond to sets. The example taken here is a database that can store eight records in each block.

【0018】a)が再配置を行う時の初期状態で、図6
のb)のある1つのクラスタを取り出したものである。
a)はレコードの再配置を行うときの初期状態で、クラ
スタの第一階層のレコードa1に位置付けられている。
b)〜d)が該当クラスタの第二階層のレコードを移動
しているところを示す。e)では第二階層までの再配置
が終わり、第三階層の移動の最初の段階であり、f)は
第三階層のレコードを1つ移動したところで、残りのレ
コードに対して同じ処理を施せば、このクラスタに対す
る再配置処理は終了する。
FIG. 6 shows the initial state when a) is rearranged.
B) is extracted from one cluster.
The a) is an initial state when the records are rearranged, and is located in the record a1 in the first layer of the cluster.
b) to d) show that the record of the second layer of the corresponding cluster is being moved. In e), the rearrangement up to the second layer is completed, which is the first step of moving the third layer. In f), when one record in the third layer is moved, the same processing can be applied to the remaining records. If so, the rearrangement process for this cluster ends.

【0019】図8はレコードの格納範囲の管理を行う許
容値設定手段1が許容値管理表3の更新を行う手順を示
した図である。利用者から許容値管理表3の更新の要求
があると、許容値設定手段1が起動される。許容値設定
手段1は利用者の設定しようとしている許容値の情報を
受け取る(ステップ801)。
FIG. 8 is a diagram showing a procedure in which the allowable value setting means 1 for managing the storage range of records updates the allowable value management table 3. When the user requests the update of the allowable value management table 3, the allowable value setting means 1 is activated. The tolerance value setting means 1 receives information on the tolerance value that the user is trying to set (step 801).

【0020】受け取った情報の正当性、例えばレコード
とセットの関係が誤っていないか等をデータベース8の
定義情報2を参照して判断し(ステップ802)、もし
設定しようとした許容値が間違っていた場合には、利用
者に入力情報に誤りがあることを伝え(ステップ80
9)処理を終了する。
It is judged by referring to the definition information 2 of the database 8 whether or not the received information is correct, for example, the relation between the record and the set is incorrect (step 802), and if the allowable value to be set is incorrect. If so, inform the user that the input information is incorrect (step 80
9) End the process.

【0021】利用者の設定しようとした情報に誤りがな
かった場合には、許容値設定手段1は許容値管理表3を
検索して既に同じレコード、セットの組み合わせが登録
されているかどうかをチェックする(ステップ80
3)。同じ組み合わせが存在しない時は、許容値管理表
3に入力情報を追加して(ステップ808)処理を終了
する。
When there is no error in the information set by the user, the allowable value setting means 1 searches the allowable value management table 3 to check whether the same record / set combination has already been registered. Yes (Step 80)
3). If the same combination does not exist, the input information is added to the allowable value management table 3 (step 808) and the process ends.

【0022】同じレコード、セットの組み合わせが既に
表に登録されているときは、続いて対象の組み合わせに
関して制御SWのON,OFFををチェックする(ステ
ップ804)。OFFならば許容値管理表3に情報をセ
ットして終了する。制御SWがONだった場合には、次
に許容値の格納範囲をチェックする(ステップ80
5)。
When the same record / set combination is already registered in the table, the control switch ON / OFF is checked for the target combination (step 804). If it is OFF, the information is set in the allowable value management table 3 and the process ends. When the control SW is ON, the storage range of the allowable value is checked next (step 80).
5).

【0023】新たに設定された格納範囲が従来の格納範
囲より広ければ制御SWをOFFにし(ステップ80
6)、狭ければ設定しようとしている格納範囲を越えて
いるクラスタが既に存在することを警告するレポートを
出力した後、それぞれ許容値管理表3を更新して(ステ
ップ808)処理を終了する。
If the newly set storage range is wider than the conventional storage range, the control SW is turned off (step 80).
6) If it is narrow, a report warning that a cluster exceeding the storage range to be set already exists is output, and then the allowable value management table 3 is updated (step 808) and the process ends.

【0024】図9は各レコードの格納状態の監視を行
い、必要に応じてレコード再配置手段5を起動する格納
状態監視手段4の動作概要を表した図である。
FIG. 9 is a diagram showing an outline of the operation of the storage state monitoring means 4 which monitors the storage state of each record and activates the record rearrangement means 5 when necessary.

【0025】格納状態監視手段4はデータベース8の更
新を監視していて、データベース8の更新が発生すると
(ステップ901)以下の処理を行う。
The storage state monitoring means 4 monitors the update of the database 8, and when the update of the database 8 occurs (step 901), the following processing is performed.

【0026】まず、更新の対象となったレコードとセッ
トの組み合わせに格納範囲の許容値が設定されているか
どうかを、許容値管理表3を検索してチェックする(ス
テップ902)。許容値が設定されていなければ、何も
せずに処理を終了する。許容値があれば、更新の情報か
ら更新されたレコードの属するクラスタを特定し、その
親レコードの物理ポインタより該当クラスタの格納範囲
を割り出す(ステップ903)。
First, the allowable value management table 3 is searched to check whether or not the allowable value of the storage range is set for the combination of the record to be updated and the set (step 902). If the allowable value is not set, the process ends without doing anything. If there is an allowable value, the cluster to which the updated record belongs is specified from the update information, and the storage range of the relevant cluster is determined from the physical pointer of the parent record (step 903).

【0027】次に、許容値管理表3より対象のクラスタ
に対応する格納範囲の許容値を読み出し(ステップ90
4)、実際の格納範囲と、格納範囲の許容値との比較を
行って(ステップ905)、格納範囲が許容値内であれ
ば以下の処理をスキップして処理を終了する。
Next, the allowable value of the storage range corresponding to the target cluster is read from the allowable value management table 3 (step 90).
4) Then, the actual storage range is compared with the allowable value of the storage range (step 905). If the storage range is within the allowable value, the following processing is skipped and the processing ends.

【0028】続いて、レコード再配置の制御SWのO
N,OFFを調べ(ステップ906)、ONならばレコ
ード再配置を行わずに終了する。制御SWがOFFなら
ば、レコード再配置手段を呼び出して(ステップ90
7)、レコード再配置終了後処理を終了する。
Subsequently, the record rearrangement control SW O
N and OFF are checked (step 906), and if ON, record rearrangement is not performed and processing ends. If the control SW is OFF, the record rearrangement means is called (step 90
7) The process after the record rearrangement is completed.

【0029】図10はレコード再配置手段5の動作概要
を表した図である。
FIG. 10 is a diagram showing an outline of the operation of the record rearrangement means 5.

【0030】格納状態監視手段4より起動されたレコー
ド再配置手段5は、まず、レコードの格納範囲より再配
置に必要となるワーク領域の大きさを決定し(ステップ
1001)、領域の確保を行う(ステップ1002)。
The record rearrangement means 5 activated by the storage state monitoring means 4 first determines the size of the work area required for the rearrangement based on the record storage range (step 1001) and secures the area. (Step 1002).

【0031】次に、レコード再配置の対象となるクラス
タが格納されているブロック中の全レコードを対象にし
て、確保したワーク領域に第1階層のレコードを除くす
べてのレコードを移動する処理を行う(ステップ100
3)。この処理を行った状態が図6のb)に相当する。
Next, a process of moving all the records except the records of the first layer to the secured work area is performed for all the records in the block storing the cluster for the record rearrangement. (Step 100
3). The state in which this processing is performed corresponds to b) in FIG.

【0032】次に、再配置の対象となるクラスタのエン
トリポイントとなるレコード、そのクラスタの最上位の
レコードに位置付け(ステップ1004)、このレコー
ドを親レコードとするクラスタに対して各レコードの再
配置を行う(ステップ1005)。指定されたある1ク
ラスタに対するレコードの再配置処理の詳細は、次の図
11の説明の中で行う。
Next, the record serving as the entry point of the cluster to be relocated and the record at the top of the cluster are positioned (step 1004), and each record is relocated to the cluster having this record as a parent record. Is performed (step 1005). Details of the record rearrangement process for one designated cluster will be given in the following description of FIG.

【0033】格納範囲の許容値を越え、再配置の対象と
なったクラスタの再配置が終わると、再配置対象ブロッ
ク内のその他すべてのレコードについても再配置を行
う。このために、まず、再配置対象以外のレコードのう
ち、何らかのセットの最上位にあるレコードを順に検索
(ステップ1006)、レコードが存在するかどうかを
調べ(ステップ1007)、もし、そのようなレコード
が存在するならば、該当レコードを親とするクラスタに
対してレコードの再配置を行う(ステップ1008)。
この後、さらに他のレコードの有無のチェックを行うた
めに、ステップ1006より繰り返し処理を行う。
When the storage area exceeds the allowable value and the rearrangement of the cluster that is the rearrangement target is completed, the rearrangement is performed for all other records in the rearrangement target block. For this purpose, first, among the records other than the relocation target, the record at the top of some set is searched in order (step 1006), and it is checked whether or not the record exists (step 1007). If exists, the record is rearranged with respect to the cluster having the corresponding record as a parent (step 1008).
After this, in order to check the presence / absence of another record, the process is repeated from step 1006.

【0034】ステップ1007のチェックでレコードが
なかった場合は、再配置対象となったクラスタが許容値
の示す範囲内に格納されているかどうかを、再チェック
する(ステップ1009,1010)。許容値の範囲内
に格納出来ているときは、許容値管理表3の再配置制御
SWをOFFにして(ステップ1011)処理を終了す
る。これに対し、再配置を行っても格納範囲の許容値内
にはクラスタが納まりきらなかった場合には、許容値管
理表3の再配置制御SWをONにして(ステップ101
2)、再配置後も格納範囲が許容値を越えていることを
警告するレポートを出力した後(ステップ1013)、
処理を終了する。
If there is no record in the check in step 1007, it is rechecked whether or not the cluster to be rearranged is stored within the range indicated by the allowable value (steps 1009 and 1010). If the data can be stored within the allowable value range, the rearrangement control SW of the allowable value management table 3 is turned off (step 1011) and the process is terminated. On the other hand, if the cluster is not completely within the allowable value of the storage range even after performing the rearrangement, the rearrangement control SW of the allowable value management table 3 is turned on (step 101
2) After outputting a report warning that the storage range exceeds the allowable value even after relocation (step 1013),
The process ends.

【0035】再配置を行った後でも格納範囲が許容値の
範囲を出ていると言うのは、該当クラスタは、その時の
データベースの条件のもとでは最良の格納状態(そのク
ラスタのレコードだけを、隙間なくブロックの先頭から
詰め込んである状態)であっても、格納範囲の許容値を
越えている状態で、そのクラスタに関しては既に設計時
の予測を超えてレコードが格納されていることを意味し
ている。
The storage range is out of the allowable value range even after the rearrangement is performed, that is, the relevant cluster is in the best storage state (only the records of that cluster are stored under the conditions of the database at that time). , Even if it is packed from the beginning of the block without a gap), it means that the records have already been stored for the cluster in excess of the design limit when the allowable value of the storage range is exceeded. is doing.

【0036】つまり、この部分に関してはデータベース
が設計時の性能を満たさないことになり、このような状
態はデータベースの再設計後、一括処理による再編成、
再構成を行わない限り解消しない。この状態が発生する
と本発明の方式では解消できず、かつ、そのままにして
おくと問題のクラスタの更新が発生する度に、無駄にレ
コードの再配置処理が動作することになる。このため、
一旦再配置を行っても、格納範囲が許容値内に納まらな
い場合には再配置の制御を行うスイッチにより問題とな
るクラスタの再配置処理を抑制している。
In other words, regarding this part, the database does not satisfy the performance at the time of designing, and in such a state, after redesigning the database, reorganization by collective processing,
It will not be resolved unless reconfigured. If this situation occurs, it cannot be solved by the method of the present invention, and if it is left as it is, the relocation processing of records will be uselessly performed every time the problem cluster is updated. For this reason,
Even if the relocation is performed once, if the storage range does not fall within the permissible value, the switch for controlling the relocation suppresses the relocation processing of the problem cluster.

【0037】図11は実際にレコードの再配置を行う場
合の処理の詳細を示した図である。
FIG. 11 is a diagram showing the details of the processing for actually rearranging the records.

【0038】まず、位置付けられているレコードをワー
ク領域からデータベース本体側に戻す(ステップ110
1)。これ以降位置付けられているレコードのことを、
カレントレコードと呼ぶことにする。
First, the positioned record is returned from the work area to the database body side (step 110).
1). Records that have been positioned since
We will call it the current record.

【0039】次に、カレントレコードを親とするセット
があるかどうかを調べる(ステップ1102)。もし、
そのようなセットが存在したならば、そのセットに属す
る最初の子レコードを検索する(ステップ1103)。
子レコード有無をチェックして(ステップ1104)、
子レコードがあるならばその子レコードをカレントレコ
ードとして、レコード再配置処理(図11の処理)を再
帰的に呼び出す(ステップ1105)。
Next, it is checked whether or not there is a set whose parent is the current record (step 1102). if,
If such a set exists, the first child record belonging to that set is searched (step 1103).
Check for child records (step 1104),
If there is a child record, the child record is set as the current record, and the record rearrangement process (process of FIG. 11) is recursively called (step 1105).

【0040】ここで、レコード再配置処理を実行して、
現在カレントになっているレコードを親とするクラスタ
の再配置を完了する。この処理をカレントレコードを親
とするすべてのセットに関するクラスタに対して施すた
めに、ステップ1102〜1105の処理を繰り返す。
Here, the record rearrangement process is executed,
Complete the relocation of the cluster whose parent is the currently current record. In order to perform this process on the clusters related to all the sets having the current record as a parent, the processes of steps 1102 to 1105 are repeated.

【0041】ステップ1102で該当するセットが存在
しなかった場合には、カレントのレコードと同じレベル
のレコード(同じセットで結ばれた子レコード)を検索
して(ステップ1106)、レコードが存在するならば
(ステップ1107)、ステップ1101から処理を繰
り返す。ステップ1107でカレントレコードと同一レ
ベルのレコードが存在しなければレコードの再配置処理
を終了する。
If the corresponding set does not exist in step 1102, a record at the same level as the current record (child record connected by the same set) is searched (step 1106) and if the record exists. If (step 1107), the process is repeated from step 1101. If there is no record at the same level as the current record in step 1107, the record rearrangement process is terminated.

【0042】図7の例を使用して、図11のレコード再
配置の動作を具体的に説明する。まず、初期状態がa)
で、再配置対象のクラスタの最上位のレコードa1がカ
レントレコードとなっている。この状態から再配置対象
のレコードのサーチを行う。最初にa1につながるセッ
トs1をたどって次のレコードb1をカレントレコード
にする(図7のb))。
The operation of the record rearrangement of FIG. 11 will be described in detail using the example of FIG. First, the initial state is a)
Thus, the highest record a1 of the rearrangement target cluster is the current record. From this state, the record to be rearranged is searched. First, the set s1 connected to a1 is traced to make the next record b1 the current record (b in FIG. 7)).

【0043】この状態で図11のレコード再配置の処理
を行う。最初にカレントレコードであるb1がデータベ
ース本体に移される(図7のc))。続いて、b1につ
ながる子レコードの有無を調べる(ステップ1102〜
1104)。b1の場合には子レコードは存在しないの
で、b1以下のレコードの移動(ステップ1105)の
処理はスキップして、セットs1で結ばれた次のレコー
ドb2の検索を行う(ステップ1106〜1107)。
b2もb1と同様に子レコードが付いていないので、b
2のみの移動で終了する。
In this state, the record rearrangement process of FIG. 11 is performed. First, the current record b1 is transferred to the database body (c in FIG. 7)). Then, it is checked whether or not there is a child record connected to b1 (steps 1102 to 1102).
1104). In the case of b1, there is no child record, so the process of moving records b1 and below (step 1105) is skipped, and the next record b2 linked by the set s1 is searched (steps 1106 to 1107).
b2 has no child record like b1, so b
Only move 2 to finish.

【0044】次に、b3をカレントとして(図7の
d))処理を行う。まず、b3をデータベース本体にも
どしてセットs2につながる子レコードの検索を行う。
b3には子レコードが存在するので、セットs2の最初
の子レコードc1をカレントレコードとして、レコード
の再配置の動作を行う(ステップ1105)。b3以下
の子レコードにはさらに下位のレコードはないので、ス
テップ1103〜1105までの動作はスキップされ
て、c1〜c5までのレコードの移動の処理だけが行わ
れる。
Next, processing is performed with b3 as the current (d in FIG. 7). First, b3 is returned to the database body and a child record connected to the set s2 is searched.
Since the child record exists in b3, the record rearrangement operation is performed using the first child record c1 of the set s2 as the current record (step 1105). Since the child records of b3 and below have no further lower records, the operations of steps 1103 to 1105 are skipped and only the processing of moving the records of c1 to c5 is performed.

【0045】図7のfはそのうちc1だけをデータベー
ス本体側に戻した状態で、カレントレコードはc2に移
っており、これからc2自身の移動とc2以下の子レコ
ードの有無のチェックを行うところを表している。c5
まで移動を完了するとc1〜c5と同じレベルのレコー
ドはもう存在しないので、ステップ1105で呼び出さ
れたレコードの再配置処理は終了する。ここまでで、b
3以下のレコードの再配置は完了で、次はb3と同じレ
ベルのレコードが検索されるが、このレコードも存在し
ないので、処理は終了、a1より連なるクラスタの再配
置は終了する。
FIG. 7f shows a state in which only c1 is returned to the database main body, the current record is moved to c2, and c2 itself is moved and the presence or absence of child records below c2 is checked. ing. c5
When the move is completed, the record of the same level as c1 to c5 does not exist anymore, so the relocation processing of the record called in step 1105 ends. Up to this point, b
The rearrangement of the records of 3 or less is completed, and the record of the same level as b3 is searched next. However, since this record does not exist, the processing ends, and the rearrangement of clusters connected from a1 ends.

【0046】図7の例では1つのブロックには8つのレ
コードが格納できるので、例として取り上げたクラスタ
は、再配置前には4ブロックに渡って格納されていたも
のが、2ブロックで済むようになり、再配置により格納
状態が改善されている。
Since eight records can be stored in one block in the example of FIG. 7, the cluster taken as an example can be stored in four blocks before rearrangement, but in two blocks, it will be sufficient. The storage state has been improved by relocation.

【0047】[0047]

【発明の効果】以上、本発明によれば、再配置処理を行
っているブロック以外は、利用者の業務プログラムが自
由に更新・検索を行えるため、利用者は業務処理を停止
することなくデータベースの再編成を行って、格納状態
の乱れを正すことが出来るという効果がある。また、実
際に再編成を起動するタイミングはデータベース制御シ
ステム側で判断して、自動的に再編成を行うため、デー
タベースの格納状態は常に良好な状態に保たれ、業務プ
ログラムの性能低下がほとんど起こらないという効果も
ある。さらに、再編成の自動化に加え、本発明では再編
成が行えない場合にも、その旨を伝える警告レポートが
出力されるため、利用者は再構成の時期を知るために格
納範囲を測定するような特別の処理を行う必要がなくな
るという効果もある。
As described above, according to the present invention, the user's business program can freely update and search, except for the block for which the reallocation processing is performed, so that the user can perform database processing without stopping the business processing. The effect of being able to correct the disorder of the storage state by performing the reorganization of. In addition, the database control system determines when to actually start reorganization, and automatically reorganizes the database. Therefore, the database storage status is always maintained in a good state, and the performance of business programs is not degraded. There is also the effect that there is no. Furthermore, in addition to the automation of reorganization, even if the present invention cannot perform reorganization, a warning report to that effect is output, so the user should measure the storage range in order to know the time of reconstruction. There is also an effect that it is not necessary to perform special processing.

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

【図1】親レコードと子レコード及びセットの関係を表
した概念図である。
FIG. 1 is a conceptual diagram showing a relationship between a parent record, a child record, and a set.

【図2】論理ポインタと物理ポインタの対応を表す概念
図である。
FIG. 2 is a conceptual diagram showing correspondence between a logical pointer and a physical pointer.

【図3】レコード内の制御情報を示した概念図である。FIG. 3 is a conceptual diagram showing control information in a record.

【図4】本発明の一実施例を示す構成図である。FIG. 4 is a configuration diagram showing an embodiment of the present invention.

【図5】許容値管理表の一例を示す説明図である。FIG. 5 is an explanatory diagram showing an example of an allowable value management table.

【図6】本発明の方式によりレコードが再配置されると
きの各レコードの状態を表す摸式図である。
FIG. 6 is a schematic diagram showing a state of each record when the records are rearranged by the method of the present invention.

【図7】図6のうち1クラスタを取り出して再配置手順
をよ詳細に示した摸式図である。
FIG. 7 is a schematic diagram showing in more detail the procedure for extracting and rearranging one cluster in FIG. 6;

【図8】許容値設定手段の動作概要を表すフローチャー
トである。
FIG. 8 is a flowchart showing an outline of operation of an allowable value setting means.

【図9】格納状態監視手段の動作概要を表すフローチャ
ートである。
FIG. 9 is a flowchart showing an outline of operation of a storage status monitoring unit.

【図10】レコード再配置手段の動作概要を表すフロー
チャートである。
FIG. 10 is a flowchart showing an outline of operation of a record rearrangement unit.

【図11】レコードの再配置の動作を表すフローチャー
トである。
FIG. 11 is a flowchart showing an operation of relocation of records.

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

1 許容値設定手段 2 定義情報 3 許容値管理表 4 格納状態監視手段 5 レコード再配置手段 6 警告レポート 7 DBMS 8 データベース 1 Allowable value setting means 2 Definition information 3 Allowable value management table 4 Storage status monitoring means 5 Record rearrangement means 6 Warning report 7 DBMS 8 Database

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 補助記憶装置上に格納された複数種類の
形式を持つレコード間のセットを、レコードの格納アド
レスを利用したポインタを用いて鎖状に連結することに
より表現しているデータベースで、1つのレコード内に
上記セット内でのレコードの論理出現順序を表す論理ポ
インタと、セット内での物理出現順序を表す物理ポイン
タとを持ち、レコードの更新時に更新処理に加えて必要
に応じて物理ポインタの繋ぎ変え処理を行うデータベー
ス管理システムにおいて、データベースの設計時に予測
された1つのセットに含まれる平均レコード件数より算
出する1つのセットに属するレコードに許される格納範
囲の管理を行う許容値設定手段と、上記許容値設定手段
により設定された格納範囲の許容値に基づき各論理ポイ
ンタで結ばれたレコードの格納範囲を物理ポインタを利
用して格納範囲の割り出しを行うことにより監視し必要
に応じてレコードの再配置手段を呼び出す格納状態監視
手段と、あるセットに属するレコードの格納範囲が上記
許容値設定手段により設定された値を越えた場合に上記
格納状態監視手段より起動され対象レコード群の再配置
を行うレコード再配置手段とを備えたことを特徴とする
データベース制御システム。
1. A database that expresses a set between records stored in an auxiliary storage device and having a plurality of formats by connecting them in a chain using a pointer using the storage address of the record, One record has a logical pointer indicating the logical appearance order of the records in the set and a physical pointer indicating the physical appearance order of the set, and the physical pointer is added as necessary in addition to the update processing when updating the record. In a database management system that performs pointer reconnection processing, an allowable value setting means that manages a storage range allowed for records belonging to one set calculated from the average number of records included in one set predicted at the time of designing a database. And the record connected by each logical pointer based on the allowable value of the storage range set by the allowable value setting means. The storage range of the record is monitored by determining the storage range by using the physical pointer, and the storage state monitoring means for calling the record rearrangement means as necessary, and the storage range of the record belonging to a certain set are allowed above. A database control system comprising: a record rearrangement unit that is activated by the storage state monitoring unit to rearrange a target record group when the value set by the value setting unit is exceeded.
JP4112420A 1992-04-06 1992-04-06 Data base control system Pending JPH05289914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4112420A JPH05289914A (en) 1992-04-06 1992-04-06 Data base control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4112420A JPH05289914A (en) 1992-04-06 1992-04-06 Data base control system

Publications (1)

Publication Number Publication Date
JPH05289914A true JPH05289914A (en) 1993-11-05

Family

ID=14586208

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4112420A Pending JPH05289914A (en) 1992-04-06 1992-04-06 Data base control system

Country Status (1)

Country Link
JP (1) JPH05289914A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100846541B1 (en) * 2001-10-31 2008-07-15 주식회사 케이티 Method and apparatus for dropping columns of database tables

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100846541B1 (en) * 2001-10-31 2008-07-15 주식회사 케이티 Method and apparatus for dropping columns of database tables

Similar Documents

Publication Publication Date Title
US5806058A (en) Index managing method in database managing system
US7174345B2 (en) Methods and systems for auto-partitioning of schema objects
US20040267782A1 (en) Database system
US6584457B1 (en) Parallel data base record distribution method and parallel data base management system
US7801932B2 (en) Undo hints to speed up segment extension and tuning of undo retention
JP4101410B2 (en) Time version data storage device
US7269589B2 (en) Database managing method and system having data backup function and associated programs
US8682872B2 (en) Index page split avoidance with mass insert processing
US20070250517A1 (en) Method and Apparatus for Autonomically Maintaining Latent Auxiliary Database Structures for Use in Executing Database Queries
JPH039494B2 (en)
JP3378594B2 (en) Processing unit that performs database relocation
JPH05289914A (en) Data base control system
JP2624170B2 (en) Logical deletion data physical deletion method
US20070174329A1 (en) Presenting a reason why a secondary data structure associated with a database needs rebuilding
JPH052515A (en) Database optimization reorganization method
JPH0456344B2 (en)
US8510269B2 (en) Uninterrupted database index reorganization/movement
JP2962335B2 (en) Free space search method
JPH11110262A (en) Information management system
US20040193654A1 (en) Logical range logging
JPS62287350A (en) Index integrally updating system
JPH07143227A (en) Network element software update control method
JP4402891B2 (en) Database system
JPH05242176A (en) Generation control system for drawing
JPH0877047A (en) Database backup method