JPS62242249A - Reorganizing system for data base file having expanded space - Google Patents

Reorganizing system for data base file having expanded space

Info

Publication number
JPS62242249A
JPS62242249A JP61084923A JP8492386A JPS62242249A JP S62242249 A JPS62242249 A JP S62242249A JP 61084923 A JP61084923 A JP 61084923A JP 8492386 A JP8492386 A JP 8492386A JP S62242249 A JPS62242249 A JP S62242249A
Authority
JP
Japan
Prior art keywords
file
calc
database
records
data base
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.)
Granted
Application number
JP61084923A
Other languages
Japanese (ja)
Other versions
JPH0760405B2 (en
Inventor
Takuji Tomiyama
卓二 富山
Eizo Okada
岡田 英三
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
NEC Solution Innovators Ltd
Original Assignee
NEC Corp
NEC Solution Innovators 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 NEC Corp, NEC Solution Innovators Ltd filed Critical NEC Corp
Priority to JP61084923A priority Critical patent/JPH0760405B2/en
Publication of JPS62242249A publication Critical patent/JPS62242249A/en
Publication of JPH0760405B2 publication Critical patent/JPH0760405B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve access efficiency by counting the number of calc control records in a file during reorganizing process and changing automatically the information of data base catalog as well. CONSTITUTION:A logical image record file 1 is developed on a memory by a logical image record input means 2. A page form editing device 3 makes reorganization by the number of calc control records per file calculated by using the number of calc controlling records per page and the number of pages (number of pages after expansion) as the information possessed by a data base catalog 7. A data base catalog changing means 4 changes the data base catalog by referring to one edited to page form (number of calc controlling records), and a page form output means 5 outputs one edited to page form to a data base film 6. Thus calc records are uniformly dispersed in the file and the access efficiency is improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データベースファイルの再編成に関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to reorganization of database files.

〔従来の技術〕[Conventional technology]

データベースを構成するファイルの物理属性。 Physical attributes of the files that make up the database.

論理属性を管理しているデータベースカタログには、カ
ルクレコードの格納を制御するカルク制御レコードが被
−ジ当たシ幾つ存在するか、また。
How many calc control records that control the storage of calc records exist per target in the database catalog that manages logical attributes?

先頭のに一ノから何ページまでカルク制御レコードが存
在するかの情報と、ファイル内に割シ付けられている総
ページ数の情報とを持っている。
It has information on how many pages of calc control records exist starting from the first page, and information on the total number of pages allocated in the file.

ファイルが最初に登録された時点では、カルク制御レコ
ードは1ペーノから最終に一ノまで存在している。とこ
ろが、その後、ファイルが拡張されると、即ち、スペー
スが拡張され、ページが増されると、この拡張された被
−ジには、カルク制御レコードは存在できない。
When a file is first registered, calc control records exist from 1 pageo to 1 pageo. However, if the file is subsequently expanded, that is, the space is expanded and pages are added, no calc control record can exist in this expanded target.

ところで、従来、スR−スが拡張されたデータベースフ
ァイルの再編成は、拡張していないデータベースファイ
ルの再編成と同様に、再編成前のカルク制御レコードの
情報をもとにしてレコード格納ページを算出し格納を行
っている。そのため。
By the way, conventionally, when reorganizing a database file whose space has been expanded, record storage pages are reorganized based on the information in the calc control record before the reorganization, similar to when reorganizing a database file that has not been expanded. It is calculated and stored. Therefore.

拡張されたファイルの再編成をファイルの再登録(デア
ロケート、アロケート)なしに行うと、前述のように、
カルク制御レコードは拡張前のベースにしか格納されな
いため、カルク1/コードがファイル全体に均等分散さ
れない。このため、カルクレコードを均等分散させるに
は、ファイルを再登録する必要がある。
If you reorganize the extended file without reregistering (deallocating, allocating) the file, as mentioned above,
Because calc control records are only stored in the pre-expansion base, calc 1/codes are not evenly distributed throughout the file. Therefore, in order to evenly distribute the calc records, it is necessary to re-register the file.

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

上述のように、従来の再編成処理では、ファイルの拡張
を行ったファイルであっても、再編成前のデータベース
カタログの情報によシカルクンコードの再格納を行って
いる。従って、セットオカレンスがファイル内に均等に
格納されず、その結果、レコード間チェインがページ間
にまたがることが多く、データベースファイルに対する
アクセス効率か悪いという問題点がある。
As described above, in the conventional reorganization process, even if the file has been expanded, the sical code is re-stored based on the information in the database catalog before reorganization. Therefore, set occurrences are not stored evenly within a file, and as a result, inter-record chains often span between pages, resulting in a problem of poor access efficiency to the database file.

〔問題点を解決する手段〕[Means to solve problems]

本発明によるデータベースファイルの再編成方式はデー
タベースファイルへのノコ−1’挿入処理でファイルが
オーバフローしたとか、オーバフローに至ることが予想
される場合に、既知レコードが格納されている領域に対
して空きのスペースを追加し、その後は継続してレコー
ドが挿入できるようになるファイルシステムでl拡張さ
れたデータベースファイルの再編成において、データベ
ースファイルから退避したロジカルレコードイメージを
入力するロジカルVコードイメーノ入力手段ト、データ
ベースファイルのファイル属性を管理しているデータベ
ースカタログからファイル内の総べ7ノ数と1−2−ジ
あたシに格納すべきカルク制御レコードの数とファイル
の拡張前に格納されていたカルク制御レコードのファイ
ルの先頭からの数とを得て前記入力手段で入力したロジ
カルイメージを、拡張後のファイル上でカルク制御レコ
ードがファイルの全体だ均等に分散されるようにぜ−ノ
イメーノに編集する被−ジ形式編集手段と。
The database file reorganization method according to the present invention is to create free space in the area where known records are stored when the file overflows or is expected to overflow during saw-1' insertion processing into the database file. Logical V-code image input means for inputting logical record images saved from the database file when reorganizing an expanded database file with a file system that allows records to be inserted continuously after adding space. In addition, from the database catalog that manages the file attributes of the database file, the total number of records in the file, the number of calc control records that should be stored in the file, and the number of calc control records that should be stored before the file is expanded. The number of calculated calc control records from the beginning of the file is obtained, and the logical image inputted by the input means is adjusted so that the calc control records are evenly distributed throughout the file after expansion. A target format editing means for editing.

この編集手段によって、ファイルの先頭から連続して格
納されたカルク制却レコードの数が増大したためデータ
ベースカタログに記憶されているカルク制御レコーrの
値を変更するデータベースカタログ変更手段と、前記編
集手段によって作成されたに一ノイメージをデー・タペ
ースに出力するページ形式出力手段とを有している。
A database catalog changing means for changing the value of the calc control record r stored in the database catalog due to an increase in the number of calc control records stored consecutively from the beginning of the file by the editing means; It has a page format output means for outputting the created image to a data tape.

〔実施例〕〔Example〕

以下本発明について実施例てよって説明する。 The present invention will be explained below with reference to examples.

第1図に本発明によるデータベースファイル再編成方式
の一実施例を示す。第1図を参照して。
FIG. 1 shows an embodiment of a database file reorganization method according to the present invention. Referring to FIG.

被−・り形式のデータベースをロゾカルイメーノ化した
ロノカルイメージレコードファイル1はロジカルイメー
ジレコード入力手段2によってメモリ(図示せず)上に
展開される。更に被−ジ形弐編集手段3はこのメモリ上
に展開されたレコードをデータベースカタログ7を参照
してデータベースファイルの格納形式であるベース形式
に編集する。
A logical image record file 1 obtained by converting a database in a logical image format into a logical image format is developed on a memory (not shown) by a logical image record input means 2. Furthermore, the data format 2 editing means 3 edits the records developed on the memory into a base format which is a storage format of a database file by referring to the database catalog 7.

データベースカタログ変更手段4はに−・ゾ形式に編集
されたもの(即ち、カルク制脚レコード数)を参照して
、データベースカタログの変更を行う。
The database catalog changing means 4 changes the database catalog by referring to the data edited in the NI-Z format (ie, the number of calc-controlled records).

そしてページ形式出力手段5はベース形式に編集された
ものをデータベースファイル6て出力する。
Then, the page format output means 5 outputs the edited data in the base format as a database file 6.

入力したロジカルイメージレコードをベース形式に編集
する時、即ち、ページ形式編集手段はデータベースカタ
ログ7を読み、現在登録されているデータベースファイ
ルの情報を得て、格納方法を次の(1)式の計算によシ
求め、ロゾ力ルイメーノツコードをに一ノ形式に編集し
ている。
When editing the input logical image record into the base format, that is, the page format editing means reads the database catalog 7, obtains information on the currently registered database file, and calculates the storage method using the following equation (1). At his request, he edited Rozo's code into a new format.

・・・・・・・・・・・・(1) (1)式において、右辺はデータベースカタログに含ま
れている情報であり 、 d−ノ当たシのカルク制御レ
コード数とはカルクレコードの格納を制御するカルク制
御レコードが4−ノ内て幾つ存在するかを示す。また、
ファイル内のページ数とは。
・・・・・・・・・・・・(1) In equation (1), the right side is the information contained in the database catalog, and the number of calc control records for d-no hit is the number of calc records. Indicates how many calc control records out of 4 exist that control storage. Also,
What is the number of pages in a file?

ファイルかページ分割される際に何ページに分割するか
を示す。この2つの情報は、データベースファイル登録
時に指定されたものである。
Indicates how many pages a file will be divided into pages. These two pieces of information were specified when registering the database file.

一方、(1)式の左辺のファイル当たりのカルク制御レ
コード数とはカルク制御レコードが1ページから何ペー
ジまで格納されているかを示す値である。拡張していな
いファイルではこの値、即ち。
On the other hand, the number of calc control records per file on the left side of equation (1) is a value indicating the number of pages from 1 page of calc control records stored. For unexpanded files this value, ie.

ファイル当たシのカルク制御レコード数は(1)式が成
り立つ。ところが第2図(1)の拡張したファイルでは
、拡張されたイーノにはカルク制御レコードが存在でき
ない状態になるため(1)式は成シ立たない。そして、
第2図(2)の状態でデータベースファイルの更新を行
うと第2図(3)のように、カルクレコードが均等分散
されず、従って、ファイルのアクセス効率が悪い。また
、このファイル当たりのカルク制御レコードも上述の(
1)式の右辺の項目と同様に、ファイルの登録時に決定
する値なので従来、再編成を行っても、ファイルの再登
録をしない限シカルクレコードは均等分散されない。
Equation (1) holds for the number of calc control records per file. However, in the expanded file shown in FIG. 2 (1), the calc control record cannot exist in the expanded ENO, so equation (1) does not hold true. and,
If the database file is updated in the state shown in FIG. 2 (2), the calc records will not be evenly distributed as shown in FIG. 2 (3), resulting in poor file access efficiency. Additionally, the calc control record per file is also
Similar to the item on the right side of equation 1), this is a value determined at the time of file registration, so conventionally, even if reorganization is performed, the records are not evenly distributed unless the file is re-registered.

一方、に−ノ形式編集手段3はデータベースカタログ7
に持つ情報として被−ノ当たシのカルク制御レコード数
とファイル内のに−・ゾ数(拡張後のページ数)とを使
用し、(1)式を利用して算出したファイル当たりのカ
ルク制御レコード数により。
On the other hand, the Ni-no format editing means 3 uses the database catalog 7
Calculation per file calculated using formula (1) using the number of calc control records in the target file and the number of pages in the file (number of pages after expansion) as information held in the file. By number of control records.

再編成を行なう。従って、第2図(4)のようにカルク
レコードがファイル内に均等分散されるため。
Perform reorganization. Therefore, the calc records are evenly distributed within the file as shown in Figure 2 (4).

アクセス効率の向上ができる。Access efficiency can be improved.

ページ形式編集手段3で、(1)式によシ算出され。It is calculated by the page format editing means 3 using equation (1).

手段4によりデータベースカタログ7の更新が行なわれ
る。従って本方式の使用によシフアイルの再登録を行な
わなくても、実ファイルとデータベースカタログの同期
がとれ、しかも、アクセス効率の良いデータ格納ができ
る。
The means 4 updates the database catalog 7. Therefore, by using this method, the real file and the database catalog can be synchronized without reregistering the file, and data can be stored with high access efficiency.

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

以上説明したように、従来の方式で拡張ファイルを再編
成する場合、データベースファイルのアクセス効率を向
上させるためには、ファイルを再登録(ディアロケート
、アロケート)する必要があるが9本方式の再編成を使
用することによシフアイルを再登録しなくても、拡張フ
ァイルを自動的にアクセス効率の良いファイルにするこ
とができる。
As explained above, when reorganizing extended files using the conventional method, it is necessary to re-register (diallocate, allocate) the files in order to improve the access efficiency of database files. By using organization, extended files can be automatically made into files with high access efficiency without having to re-register the file.

本発明では、再編成処理中にファイル中のカルク制御レ
コード数を計算しデータベースカタログの情報も自動的
に変更するため、上記のような特別な手段を必要とせず
にアクセス効率の向上を図ることができる。
In the present invention, the number of calc control records in the file is calculated during the reorganization process and the information in the database catalog is automatically changed, so that access efficiency can be improved without the need for the above-mentioned special means. I can do it.

以下余日Remaining days below

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

第1図は本発明の構成の一実施例を示す図、第2図は本
発明の詳細な説明するための図である。 1・・・ロジカルイメージレコードファイル、2・・・
ロジカルイメージレコード入力手段、3・・・ページ形
式編集手段、4・・・データベースカタログ変更手段、
5・・・K−ジ形式出力手段、6・・・データベースフ
ァイル、7・・・データベースカタログ。
FIG. 1 is a diagram showing an embodiment of the configuration of the present invention, and FIG. 2 is a diagram for explaining the present invention in detail. 1... Logical image record file, 2...
Logical image record input means, 3... page format editing means, 4... database catalog changing means,
5... K-zi format output means, 6... Database file, 7... Database catalog.

Claims (1)

【特許請求の範囲】[Claims] 1、データベースファイルへのレコード挿入処理でファ
イルがオーバフローしたとか、オーバフローに至ること
が予想される場合に、既にレコードが格納されている領
域に対して空きのスペースを追加し、その後は継続して
レコードが挿入できるようになるファイルシステムで拡
張されたデータベースファイルの再編成において、デー
タベースファイルから退避したロジカルレコードイメー
ジを入力するロジカルレコードイメージ入力手段と、デ
ータベースファイルのファイル属性を管理しているデー
タベースカタログからファイル内の総ページ数と1ペー
ジあたり格納すべきカルク制御レコードの数とファイル
の拡張前に格納されていたカルク制御レコードのファイ
ルの先頭からの数とを得て前記入力手段で入力したロジ
カルイメージを、拡張後のファイル上でカルク制御レコ
ードがファイルの全体に均等に分散されるようにページ
イメージに編集するページ形式編集手段と、該編集手段
によって、ファイルの先頭から連続して格納されたカル
ク制御レコードの数が増大したためデータベースカタロ
グに記憶されているカルク制御レコードの値を変更する
データベースカタログ変更手段と、前記編集手段によっ
て作成されたページイメージをデータベースに出力する
ページ形式出力手段とを有することを特徴とするスペー
スが拡張されたデータベースファイルの再編成方式。
1. If the file overflows or is expected to overflow during record insertion processing into the database file, add free space to the area where records are already stored, and then continue. A logical record image input means for inputting the logical record image saved from the database file when reorganizing the database file expanded by the file system that allows records to be inserted, and a database catalog that manages the file attributes of the database file. The total number of pages in the file, the number of calc control records to be stored per page, and the number of calc control records stored before file expansion from the beginning of the file are obtained from the logical input means input by the input means. page format editing means for editing the image into a page image so that the calc control records are evenly distributed throughout the file after expansion; The database catalog changing means changes the value of the calc control record stored in the database catalog due to an increase in the number of calc control records, and the page format output means outputs the page image created by the editing means to the database. A database file reorganization method with expanded space characterized by:
JP61084923A 1986-04-15 1986-04-15 Reorganization method of database base with expanded space Expired - Lifetime JPH0760405B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61084923A JPH0760405B2 (en) 1986-04-15 1986-04-15 Reorganization method of database base with expanded space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61084923A JPH0760405B2 (en) 1986-04-15 1986-04-15 Reorganization method of database base with expanded space

Publications (2)

Publication Number Publication Date
JPS62242249A true JPS62242249A (en) 1987-10-22
JPH0760405B2 JPH0760405B2 (en) 1995-06-28

Family

ID=13844222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61084923A Expired - Lifetime JPH0760405B2 (en) 1986-04-15 1986-04-15 Reorganization method of database base with expanded space

Country Status (1)

Country Link
JP (1) JPH0760405B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963959B2 (en) 2002-10-31 2005-11-08 International Business Machines Corporation Storage system and method for reorganizing data to improve prefetch effectiveness and reduce seek distance

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963959B2 (en) 2002-10-31 2005-11-08 International Business Machines Corporation Storage system and method for reorganizing data to improve prefetch effectiveness and reduce seek distance
US7076619B2 (en) 2002-10-31 2006-07-11 International Business Machines Corporation Storage system and method for reorganizing data to improve prefetch effectiveness and reduce seek distance

Also Published As

Publication number Publication date
JPH0760405B2 (en) 1995-06-28

Similar Documents

Publication Publication Date Title
JPS62242249A (en) Reorganizing system for data base file having expanded space
EP0633531A1 (en) Memory management system and method
JP3169596B2 (en) Database management device
US5978810A (en) Data management system and method for storing a long record in a set of shorter keyed records
JPH0296277A (en) Picture data control system
JPS62221048A (en) Method for extending area of continuous file
JPS63239540A (en) Data management system in memory medium
JP2874810B2 (en) Key memory allocation method
JPS6129955A (en) Information accumulating method in postscript type medium
JPS60103461A (en) Substitute key control processing system using plural items
JPS6125256A (en) File shunt system
JPH0398110A (en) Multiplex data reading system
JPS59119386A (en) Buffer area controlling system
JPH0310341A (en) Disk space compaction system
JPH02116936A (en) Reorganizing system
JPH0337748A (en) External storage accessing system utilizing main storage
JPH0457153A (en) Structured document processing system
JPH02191019A (en) File storing method, file read method and file editing method
JPH03282841A (en) Direct input/output processing system for variable length record
JPH0432419B2 (en)
JPH0652495B2 (en) Message text editing control method
JPH02291069A (en) Ruled line output system
JPH04350741A (en) Access speed increasing method for indexed sequential file
JPH0324618A (en) Record ascending order adder
JPH01177649A (en) System for managing file